xref: /aoo41x/main/xmloff/source/text/txtparai.hxx (revision ecfe53c5)
1*ecfe53c5SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ecfe53c5SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ecfe53c5SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ecfe53c5SAndrew Rist  * distributed with this work for additional information
6*ecfe53c5SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ecfe53c5SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ecfe53c5SAndrew Rist  * "License"); you may not use this file except in compliance
9*ecfe53c5SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*ecfe53c5SAndrew Rist  *
11*ecfe53c5SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*ecfe53c5SAndrew Rist  *
13*ecfe53c5SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ecfe53c5SAndrew Rist  * software distributed under the License is distributed on an
15*ecfe53c5SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ecfe53c5SAndrew Rist  * KIND, either express or implied.  See the License for the
17*ecfe53c5SAndrew Rist  * specific language governing permissions and limitations
18*ecfe53c5SAndrew Rist  * under the License.
19*ecfe53c5SAndrew Rist  *
20*ecfe53c5SAndrew Rist  *************************************************************/
21*ecfe53c5SAndrew Rist 
22*ecfe53c5SAndrew Rist 
23cdf0e10cSrcweir #ifndef _XMLOFF_TEXTPARAI_HXX_
24cdf0e10cSrcweir #define _XMLOFF_TEXTPARAI_HXX_
25cdf0e10cSrcweir 
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h>
28cdf0e10cSrcweir #include <xmloff/xmlictxt.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir class XMLHints_Impl;
31cdf0e10cSrcweir namespace com { namespace sun { namespace star {
32cdf0e10cSrcweir namespace text {  class XTextRange; }
33cdf0e10cSrcweir namespace xml { namespace sax { class XAttributeList; } }
34cdf0e10cSrcweir } } }
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #define CONV_FROM_STAR_BATS 1
37cdf0e10cSrcweir #define CONV_FROM_STAR_MATH 2
38cdf0e10cSrcweir #define CONV_STAR_FONT_FLAGS_VALID 4
39cdf0e10cSrcweir 
40cdf0e10cSrcweir class XMLParaContext : public SvXMLImportContext
41cdf0e10cSrcweir {
42cdf0e10cSrcweir 	::com::sun::star::uno::Reference <
43cdf0e10cSrcweir 		::com::sun::star::text::XTextRange > xStart;	// xub_StrLen nStart;
44cdf0e10cSrcweir 	::rtl::OUString				sStyleName;
45cdf0e10cSrcweir     ::rtl::OUString             m_sXmlId;
46cdf0e10cSrcweir     ::rtl::OUString             m_sAbout;
47cdf0e10cSrcweir     ::rtl::OUString             m_sProperty;
48cdf0e10cSrcweir     ::rtl::OUString             m_sContent;
49cdf0e10cSrcweir     ::rtl::OUString             m_sDatatype;
50cdf0e10cSrcweir     bool                        m_bHaveAbout;
51cdf0e10cSrcweir 	sal_Int8 				nOutlineLevel;
52cdf0e10cSrcweir 	XMLHints_Impl			*pHints;
53cdf0e10cSrcweir     // --> OD 2007-07-25 #i73509#
54cdf0e10cSrcweir     sal_Bool                mbOutlineLevelAttrFound;
55cdf0e10cSrcweir     // <--
56cdf0e10cSrcweir 	sal_Bool				bIgnoreLeadingSpace;
57cdf0e10cSrcweir 	sal_Bool				bHeading;
58cdf0e10cSrcweir     sal_Bool                bIsListHeader;
59cdf0e10cSrcweir     sal_Bool                bIsRestart;
60cdf0e10cSrcweir     sal_Int16               nStartValue;
61cdf0e10cSrcweir 	sal_uInt8				nStarFontsConvFlags;
62cdf0e10cSrcweir 
63cdf0e10cSrcweir public:
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 	TYPEINFO();
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 	XMLParaContext( SvXMLImport& rImport,
68cdf0e10cSrcweir 			sal_uInt16 nPrfx,
69cdf0e10cSrcweir 			const ::rtl::OUString& rLName,
70cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference<
71cdf0e10cSrcweir 				::com::sun::star::xml::sax::XAttributeList > & xAttrList,
72cdf0e10cSrcweir 			sal_Bool bHeading );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 	virtual ~XMLParaContext();
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 	virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
77cdf0e10cSrcweir 			const ::rtl::OUString& rLocalName,
78cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference<
79cdf0e10cSrcweir 				::com::sun::star::xml::sax::XAttributeList > & xAttrList );
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 	virtual void Characters( const ::rtl::OUString& rChars );
82cdf0e10cSrcweir 
83cdf0e10cSrcweir };
84cdf0e10cSrcweir 
85cdf0e10cSrcweir class XMLNumberedParaContext : public SvXMLImportContext
86cdf0e10cSrcweir {
87cdf0e10cSrcweir     /// text:list-level MINUS 1
88cdf0e10cSrcweir     sal_Int16 m_Level;
89cdf0e10cSrcweir     /// text:start-value
90cdf0e10cSrcweir     sal_Int16 m_StartValue;
91cdf0e10cSrcweir     /// xml:id
92cdf0e10cSrcweir     ::rtl::OUString m_XmlId;
93cdf0e10cSrcweir     /// text:list-id
94cdf0e10cSrcweir     ::rtl::OUString m_ListId;
95cdf0e10cSrcweir     /// text:style-name
96cdf0e10cSrcweir     ::com::sun::star::uno::Reference <
97cdf0e10cSrcweir         ::com::sun::star::container::XIndexReplace > m_xNumRules;
98cdf0e10cSrcweir 
99cdf0e10cSrcweir public:
100cdf0e10cSrcweir 
101cdf0e10cSrcweir     TYPEINFO();
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     XMLNumberedParaContext( SvXMLImport& i_rImport,
104cdf0e10cSrcweir             sal_uInt16 i_nPrefix,
105cdf0e10cSrcweir             const ::rtl::OUString& i_rLocalName,
106cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
107cdf0e10cSrcweir                 ::com::sun::star::xml::sax::XAttributeList > & i_xAttrList );
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     virtual ~XMLNumberedParaContext();
110cdf0e10cSrcweir 
111cdf0e10cSrcweir     virtual void EndElement();
112cdf0e10cSrcweir 
113cdf0e10cSrcweir     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 i_nPrefix,
114cdf0e10cSrcweir             const ::rtl::OUString& i_rLocalName,
115cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
116cdf0e10cSrcweir                 ::com::sun::star::xml::sax::XAttributeList > & i_xAttrList );
117cdf0e10cSrcweir 
GetLevel() const118cdf0e10cSrcweir     sal_Int16 GetLevel() const { return m_Level; }
119cdf0e10cSrcweir     const ::com::sun::star::uno::Reference <
GetNumRules() const120cdf0e10cSrcweir         ::com::sun::star::container::XIndexReplace >& GetNumRules() const
121cdf0e10cSrcweir         { return m_xNumRules; }
GetListId() const122cdf0e10cSrcweir     const ::rtl::OUString& GetListId() const { return m_ListId; }
GetStartValue() const123cdf0e10cSrcweir     sal_Int16 GetStartValue() const { return m_StartValue; }
124cdf0e10cSrcweir 
125cdf0e10cSrcweir };
126cdf0e10cSrcweir 
127cdf0e10cSrcweir #endif
128