update dev300-m58
[ooovba.git] / xmloff / inc / XMLChartPropertySetMapper.hxx
blobed651f0adda1158b1b28c54f6d4c121ce7b2e689
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.11 $
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[];
43 class SvXMLExport;
45 // ----------------------------------------
47 class XMLChartPropHdlFactory : public XMLPropertyHandlerFactory
49 private:
50 const XMLPropertyHandler* GetShapePropertyHandler( sal_Int32 nType ) const;
52 public:
53 virtual ~XMLChartPropHdlFactory();
54 virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
57 // ----------------------------------------
59 class XMLChartPropertySetMapper : public XMLPropertySetMapper
61 public:
62 XMLChartPropertySetMapper();
63 ~XMLChartPropertySetMapper();
66 // ----------------------------------------
68 class XMLChartExportPropertyMapper : public SvXMLExportPropertyMapper
70 private:
71 const rtl::OUString msTrue;
72 const rtl::OUString msFalse;
73 bool mbAdaptPercentage;
75 SvXMLExport& mrExport;
77 protected:
78 virtual void ContextFilter(
79 ::std::vector< XMLPropertyState >& rProperties,
80 ::com::sun::star::uno::Reference<
81 ::com::sun::star::beans::XPropertySet > rPropSet ) const;
83 private:
84 /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
85 virtual void handleElementItem(
86 SvXMLExport& rExport,
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;
98 public:
99 XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper,
100 SvXMLExport& rExport );
101 virtual ~XMLChartExportPropertyMapper();
103 void setAdaptPercentage( bool bNewValue );
106 // ----------------------------------------
108 class XMLChartImportPropertyMapper : public SvXMLImportPropertyMapper
110 private:
111 SvXMLImport& mrImport;
113 public:
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_