[Libreoffice-commits] core.git: include/vcl vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 3 19:09:29 UTC 2019
include/vcl/gdimtf.hxx | 3 +++
vcl/source/gdi/gdimtf.cxx | 8 ++++++++
2 files changed, 11 insertions(+)
New commits:
commit 0ea4c1ae099e53e20babc3eaae0c1c377cc3ded5
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Jan 3 14:17:10 2019 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jan 3 20:09:06 2019 +0100
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 at collabora.com>
Tested-by: Jenkins
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: */
More information about the Libreoffice-commits
mailing list