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 .
22 #include <com/sun/star/frame/XModel.hpp>
23 #include <com/sun/star/drawing/ConnectorType.hpp>
24 #include <com/sun/star/drawing/CircleKind.hpp>
25 #include <xmloff/xmlnume.hxx>
26 #include <xmloff/maptype.hxx>
27 #include <xmloff/xmlement.hxx>
28 #include <xmloff/prhdlfac.hxx>
29 #include <xmloff/xmlprmap.hxx>
30 #include <xmloff/xmlexppr.hxx>
32 // entry list for graphic properties
34 extern const XMLPropertyMapEntry aXMLSDProperties
[];
36 // entry list for presentation page properties
38 extern const XMLPropertyMapEntry aXMLSDPresPageProps
[];
40 // enum maps for attributes
42 extern SvXMLEnumMapEntry
<css::drawing::ConnectorType
> const aXML_ConnectionKind_EnumMap
[];
43 extern SvXMLEnumMapEntry
<css::drawing::CircleKind
> const aXML_CircleKind_EnumMap
[];
45 /** contains the attribute to property mapping for a drawing layer table */
46 extern const XMLPropertyMapEntry aXMLTableShapeAttributes
[];
48 // factory for own graphic properties
53 class XMLSdPropHdlFactory
: public XMLPropertyHandlerFactory
56 css::uno::Reference
< css::frame::XModel
> mxModel
;
57 SvXMLExport
* mpExport
;
58 SvXMLImport
* mpImport
;
61 XMLSdPropHdlFactory( css::uno::Reference
< css::frame::XModel
> xModel
, SvXMLExport
& rExport
);
62 XMLSdPropHdlFactory( css::uno::Reference
< css::frame::XModel
> xModel
, SvXMLImport
& rImport
);
63 virtual ~XMLSdPropHdlFactory() override
;
64 virtual const XMLPropertyHandler
* GetPropertyHandler( sal_Int32 nType
) const override
;
67 class XMLShapePropertySetMapper
: public XMLPropertySetMapper
70 XMLShapePropertySetMapper(const rtl::Reference
< XMLPropertyHandlerFactory
>& rFactoryRef
, bool bForExport
);
71 virtual ~XMLShapePropertySetMapper() override
;
74 class XMLShapeExportPropertyMapper
: public SvXMLExportPropertyMapper
77 SvxXMLNumRuleExport maNumRuleExp
;
78 bool mbIsInAutoStyles
;
81 virtual void ContextFilter(
82 bool bEnableFoFontFamily
,
83 ::std::vector
< XMLPropertyState
>& rProperties
,
84 const css::uno::Reference
< css::beans::XPropertySet
>& rPropSet
) const override
;
86 XMLShapeExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
);
87 virtual ~XMLShapeExportPropertyMapper() override
;
89 virtual void handleElementItem(
91 const XMLPropertyState
& rProperty
,
92 SvXmlExportFlags nFlags
,
93 const ::std::vector
< XMLPropertyState
>* pProperties
,
97 void SetAutoStyles( bool bIsInAutoStyles
) { mbIsInAutoStyles
= bIsInAutoStyles
; }
99 virtual void handleSpecialItem(
100 comphelper::AttributeList
& rAttrList
,
101 const XMLPropertyState
& rProperty
,
102 const SvXMLUnitConverter
& rUnitConverter
,
103 const SvXMLNamespaceMap
& rNamespaceMap
,
104 const ::std::vector
< XMLPropertyState
> *pProperties
,
105 sal_uInt32 nIdx
) const override
;
108 class XMLPageExportPropertyMapper
: public SvXMLExportPropertyMapper
111 SvXMLExport
& mrExport
;
114 virtual void ContextFilter(
115 bool bEnableFoFontFamily
,
116 ::std::vector
< XMLPropertyState
>& rProperties
,
117 const css::uno::Reference
< css::beans::XPropertySet
>& rPropSet
) const override
;
119 XMLPageExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
);
120 virtual ~XMLPageExportPropertyMapper() override
;
122 virtual void handleElementItem(
123 SvXMLExport
& rExport
,
124 const XMLPropertyState
& rProperty
,
125 SvXmlExportFlags nFlags
,
126 const ::std::vector
< XMLPropertyState
>* pProperties
,
131 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */