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 .
20 #ifndef INCLUDED_XMLOFF_SOURCE_DRAW_SDPROPLS_HXX
21 #define INCLUDED_XMLOFF_SOURCE_DRAW_SDPROPLS_HXX
23 #include <com/sun/star/frame/XModel.hpp>
24 #include <xmloff/xmlnume.hxx>
25 #include <xmloff/maptype.hxx>
26 #include <xmloff/xmltypes.hxx>
27 #include <xmloff/xmlement.hxx>
28 #include <xmloff/prhdlfac.hxx>
29 #include <xmloff/xmlprmap.hxx>
30 #include <xmloff/xmlexppr.hxx>
31 #include <xmlsdtypes.hxx>
33 // entry list for graphic properties
35 extern const XMLPropertyMapEntry aXMLSDProperties
[];
37 // entry list for presentation page properties
39 extern const XMLPropertyMapEntry aXMLSDPresPageProps
[];
40 extern const XMLPropertyMapEntry aXMLSDPresPageProps_onlyHeadersFooter
[];
42 // enum maps for attributes
44 extern SvXMLEnumMapEntry
const aXML_ConnectionKind_EnumMap
[];
45 extern SvXMLEnumMapEntry
const aXML_CircleKind_EnumMap
[];
47 /** contains the attribute to property mapping for a drawing layer table */
48 extern const XMLPropertyMapEntry aXMLTableShapeAttributes
[];
50 // factory for own graphic properties
55 class XMLSdPropHdlFactory
: public XMLPropertyHandlerFactory
58 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
> mxModel
;
59 SvXMLExport
* mpExport
;
60 SvXMLImport
* mpImport
;
63 XMLSdPropHdlFactory( ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>, SvXMLExport
& rExport
);
64 XMLSdPropHdlFactory( ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>, SvXMLImport
& rImport
);
65 virtual ~XMLSdPropHdlFactory();
66 virtual const XMLPropertyHandler
* GetPropertyHandler( sal_Int32 nType
) const SAL_OVERRIDE
;
69 class XMLShapePropertySetMapper
: public XMLPropertySetMapper
72 XMLShapePropertySetMapper(const rtl::Reference
< XMLPropertyHandlerFactory
>& rFactoryRef
, bool bForExport
);
73 virtual ~XMLShapePropertySetMapper();
76 class XMLShapeExportPropertyMapper
: public SvXMLExportPropertyMapper
79 SvxXMLNumRuleExport maNumRuleExp
;
80 bool mbIsInAutoStyles
;
83 virtual void ContextFilter(
84 bool bEnableFoFontFamily
,
85 ::std::vector
< XMLPropertyState
>& rProperties
,
86 ::com::sun::star::uno::Reference
<
87 ::com::sun::star::beans::XPropertySet
> rPropSet
) const SAL_OVERRIDE
;
89 XMLShapeExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
);
90 virtual ~XMLShapeExportPropertyMapper();
92 virtual void handleElementItem(
94 const XMLPropertyState
& rProperty
,
95 SvXmlExportFlags nFlags
,
96 const ::std::vector
< XMLPropertyState
>* pProperties
= 0,
100 void SetAutoStyles( bool bIsInAutoStyles
) { mbIsInAutoStyles
= bIsInAutoStyles
; }
102 virtual void handleSpecialItem(
103 SvXMLAttributeList
& rAttrList
,
104 const XMLPropertyState
& rProperty
,
105 const SvXMLUnitConverter
& rUnitConverter
,
106 const SvXMLNamespaceMap
& rNamespaceMap
,
107 const ::std::vector
< XMLPropertyState
> *pProperties
= 0,
108 sal_uInt32 nIdx
= 0 ) const SAL_OVERRIDE
;
111 class XMLPageExportPropertyMapper
: public SvXMLExportPropertyMapper
114 SvXMLExport
& mrExport
;
117 virtual void ContextFilter(
118 bool bEnableFoFontFamily
,
119 ::std::vector
< XMLPropertyState
>& rProperties
,
120 ::com::sun::star::uno::Reference
<
121 ::com::sun::star::beans::XPropertySet
> rPropSet
) const SAL_OVERRIDE
;
123 XMLPageExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
);
124 virtual ~XMLPageExportPropertyMapper();
126 virtual void handleElementItem(
127 SvXMLExport
& rExport
,
128 const XMLPropertyState
& rProperty
,
129 SvXmlExportFlags nFlags
,
130 const ::std::vector
< XMLPropertyState
>* pProperties
= 0,
132 ) const SAL_OVERRIDE
;
135 #endif // INCLUDED_XMLOFF_SOURCE_DRAW_SDPROPLS_HXX
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */