bump product version to 5.0.4.1
[LibreOffice.git] / xmloff / inc / XMLChartPropertySetMapper.hxx
blob7ead99500a848d66203e0953ac4450fc092f921f
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 INCLUDED_XMLOFF_INC_XMLCHARTPROPERTYSETMAPPER_HXX
20 #define INCLUDED_XMLOFF_INC_XMLCHARTPROPERTYSETMAPPER_HXX
22 #include <xmloff/xmlprmap.hxx>
23 #include <xmloff/xmlexppr.hxx>
24 #include <xmloff/xmlimppr.hxx>
25 #include <xmloff/xmlimp.hxx>
27 extern const XMLPropertyMapEntry aXMLChartPropMap[];
29 class SvXMLExport;
31 class XMLChartPropHdlFactory : public XMLPropertyHandlerFactory
33 private:
34 const XMLPropertyHandler* GetShapePropertyHandler( sal_Int32 nType ) const;
36 public:
37 virtual ~XMLChartPropHdlFactory();
38 virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const SAL_OVERRIDE;
41 class XMLChartPropertySetMapper : public XMLPropertySetMapper
43 public:
44 explicit XMLChartPropertySetMapper( bool bForExport );
45 virtual ~XMLChartPropertySetMapper();
48 class XMLChartExportPropertyMapper : public SvXMLExportPropertyMapper
50 private:
51 const OUString msTrue;
52 const OUString msFalse;
54 SvXMLExport& mrExport;
55 com::sun::star::uno::Reference< com::sun::star::chart2::XChartDocument > mxChartDoc;
57 protected:
58 virtual void ContextFilter(
59 bool bEnableFoFontFamily,
60 ::std::vector< XMLPropertyState >& rProperties,
61 ::com::sun::star::uno::Reference<
62 ::com::sun::star::beans::XPropertySet > rPropSet ) const SAL_OVERRIDE;
64 private:
65 /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
66 virtual void handleElementItem(
67 SvXMLExport& rExport,
68 const XMLPropertyState& rProperty, SvXmlExportFlags nFlags,
69 const ::std::vector< XMLPropertyState > *pProperties = 0,
70 sal_uInt32 nIdx = 0 ) const SAL_OVERRIDE;
72 /// this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
73 virtual void handleSpecialItem(
74 SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
75 const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap,
76 const ::std::vector< XMLPropertyState > *pProperties = 0,
77 sal_uInt32 nIdx = 0 ) const SAL_OVERRIDE;
79 public:
80 XMLChartExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper,
81 SvXMLExport& rExport );
82 virtual ~XMLChartExportPropertyMapper();
84 void setAdaptPercentage( bool bNewValue );
86 void setChartDoc( com::sun::star::uno::Reference<
87 com::sun::star::chart2::XChartDocument > xChartDoc );
90 class XMLChartImportPropertyMapper : public SvXMLImportPropertyMapper
92 private:
93 SvXMLImport& mrImport;
95 public:
96 XMLChartImportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper,
97 const SvXMLImport& rImport );
98 virtual ~XMLChartImportPropertyMapper();
100 virtual bool handleSpecialItem(
101 XMLPropertyState& rProperty,
102 ::std::vector< XMLPropertyState >& rProperties,
103 const OUString& rValue,
104 const SvXMLUnitConverter& rUnitConverter,
105 const SvXMLNamespaceMap& rNamespaceMap ) const SAL_OVERRIDE;
107 virtual void finished(
108 ::std::vector< XMLPropertyState >& rProperties,
109 sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const SAL_OVERRIDE;
112 #endif // INCLUDED_XMLOFF_INC_XMLCHARTPROPERTYSETMAPPER_HXX
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */