17#include <document.hxx>
29uno::Reference<xml::sax::XFastContextHandler>
31 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
94 if (!rDataSources.empty())
96 rDataSources[rDataSources.size() - 1].AddDataTransformation(
97 std::make_shared<sc::ColumnRemoveTransformation>(std::set(
maColumns)));
101uno::Reference<xml::sax::XFastContextHandler>
103 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
116 for (
auto& aIter : *rAttrList)
118 switch (aIter.getToken())
144 for (
auto& aIter : *rAttrList)
146 switch (aIter.getToken())
150 mnCol = aIter.toInt32();
155 cSeparator = aIter.toString();
166 if (!rDataSources.empty())
168 rDataSources[rDataSources.size() - 1].AddDataTransformation(
169 std::make_shared<sc::SplitColumnTransformation>(
mnCol, cSeparator.toChar()));
183 for (
auto& aIter : *rAttrList)
185 switch (aIter.getToken())
200 if (!rDataSources.empty())
202 rDataSources[rDataSources.size() - 1].AddDataTransformation(
207uno::Reference<xml::sax::XFastContextHandler>
209 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
217 switch (aIter.getToken())
258 for (
auto& aIter : *rAttrList)
260 switch (aIter.getToken())
264 aType = aIter.toString();
271 if (!aType.isEmpty())
273 if (aType ==
"lowercase")
275 else if (aType ==
"uppercase")
277 else if (aType ==
"capitalize")
279 else if (aType ==
"trim")
288 if (!rDataSources.empty())
290 rDataSources[rDataSources.size() - 1].AddDataTransformation(
291 std::make_shared<sc::TextTransformation>(std::set(
maColumns),
maType));
295uno::Reference<xml::sax::XFastContextHandler>
297 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
305 switch (aIter.getToken())
329 for (
auto& aIter : *rAttrList)
331 switch (aIter.getToken())
335 aType = aIter.toString();
342 if (!aType.isEmpty())
346 else if (aType ==
"average")
348 else if (aType ==
"min")
350 else if (aType ==
"max")
359 if (!rDataSources.empty())
361 rDataSources[rDataSources.size() - 1].AddDataTransformation(
366uno::Reference<xml::sax::XFastContextHandler>
368 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
376 switch (aIter.getToken())
400 for (
auto& aIter : *rAttrList)
402 switch (aIter.getToken())
406 aType = aIter.toString();
421 if (aType ==
"round")
423 else if (aType ==
"round-up")
425 else if (aType ==
"round-down")
427 else if (aType ==
"abs")
429 else if (aType ==
"log")
431 else if (aType ==
"log-base-10")
433 else if (aType ==
"cube")
435 else if (aType ==
"number-square")
437 else if (aType ==
"square-root")
439 else if (aType ==
"exponential")
441 else if (aType ==
"even")
443 else if (aType ==
"odd")
445 else if (aType ==
"sign")
453 if (!rDataSources.empty())
455 rDataSources[rDataSources.size() - 1].AddDataTransformation(
460uno::Reference<xml::sax::XFastContextHandler>
462 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
470 switch (aIter.getToken())
492 for (
auto& aIter : *rAttrList)
494 switch (aIter.getToken())
509 if (!rDataSources.empty())
511 rDataSources[rDataSources.size() - 1].AddDataTransformation(
516uno::Reference<xml::sax::XFastContextHandler>
518 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
526 switch (aIter.getToken())
548 for (
auto& aIter : *rAttrList)
550 switch (aIter.getToken())
554 aType = aIter.toString();
564 if (
aType ==
"date-string")
566 else if (
aType ==
"year")
568 else if (
aType ==
"start-of-year")
570 else if (
aType ==
"end-of-year")
572 else if (
aType ==
"month")
574 else if (
aType ==
"month-name")
576 else if (
aType ==
"start-of-month")
578 else if (
aType ==
"end-of-month")
580 else if (
aType ==
"day")
582 else if (
aType ==
"day-of-week")
584 else if (
aType ==
"day-of-year")
586 else if (
aType ==
"quarter")
588 else if (
aType ==
"start-of-quarter")
590 else if (
aType ==
"end-of-quarter")
592 else if (
aType ==
"time")
594 else if (
aType ==
"hour")
596 else if (
aType ==
"minute")
598 else if (
aType ==
"seconds")
606 if (!rDataSources.empty())
608 rDataSources[rDataSources.size() - 1].AddDataTransformation(
609 std::make_shared<sc::DateTimeTransformation>(std::set(
maColumns),
maType));
614 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
622 switch (aIter.getToken())
SC_DLLPUBLIC sc::ExternalDataMapper & GetExternalDataMapper()
std::set< SCCOL > maColumns
virtual ~ScXMLColumnAggregateContext() override
sc::AGGREGATE_FUNCTION maType
ScXMLColumnAggregateContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
std::set< SCCOL > maColumns
virtual ~ScXMLColumnMergeContext() override
ScXMLColumnMergeContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~ScXMLColumnNumberContext() override
ScXMLColumnNumberContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
sc::NUMBER_TRANSFORM_TYPE maType
std::set< SCCOL > maColumns
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLColumnRemoveContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
std::set< SCCOL > maColumns
virtual ~ScXMLColumnRemoveContext() override
std::set< SCCOL > maColumns
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLColumnRemoveNullContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
virtual ~ScXMLColumnRemoveNullContext() override
virtual ~ScXMLColumnSortContext() override
ScXMLColumnSortContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
virtual ~ScXMLColumnSplitContext() override
ScXMLColumnSplitContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
sc::TEXT_TRANSFORM_TYPE maType
ScXMLColumnTextContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
std::set< SCCOL > maColumns
virtual ~ScXMLColumnTextContext() override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
sc::DATETIME_TRANSFORMATION_TYPE maType
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
std::set< SCCOL > maColumns
ScXMLDateTimeContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
virtual ~ScXMLDateTimeContext() override
This class exists only to provide GetScImport() to its derived classes.
ScXMLImport & GetScImport()
ScDocument * GetDocument()
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~ScXMLTransformationsContext() override
ScXMLTransformationsContext(ScXMLImport &rImport)
SvXMLImport & GetImport()
SvXMLImportContext(SvXMLImport &rImport)
const std::vector< ExternalDataSource > & getDataSources() const
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
CAUTION! The following defines must be in the same namespace as the respective type.
DATETIME_TRANSFORMATION_TYPE
XML_COLUMN_TEXT_TRANSFORMATION
XML_COLUMN_REPLACENULL_TRANSFORMATION
XML_COLUMN_REMOVE_TRANSFORMATION
XML_COLUMN_SORT_TRANSFORMATION
XML_COLUMN_NUMBER_TRANSFORMATION
XML_COLUMN_SPLIT_TRANSFORMATION
XML_COLUMN_MERGE_TRANSFORMATION
XML_COLUMN_AGGREGATE_TRANSFORMATION
#define XML_ELEMENT(prefix, name)