merge the formfield patch from ooo-build
[ooovba.git] / xmloff / source / text / txtparai.hxx
blob657dcec1e4562f1152ae5122638eabf7b1e032bc
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: txtparai.hxx,v $
10 * $Revision: 1.14.2.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _XMLOFF_TEXTPARAI_HXX_
31 #define _XMLOFF_TEXTPARAI_HXX_
34 #include <com/sun/star/uno/Reference.h>
35 #include <xmloff/xmlictxt.hxx>
37 class XMLHints_Impl;
38 namespace com { namespace sun { namespace star {
39 namespace text { class XTextRange; }
40 namespace xml { namespace sax { class XAttributeList; } }
41 } } }
43 #define CONV_FROM_STAR_BATS 1
44 #define CONV_FROM_STAR_MATH 2
45 #define CONV_STAR_FONT_FLAGS_VALID 4
47 class XMLParaContext : public SvXMLImportContext
49 ::com::sun::star::uno::Reference <
50 ::com::sun::star::text::XTextRange > xStart; // xub_StrLen nStart;
51 ::rtl::OUString m_sStyleName;
52 ::rtl::OUString m_sClassNames;
53 ::rtl::OUString sId;
54 ::rtl::OUString m_sXmlId;
55 ::rtl::OUString m_sAbout;
56 ::rtl::OUString m_sProperty;
57 ::rtl::OUString m_sContent;
58 ::rtl::OUString m_sDatatype;
59 bool m_bHaveAbout;
60 sal_Int8 nOutlineLevel;
61 XMLHints_Impl *pHints;
62 // --> OD 2007-07-25 #i73509#
63 sal_Bool mbOutlineLevelAttrFound;
64 // <--
65 sal_Bool bIgnoreLeadingSpace;
66 sal_Bool bHeading;
67 sal_Bool bIsListHeader;
68 sal_Bool bIsRestart;
69 sal_Int16 nStartValue;
70 sal_uInt8 nStarFontsConvFlags;
72 public:
74 TYPEINFO();
76 XMLParaContext( SvXMLImport& rImport,
77 sal_uInt16 nPrfx,
78 const ::rtl::OUString& rLName,
79 const ::com::sun::star::uno::Reference<
80 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
81 sal_Bool bHeading );
83 virtual ~XMLParaContext();
85 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
86 const ::rtl::OUString& rLocalName,
87 const ::com::sun::star::uno::Reference<
88 ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
90 virtual void Characters( const ::rtl::OUString& rChars );
94 class XMLNumberedParaContext : public SvXMLImportContext
96 /// text:list-level MINUS 1
97 sal_Int16 m_Level;
98 /// text:start-value
99 sal_Int16 m_StartValue;
100 /// xml:id
101 ::rtl::OUString m_XmlId;
102 /// text:list-id
103 ::rtl::OUString m_ListId;
104 /// text:style-name
105 ::com::sun::star::uno::Reference <
106 ::com::sun::star::container::XIndexReplace > m_xNumRules;
108 public:
110 TYPEINFO();
112 XMLNumberedParaContext( SvXMLImport& i_rImport,
113 sal_uInt16 i_nPrefix,
114 const ::rtl::OUString& i_rLocalName,
115 const ::com::sun::star::uno::Reference<
116 ::com::sun::star::xml::sax::XAttributeList > & i_xAttrList );
118 virtual ~XMLNumberedParaContext();
120 virtual void EndElement();
122 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 i_nPrefix,
123 const ::rtl::OUString& i_rLocalName,
124 const ::com::sun::star::uno::Reference<
125 ::com::sun::star::xml::sax::XAttributeList > & i_xAttrList );
127 sal_Int16 GetLevel() const { return m_Level; }
128 const ::com::sun::star::uno::Reference <
129 ::com::sun::star::container::XIndexReplace >& GetNumRules() const
130 { return m_xNumRules; }
131 const ::rtl::OUString& GetListId() const { return m_ListId; }
132 sal_Int16 GetStartValue() const { return m_StartValue; }
136 #endif