27#include <com/sun/star/chart/XChartDocument.hpp>
28#include <com/sun/star/chart2/XChartDocument.hpp>
29#include <com/sun/star/chart2/XDiagram.hpp>
30#include <com/sun/star/chart2/XDataTable.hpp>
31#include <com/sun/star/lang/XMultiServiceFactory.hpp>
38 , mrImportHelper(rImpHelper)
43 sal_Int32 ,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
47 if (!xChartDocument.is())
50 uno::Reference<chart2::XChartDocument> xNewChartDocument(xChartDocument, uno::UNO_QUERY);
51 if (!xNewChartDocument.is())
54 uno::Reference<chart2::XDiagram> xDiagram(xNewChartDocument->getFirstDiagram());
60 uno::Reference<chart2::XDataTable> xDataTable(
61 xFactory->createInstance(
"com.sun.star.chart2.DataTable"), uno::UNO_QUERY);
65 xDiagram->setDataTable(xDataTable);
67 OUString sAutoStyleName;
72 sAutoStyleName = aIter.toString();
78 uno::Reference<beans::XPropertySet> xPropertySet(xDataTable, uno::UNO_QUERY);
80 if (!sAutoStyleName.isEmpty() && xPropertySet.is())
virtual ~SchXMLDataTableContext() override
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
SchXMLDataTableContext(SchXMLImportHelper &rImpHelper, SvXMLImport &rImport)
SchXMLImportHelper & mrImportHelper
With this class you can import a <chart:chart> element containing its data as <table:table> element o...
const css::uno::Reference< css::chart::XChartDocument > & GetChartDocument() const
void FillAutoStyle(const OUString &rAutoStyleName, const css::uno::Reference< css::beans::XPropertySet > &rProp)
Fill in the autostyle.
This class deliberately does not support XWeak, to improve performance when loading large documents.
Reference< XSingleServiceFactory > xFactory
Reference< XMultiServiceFactory > getProcessServiceFactory()
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
#define XMLOFF_WARN_UNKNOWN(area, rIter)
#define XML_ELEMENT(prefix, name)