LibreOffice Module xmloff (master) 1
sdxmlexp_impl.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <xmloff/xmlexp.hxx>
23
24#include <com/sun/star/container/XNameAccess.hpp>
25#include <com/sun/star/drawing/XDrawPage.hpp>
26
28#include <vector>
29
30namespace tools { class Rectangle; }
31
37
38typedef ::std::vector< ImpXMLEXPPageMasterInfo* > ImpXMLEXPPageMasterList;
39
41{
54};
55
57
59{
63};
64
66{
67 OUString maStrText;
68 bool mbFixed;
69 sal_Int32 mnFormat;
70};
71
73{
74 css::uno::Reference< css::container::XNameAccess > mxDocStyleFamilies;
75 css::uno::Reference< css::container::XIndexAccess > mxDocMasterPages;
76 css::uno::Reference< css::container::XIndexAccess > mxDocDrawPages;
79 sal_uInt32 mnObjectCount;
80
81 // temporary infos
82 std::vector< std::unique_ptr<ImpXMLEXPPageMasterInfo> > mvPageMasterInfoList;
86 std::vector< std::unique_ptr<ImpXMLAutoLayoutInfo> > mvAutoLayoutInfoList;
87
88 css::uno::Sequence< OUString > maDrawPagesAutoLayoutNames;
89
90 ::std::vector< OUString > maDrawPagesStyleNames;
91 ::std::vector< OUString > maDrawNotesPagesStyleNames;
92 ::std::vector< OUString > maMasterPagesStyleNames;
94 ::std::vector< HeaderFooterPageSettingsImpl > maDrawPagesHeaderFooterSettings;
95 ::std::vector< HeaderFooterPageSettingsImpl > maDrawNotesPagesHeaderFooterSettings;
96
97 ::std::vector< OUString > maHeaderDeclsVector;
98 ::std::vector< OUString > maFooterDeclsVector;
99 ::std::vector< DateTimeDeclImpl > maDateTimeDeclsVector;
100
102
106
107 SdXMLFormatMap maUsedDateStyles; // this is a vector with the used formattings for date fields
108 SdXMLFormatMap maUsedTimeStyles; // this is a vector with the used formattings for time fields
109
111
112 virtual void ExportStyles_(bool bUsed) override;
113 virtual void ExportAutoStyles_() override;
114 virtual void ExportFontDecls_() override;
115 virtual void ExportMasterStyles_() override;
116 virtual void ExportContent_() override;
117 virtual void ExportMeta_() override;
118
119 ImpXMLEXPPageMasterInfo* ImpGetOrCreatePageMasterInfo( const css::uno::Reference< css::drawing::XDrawPage >& xMasterPage );
123 HeaderFooterPageSettingsImpl ImpPrepDrawPageHeaderFooterDecls( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage );
124 ImpXMLEXPPageMasterInfo* ImpGetPageMasterInfoByName(std::u16string_view rName);
125
129 OUString ImpCreatePresPageStyleName( const css::uno::Reference<css::drawing::XDrawPage>& xDrawPage, bool bExportBackground = true );
130
131 bool ImpPrepAutoLayoutInfo(const css::uno::Reference< css::drawing::XDrawPage >& xPage, OUString& rName);
136
137 void exportFormsElement( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage );
138 void ExportThemeElement(const css::uno::Reference<css::drawing::XDrawPage>& xDrawPage);
140
141 // #82003# helper function for recursive object count
142 sal_uInt32 ImpRecursiveObjectCount( const css::uno::Reference< css::drawing::XShapes >& xShapes);
143
144 OUString getNavigationOrder( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage );
145
146 void collectAnnotationAutoStyles( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage );
147 void exportAnnotations( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage );
148
149protected:
150 virtual void GetViewSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override;
151 virtual void GetConfigurationSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override;
153
154public:
156 const css::uno::Reference< css::uno::XComponentContext >& xContext,
157 OUString const & implementationName,
158 bool bIsDraw, SvXMLExportFlags nExportFlags );
159 virtual ~SdXMLExport() override;
160
161 void collectAutoStyles() override;
162
163 // XExporter
164 virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) override;
165
166 // get factories and mappers
169
170 bool IsDraw() const { return mbIsDraw; }
171 bool IsImpress() const { return !mbIsDraw; }
172
173 virtual void addDataStyle(const sal_Int32 nNumberFormat, bool bTimeFormat = false ) override;
174 virtual void exportDataStyles() override;
175 virtual void exportAutoDataStyles() override;
176 virtual OUString getDataStyleName(const sal_Int32 nNumberFormat, bool bTimeFormat = false ) const override;
177};
178
179/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::vector< OUString > maDrawPagesStyleNames
void ImpWriteHeaderFooterDecls()
Definition: sdxmlexp.cxx:1421
css::uno::Reference< css::container::XIndexAccess > mxDocMasterPages
OUString maHandoutMasterStyleName
OUString ImpCreatePresPageStyleName(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage, bool bExportBackground=true)
Definition: sdxmlexp.cxx:1493
::std::vector< OUString > maHeaderDeclsVector
virtual void ExportMasterStyles_() override
Override this method to export the contents of <style:master-styles>.
Definition: sdxmlexp.cxx:2222
void ImplExportHeaderFooterDeclAttributes(const HeaderFooterPageSettingsImpl &aSettings)
Definition: sdxmlexp.cxx:1481
SdXMLFormatMap maUsedDateStyles
XMLShapeExportPropertyMapper * GetPropertySetMapper() const
sal_uInt32 mnObjectCount
ImpXMLEXPPageMasterInfo * ImpGetOrCreatePageMasterInfo(const css::uno::Reference< css::drawing::XDrawPage > &xMasterPage)
Definition: sdxmlexp.cxx:1145
std::vector< std::unique_ptr< ImpXMLEXPPageMasterInfo > > mvPageMasterInfoList
::std::vector< OUString > maFooterDeclsVector
virtual void ExportFontDecls_() override
Override this method to export the font declarations The default implementation will export the conte...
Definition: sdxmlexp.cxx:1626
bool IsImpress() const
virtual XMLFontAutoStylePool * CreateFontAutoStylePool() override
Definition: sdxmlexp.cxx:2818
virtual void GetConfigurationSettings(css::uno::Sequence< css::beans::PropertyValue > &aProps) override
Definition: sdxmlexp.cxx:2453
ImpXMLEXPPageMasterInfo * mpHandoutPageMaster
void collectAnnotationAutoStyles(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage)
Definition: sdxmlexp.cxx:2549
void exportFormsElement(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage)
Definition: sdxmlexp.cxx:2345
rtl::Reference< XMLPageExportPropertyMapper > mpPresPagePropsMapper
void ImpWritePageMasterInfos()
Definition: sdxmlexp.cxx:1218
::std::vector< DateTimeDeclImpl > maDateTimeDeclsVector
virtual ~SdXMLExport() override
Definition: sdxmlexp.cxx:605
void collectAutoStyles() override
Definition: sdxmlexp.cxx:2026
::std::vector< OUString > maMasterPagesStyleNames
::std::vector< OUString > maDrawNotesPagesStyleNames
::std::vector< HeaderFooterPageSettingsImpl > maDrawPagesHeaderFooterSettings
bool IsDraw() const
virtual void ExportContent_() override
Override this method to export the content of <office:body>.
Definition: sdxmlexp.cxx:1632
virtual void GetViewSettings(css::uno::Sequence< css::beans::PropertyValue > &aProps) override
Definition: sdxmlexp.cxx:2430
::std::vector< HeaderFooterPageSettingsImpl > maDrawNotesPagesHeaderFooterSettings
OUString getNavigationOrder(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage)
Definition: sdxmlexp.cxx:2516
virtual OUString getDataStyleName(const sal_Int32 nNumberFormat, bool bTimeFormat=false) const override
Definition: sdxmlexp.cxx:2504
css::uno::Reference< css::container::XIndexAccess > mxDocDrawPages
void ImpWriteAutoLayoutPlaceholder(XmlPlaceholder ePl, const tools::Rectangle &rRect)
Definition: sdxmlexp.cxx:1098
void ImpPrepAutoLayoutInfos()
Definition: sdxmlexp.cxx:622
void ImpWritePresentationStyles()
Definition: sdxmlexp.cxx:1580
virtual void ExportAutoStyles_() override
Override this method to export the contents of <style:auto-styles>.
Definition: sdxmlexp.cxx:2197
XMLPageExportPropertyMapper * GetPresPagePropsMapper() const
SdXMLExport(const css::uno::Reference< css::uno::XComponentContext > &xContext, OUString const &implementationName, bool bIsDraw, SvXMLExportFlags nExportFlags)
Definition: sdxmlexp.cxx:381
virtual void SAL_CALL setSourceDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
Definition: sdxmlexp.cxx:397
sal_Int32 mnDocDrawPageCount
virtual void exportDataStyles() override
Definition: sdxmlexp.cxx:2487
virtual void exportAutoDataStyles() override
Definition: sdxmlexp.cxx:2492
bool ImpPrepAutoLayoutInfo(const css::uno::Reference< css::drawing::XDrawPage > &xPage, OUString &rName)
Definition: sdxmlexp.cxx:654
SdXMLFormatMap maUsedTimeStyles
virtual void ExportStyles_(bool bUsed) override
Override this method to export the content of <style:styles>.
Definition: sdxmlexp.cxx:1991
virtual void ExportMeta_() override
Override this method to export the content of <office:meta>.
Definition: sdxmlexp.cxx:1609
css::uno::Reference< css::container::XNameAccess > mxDocStyleFamilies
ImpXMLEXPPageMasterList mvNotesPageMasterUsageList
sal_Int32 mnDocMasterPageCount
void ImpPrepMasterPageInfos()
Definition: sdxmlexp.cxx:1551
rtl::Reference< XMLSdPropHdlFactory > mpSdPropHdlFactory
ImpXMLEXPPageMasterList mvPageMasterUsageList
void ImpPrepDrawPageInfos()
Definition: sdxmlexp.cxx:1300
virtual void addDataStyle(const sal_Int32 nNumberFormat, bool bTimeFormat=false) override
Definition: sdxmlexp.cxx:2471
void ImpPrepPageMasterInfos()
Definition: sdxmlexp.cxx:1170
void exportPresentationSettings()
Definition: sdxmlexp.cxx:1811
HeaderFooterPageSettingsImpl ImpPrepDrawPageHeaderFooterDecls(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage)
Definition: sdxmlexp.cxx:1369
ImpXMLEXPPageMasterInfo * ImpGetPageMasterInfoByName(std::u16string_view rName)
Definition: sdxmlexp.cxx:1282
rtl::Reference< XMLShapeExportPropertyMapper > mpPropertySetMapper
std::vector< std::unique_ptr< ImpXMLAutoLayoutInfo > > mvAutoLayoutInfoList
HeaderFooterPageSettingsImpl maHandoutPageHeaderFooterSettings
void exportAnnotations(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage)
Definition: sdxmlexp.cxx:2575
sal_uInt32 ImpRecursiveObjectCount(const css::uno::Reference< css::drawing::XShapes > &xShapes)
Definition: sdxmlexp.cxx:577
void ImpWriteAutoLayoutInfos()
Definition: sdxmlexp.cxx:713
css::uno::Sequence< OUString > maDrawPagesAutoLayoutNames
void ExportThemeElement(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage)
Definition: sdxmlexp.cxx:2364
o3tl::sorted_vector< sal_Int32 > SdXMLFormatMap
::std::vector< ImpXMLEXPPageMasterInfo * > ImpXMLEXPPageMasterList
XmlPlaceholder
@ XmlPlaceholderVerticalTitle
@ XmlPlaceholderPage
@ XmlPlaceholderHandout
@ XmlPlaceholderNotes
@ XmlPlaceholderVerticalOutline
@ XmlPlaceholderTable
@ XmlPlaceholderObject
@ XmlPlaceholderTitle
@ XmlPlaceholderGraphic
@ XmlPlaceholderOutline
@ XmlPlaceholderChart
@ XmlPlaceholderSubtitle
SvXMLExportFlags
Definition: xmlexp.hxx:90