summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Jacobi <sj@openoffice.org>2001-10-01 15:15:18 +0000
committerSven Jacobi <sj@openoffice.org>2001-10-01 15:15:18 +0000
commit68e7b533c71bd9c054e9801d0a3428e19b2b9ccf (patch)
treeef862dae009f9c7c2b7fc36833d132b45370d8f7
parent009f35eab8a6e38dc0cbab51ea580f993e9ae173 (diff)
#92623# do not try to read bitmaps which width or height is zero
-rw-r--r--svtools/source/filter.vcl/wmf/winwmf.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx
index 081520719f90..906cb62bfe92 100644
--- a/svtools/source/filter.vcl/wmf/winwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/winwmf.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: winwmf.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: sj $ $Date: 2001-09-21 16:17:44 $
+ * last change: $Author: sj $ $Date: 2001-10-01 16:15:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -545,12 +545,15 @@ void WMFReader::ReadRecordParams( USHORT nFunction )
// pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE );
Size aDestSize( ReadYXExt() );
- if ( !bWinExtSet ) // sj, this is also possible: a wmf consisting of
- aDestSize = Size( 1, 1 ); // only one STRETCHDIB action (92115)
- Rectangle aDestRect( ReadYX(), aDestSize );
- if ( nWinROP != PATCOPY )
- aBmp.Read( *pWMF, FALSE );
- aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP ), LIST_APPEND );
+ if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps
+ {
+ if ( !bWinExtSet ) // sj, this is also possible: a wmf consisting of
+ aDestSize = Size( 1, 1 ); // only one STRETCHDIB action (92115)
+ Rectangle aDestRect( ReadYX(), aDestSize );
+ if ( nWinROP != PATCOPY )
+ aBmp.Read( *pWMF, FALSE );
+ aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP ), LIST_APPEND );
+ }
}
}
break;