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 _XMLOFF_TEXTPARAI_HXX_
20 : #define _XMLOFF_TEXTPARAI_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; // xub_StrLen nStart;
40 : ::rtl::OUString sStyleName;
41 : ::rtl::OUString m_sXmlId;
42 : ::rtl::OUString m_sAbout;
43 : ::rtl::OUString m_sProperty;
44 : ::rtl::OUString m_sContent;
45 : ::rtl::OUString m_sDatatype;
46 : bool m_bHaveAbout;
47 : sal_Int8 nOutlineLevel;
48 : XMLHints_Impl *pHints;
49 : // Lost outline numbering in master document (#i73509#)
50 : sal_Bool mbOutlineLevelAttrFound;
51 : sal_Bool bIgnoreLeadingSpace;
52 : sal_Bool bHeading;
53 : sal_Bool bIsListHeader;
54 : sal_Bool bIsRestart;
55 : sal_Int16 nStartValue;
56 : sal_uInt8 nStarFontsConvFlags;
57 :
58 : public:
59 :
60 : TYPEINFO();
61 :
62 : XMLParaContext( SvXMLImport& rImport,
63 : sal_uInt16 nPrfx,
64 : const ::rtl::OUString& rLName,
65 : const ::com::sun::star::uno::Reference<
66 : ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
67 : sal_Bool bHeading );
68 :
69 : virtual ~XMLParaContext();
70 :
71 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
72 : const ::rtl::OUString& rLocalName,
73 : const ::com::sun::star::uno::Reference<
74 : ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
75 :
76 : virtual void Characters( const ::rtl::OUString& rChars );
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 : ::rtl::OUString m_XmlId;
88 : /// text:list-id
89 : ::rtl::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();
97 :
98 : XMLNumberedParaContext( SvXMLImport& i_rImport,
99 : sal_uInt16 i_nPrefix,
100 : const ::rtl::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();
107 :
108 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 i_nPrefix,
109 : const ::rtl::OUString& i_rLocalName,
110 : const ::com::sun::star::uno::Reference<
111 : ::com::sun::star::xml::sax::XAttributeList > & i_xAttrList );
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 ::rtl::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: */
|