/src/libreoffice/include/xmloff/XMLPageExport.hxx
Line | Count | Source |
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 INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX |
21 | | #define INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX |
22 | | |
23 | | #include <sal/config.h> |
24 | | #include <xmloff/dllapi.h> |
25 | | #include <rtl/ustring.hxx> |
26 | | #include <vector> |
27 | | #include <rtl/ref.hxx> |
28 | | #include <salhelper/simplereferenceobject.hxx> |
29 | | #include <com/sun/star/uno/Reference.hxx> |
30 | | |
31 | | namespace com::sun::star { |
32 | | namespace style { class XStyle; } |
33 | | namespace container { class XNameAccess;} |
34 | | namespace beans { class XPropertySet; } |
35 | | } |
36 | | |
37 | | class SvXMLExport; |
38 | | class XMLPropertyHandlerFactory; |
39 | | class XMLPropertySetMapper; |
40 | | class SvXMLExportPropertyMapper; |
41 | | class XMLPageMasterExportPropMapper; |
42 | | |
43 | | struct XMLPageExportNameEntry |
44 | | { |
45 | | OUString sPageMasterName; |
46 | | OUString sDrawingPageStyleName; |
47 | | OUString sStyleName; |
48 | | }; |
49 | | |
50 | | |
51 | | class XMLOFF_DLLPUBLIC XMLPageExport : public salhelper::SimpleReferenceObject |
52 | | { |
53 | | SvXMLExport& m_rExport; |
54 | | |
55 | | css::uno::Reference< css::container::XNameAccess > m_xPageStyles; |
56 | | |
57 | | ::std::vector< XMLPageExportNameEntry > m_aNameVector; |
58 | | |
59 | | rtl::Reference < XMLPropertyHandlerFactory > m_xPageMasterPropHdlFactory; |
60 | | rtl::Reference < XMLPropertySetMapper > m_xPageMasterPropSetMapper; |
61 | | rtl::Reference < XMLPageMasterExportPropMapper > m_xPageMasterExportPropMapper; |
62 | | rtl::Reference<XMLPropertySetMapper> m_xPageMasterDrawingPagePropSetMapper; |
63 | | rtl::Reference<SvXMLExportPropertyMapper> m_xPageMasterDrawingPageExportPropMapper; |
64 | | |
65 | | protected: |
66 | | |
67 | 0 | SvXMLExport& GetExport() { return m_rExport; } |
68 | | |
69 | | void collectPageMasterAutoStyle( |
70 | | const css::uno::Reference< css::beans::XPropertySet > & rPropSet, |
71 | | XMLPageExportNameEntry & rEntry); |
72 | | |
73 | | virtual void exportMasterPageContent( |
74 | | const css::uno::Reference< css::beans::XPropertySet > & rPropSet, |
75 | | bool bAutoStyles ); |
76 | | |
77 | | bool exportStyle( |
78 | | const css::uno::Reference< css::style::XStyle >& rStyle, |
79 | | bool bAutoStyles ); |
80 | | |
81 | | void exportStyles( bool bUsed, bool bAutoStyles ); |
82 | | |
83 | | public: |
84 | | XMLPageExport( SvXMLExport& rExp ); |
85 | | virtual ~XMLPageExport() override; |
86 | | |
87 | 0 | void collectAutoStyles( bool bUsed ) { exportStyles( bUsed, true ); } |
88 | | void exportAutoStyles(); |
89 | 0 | void exportMasterStyles( bool bUsed ) { exportStyles( bUsed, false ); } |
90 | | |
91 | | //text grid enhancement for better CJK support |
92 | | void exportDefaultStyle(); |
93 | | }; |
94 | | |
95 | | #endif // INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX |
96 | | |
97 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |