bump product version to 5.0.4.1
[LibreOffice.git] / xmloff / source / text / txtparai.hxx
blobf8d11cb7ca379e30c8cee0b094cfe5107f5a090c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_TXTPARAI_HXX
20 #define INCLUDED_XMLOFF_SOURCE_TEXT_TXTPARAI_HXX
23 #include <com/sun/star/uno/Reference.h>
24 #include <xmloff/xmlictxt.hxx>
26 class XMLHints_Impl;
27 namespace com { namespace sun { namespace star {
28 namespace text { class XTextRange; }
29 namespace xml { namespace sax { class XAttributeList; } }
30 } } }
32 #define CONV_FROM_STAR_BATS 1
33 #define CONV_FROM_STAR_MATH 2
34 #define CONV_STAR_FONT_FLAGS_VALID 4
36 class XMLParaContext : public SvXMLImportContext
38 ::com::sun::star::uno::Reference <
39 ::com::sun::star::text::XTextRange > xStart;
40 OUString sStyleName;
41 OUString m_sXmlId;
42 OUString m_sAbout;
43 OUString m_sProperty;
44 OUString m_sContent;
45 OUString m_sDatatype;
46 bool m_bHaveAbout;
47 sal_Int8 nOutlineLevel;
48 XMLHints_Impl *pHints;
49 // Lost outline numbering in master document (#i73509#)
50 bool mbOutlineLevelAttrFound;
51 bool bIgnoreLeadingSpace;
52 bool bHeading;
53 bool bIsListHeader;
54 bool bIsRestart;
55 sal_Int16 nStartValue;
56 sal_uInt8 nStarFontsConvFlags;
58 public:
60 TYPEINFO_OVERRIDE();
62 XMLParaContext( SvXMLImport& rImport,
63 sal_uInt16 nPrfx,
64 const OUString& rLName,
65 const ::com::sun::star::uno::Reference<
66 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
67 bool bHeading );
69 virtual ~XMLParaContext();
71 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
72 const OUString& rLocalName,
73 const ::com::sun::star::uno::Reference<
74 ::com::sun::star::xml::sax::XAttributeList > & xAttrList ) SAL_OVERRIDE;
76 virtual void Characters( const OUString& rChars ) SAL_OVERRIDE;
80 class XMLNumberedParaContext : public SvXMLImportContext
82 /// text:list-level MINUS 1
83 sal_Int16 m_Level;
84 /// text:start-value
85 sal_Int16 m_StartValue;
86 /// xml:id
87 OUString m_XmlId;
88 /// text:list-id
89 OUString m_ListId;
90 /// text:style-name
91 ::com::sun::star::uno::Reference <
92 ::com::sun::star::container::XIndexReplace > m_xNumRules;
94 public:
96 TYPEINFO_OVERRIDE();
98 XMLNumberedParaContext( SvXMLImport& i_rImport,
99 sal_uInt16 i_nPrefix,
100 const OUString& i_rLocalName,
101 const ::com::sun::star::uno::Reference<
102 ::com::sun::star::xml::sax::XAttributeList > & i_xAttrList );
104 virtual ~XMLNumberedParaContext();
106 virtual void EndElement() SAL_OVERRIDE;
108 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 i_nPrefix,
109 const OUString& i_rLocalName,
110 const ::com::sun::star::uno::Reference<
111 ::com::sun::star::xml::sax::XAttributeList > & i_xAttrList ) SAL_OVERRIDE;
113 sal_Int16 GetLevel() const { return m_Level; }
114 const ::com::sun::star::uno::Reference <
115 ::com::sun::star::container::XIndexReplace >& GetNumRules() const
116 { return m_xNumRules; }
117 const OUString& GetListId() const { return m_ListId; }
118 sal_Int16 GetStartValue() const { return m_StartValue; }
122 #endif
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */