LibreOffice Module xmloff (master)  1
XMLChartPropertySetMapper.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_XMLOFF_INC_XMLCHARTPROPERTYSETMAPPER_HXX
20 #define INCLUDED_XMLOFF_INC_XMLCHARTPROPERTYSETMAPPER_HXX
21 
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>
27 
28 class SvXMLExport;
29 
31 {
32 private:
33  SvXMLExport const*const m_pExport;
34 
35 public:
37  virtual ~XMLChartPropHdlFactory() override;
38  virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const override;
39 };
40 
42 {
43 public:
44  explicit XMLChartPropertySetMapper(SvXMLExport const* pExport);
45  virtual ~XMLChartPropertySetMapper() override;
46 };
47 
49 {
50 private:
52  css::uno::Reference< css::chart2::XChartDocument > mxChartDoc;
53 
54  virtual void ContextFilter(
55  bool bEnableFoFontFamily,
56  ::std::vector< XMLPropertyState >& rProperties,
57  const css::uno::Reference<css::beans::XPropertySet >& rPropSet ) const override;
58 
60  virtual void handleElementItem(
62  const XMLPropertyState& rProperty, SvXmlExportFlags nFlags,
63  const ::std::vector< XMLPropertyState > *pProperties,
64  sal_uInt32 nIdx ) const override;
65 
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;
72 
73 public:
76  virtual ~XMLChartExportPropertyMapper() override;
77 
78  void setChartDoc( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
79 };
80 
82 {
83 private:
85 
86 public:
88  const SvXMLImport& rImport );
89  virtual ~XMLChartImportPropertyMapper() override;
90 
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;
97 
98  virtual void finished(
99  ::std::vector< XMLPropertyState >& rProperties,
100  sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const override;
101 };
102 
103 #endif // INCLUDED_XMLOFF_INC_XMLCHARTPROPERTYSETMAPPER_HXX
104 
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const override
This method retrieves a PropertyHandler for the given XML-type.
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:77
This class is a base-class to create XMLPropertyHandler.
Definition: prhdlfac.hxx:40
XMLChartExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper, SvXMLExport &rExport)
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
virtual ~XMLChartPropHdlFactory() override
SvXMLImport & rImport
Definition: xmlimppr.hxx:66
virtual bool handleSpecialItem(XMLPropertyState &rProperty,::std::vector< XMLPropertyState > &rProperties, const OUString &rValue, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const override
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set ...
virtual void handleElementItem(SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set ...
void setChartDoc(const css::uno::Reference< css::chart2::XChartDocument > &xChartDoc)
SvXMLExport const *const m_pExport
virtual ~XMLChartExportPropertyMapper() override
virtual void finished(::std::vector< XMLPropertyState > &rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex) const override
This method is called when all attributes have benn processed.
XMLChartPropHdlFactory(SvXMLExport const *)
XMLChartPropertySetMapper(SvXMLExport const *pExport)
SvXmlExportFlags
Definition: xmlexppr.hxx:39
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:122
virtual ~XMLChartImportPropertyMapper() override
virtual ~XMLChartPropertySetMapper() override
virtual void handleSpecialItem(SvXMLAttributeList &rAttrList, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set ...
Abstract base-class for different XML-types.
Definition: xmlprhdl.hxx:35
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const override
Application-specific filter.
css::uno::Any const SvXMLExport & rExport
Definition: ImageStyle.hxx:38
css::uno::Reference< css::chart2::XChartDocument > mxChartDoc
XMLChartImportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper, const SvXMLImport &rImport)