[Libreoffice-commits] core.git: vcl/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 4 11:45:14 UTC 2019


 vcl/source/gdi/gdimtf.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 41383ad341dbfcb0233cbbdaafceeb545b955ce3
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Oct 4 11:48:03 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Oct 4 13:44:35 2019 +0200

    vcl metafile dump: a relative file path is not a good default
    
    SvFileStream wants an absolute file URL, so improve the default
    minimally and also assert that opening the file worked, so the dump is
    not just silently discarded.
    
    Change-Id: Iaea45603db65aff475051ea83ba1b45992d53590
    Reviewed-on: https://gerrit.libreoffice.org/80195
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index e2895e796be0..dea25de63719 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2830,8 +2830,9 @@ void GDIMetaFile::UseCanvas( bool _bUseCanvas )
 
 void GDIMetaFile::dumpAsXml(const char* pFileName) const
 {
-    SvFileStream aStream(pFileName ? OUString::fromUtf8(pFileName) : OUString("metafile.xml"),
+    SvFileStream aStream(pFileName ? OUString::fromUtf8(pFileName) : OUString("file:///tmp/metafile.xml"),
             StreamMode::STD_READWRITE | StreamMode::TRUNC);
+    assert(aStream.good());
     MetafileXmlDump aDumper;
     aDumper.dump(*this, aStream);
 }


More information about the Libreoffice-commits mailing list