bump product version to 4.1.6.2
[LibreOffice.git] / xmloff / inc / XMLChartPropertySetMapper.hxx
blob051910eeb516942abba3b3f3413ac77aa142e21d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
20 #define _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
22 #include <xmloff/uniref.hxx>
23 #include <xmloff/xmlprmap.hxx>
24 #include <xmloff/xmlexppr.hxx>
25 #include <xmloff/xmlimppr.hxx>
26 #include <xmloff/xmlimp.hxx>
29 extern const XMLPropertyMapEntry aXMLChartPropMap[];
31 class SvXMLExport;
33 // ----------------------------------------
35 class XMLChartPropHdlFactory : public XMLPropertyHandlerFactory
37 private:
38 const XMLPropertyHandler* GetShapePropertyHandler( sal_Int32 nType ) const;
40 public:
41 virtual ~XMLChartPropHdlFactory();
42 virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
45 // ----------------------------------------
47 class XMLChartPropertySetMapper : public XMLPropertySetMapper
49 public:
50 explicit XMLChartPropertySetMapper( bool bForExport );
51 ~XMLChartPropertySetMapper();
54 // ----------------------------------------
56 class XMLChartExportPropertyMapper : public SvXMLExportPropertyMapper
58 private:
59 const OUString msTrue;
60 const OUString msFalse;
61 bool mbAdaptPercentage;
63 SvXMLExport& mrExport;
64 com::sun::star::uno::Reference< com::sun::star::chart2::XChartDocument > mxChartDoc;
66 protected:
67 virtual void ContextFilter(
68 bool bEnableFoFontFamily,
69 ::std::vector< XMLPropertyState >& rProperties,
70 ::com::sun::star::uno::Reference<
71 ::com::sun::star::beans::XPropertySet > rPropSet ) const;
73 private:
74 /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
75 virtual void handleElementItem(
76 SvXMLExport& rExport,
77 const XMLPropertyState& rProperty, sal_uInt16 nFlags,
78 const ::std::vector< XMLPropertyState > *pProperties = 0,
79 sal_uInt32 nIdx = 0 ) const;
81 /// this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
82 virtual void handleSpecialItem(
83 SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
84 const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap,
85 const ::std::vector< XMLPropertyState > *pProperties = 0,
86 sal_uInt32 nIdx = 0 ) const;
88 public:
89 XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper,
90 SvXMLExport& rExport );
91 virtual ~XMLChartExportPropertyMapper();
93 void setAdaptPercentage( bool bNewValue );
95 void setChartDoc( com::sun::star::uno::Reference<
96 com::sun::star::chart2::XChartDocument > xChartDoc );
99 // ----------------------------------------
101 class XMLChartImportPropertyMapper : public SvXMLImportPropertyMapper
103 private:
104 SvXMLImport& mrImport;
106 public:
107 XMLChartImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper,
108 const SvXMLImport& rImport );
109 virtual ~XMLChartImportPropertyMapper();
111 virtual bool handleSpecialItem(
112 XMLPropertyState& rProperty,
113 ::std::vector< XMLPropertyState >& rProperties,
114 const OUString& rValue,
115 const SvXMLUnitConverter& rUnitConverter,
116 const SvXMLNamespaceMap& rNamespaceMap ) const;
118 virtual void finished(
119 ::std::vector< XMLPropertyState >& rProperties,
120 sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const;
123 #endif // _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */