LibreOffice Module xmloff (master)  1
SchXMLTableContext.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_SOURCE_CHART_SCHXMLTABLECONTEXT_HXX
20 #define INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLTABLECONTEXT_HXX
21 
22 #include <xmloff/xmlictxt.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
25 
26 #include <com/sun/star/chart/ChartDataRowSource.hpp>
27 
28 #include "transporttypes.hxx"
29 
30 namespace com::sun::star {
31  namespace xml::sax {
32  class XAttributeList;
33  }
34  namespace chart {
35  class XChartDocument;
36  }
37 }
38 
40 {
41 private:
43 
46  css::uno::Sequence< sal_Int32 > maRowPermutation;
47  css::uno::Sequence< sal_Int32 > maColumnPermutation;
48 
49 public:
51  SchXMLTable& aTable );
52  virtual ~SchXMLTableContext() override;
53 
54  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
55  sal_Int32 nElement,
56  const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
57  virtual void SAL_CALL startFastElement(
58  sal_Int32 nElement,
59  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
60  virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
61 
62  void setRowPermutation( const css::uno::Sequence< sal_Int32 > & rPermutation );
63  void setColumnPermutation( const css::uno::Sequence< sal_Int32 > & rPermutation );
64 };
65 
67 {
68 public:
69  static void applyTableToInternalDataProvider( const SchXMLTable& rTable,
70  const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
71 
76  const tSchXMLLSequencesPerIndex & rLSequencesPerIndex,
77  const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc,
78  css::chart::ChartDataRowSource eDataRowSource );
79 };
80 
81 // classes for columns
82 
89 {
90 private:
92 
93 public:
95  SchXMLTable& aTable );
96  virtual ~SchXMLTableColumnsContext() override;
97 
98  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
99  sal_Int32 nElement,
100  const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
101 };
102 
104 {
105 private:
107 
108 public:
110  SchXMLTable& aTable );
111  virtual ~SchXMLTableColumnContext() override;
112  virtual void SAL_CALL startFastElement(
113  sal_Int32 nElement,
114  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
115 };
116 
117 // classes for rows
118 
120 {
121 private:
123 
124 public:
126  SchXMLTable& aTable );
127  virtual ~SchXMLTableRowsContext() override;
128 
129  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
130  sal_Int32 nElement,
131  const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
132 };
133 
135 {
136 private:
138 
139 public:
141  SchXMLTable& aTable );
142  virtual ~SchXMLTableRowContext() override;
143 
144  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
145  sal_Int32 nElement,
146  const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
147 };
148 
149 // classes for cells and their content
150 
152 {
153 private:
155  OUString maCellContent;
156  OUString maRangeId;
158 
159 public:
161  SchXMLTable& aTable );
162  virtual ~SchXMLTableCellContext() override;
163 
164  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
165  sal_Int32 nElement,
166  const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
167  virtual void SAL_CALL startFastElement(
168  sal_Int32 nElement,
169  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
170  virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
171 };
172 
173 #endif // INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLTABLECONTEXT_HXX
174 
175 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SchXMLTableRowContext(SvXMLImport &rImport, SchXMLTable &aTable)
SchXMLTableContext(SvXMLImport &rImport, SchXMLTable &aTable)
SchXMLTableRowsContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual ~SchXMLTableColumnContext() override
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
SchXMLTableColumnsContext(SvXMLImport &rImport, SchXMLTable &aTable)
void setRowPermutation(const css::uno::Sequence< sal_Int32 > &rPermutation)
SchXMLTableColumnContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
css::uno::Sequence< sal_Int32 > maRowPermutation
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
css::uno::Sequence< sal_Int32 > maColumnPermutation
virtual ~SchXMLTableContext() override
SchXMLTableCellContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~SchXMLTableRowsContext() override
virtual ~SchXMLTableCellContext() override
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:45
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
static void switchRangesFromOuterToInternalIfNecessary(const SchXMLTable &rTable, const tSchXMLLSequencesPerIndex &rLSequencesPerIndex, const css::uno::Reference< css::chart2::XChartDocument > &xChartDoc, css::chart::ChartDataRowSource eDataRowSource)
This function reorders local data to fit the correct data structure.
virtual ~SchXMLTableRowContext() override
With this context all column elements are parsed to determine the index of the column containing the ...
::std::multimap< tSchXMLIndexWithPart, css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tSchXMLLSequencesPerIndex
void setColumnPermutation(const css::uno::Sequence< sal_Int32 > &rPermutation)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
static void applyTableToInternalDataProvider(const SchXMLTable &rTable, const css::uno::Reference< css::chart2::XChartDocument > &xChartDoc)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
virtual ~SchXMLTableColumnsContext() override