summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx25
-rw-r--r--include/drawinglayer/XShapeDumper.hxx2
2 files changed, 25 insertions, 2 deletions
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 93712ad9b123..639ec73e04b0 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -1938,7 +1938,6 @@ void dumpXShapes( uno::Reference< drawing::XShapes > xShapes, xmlTextWriterPtr x
OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes, bool bDumpInteropProperties)
{
-
OStringBuffer aString;
xmlOutputBufferPtr xmlOutBuffer = xmlOutputBufferCreateIO( writeCallback, closeCallback, &aString, NULL );
xmlTextWriterPtr xmlWriter = xmlNewTextWriter( xmlOutBuffer );
@@ -1961,4 +1960,28 @@ OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes, bool b
return OStringToOUString(aString.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
}
+OUString XShapeDumper::dump(uno::Reference<drawing::XShape> xPageShapes, bool bDumpInteropProperties)
+{
+ OStringBuffer aString;
+ xmlOutputBufferPtr xmlOutBuffer = xmlOutputBufferCreateIO( writeCallback, closeCallback, &aString, NULL );
+ xmlTextWriterPtr xmlWriter = xmlNewTextWriter( xmlOutBuffer );
+ xmlTextWriterSetIndent( xmlWriter, 1 );
+
+ xmlTextWriterStartDocument( xmlWriter, NULL, NULL, NULL );
+
+ try
+ {
+ dumpXShape( xPageShapes, xmlWriter, bDumpInteropProperties );
+ }
+ catch (const beans::UnknownPropertyException& e)
+ {
+ std::cout << "Exception caught in XShapeDumper: " << e.Message << std::endl;
+ }
+
+ xmlTextWriterEndDocument( xmlWriter );
+ xmlFreeTextWriter( xmlWriter );
+
+ return OStringToOUString(aString.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/XShapeDumper.hxx b/include/drawinglayer/XShapeDumper.hxx
index efce7779c133..e8c50bcaf59d 100644
--- a/include/drawinglayer/XShapeDumper.hxx
+++ b/include/drawinglayer/XShapeDumper.hxx
@@ -47,7 +47,7 @@ class DRAWINGLAYER_DLLPUBLIC XShapeDumper
public:
XShapeDumper();
OUString dump(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> xPageShapes, bool bDumpInteropProperties=false);
-
+ OUString dump(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> xPageShapes, bool bDumpInteropProperties=false);
};
#endif