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#pragma once
20
21#include <xmloff/xmlictxt.hxx>
23#include <com/sun/star/uno/Sequence.hxx>
24
25#include <com/sun/star/chart/ChartDataRowSource.hpp>
26
27#include "transporttypes.hxx"
28
29namespace com::sun::star {
30 namespace xml::sax {
31 class XAttributeList;
32 }
33 namespace chart {
34 class XChartDocument;
35 }
36}
37
39{
40private:
42
45 css::uno::Sequence< sal_Int32 > maRowPermutation;
46 css::uno::Sequence< sal_Int32 > maColumnPermutation;
47
48public:
50 SchXMLTable& aTable );
51 virtual ~SchXMLTableContext() override;
52
53 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
54 sal_Int32 nElement,
55 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
56 virtual void SAL_CALL startFastElement(
57 sal_Int32 nElement,
58 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
59 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
60
61 void setRowPermutation( const css::uno::Sequence< sal_Int32 > & rPermutation );
62 void setColumnPermutation( const css::uno::Sequence< sal_Int32 > & rPermutation );
63};
64
66{
67public:
68 static void applyTableToInternalDataProvider( const SchXMLTable& rTable,
69 const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
70
75 const tSchXMLLSequencesPerIndex & rLSequencesPerIndex,
76 const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc,
77 css::chart::ChartDataRowSource eDataRowSource );
78};
79
80// classes for columns
81
88{
89private:
91
92public:
94 SchXMLTable& aTable );
95 virtual ~SchXMLTableColumnsContext() override;
96
97 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
98 sal_Int32 nElement,
99 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
100};
101
103{
104private:
106
107public:
109 SchXMLTable& aTable );
110 virtual ~SchXMLTableColumnContext() override;
111 virtual void SAL_CALL startFastElement(
112 sal_Int32 nElement,
113 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
114};
115
116// classes for rows
117
119{
120private:
122
123public:
125 SchXMLTable& aTable );
126 virtual ~SchXMLTableRowsContext() override;
127
128 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
129 sal_Int32 nElement,
130 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
131};
132
134{
135private:
137
138public:
140 SchXMLTable& aTable );
141 virtual ~SchXMLTableRowContext() override;
142
143 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
144 sal_Int32 nElement,
145 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
146};
147
148// classes for cells and their content
149
151{
152private:
155 OUString maRangeId;
157
158public:
160 SchXMLTable& aTable );
161 virtual ~SchXMLTableCellContext() override;
162
163 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
164 sal_Int32 nElement,
165 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
166 virtual void SAL_CALL startFastElement(
167 sal_Int32 nElement,
168 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
169 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
170};
171
172/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~SchXMLTableCellContext() 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 ...
SchXMLTableCellContext(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 void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
SchXMLTableColumnContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~SchXMLTableColumnContext() override
With this context all column elements are parsed to determine the index of the column containing the ...
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
SchXMLTableColumnsContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual ~SchXMLTableColumnsContext() override
SchXMLTableContext(SvXMLImport &rImport, SchXMLTable &aTable)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) 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 ...
css::uno::Sequence< sal_Int32 > maColumnPermutation
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 ~SchXMLTableContext() override
void setRowPermutation(const css::uno::Sequence< sal_Int32 > &rPermutation)
void setColumnPermutation(const css::uno::Sequence< sal_Int32 > &rPermutation)
css::uno::Sequence< sal_Int32 > maRowPermutation
static void applyTableToInternalDataProvider(const SchXMLTable &rTable, const css::uno::Reference< css::chart2::XChartDocument > &xChartDoc)
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.
SchXMLTableRowContext(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 ~SchXMLTableRowContext() override
virtual ~SchXMLTableRowsContext() 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
SchXMLTableRowsContext(SvXMLImport &rImport, SchXMLTable &aTable)
This class deliberately does not support XWeak, to improve performance when loading large documents.
Definition: xmlictxt.hxx:48
::std::multimap< tSchXMLIndexWithPart, css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tSchXMLLSequencesPerIndex