summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/cvtsvm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/cvtsvm.cxx')
-rw-r--r--vcl/source/gdi/cvtsvm.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index fce0a042a12f..0f999573ef89 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -408,9 +408,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
char aCode[ 5 ];
- MapMode aMapMode;
Size aPrefSz;
- INT32 nActions;
INT16 nSize;
INT16 nVersion;
@@ -420,11 +418,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
rIStm >> nVersion; // Version
rIStm >> aPrefSz.Width(); // PrefSize.Width()
rIStm >> aPrefSz.Height(); // PrefSize.Height()
- ImplReadMapMode( rIStm, aMapMode ); // MapMode
- rIStm >> nActions; // Action count
// Header-Kennung und Versionsnummer pruefen
- if( ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 ) || ( nVersion != 200 ) )
+ if( rIStm.GetError()
+ || ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 )
+ || ( nVersion != 200 ) )
{
rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
rIStm.SetNumberFormatInt( nOldFormat );
@@ -432,17 +430,22 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
}
else
{
+ MapMode aMapMode;
Polygon aActionPoly;
Rectangle aRect;
Point aPt, aPt1;
Size aSz;
Color aActionColor;
INT32 nTmp, nTmp1, nActionSize;
+ INT32 nActions;
INT16 nType;
sal_uInt32 nUnicodeCommentStreamPos = 0;
INT32 nUnicodeCommentActionNumber = 0;
+ ImplReadMapMode( rIStm, aMapMode ); // MapMode
+ rIStm >> nActions; // Action count
+
rMtf.SetPrefSize( aPrefSz );
rMtf.SetPrefMapMode( aMapMode );