diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-01-14 10:27:40 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-14 16:39:53 +0100 |
commit | 0bb77f2161e8bcaf42c536a859c2095a3f03428a (patch) | |
tree | 9c4fa0638a574c9ba5ee768d02566e393b913767 | |
parent | d872cd935e16525e22db1ee43a75d5913ebefcf5 (diff) |
Add fileName to GDIMetaFile::dumpAsXml()
GDIMetaFile::dumpAsXml() is very useful while investigating/examining
the meta files, but it overwrites with the same file name each time.
To be able to get different dumps at the same time, let's add
a fileName parameter to it.
Change-Id: I993720b460f326cd65519556cf1e902591d90d42
Reviewed-on: https://gerrit.libreoffice.org/66283
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/vcl/gdimtf.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index 59d4f0939076..9b43cd2f6ef8 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -199,7 +199,7 @@ public: bool GetUseCanvas() const { return m_bUseCanvas; } /// Dumps the meta actions as XML in metafile.xml. - void dumpAsXml() const; + void dumpAsXml( const OUString& sFileName = OUString() ) const; }; #endif // INCLUDED_VCL_GDIMTF_HXX diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index db292eebb298..7038fb7c5244 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2835,9 +2835,9 @@ void GDIMetaFile::UseCanvas( bool _bUseCanvas ) m_bUseCanvas = _bUseCanvas; } -void GDIMetaFile::dumpAsXml() const +void GDIMetaFile::dumpAsXml( const OUString& sFileName ) const { - SvFileStream aStream("metafile.xml", StreamMode::STD_READWRITE | StreamMode::TRUNC); + SvFileStream aStream(sFileName.isEmpty() ? "metafile.xml" : sFileName, StreamMode::STD_READWRITE | StreamMode::TRUNC); MetafileXmlDump aDumper; aDumper.dump(*this, aStream); } |