1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
26 #include <xmloff/prhdlfac.hxx>
28 extern const XMLPropertyMapEntry aXMLChartPropMap
[];
32 class XMLChartPropHdlFactory
: public XMLPropertyHandlerFactory
35 virtual ~XMLChartPropHdlFactory() override
;
36 virtual const XMLPropertyHandler
* GetPropertyHandler( sal_Int32 nType
) const override
;
39 class XMLChartPropertySetMapper
: public XMLPropertySetMapper
42 explicit XMLChartPropertySetMapper( bool bForExport
);
43 virtual ~XMLChartPropertySetMapper() override
;
46 class XMLChartExportPropertyMapper
: public SvXMLExportPropertyMapper
49 SvXMLExport
& mrExport
;
50 css::uno::Reference
< css::chart2::XChartDocument
> mxChartDoc
;
53 virtual void ContextFilter(
54 bool bEnableFoFontFamily
,
55 ::std::vector
< XMLPropertyState
>& rProperties
,
56 const css::uno::Reference
<css::beans::XPropertySet
>& rPropSet
) const override
;
59 /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
60 virtual void handleElementItem(
62 const XMLPropertyState
& rProperty
, SvXmlExportFlags nFlags
,
63 const ::std::vector
< XMLPropertyState
> *pProperties
,
64 sal_uInt32 nIdx
) const override
;
66 /// this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
67 virtual void handleSpecialItem(
68 SvXMLAttributeList
& rAttrList
, const XMLPropertyState
& rProperty
,
69 const SvXMLUnitConverter
& rUnitConverter
, const SvXMLNamespaceMap
& rNamespaceMap
,
70 const ::std::vector
< XMLPropertyState
> *pProperties
,
71 sal_uInt32 nIdx
) const override
;
74 XMLChartExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
,
75 SvXMLExport
& rExport
);
76 virtual ~XMLChartExportPropertyMapper() override
;
78 void setChartDoc( const css::uno::Reference
< css::chart2::XChartDocument
>& xChartDoc
);
81 class XMLChartImportPropertyMapper
: public SvXMLImportPropertyMapper
84 SvXMLImport
& mrImport
;
87 XMLChartImportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
,
88 const SvXMLImport
& rImport
);
89 virtual ~XMLChartImportPropertyMapper() override
;
91 virtual bool handleSpecialItem(
92 XMLPropertyState
& rProperty
,
93 ::std::vector
< XMLPropertyState
>& rProperties
,
94 const OUString
& rValue
,
95 const SvXMLUnitConverter
& rUnitConverter
,
96 const SvXMLNamespaceMap
& rNamespaceMap
) const override
;
98 virtual void finished(
99 ::std::vector
< XMLPropertyState
>& rProperties
,
100 sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) const override
;
103 #endif // INCLUDED_XMLOFF_INC_XMLCHARTPROPERTYSETMAPPER_HXX
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */