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 .
21 #include <xmloff/xmlprmap.hxx>
22 #include <xmloff/xmlexppr.hxx>
23 #include <xmloff/xmlimppr.hxx>
24 #include <xmloff/xmlimp.hxx>
25 #include <xmloff/prhdlfac.hxx>
29 class XMLChartPropHdlFactory final
: public XMLPropertyHandlerFactory
32 SvXMLExport
const*const m_pExport
;
35 XMLChartPropHdlFactory(SvXMLExport
const*);
36 virtual ~XMLChartPropHdlFactory() override
;
37 virtual const XMLPropertyHandler
* GetPropertyHandler( sal_Int32 nType
) const override
;
40 class XMLChartPropertySetMapper final
: public XMLPropertySetMapper
43 explicit XMLChartPropertySetMapper(SvXMLExport
const* pExport
);
44 virtual ~XMLChartPropertySetMapper() override
;
47 class XMLChartExportPropertyMapper final
: public SvXMLExportPropertyMapper
50 SvXMLExport
& mrExport
;
51 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
;
58 /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
59 virtual void handleElementItem(
61 const XMLPropertyState
& rProperty
, SvXmlExportFlags nFlags
,
62 const ::std::vector
< XMLPropertyState
> *pProperties
,
63 sal_uInt32 nIdx
) const override
;
65 /// this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
66 virtual void handleSpecialItem(
67 comphelper::AttributeList
& rAttrList
, const XMLPropertyState
& rProperty
,
68 const SvXMLUnitConverter
& rUnitConverter
, const SvXMLNamespaceMap
& rNamespaceMap
,
69 const ::std::vector
< XMLPropertyState
> *pProperties
,
70 sal_uInt32 nIdx
) const override
;
73 XMLChartExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
,
74 SvXMLExport
& rExport
);
75 virtual ~XMLChartExportPropertyMapper() override
;
77 void setChartDoc( const css::uno::Reference
< css::chart2::XChartDocument
>& xChartDoc
);
80 class XMLChartImportPropertyMapper final
: public SvXMLImportPropertyMapper
83 SvXMLImport
& mrImport
;
86 XMLChartImportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
,
87 const SvXMLImport
& rImport
);
88 virtual ~XMLChartImportPropertyMapper() override
;
90 virtual bool handleSpecialItem(
91 XMLPropertyState
& rProperty
,
92 ::std::vector
< XMLPropertyState
>& rProperties
,
93 const OUString
& rValue
,
94 const SvXMLUnitConverter
& rUnitConverter
,
95 const SvXMLNamespaceMap
& rNamespaceMap
) const override
;
97 virtual void finished(
98 ::std::vector
< XMLPropertyState
>& rProperties
,
99 sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) const override
;
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */