From 23c01f82682469e25fa2a8407c55100e89ab86de Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Wed, 14 Sep 2022 23:55:20 +0200 Subject: Add documentation for data table added classes and functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idc9756bf5b468d8ed0d11e6a75703d96350e1273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139960 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- xmloff/source/chart/SchXMLDataTableContext.cxx | 4 +++- xmloff/source/chart/SchXMLDataTableContext.hxx | 1 + xmloff/source/chart/SchXMLExport.cxx | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/chart/SchXMLDataTableContext.cxx b/xmloff/source/chart/SchXMLDataTableContext.cxx index a9a26d2e1d3d..20846c5d95a8 100644 --- a/xmloff/source/chart/SchXMLDataTableContext.cxx +++ b/xmloff/source/chart/SchXMLDataTableContext.cxx @@ -42,6 +42,7 @@ SchXMLDataTableContext::SchXMLDataTableContext(SchXMLImportHelper& rImpHelper, S void SchXMLDataTableContext::startFastElement( sal_Int32 /*nElement*/, const uno::Reference& xAttrList) { + // Check if we have all that is needed to create the data table instance auto xChartDocument = mrImportHelper.GetChartDocument(); if (!xChartDocument.is()) return; @@ -54,6 +55,7 @@ void SchXMLDataTableContext::startFastElement( if (!xDiagram.is()) return; + // Create a new DataTable instance uno::Reference xFactory = comphelper::getProcessServiceFactory(); uno::Reference xDataTable( xFactory->createInstance("com.sun.star.chart2.DataTable"), uno::UNO_QUERY); @@ -72,7 +74,7 @@ void SchXMLDataTableContext::startFastElement( XMLOFF_WARN_UNKNOWN("xmloff", aIter); } - // set properties + // Set the data table properties uno::Reference xPropertySet(xDataTable, uno::UNO_QUERY); if (!sAutoStyleName.isEmpty() && xPropertySet.is()) diff --git a/xmloff/source/chart/SchXMLDataTableContext.hxx b/xmloff/source/chart/SchXMLDataTableContext.hxx index 716f445ed61e..fbf87fb44967 100644 --- a/xmloff/source/chart/SchXMLDataTableContext.hxx +++ b/xmloff/source/chart/SchXMLDataTableContext.hxx @@ -23,6 +23,7 @@ #include #include +/** Import the content of the data-table (XML_DATA_TABLE) element */ class SchXMLDataTableContext : public SvXMLImportContext { public: diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index da27d1447368..e07fb6a77693 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1493,7 +1493,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > aPropertyStates.clear(); } - // Data table + // Export data table element and properties if (xNewDiagram.is() && nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) { auto xDataTable = xNewDiagram->getDataTable(); -- cgit