1 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */ 2 3 /* AbiSource 4 * 5 * Copyright (C) 2007 Philippe Milot <PhilMilot@gmail.com> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 20 * 02110-1301 USA. 21 */ 22 23 #ifndef _OXML_ELEMENT_TEXT_H_ 24 #define _OXML_ELEMENT_TEXT_H_ 25 26 // Internal includes 27 #include <OXML_Element.h> 28 #include <ie_exp_OpenXML.h> 29 30 // AbiWord includes 31 #include <ut_types.h> 32 #include <ut_string.h> 33 #include <pd_Document.h> 34 35 class OXML_Element_Text : public OXML_Element 36 { 37 public: 38 OXML_Element_Text(); 39 OXML_Element_Text(const gchar * text, int length); 40 virtual ~OXML_Element_Text(); 41 setCharRange(OXML_CharRange range)42 inline void setCharRange(OXML_CharRange range) { m_range = range; } getCharRange()43 inline OXML_CharRange getCharRange() { return m_range; } 44 45 void setText(const gchar * text, int length); 46 const UT_UCS4Char * getText_UCS4String(); 47 const char* getText(); 48 49 virtual UT_Error serialize(IE_Exp_OpenXML* exporter); 50 virtual UT_Error addToPT(PD_Document * pDocument); 51 private: 52 UT_UCS4String * m_pString; 53 OXML_CharRange m_range; 54 }; 55 56 #endif //_OXML_ELEMENT_TEXT_H_ 57 58