LibreOffice Module xmloff (master)  1
txtparai.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_TXTPARAI_HXX
20 #define INCLUDED_XMLOFF_SOURCE_TEXT_TXTPARAI_HXX
21 
22 
23 #include <com/sun/star/container/XIndexReplace.hpp>
24 #include <com/sun/star/uno/Reference.h>
25 #include <xmloff/xmlictxt.hxx>
26 
27 class XMLHints_Impl;
28 namespace com::sun::star {
29  namespace text { class XTextRange; }
30  namespace xml::sax { class XAttributeList; }
31 }
32 
33 #define CONV_FROM_STAR_BATS 1
34 #define CONV_FROM_STAR_MATH 2
35 #define CONV_STAR_FONT_FLAGS_VALID 4
36 
38 {
39  css::uno::Reference < css::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;
48  std::unique_ptr<XMLHints_Impl> m_xHints;
49  // Lost outline numbering in master document (#i73509#)
53  bool bHeading;
55  bool bIsRestart;
56  sal_Int16 nStartValue;
58 
59 public:
60 
61 
62  XMLParaContext( SvXMLImport& rImport,
63  sal_uInt16 nPrfx,
64  const OUString& rLName,
65  const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
66  bool bHeading );
67 
68  virtual void EndElement() override;
69 
70  virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
71  const OUString& rLocalName,
72  const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
73 
74  virtual void Characters( const OUString& rChars ) override;
75 
76 };
77 
79 {
81  sal_Int16 m_Level;
83  sal_Int16 m_StartValue;
85  OUString m_ListId;
87  css::uno::Reference< css::container::XIndexReplace > m_xNumRules;
88 
89 public:
90 
91 
93  sal_uInt16 i_nPrefix,
94  const OUString& i_rLocalName,
95  const css::uno::Reference< css::xml::sax::XAttributeList > & i_xAttrList );
96 
97  virtual void EndElement() override;
98 
99  virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 i_nPrefix,
100  const OUString& i_rLocalName,
101  const css::uno::Reference< css::xml::sax::XAttributeList > & i_xAttrList ) override;
102 
103  sal_Int16 GetLevel() const { return m_Level; }
104  const css::uno::Reference< css::container::XIndexReplace >& GetNumRules() const
105  { return m_xNumRules; }
106  const OUString& GetListId() const { return m_ListId; }
107  sal_Int16 GetStartValue() const { return m_StartValue; }
108 
109 };
110 
111 #endif
112 
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::container::XIndexReplace > m_xNumRules
text:style-name
Definition: txtparai.hxx:87
OUString sStyleName
Definition: txtparai.hxx:40
virtual void EndElement() override
EndElement is called before a context will be destructed, but after an elements context has been pars...
Definition: txtparai.cxx:1972
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
Create a children element context.
signed char sal_Int8
bool mbOutlineContentVisible
Definition: txtparai.hxx:51
sal_Int16 m_StartValue
text:start-value
Definition: txtparai.hxx:83
XMLParaContext(SvXMLImport &rImport, sal_uInt16 nPrfx, const OUString &rLName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, bool bHeading)
XMLNumberedParaContext(SvXMLImport &i_rImport, sal_uInt16 i_nPrefix, const OUString &i_rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &i_xAttrList)
Definition: txtparai.cxx:2277
OUString m_sAbout
Definition: txtparai.hxx:42
sal_Int8 nOutlineLevel
Definition: txtparai.hxx:47
bool bIgnoreLeadingSpace
Definition: txtparai.hxx:52
sal_uInt8 nStarFontsConvFlags
Definition: txtparai.hxx:57
OUString m_sProperty
Definition: txtparai.hxx:43
OUString m_sContent
Definition: txtparai.hxx:44
exports com.sun.star. text
virtual void EndElement() override
EndElement is called before a context will be destructed, but after an elements context has been pars...
Definition: txtparai.cxx:2358
std::unique_ptr< XMLHints_Impl > m_xHints
Definition: txtparai.hxx:48
bool mbOutlineLevelAttrFound
Definition: txtparai.hxx:50
virtual void Characters(const OUString &rChars) override
This method is called for all characters that are contained in the current element.
Definition: txtparai.cxx:2267
const css::uno::Reference< css::container::XIndexReplace > & GetNumRules() const
Definition: txtparai.hxx:104
bool bIsListHeader
Definition: txtparai.hxx:54
sal_Int16 m_Level
text:list-level MINUS 1
Definition: txtparai.hxx:81
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:44
OUString m_sDatatype
Definition: txtparai.hxx:45
OUString m_ListId
text:list-id
Definition: txtparai.hxx:85
unsigned char sal_uInt8
const OUString & GetListId() const
Definition: txtparai.hxx:106
sal_Int16 nStartValue
Definition: txtparai.hxx:56
sal_Int16 GetStartValue() const
Definition: txtparai.hxx:107
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 i_nPrefix, const OUString &i_rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &i_xAttrList) override
Create a children element context.
Definition: txtparai.cxx:2365
bool m_bHaveAbout
Definition: txtparai.hxx:46
OUString m_sXmlId
Definition: txtparai.hxx:41
sal_Int16 GetLevel() const
Definition: txtparai.hxx:103
css::uno::Reference< css::text::XTextRange > xStart
Definition: txtparai.hxx:39