summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/filter.vcl/wmf/wmfwr.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter.vcl/wmf/wmfwr.cxx
index ba812780d97c..c4f53046c29a 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.cxx
+++ b/svtools/source/filter.vcl/wmf/wmfwr.cxx
@@ -2027,12 +2027,13 @@ void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF )
{
EMFWriter aEMFWriter;
SvMemoryStream aStream;
+
if( aEMFWriter.WriteEMF( rMTF, aStream ) )
{
- aStream.Seek( 0 );
- sal_Size nTotalSize = aStream.GetSize();
+ sal_Size nTotalSize = aStream.Tell();
if( nTotalSize > SAL_MAX_UINT32 )
return;
+ aStream.Seek( 0 );
sal_uInt32 nRemainingSize = static_cast< sal_uInt32 >( nTotalSize );
sal_uInt32 nRecCounts = ( (nTotalSize - 1) / 0x2000 ) + 1;
sal_uInt16 nCheckSum = 0, nWord;