summaryrefslogtreecommitdiff
path: root/chart2/source/model/main
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-07-01 12:03:20 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-07-01 14:56:23 +0200
commit3b7c81b9536d8155f4134010aee61d27764f1a5f (patch)
treed4ba01c8ef4be5d6ceede264917994e91e20a0d4 /chart2/source/model/main
parent5ab5f2d8656a1a0f3c9631e767687f9bb51a6913 (diff)
sw doc model xml dump: show SdrModel of embedded charts
Change-Id: Iae9daefb9b2173736c039d6177d7356c27eb7a33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97605 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'chart2/source/model/main')
-rw-r--r--chart2/source/model/main/ChartModel.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 96c49fb56655..4f1d055f6a13 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -56,6 +56,7 @@
#include <sal/log.hxx>
#include <svl/zforlist.hxx>
#include <tools/diagnose_ex.h>
+#include <libxml/xmlwriter.h>
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
@@ -738,6 +739,19 @@ void ChartModel::removeDataProviders()
m_xDataProvider.clear();
}
+void ChartModel::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("ChartModel"));
+ xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
+
+ if (mxChartView.is())
+ {
+ mxChartView->dumpAsXml(pWriter);
+ }
+
+ xmlTextWriterEndElement(pWriter);
+}
+
sal_Bool SAL_CALL ChartModel::hasInternalDataProvider()
{
return m_xDataProvider.is() && m_xInternalDataProvider.is();