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 :
20 : #ifndef _XMLOFF_XMLNUME_HXX
21 : #define _XMLOFF_XMLNUME_HXX
22 :
23 : #include <rtl/ustring.hxx>
24 : #include <tools/mapunit.hxx>
25 : #include <xmloff/XMLStringVector.hxx>
26 : #include <xmloff/attrlist.hxx>
27 :
28 : namespace com { namespace sun { namespace star {
29 : namespace frame { class XModel; }
30 : namespace style { class XStyle; }
31 : namespace container { class XIndexReplace; }
32 : namespace beans { struct PropertyValue; }
33 : } } }
34 :
35 : class SvXMLNamespaceMap;
36 : class SvXMLUnitConverter;
37 : class SvXMLExportItemMapper;
38 : class SvXMLExport;
39 : class XMLTextListAutoStylePool;
40 :
41 : class SvxXMLNumRuleExport
42 : {
43 : SvXMLExport& rExport;
44 : const ::rtl::OUString sCDATA;
45 : const ::rtl::OUString sWS;
46 : const ::rtl::OUString sNumberingRules;
47 : const ::rtl::OUString sIsPhysical;
48 : const ::rtl::OUString sIsContinuousNumbering;
49 : // Boolean indicating, if properties for position-and-space-mode LABEL_ALIGNEMNT
50 : // are exported or not. (#i89178#)
51 : // These properties have been introduced in ODF 1.2. Thus, its export have
52 : // to be suppressed on writing ODF 1.0 respectively ODF 1.1
53 : bool mbExportPositionAndSpaceModeLabelAlignment;
54 :
55 : void exportLevelStyles(
56 : const ::com::sun::star::uno::Reference<
57 : ::com::sun::star::container::XIndexReplace > & xNumRule,
58 : sal_Bool bOutline=sal_False );
59 :
60 : void exportLevelStyle(
61 : sal_Int32 nLevel,
62 : const ::com::sun::star::uno::Sequence<
63 : ::com::sun::star::beans::PropertyValue>& rProps,
64 : sal_Bool bOutline=sal_False );
65 :
66 : protected:
67 :
68 : // This method may be overloaded to add attributes to the <list-style>
69 : // element.
70 : virtual void AddListStyleAttributes();
71 :
72 : sal_Bool exportStyle( const ::com::sun::star::uno::Reference<
73 : ::com::sun::star::style::XStyle >& rStyle );
74 : void exportOutline();
75 :
76 752 : SvXMLExport& GetExport() { return rExport; }
77 :
78 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > GetUNONumRule() const;
79 :
80 : public:
81 :
82 : SvxXMLNumRuleExport( SvXMLExport& rExport );
83 : virtual ~SvxXMLNumRuleExport();
84 :
85 : void exportStyles( sal_Bool bUsed,
86 : XMLTextListAutoStylePool *pPool,
87 : sal_Bool bExportChapterNumbering = sal_True );
88 : void exportNumberingRule(
89 : const ::rtl::OUString& rName, sal_Bool bIsHidden,
90 : const ::com::sun::star::uno::Reference<
91 : ::com::sun::star::container::XIndexReplace > & xNumRule );
92 : };
93 :
94 : #endif // _XMLOFF_XMLNUME_HXX
95 :
96 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|