summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-01-03 14:17:10 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-03 20:09:06 +0100
commit0ea4c1ae099e53e20babc3eaae0c1c377cc3ded5 (patch)
tree54cffe63f9a0106c6ade084e904b463ace4bbb85
parent5d6102ce297f12a81e1d21b4ffc9df1d97d0b847 (diff)
vcl GDIMetaFile: easier dumping from debugger
Calling a const member function is easy, creating a dumper instance is not. Change-Id: I4892f93f6e1d1f17021185bfd24e411c9d705b3b Reviewed-on: https://gerrit.libreoffice.org/65838 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
-rw-r--r--include/vcl/gdimtf.hxx3
-rw-r--r--vcl/source/gdi/gdimtf.cxx8
2 files changed, 11 insertions, 0 deletions
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 7f89c1019eb5..59d4f0939076 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -197,6 +197,9 @@ public:
void UseCanvas( bool _bUseCanvas );
bool GetUseCanvas() const { return m_bUseCanvas; }
+
+ /// Dumps the meta actions as XML in metafile.xml.
+ void dumpAsXml() const;
};
#endif // INCLUDED_VCL_GDIMTF_HXX
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index c1f2b9e92e42..13b57d27e1e0 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -37,6 +37,7 @@
#include <comphelper/fileformat.h>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <vcl/canvastools.hxx>
+#include <vcl/mtfxmldump.hxx>
#include <svmconverter.hxx>
@@ -2834,4 +2835,11 @@ void GDIMetaFile::UseCanvas( bool _bUseCanvas )
m_bUseCanvas = _bUseCanvas;
}
+void GDIMetaFile::dumpAsXml() const
+{
+ SvFileStream aStream("metafile.xml", StreamMode::STD_READWRITE | StreamMode::TRUNC);
+ MetafileXmlDump aDumper;
+ aDumper.dump(*this, aStream);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */