1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
27 namespace com
{ namespace sun
{ namespace star
{
28 namespace text
{ class XTextRange
; }
29 namespace xml
{ namespace sax
{ class XAttributeList
; } }
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
;
47 sal_Int8 nOutlineLevel
;
48 XMLHints_Impl
*pHints
;
49 // Lost outline numbering in master document (#i73509#)
50 bool mbOutlineLevelAttrFound
;
51 bool bIgnoreLeadingSpace
;
55 sal_Int16 nStartValue
;
56 sal_uInt8 nStarFontsConvFlags
;
62 XMLParaContext( SvXMLImport
& rImport
,
64 const OUString
& rLName
,
65 const ::com::sun::star::uno::Reference
<
66 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
,
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
85 sal_Int16 m_StartValue
;
91 ::com::sun::star::uno::Reference
<
92 ::com::sun::star::container::XIndexReplace
> m_xNumRules
;
98 XMLNumberedParaContext( SvXMLImport
& i_rImport
,
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
; }
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */