1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLChartPropertySetMapper.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
31 #define _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
33 #include <xmloff/uniref.hxx>
34 #include <xmloff/xmlprmap.hxx>
35 #include <xmloff/xmlexppr.hxx>
36 #include <xmloff/xmlimppr.hxx>
37 #include <xmloff/xmlimp.hxx>
39 namespace rtl
{ class OUString
; }
41 extern const XMLPropertyMapEntry aXMLChartPropMap
[];
45 // ----------------------------------------
47 class XMLChartPropHdlFactory
: public XMLPropertyHandlerFactory
50 const XMLPropertyHandler
* GetShapePropertyHandler( sal_Int32 nType
) const;
53 virtual ~XMLChartPropHdlFactory();
54 virtual const XMLPropertyHandler
* GetPropertyHandler( sal_Int32 nType
) const;
57 // ----------------------------------------
59 class XMLChartPropertySetMapper
: public XMLPropertySetMapper
62 XMLChartPropertySetMapper();
63 ~XMLChartPropertySetMapper();
66 // ----------------------------------------
68 class XMLChartExportPropertyMapper
: public SvXMLExportPropertyMapper
71 const rtl::OUString msTrue
;
72 const rtl::OUString msFalse
;
73 bool mbAdaptPercentage
;
75 SvXMLExport
& mrExport
;
78 virtual void ContextFilter(
79 ::std::vector
< XMLPropertyState
>& rProperties
,
80 ::com::sun::star::uno::Reference
<
81 ::com::sun::star::beans::XPropertySet
> rPropSet
) const;
84 /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
85 virtual void handleElementItem(
87 const XMLPropertyState
& rProperty
, sal_uInt16 nFlags
,
88 const ::std::vector
< XMLPropertyState
> *pProperties
= 0,
89 sal_uInt32 nIdx
= 0 ) const;
91 /// this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
92 virtual void handleSpecialItem(
93 SvXMLAttributeList
& rAttrList
, const XMLPropertyState
& rProperty
,
94 const SvXMLUnitConverter
& rUnitConverter
, const SvXMLNamespaceMap
& rNamespaceMap
,
95 const ::std::vector
< XMLPropertyState
> *pProperties
= 0,
96 sal_uInt32 nIdx
= 0 ) const;
99 XMLChartExportPropertyMapper( const UniReference
< XMLPropertySetMapper
>& rMapper
,
100 SvXMLExport
& rExport
);
101 virtual ~XMLChartExportPropertyMapper();
103 void setAdaptPercentage( bool bNewValue
);
106 // ----------------------------------------
108 class XMLChartImportPropertyMapper
: public SvXMLImportPropertyMapper
111 SvXMLImport
& mrImport
;
114 XMLChartImportPropertyMapper( const UniReference
< XMLPropertySetMapper
>& rMapper
,
115 const SvXMLImport
& rImport
);
116 virtual ~XMLChartImportPropertyMapper();
118 virtual sal_Bool
handleSpecialItem(
119 XMLPropertyState
& rProperty
,
120 ::std::vector
< XMLPropertyState
>& rProperties
,
121 const ::rtl::OUString
& rValue
,
122 const SvXMLUnitConverter
& rUnitConverter
,
123 const SvXMLNamespaceMap
& rNamespaceMap
) const;
125 virtual void finished(
126 ::std::vector
< XMLPropertyState
>& rProperties
,
127 sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) const;
130 #endif // _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_