summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-03-29 14:31:14 +0200
committerRadek Doulik <rodo@novell.com>2012-03-29 14:37:31 +0200
commite0a43983faff4982ddfd151b0ae4c28623edf894 (patch)
tree434dc88e24f78987ffec30ca3249c6df2591eb34 /svtools
parent48f0a248cf8313f0341e2e6171f518d01d83478d (diff)
emf+ on win: flush the header stream, so that it doesn't look like empty
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/filter/wmf/winmtf.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx
index d9597ff0fffa..6abf4457c0d6 100644
--- a/svtools/source/filter/wmf/winmtf.cxx
+++ b/svtools/source/filter/wmf/winmtf.cxx
@@ -2228,6 +2228,10 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
// rotate and scale operations
mem << one << zero << zero << one << zero << zero;
+ // need to flush the stream, otherwise GetEndOfData will return 0
+ // on windows where the function parameters are probably resolved in reverse order
+ mem.Flush();
+
mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const sal_uInt8*) mem.GetData(), mem.GetEndOfData() ) );
mpGDIMetaFile->UseCanvas( sal_True );
}