xref: /AOO41X/main/xmloff/inc/xmloff/txtstyli.hxx (revision ecfe53c5d1886e1e0d215b0d140d05282ab1c477)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _XMLOFF_TXTSTYLI_HXX_
24 #define _XMLOFF_TXTSTYLI_HXX_
25 
26 #include "sal/config.h"
27 #include "xmloff/dllapi.h"
28 #include <xmloff/prstylei.hxx>
29 
30 class SvXMLTokenMap;
31 class XMLEventsImportContext;
32 
33 class XMLOFF_DLLPUBLIC XMLTextStyleContext : public XMLPropStyleContext
34 {
35     ::rtl::OUString             sListStyleName;
36     ::rtl::OUString             sCategoryVal;
37     ::rtl::OUString             sDropCapTextStyleName;
38     ::rtl::OUString             sMasterPageName;
39     ::rtl::OUString             sDataStyleName; // for grid columns only
40     const ::rtl::OUString       sIsAutoUpdate;
41     const ::rtl::OUString       sCategory;
42     const ::rtl::OUString       sNumberingStyleName;
43     const ::rtl::OUString       sOutlineLevel; //#outline level,add by zhaojianwei
44 
45 public:
46     const ::rtl::OUString       sDropCapCharStyleName;
47 private:
48     const ::rtl::OUString       sPageDescName;
49 
50     sal_Int8    nOutlineLevel;
51 
52     sal_Bool    bAutoUpdate : 1;
53     sal_Bool    bHasMasterPageName : 1;
54 
55     sal_Bool bHasCombinedCharactersLetter : 1;
56 
57     // --> OD 2006-09-21 #i69523#
58     // introduce import of empty list style
59     sal_Bool mbListStyleSet : 1;
60     // <--
61 
62     XMLEventsImportContext* pEventContext;
63 
64 protected:
65 
66     virtual void SetAttribute( sal_uInt16 nPrefixKey,
67                                const ::rtl::OUString& rLocalName,
68                                const ::rtl::OUString& rValue );
69 
70 public:
71 
72     TYPEINFO();
73 
74     XMLTextStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
75             const ::rtl::OUString& rLName,
76             const ::com::sun::star::uno::Reference<
77                 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
78             SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
79             sal_Bool bDefaultStyle = sal_False );
80     virtual ~XMLTextStyleContext();
81 
82     virtual SvXMLImportContext *CreateChildContext(
83             sal_uInt16 nPrefix,
84             const ::rtl::OUString& rLocalName,
85             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
86 
IsAutoUpdate() const87     sal_Bool IsAutoUpdate() const { return bAutoUpdate; }
88 
GetListStyle() const89     const ::rtl::OUString& GetListStyle() const { return sListStyleName; }
90     // --> OD 2006-10-13 #i69629#
IsListStyleSet() const91     sal_Bool IsListStyleSet() const
92     {
93         return mbListStyleSet;
94     }
95     // <--
GetMasterPageName() const96     const ::rtl::OUString& GetMasterPageName() const { return sMasterPageName; }
HasMasterPageName() const97     sal_Bool HasMasterPageName() const { return bHasMasterPageName; }
GetDropCapStyleName() const98     const ::rtl::OUString& GetDropCapStyleName() const { return sDropCapTextStyleName; }
GetDataStyleName() const99     const ::rtl::OUString& GetDataStyleName() const { return sDataStyleName; }
100 
101     virtual void CreateAndInsert( sal_Bool bOverwrite );
102     virtual void Finish( sal_Bool bOverwrite );
103     virtual void SetDefaults();
104 
105     // overload FillPropertySet, so we can get at the combined characters
106     virtual void FillPropertySet(
107             const ::com::sun::star::uno::Reference<
108                 ::com::sun::star::beans::XPropertySet > & rPropSet );
109 
HasCombinedCharactersLetter()110     inline sal_Bool HasCombinedCharactersLetter()
111         { return bHasCombinedCharactersLetter; }
112 
_GetProperties()113     const ::std::vector< XMLPropertyState > & _GetProperties() { return GetProperties(); }
114 };
115 
116 #endif
117