Line data Source code
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/uno/Reference.h>
24 : #include <xmloff/xmlictxt.hxx>
25 :
26 : class XMLHints_Impl;
27 : namespace com { namespace sun { namespace star {
28 : namespace text { class XTextRange; }
29 : namespace xml { namespace sax { class XAttributeList; } }
30 : } } }
31 :
32 : #define CONV_FROM_STAR_BATS 1
33 : #define CONV_FROM_STAR_MATH 2
34 : #define CONV_STAR_FONT_FLAGS_VALID 4
35 :
36 : class XMLParaContext : public SvXMLImportContext
37 : {
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;
57 :
58 : public:
59 :
60 : TYPEINFO_OVERRIDE();
61 :
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 );
68 :
69 : virtual ~XMLParaContext();
70 :
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;
75 :
76 : virtual void Characters( const OUString& rChars ) SAL_OVERRIDE;
77 :
78 : };
79 :
80 : class XMLNumberedParaContext : public SvXMLImportContext
81 : {
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;
93 :
94 : public:
95 :
96 : TYPEINFO_OVERRIDE();
97 :
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 );
103 :
104 : virtual ~XMLNumberedParaContext();
105 :
106 : virtual void EndElement() SAL_OVERRIDE;
107 :
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;
112 :
113 0 : sal_Int16 GetLevel() const { return m_Level; }
114 : const ::com::sun::star::uno::Reference <
115 0 : ::com::sun::star::container::XIndexReplace >& GetNumRules() const
116 0 : { return m_xNumRules; }
117 0 : const OUString& GetListId() const { return m_ListId; }
118 0 : sal_Int16 GetStartValue() const { return m_StartValue; }
119 :
120 : };
121 :
122 : #endif
123 :
124 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|