LibreOffice Module xmloff (master)  1
SchXMLImportHelper.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_SCHXMLIMPORTHELPER_HXX
20 #define INCLUDED_XMLOFF_SCHXMLIMPORTHELPER_HXX
21 
22 #include <memory>
23 
25 #include <xmloff/families.hxx>
26 #include <xmloff/xmltkmap.hxx>
27 
28 namespace com::sun::star::chart { class XChartDocument; }
29 namespace com::sun::star::beans { class XPropertySet; }
30 
31 namespace com::sun::star {
32  namespace frame {
33  class XModel;
34  }
35  namespace xml {
36  namespace sax {
37  class XAttributeList;
38  }
39  }
40  namespace chart2 {
41  class XChartDocument;
42  class XDataSeries;
43  }
44 }
45 
46 class SvXMLStylesContext;
47 class SvXMLImportContext;
48 class SvXMLImport;
49 
50 
58 {
59 private:
60  css::uno::Reference< css::chart::XChartDocument > mxChartDoc;
62 
63  std::unique_ptr<SvXMLTokenMap> mpChartDocElemTokenMap;
64  std::unique_ptr<SvXMLTokenMap> mpTableElemTokenMap;
65  std::unique_ptr<SvXMLTokenMap> mpChartElemTokenMap;
66  std::unique_ptr<SvXMLTokenMap> mpPlotAreaElemTokenMap;
67  std::unique_ptr<SvXMLTokenMap> mpSeriesElemTokenMap;
68 
69  std::unique_ptr<SvXMLTokenMap> mpChartAttrTokenMap;
70  std::unique_ptr<SvXMLTokenMap> mpPlotAreaAttrTokenMap;
71  std::unique_ptr<SvXMLTokenMap> mpCellAttrTokenMap;
72  std::unique_ptr<SvXMLTokenMap> mpSeriesAttrTokenMap;
73  std::unique_ptr<SvXMLTokenMap> mpPropMappingAttrTokenMap;
74  std::unique_ptr<SvXMLTokenMap> mpRegEquationAttrTokenMap;
75 
76 public:
77 
79 
85  SvXMLImport& rImport,
86  const css::uno::Reference< css::frame::XModel >& rChartModel );
87 
91  void SetAutoStylesContext( SvXMLStylesContext* pAutoStyles ) { mpAutoStyles = pAutoStyles; }
93 
95  void FillAutoStyle(const OUString& rAutoStyleName, const css::uno::Reference<css::beans::XPropertySet>& rProp);
96 
97  const css::uno::Reference< css::chart::XChartDocument >& GetChartDocument() const
98  { return mxChartDoc; }
99 
106 
112 
114 
127  static css::uno::Reference< css::chart2::XDataSeries > GetNewDataSeries(
128  const css::uno::Reference< css::chart2::XChartDocument > & xDoc,
129  sal_Int32 nCoordinateSystemIndex,
130  const OUString & rChartTypeName,
131  bool bPushLastChartType );
132 
133  static void DeleteDataSeries(
134  const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
135  const css::uno::Reference< css::chart2::XChartDocument > & xDoc );
136 };
137 
138 #endif // INCLUDED_XMLOFF_SCHXMLIMPORTHELPER_HXX
139 
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SvXMLTokenMap > mpChartAttrTokenMap
std::unique_ptr< SvXMLTokenMap > mpChartDocElemTokenMap
const SvXMLTokenMap & GetSeriesAttrTokenMap()
exports com.sun.star. xml
std::unique_ptr< SvXMLTokenMap > mpSeriesAttrTokenMap
SvXMLStylesContext * GetAutoStylesContext() const
std::unique_ptr< SvXMLTokenMap > mpRegEquationAttrTokenMap
void FillAutoStyle(const OUString &rAutoStyleName, const css::uno::Reference< css::beans::XPropertySet > &rProp)
Fill in the autostyle.
const SvXMLTokenMap & GetChartAttrTokenMap()
XmlStyleFamily
Definition: families.hxx:47
exports com.sun.star. chart2
exports com.sun.star. frame
static void DeleteDataSeries(const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const css::uno::Reference< css::chart2::XChartDocument > &xDoc)
SvXMLImportContext * CreateChartContext(SvXMLImport &rImport, const css::uno::Reference< css::frame::XModel > &rChartModel)
get the context for reading the element with subelements.
const SvXMLTokenMap & GetPlotAreaElemTokenMap()
const SvXMLTokenMap & GetTableElemTokenMap()
const SvXMLTokenMap & GetPlotAreaAttrTokenMap()
void SetAutoStylesContext(SvXMLStylesContext *pAutoStyles)
set the auto-style context that will be used to retrieve auto-styles used inside the following
std::unique_ptr< SvXMLTokenMap > mpPlotAreaAttrTokenMap
std::unique_ptr< SvXMLTokenMap > mpCellAttrTokenMap
static css::uno::Reference< css::chart2::XDataSeries > GetNewDataSeries(const css::uno::Reference< css::chart2::XChartDocument > &xDoc, sal_Int32 nCoordinateSystemIndex, const OUString &rChartTypeName, bool bPushLastChartType)
class SAL_NO_VTABLE XPropertySet
const SvXMLTokenMap & GetPropMappingAttrTokenMap()
std::unique_ptr< SvXMLTokenMap > mpTableElemTokenMap
static XmlStyleFamily GetChartFamilyID()
With this class you can import a element containing its data as element o...
const SvXMLTokenMap & GetChartElemTokenMap()
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:45
const SvXMLTokenMap & GetRegEquationAttrTokenMap()
const SvXMLTokenMap & GetSeriesElemTokenMap()
const css::uno::Reference< css::chart::XChartDocument > & GetChartDocument() const
std::unique_ptr< SvXMLTokenMap > mpPropMappingAttrTokenMap
std::unique_ptr< SvXMLTokenMap > mpChartElemTokenMap
const SvXMLTokenMap & GetDocElemTokenMap()
const SvXMLTokenMap & GetCellAttrTokenMap()
std::unique_ptr< SvXMLTokenMap > mpSeriesElemTokenMap
std::unique_ptr< SvXMLTokenMap > mpPlotAreaElemTokenMap
css::uno::Reference< css::chart::XChartDocument > mxChartDoc
SvXMLStylesContext * mpAutoStyles