LibreOffice Module sc (master) 1
xmldrani.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 <com/sun/star/sheet/DataImportMode.hpp>
22#include <com/sun/star/sheet/SubTotalColumn.hpp>
23#include <com/sun/star/beans/PropertyValue.hpp>
24
25#include <dbdata.hxx>
26#include "importcontext.hxx"
27
28#include <memory>
29
30namespace sax_fastparser { class FastAttributeList; }
31
32struct ScQueryParam;
33
35{
36public:
37
39
40 virtual ~ScXMLDatabaseRangesContext() override;
41
42 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
43 sal_Int32 nElement,
44 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
45};
46
48{
50 css::uno::Sequence <css::sheet::SubTotalColumn> aSubTotalColumns;
51};
52
54{
55 std::unique_ptr<ScQueryParam> mpQueryParam;
59 OUString sDatabaseName;
60 OUString sSourceObject;
61 css::uno::Sequence <css::beans::PropertyValue> aSortSequence;
62 std::vector < ScSubTotalRule > aSubTotalRules;
64 css::sheet::DataImportMode nSourceType;
65 sal_Int32 nRefresh;
70 bool bNative;
71 bool bIsSelection; // TODO: import to document core
84 bool bByRow;
86
87 std::unique_ptr<ScDBData> ConvertToDBData(const OUString& rName);
88
89public:
90
93
94 virtual ~ScXMLDatabaseRangeContext() override;
95
96 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
97 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
98
99 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
100
101 void SetDatabaseName(const OUString& sTempDatabaseName) { sDatabaseName = sTempDatabaseName; }
102 void SetConnectionResource(const OUString& sTempConRes) { sConnectionResource = sTempConRes; }
103 void SetSourceObject(const OUString& sTempSourceObject) { sSourceObject = sTempSourceObject; }
104 void SetSourceType(const css::sheet::DataImportMode nTempSourceType) { nSourceType = nTempSourceType; }
105 void SetNative(const bool bTempNative) { bNative = bTempNative; }
107 void SetSubTotalsIsCaseSensitive(const bool bTemp) { bSubTotalsIsCaseSensitive = bTemp; }
109 void SetSubTotalsEnabledUserList(const bool bTemp) { bSubTotalsEnabledUserList = bTemp; }
110 void SetSubTotalsUserListIndex(const sal_Int16 nTemp) { nSubTotalsUserListIndex = nTemp; }
111 void SetSubTotalsAscending(const bool bTemp) { bSubTotalsAscending = bTemp; }
112 void SetSubTotalsSortGroups(const bool bTemp) { bSubTotalsSortGroups = bTemp; }
113 void AddSubTotalRule(const ScSubTotalRule& rRule) { aSubTotalRules.push_back(rRule); }
114 void SetSortSequence(const css::uno::Sequence <css::beans::PropertyValue>& aTempSortSequence) { aSortSequence = aTempSortSequence; }
117};
118
120{
122 OUString sDBName;
123
124public:
125
128 ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
129
130 virtual ~ScXMLSourceSQLContext() override;
131
132 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
133 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
134
135 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
136};
137
139{
141 OUString sDBName;
142
143public:
144
147 ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
148
149 virtual ~ScXMLSourceTableContext() override;
150
151 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
152 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
153
154 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
155};
156
158{
160 OUString sDBName;
161
162public:
163
166 ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
167
168 virtual ~ScXMLSourceQueryContext() override;
169
170 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
171 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
172
173 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
174};
175
177{
178public:
179
182 ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
183
184 virtual ~ScXMLConResContext() override;
185};
186
188{
190
191public:
192
195 ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
196
197 virtual ~ScXMLSubTotalRulesContext() override;
198
199 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
200 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
201};
202
204{
205public:
206
209 ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
210
211 virtual ~ScXMLSortGroupsContext() override;
212};
213
215{
218
219public:
220
223 ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
224
225 virtual ~ScXMLSubTotalRuleContext() override;
226
227 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
228 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
229
230 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
231
232 void AddSubTotalColumn(const css::sheet::SubTotalColumn& rSubTotalColumn)
233 {
235 aSubTotalRule.aSubTotalColumns.getArray()[aSubTotalRule.aSubTotalColumns.getLength() - 1] = rSubTotalColumn;
236 }
237};
238
240{
242 OUString sFieldNumber;
243 OUString sFunction;
244
245public:
246
250
251 virtual ~ScXMLSubTotalFieldContext() override;
252
253 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
254};
255
256/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~ScXMLConResContext() override
Definition: xmldrani.cxx:611
ScXMLConResContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDatabaseRangeContext *pTempDatabaseRangeContext)
Definition: xmldrani.cxx:595
sal_Int16 nSubTotalsUserListIndex
Definition: xmldrani.hxx:66
css::sheet::DataImportMode nSourceType
Definition: xmldrani.hxx:64
void SetSubTotalsInsertPageBreaks(const bool bTemp)
Definition: xmldrani.hxx:108
std::vector< ScSubTotalRule > aSubTotalRules
Definition: xmldrani.hxx:62
ScXMLDatabaseRangeContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
Definition: xmldrani.cxx:82
void SetSubTotalsIsCaseSensitive(const bool bTemp)
Definition: xmldrani.hxx:107
void SetSubTotalsEnabledUserList(const bool bTemp)
Definition: xmldrani.hxx:109
void SetConnectionResource(const OUString &sTempConRes)
Definition: xmldrani.hxx:102
void SetSortSequence(const css::uno::Sequence< css::beans::PropertyValue > &aTempSortSequence)
Definition: xmldrani.hxx:114
void SetDatabaseName(const OUString &sTempDatabaseName)
Definition: xmldrani.hxx:101
std::unique_ptr< ScQueryParam > mpQueryParam
Definition: xmldrani.hxx:55
ScRange aFilterConditionSourceRangeAddress
Definition: xmldrani.hxx:63
void SetSubTotalsAscending(const bool bTemp)
Definition: xmldrani.hxx:111
ScDBCollection::RangeType meRangeType
Definition: xmldrani.hxx:85
void SetSubTotalsUserListIndex(const sal_Int16 nTemp)
Definition: xmldrani.hxx:110
void SetSubTotalsSortGroups(const bool bTemp)
Definition: xmldrani.hxx:112
void SetFilterConditionSourceRangeAddress(const ScRange &aRange)
Definition: xmldrani.hxx:115
std::unique_ptr< ScDBData > ConvertToDBData(const OUString &rName)
Definition: xmldrani.cxx:242
css::uno::Sequence< css::beans::PropertyValue > aSortSequence
Definition: xmldrani.hxx:61
virtual ~ScXMLDatabaseRangeContext() override
Definition: xmldrani.cxx:191
void SetSourceObject(const OUString &sTempSourceObject)
Definition: xmldrani.hxx:103
void SetSubTotalsBindFormatsToContent(const bool bTemp)
Definition: xmldrani.hxx:106
void SetNative(const bool bTempNative)
Definition: xmldrani.hxx:105
void SetSourceType(const css::sheet::DataImportMode nTempSourceType)
Definition: xmldrani.hxx:104
void AddSubTotalRule(const ScSubTotalRule &rRule)
Definition: xmldrani.hxx:113
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmldrani.cxx:195
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmldrani.cxx:396
ScXMLDatabaseRangesContext(ScXMLImport &rImport)
Definition: xmldrani.cxx:50
virtual ~ScXMLDatabaseRangesContext() override
Definition: xmldrani.cxx:57
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmldrani.cxx:62
This class exists only to provide GetScImport() to its derived classes.
virtual ~ScXMLSortGroupsContext() override
Definition: xmldrani.cxx:724
ScXMLSortGroupsContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDatabaseRangeContext *pTempDatabaseRangeContext)
Definition: xmldrani.cxx:669
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmldrani.cxx:589
ScXMLDatabaseRangeContext * pDatabaseRangeContext
Definition: xmldrani.hxx:159
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmldrani.cxx:574
virtual ~ScXMLSourceQueryContext() override
Definition: xmldrani.cxx:570
ScXMLSourceQueryContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDatabaseRangeContext *pTempDatabaseRangeContext)
Definition: xmldrani.cxx:546
ScXMLDatabaseRangeContext * pDatabaseRangeContext
Definition: xmldrani.hxx:121
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmldrani.cxx:490
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmldrani.cxx:475
virtual ~ScXMLSourceSQLContext() override
Definition: xmldrani.cxx:471
ScXMLSourceSQLContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDatabaseRangeContext *pTempDatabaseRangeContext)
Definition: xmldrani.cxx:444
ScXMLDatabaseRangeContext * pDatabaseRangeContext
Definition: xmldrani.hxx:140
ScXMLSourceTableContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDatabaseRangeContext *pTempDatabaseRangeContext)
Definition: xmldrani.cxx:496
virtual ~ScXMLSourceTableContext() override
Definition: xmldrani.cxx:521
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmldrani.cxx:525
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmldrani.cxx:540
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmldrani.cxx:804
virtual ~ScXMLSubTotalFieldContext() override
Definition: xmldrani.cxx:800
ScXMLSubTotalFieldContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLSubTotalRuleContext *pSubTotalRuleContext)
Definition: xmldrani.cxx:777
ScXMLSubTotalRuleContext * pSubTotalRuleContext
Definition: xmldrani.hxx:241
void AddSubTotalColumn(const css::sheet::SubTotalColumn &rSubTotalColumn)
Definition: xmldrani.hxx:232
ScXMLSubTotalRuleContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDatabaseRangeContext *pTempDatabaseRangeContext)
Definition: xmldrani.cxx:728
ScSubTotalRule aSubTotalRule
Definition: xmldrani.hxx:217
ScXMLDatabaseRangeContext * pDatabaseRangeContext
Definition: xmldrani.hxx:216
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmldrani.cxx:752
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmldrani.cxx:771
virtual ~ScXMLSubTotalRuleContext() override
Definition: xmldrani.cxx:748
ScXMLDatabaseRangeContext * pDatabaseRangeContext
Definition: xmldrani.hxx:189
ScXMLSubTotalRulesContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDatabaseRangeContext *pTempDatabaseRangeContext)
Definition: xmldrani.cxx:615
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmldrani.cxx:645
virtual ~ScXMLSubTotalRulesContext() override
Definition: xmldrani.cxx:641
sal_Int16 nSubTotalRuleGroupFieldNumber
Definition: xmldrani.hxx:49
css::uno::Sequence< css::sheet::SubTotalColumn > aSubTotalColumns
Definition: xmldrani.hxx:50