summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-04-25 19:55:59 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-04-25 20:03:48 +0200
commit12ace5060dbef6add5521fb932d78e7807c793be (patch)
treea7cccb5565183a2850b3bf4d1726583a0cf4915b /chart2
parenta371f5de634195785c9e4b90118049b3c8260ac6 (diff)
dump also drawinglayer shapes that are externally added
Change-Id: I0a5ba2db0fa09193803442b5771a1d6b0475c2c8
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/ChartView.cxx32
1 files changed, 23 insertions, 9 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index fe5d38c76eed..ec9dcb503b06 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -3059,17 +3059,31 @@ OUString ChartView::dump() throw (uno::RuntimeException, std::exception)
// Used for unit tests only, no need to drag in this when cross-compiling
// for non-desktop
impl_updateView();
- if(!mxRootShape.is())
- mxRootShape = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)
- ->getOrCreateChartRootShape( m_xDrawPage );
-
- if (!mxRootShape.is())
- return OUString();
- else
+ uno::Reference< drawing::XShapes > xShapes( m_xDrawPage, uno::UNO_QUERY_THROW );
+ sal_Int32 n = xShapes->getCount();
+ OUStringBuffer aBuffer;
+ for(sal_Int32 i = 0; i < n; ++i)
{
- XShapeDumper dumper;
- return dumper.dump(mxRootShape);
+ uno::Reference< drawing::XShapes > xShape(xShapes->getByIndex(i), uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ XShapeDumper dumper;
+ OUString aString = dumper.dump(mxRootShape);
+ aBuffer.append(aString);
+ }
+ else
+ {
+ uno::Reference< drawing::XShape > xSingleShape(xShapes->getByIndex(i), uno::UNO_QUERY);
+ if(!xSingleShape.is())
+ continue;
+ XShapeDumper dumper;
+ OUString aString = dumper.dump(xSingleShape);
+ aBuffer.append(aString);
+ }
+ aBuffer.append("\n\n");
}
+
+ return aBuffer.makeStringAndClear();
#else
return OUString();
#endif