merge the formfield patch from ooo-build
[ooovba.git] / binfilter / inc / bf_xmloff / XMLChartPropertySetMapper.hxx
blob5157a7aa9bbebd9bb4b7cf9813a18a7a8acc41da
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLChartPropertySetMapper.hxx,v $
10 * $Revision: 1.4 $
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
34 #include "uniref.hxx"
35 #endif
36 #ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
37 #include "xmlprmap.hxx"
38 #endif
39 #ifndef _XMLOFF_XMLEXPPR_HXX
40 #include "xmlexppr.hxx"
41 #endif
42 #ifndef _XMLOFF_XMLIMPPR_HXX
43 #include "xmlimppr.hxx"
44 #endif
45 #ifndef _XMLOFF_XMLIMP_HXX
46 #include "xmlimp.hxx"
47 #endif
49 namespace rtl { class OUString; }
50 namespace binfilter {
52 extern const XMLPropertyMapEntry aXMLChartPropMap[];
54 class SvXMLExport;
56 // ----------------------------------------
58 class XMLChartPropHdlFactory : public XMLPropertyHandlerFactory
60 private:
61 const XMLPropertyHandler* GetShapePropertyHandler( sal_Int32 nType ) const;
63 public:
64 virtual ~XMLChartPropHdlFactory();
65 virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
68 // ----------------------------------------
70 class XMLChartPropertySetMapper : public XMLPropertySetMapper
72 public:
73 XMLChartPropertySetMapper();
74 ~XMLChartPropertySetMapper();
77 // ----------------------------------------
79 class XMLChartExportPropertyMapper : public SvXMLExportPropertyMapper
81 private:
82 const ::rtl::OUString msTrue;
83 const ::rtl::OUString msFalse;
85 SvXMLExport& mrExport;
87 protected:
88 virtual void ContextFilter(
89 ::std::vector< XMLPropertyState >& rProperties,
90 ::com::sun::star::uno::Reference<
91 ::com::sun::star::beans::XPropertySet > rPropSet ) const;
93 private:
94 /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
95 virtual void handleElementItem(
96 SvXMLExport& rExport,
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;
108 public:
109 XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper,
110 SvXMLExport& rExport );
111 virtual ~XMLChartExportPropertyMapper();
114 // ----------------------------------------
116 class XMLChartImportPropertyMapper : public SvXMLImportPropertyMapper
118 private:
119 SvXMLImport& mrImport;
121 public:
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_