Branch libreoffice-5-0-4
[LibreOffice.git] / include / xmloff / XMLPageExport.hxx
blobf2ec924bcfa5366fe75dbfbe816ae4f26feb7376
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX
21 #define INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX
23 #include <sal/config.h>
24 #include <xmloff/dllapi.h>
25 #include <sal/types.h>
26 #include <rtl/ustring.hxx>
27 #include <vector>
28 #include <xmloff/attrlist.hxx>
29 #include <rtl/ref.hxx>
30 #include <salhelper/simplereferenceobject.hxx>
31 #include <com/sun/star/container/XIndexAccess.hpp>
33 namespace com { namespace sun { namespace star {
34 namespace style { class XStyle; }
35 namespace container { class XIndexReplace; class XNameAccess;}
36 namespace beans { class XPropertySet; }
37 } } }
39 class SvXMLExport;
40 class XMLPropertyHandlerFactory;
41 class XMLPropertySetMapper;
42 class SvXMLExportPropertyMapper;
46 struct XMLPageExportNameEntry
48 OUString sPageMasterName;
49 OUString sStyleName;
54 class XMLOFF_DLLPUBLIC XMLPageExport : public salhelper::SimpleReferenceObject
56 SvXMLExport& rExport;
58 const OUString sIsPhysical;
59 const OUString sFollowStyle;
61 ::com::sun::star::uno::Reference<
62 ::com::sun::star::container::XNameAccess > xPageStyles;
64 ::std::vector< XMLPageExportNameEntry > aNameVector;
65 SAL_DLLPRIVATE bool findPageMasterName( const OUString& rStyleName, OUString& rPMName ) const;
67 rtl::Reference < XMLPropertyHandlerFactory > xPageMasterPropHdlFactory;
68 rtl::Reference < XMLPropertySetMapper > xPageMasterPropSetMapper;
69 rtl::Reference < SvXMLExportPropertyMapper > xPageMasterExportPropMapper;
71 protected:
73 SvXMLExport& GetExport() { return rExport; }
75 void collectPageMasterAutoStyle(
76 const ::com::sun::star::uno::Reference <
77 ::com::sun::star::beans::XPropertySet > & rPropSet,
78 OUString& rPageMasterName );
80 virtual void exportMasterPageContent(
81 const ::com::sun::star::uno::Reference <
82 ::com::sun::star::beans::XPropertySet > & rPropSet,
83 bool bAutoStyles );
85 bool exportStyle(
86 const ::com::sun::star::uno::Reference<
87 ::com::sun::star::style::XStyle >& rStyle,
88 bool bAutoStyles );
90 void exportStyles( bool bUsed, bool bAutoStyles );
92 public:
93 XMLPageExport( SvXMLExport& rExp );
94 virtual ~XMLPageExport();
96 void collectAutoStyles( bool bUsed ) { exportStyles( bUsed, true ); }
97 void exportAutoStyles();
98 void exportMasterStyles( bool bUsed ) { exportStyles( bUsed, false ); }
100 //text grid enhancement for better CJK support
101 void exportDefaultStyle();
104 #endif // INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */