1 /* AbiSource 2 * 3 * Copyright (C) 2005 INdT 4 * Author: Daniel d'Andrada T. de Carvalho <daniel.carvalho@indt.org.br> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 2 9 * of the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 * 02110-1301 USA. 20 */ 21 22 #ifndef ODE_STYLE_LIST_H_ 23 #define ODE_STYLE_LIST_H_ 24 25 // AbiWord includes 26 #include <ut_hash.h> 27 #include <ut_string_class.h> 28 29 // External includes 30 #include <gsf/gsf-output.h> 31 32 // Internal classes 33 class ODe_ListLevelStyle; 34 35 // AbiWord classes 36 class PP_AttrProp; 37 38 /** 39 * Represents a <text:list-style> element. 40 */ 41 class ODe_Style_List { 42 public: 43 44 virtual ~ODe_Style_List(); 45 46 // Write this <text:list-style> element. 47 bool write(GsfOutput* pODT, const UT_UTF8String& rSpacesOffset) const; 48 setName(const UT_UTF8String & rName)49 void setName(const UT_UTF8String& rName) { m_name = rName; } getName()50 const UT_UTF8String& getName() const {return m_name;} 51 52 void setLevelStyle(UT_uint8 level, const PP_AttrProp& rBlockAP); 53 const ODe_ListLevelStyle* getLevelStyle(UT_uint8 level) const; 54 getListLevelStyles()55 UT_GenericVector<ODe_ListLevelStyle*>* getListLevelStyles() { 56 return m_levelStyles.enumerate(); 57 } 58 59 private: 60 // style:name attribute 61 UT_UTF8String m_name; 62 63 // text:consecutive-numbering attribute 64 bool m_bConsecutiveNumbering; 65 66 UT_GenericStringMap<ODe_ListLevelStyle*> m_levelStyles; 67 }; 68 69 #endif /*ODE_STYLE_LIST_H_*/ 70