summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2022-09-14 23:55:20 +0200
committerTomaž Vajngerl <quikee@gmail.com>2022-09-15 12:38:22 +0200
commit23c01f82682469e25fa2a8407c55100e89ab86de (patch)
tree38d85d60d058d46e8c5876d552fbc45c2c9df5a0 /xmloff
parentd0760109b7bb965187243cdb1d3a07df83039db1 (diff)
Add documentation for data table added classes and functions
Change-Id: Idc9756bf5b468d8ed0d11e6a75703d96350e1273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139960 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLDataTableContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLDataTableContext.hxx1
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx2
3 files changed, 5 insertions, 2 deletions
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<xml::sax::XFastAttributeList>& 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<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory();
uno::Reference<chart2::XDataTable> 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<beans::XPropertySet> 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 <xmloff/SchXMLImportHelper.hxx>
#include <xmloff/xmlictxt.hxx>
+/** 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();