From da2c680d23b67d4721aa29f740475fd6d40e2e08 Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Mon, 1 Feb 2010 14:09:37 +0100 Subject: #i10000# tools api changed --- svtools/source/filter.vcl/wmf/wmfwr.cxx | 5 +++-- 1 file 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; -- cgit v1.2.3