1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _XMLOFF_TXTSTYLI_HXX_ 28 #define _XMLOFF_TXTSTYLI_HXX_ 29 30 #include "sal/config.h" 31 #include "xmloff/dllapi.h" 32 #include <xmloff/prstylei.hxx> 33 34 class SvXMLTokenMap; 35 class XMLEventsImportContext; 36 37 class XMLOFF_DLLPUBLIC XMLTextStyleContext : public XMLPropStyleContext 38 { 39 ::rtl::OUString sListStyleName; 40 ::rtl::OUString sCategoryVal; 41 ::rtl::OUString sDropCapTextStyleName; 42 ::rtl::OUString sMasterPageName; 43 ::rtl::OUString sDataStyleName; // for grid columns only 44 const ::rtl::OUString sIsAutoUpdate; 45 const ::rtl::OUString sCategory; 46 const ::rtl::OUString sNumberingStyleName; 47 const ::rtl::OUString sOutlineLevel; //#outline level,add by zhaojianwei 48 49 public: 50 const ::rtl::OUString sDropCapCharStyleName; 51 private: 52 const ::rtl::OUString sPageDescName; 53 54 sal_Int8 nOutlineLevel; 55 56 sal_Bool bAutoUpdate : 1; 57 sal_Bool bHasMasterPageName : 1; 58 59 sal_Bool bHasCombinedCharactersLetter : 1; 60 61 // --> OD 2006-09-21 #i69523# 62 // introduce import of empty list style 63 sal_Bool mbListStyleSet : 1; 64 // <-- 65 66 XMLEventsImportContext* pEventContext; 67 68 protected: 69 70 virtual void SetAttribute( sal_uInt16 nPrefixKey, 71 const ::rtl::OUString& rLocalName, 72 const ::rtl::OUString& rValue ); 73 74 public: 75 76 TYPEINFO(); 77 78 XMLTextStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 79 const ::rtl::OUString& rLName, 80 const ::com::sun::star::uno::Reference< 81 ::com::sun::star::xml::sax::XAttributeList > & xAttrList, 82 SvXMLStylesContext& rStyles, sal_uInt16 nFamily, 83 sal_Bool bDefaultStyle = sal_False ); 84 virtual ~XMLTextStyleContext(); 85 86 virtual SvXMLImportContext *CreateChildContext( 87 sal_uInt16 nPrefix, 88 const ::rtl::OUString& rLocalName, 89 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 90 91 sal_Bool IsAutoUpdate() const { return bAutoUpdate; } 92 93 const ::rtl::OUString& GetListStyle() const { return sListStyleName; } 94 // --> OD 2006-10-13 #i69629# 95 sal_Bool IsListStyleSet() const 96 { 97 return mbListStyleSet; 98 } 99 // <-- 100 const ::rtl::OUString& GetMasterPageName() const { return sMasterPageName; } 101 sal_Bool HasMasterPageName() const { return bHasMasterPageName; } 102 const ::rtl::OUString& GetDropCapStyleName() const { return sDropCapTextStyleName; } 103 const ::rtl::OUString& GetDataStyleName() const { return sDataStyleName; } 104 105 virtual void CreateAndInsert( sal_Bool bOverwrite ); 106 virtual void Finish( sal_Bool bOverwrite ); 107 virtual void SetDefaults(); 108 109 // overload FillPropertySet, so we can get at the combined characters 110 virtual void FillPropertySet( 111 const ::com::sun::star::uno::Reference< 112 ::com::sun::star::beans::XPropertySet > & rPropSet ); 113 114 inline sal_Bool HasCombinedCharactersLetter() 115 { return bHasCombinedCharactersLetter; } 116 117 const ::std::vector< XMLPropertyState > & _GetProperties() { return GetProperties(); } 118 }; 119 120 #endif 121