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 #ifndef _UNIVERSALL_REFERENCE_HXX
36 #ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
37 #include "xmlprmap.hxx"
39 #ifndef _XMLOFF_XMLEXPPR_HXX
40 #include "xmlexppr.hxx"
42 #ifndef _XMLOFF_XMLIMPPR_HXX
43 #include "xmlimppr.hxx"
45 #ifndef _XMLOFF_XMLIMP_HXX
49 namespace rtl
{ class OUString
; }
52 extern const XMLPropertyMapEntry aXMLChartPropMap
[];
56 // ----------------------------------------
58 class XMLChartPropHdlFactory
: public XMLPropertyHandlerFactory
61 const XMLPropertyHandler
* GetShapePropertyHandler( sal_Int32 nType
) const;
64 virtual ~XMLChartPropHdlFactory();
65 virtual const XMLPropertyHandler
* GetPropertyHandler( sal_Int32 nType
) const;
68 // ----------------------------------------
70 class XMLChartPropertySetMapper
: public XMLPropertySetMapper
73 XMLChartPropertySetMapper();
74 ~XMLChartPropertySetMapper();
77 // ----------------------------------------
79 class XMLChartExportPropertyMapper
: public SvXMLExportPropertyMapper
82 const ::rtl::OUString msTrue
;
83 const ::rtl::OUString msFalse
;
85 SvXMLExport
& mrExport
;
88 virtual void ContextFilter(
89 ::std::vector
< XMLPropertyState
>& rProperties
,
90 ::com::sun::star::uno::Reference
<
91 ::com::sun::star::beans::XPropertySet
> rPropSet
) const;
94 /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
95 virtual void handleElementItem(
97 const XMLPropertyState
& rProperty
, sal_uInt16 nFlags
,
98 const ::std::vector
< XMLPropertyState
> *pProperties
= 0,
99 sal_uInt32 nIdx
= 0 ) const;
101 /// this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
102 virtual void handleSpecialItem(
103 SvXMLAttributeList
& rAttrList
, const XMLPropertyState
& rProperty
,
104 const SvXMLUnitConverter
& rUnitConverter
, const SvXMLNamespaceMap
& rNamespaceMap
,
105 const ::std::vector
< XMLPropertyState
> *pProperties
= 0,
106 sal_uInt32 nIdx
= 0 ) const;
109 XMLChartExportPropertyMapper( const UniReference
< XMLPropertySetMapper
>& rMapper
,
110 SvXMLExport
& rExport
);
111 virtual ~XMLChartExportPropertyMapper();
114 // ----------------------------------------
116 class XMLChartImportPropertyMapper
: public SvXMLImportPropertyMapper
119 SvXMLImport
& mrImport
;
122 XMLChartImportPropertyMapper( const UniReference
< XMLPropertySetMapper
>& rMapper
,
123 const SvXMLImport
& rImport
);
124 virtual ~XMLChartImportPropertyMapper();
126 virtual sal_Bool
handleSpecialItem(
127 XMLPropertyState
& rProperty
,
128 ::std::vector
< XMLPropertyState
>& rProperties
,
129 const ::rtl::OUString
& rValue
,
130 const SvXMLUnitConverter
& rUnitConverter
,
131 const SvXMLNamespaceMap
& rNamespaceMap
) const;
133 virtual void finished(
134 ::std::vector
< XMLPropertyState
>& rProperties
,
135 sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) const;
138 }//end of namespace binfilter
139 #endif // _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_