diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-04-22 11:46:45 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-04-24 22:51:12 +0200 |
commit | e6efeb383a047ccf4b5aa50f66a39e936816875a (patch) | |
tree | 2b5b792cf3a80cd938bd2c4671c732ae00537fcc /vcl | |
parent | 15af2fddd639d3614fbdb5447b2dfe4f7c0d622d (diff) |
wmf: cleanup winwmf.cxx
Change-Id: Iac28bea6f7ae7d83e48945ac34807d9db8f71caf
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/wmf/winwmf.cxx | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index ef39c9c84ef6..ba08ed539517 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -728,13 +728,17 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) case W_META_CREATEPENINDIRECT: { - LineInfo aLineInfo; - sal_uInt16 nStyle = 0, nWidth = 0, nHeight = 0; + LineInfo aLineInfo; + sal_uInt16 nStyle = 0; + sal_uInt16 nWidth = 0; + sal_uInt16 nHeight = 0; - pWMF->ReadUInt16( nStyle ).ReadUInt16( nWidth ).ReadUInt16( nHeight ); + pWMF->ReadUInt16(nStyle); + pWMF->ReadUInt16(nWidth); + pWMF->ReadUInt16(nHeight); - if ( nWidth ) - aLineInfo.SetWidth( nWidth ); + if (nWidth > 0) + aLineInfo.SetWidth(nWidth); bool bTransparent = false; switch( nStyle & 0xFF ) @@ -818,15 +822,25 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) case W_META_CREATEFONTINDIRECT: { - Size aFontSize; - char lfFaceName[ LF_FACESIZE ]; - sal_Int16 lfEscapement = 0, lfOrientation = 0, lfWeight = 0; // ( formerly sal_uInt16 ) + Size aFontSize; + char lfFaceName[LF_FACESIZE]; + sal_Int16 lfEscapement = 0; + sal_Int16 lfOrientation = 0; + sal_Int16 lfWeight = 0; LOGFONTW aLogFont; aFontSize = ReadYXExt(); - pWMF->ReadInt16( lfEscapement ).ReadInt16( lfOrientation ).ReadInt16( lfWeight ) - .ReadUChar( aLogFont.lfItalic ).ReadUChar( aLogFont.lfUnderline ).ReadUChar( aLogFont.lfStrikeOut ).ReadUChar( aLogFont.lfCharSet ).ReadUChar( aLogFont.lfOutPrecision ) - .ReadUChar( aLogFont.lfClipPrecision ).ReadUChar( aLogFont.lfQuality ).ReadUChar( aLogFont.lfPitchAndFamily ); + pWMF->ReadInt16( lfEscapement ); + pWMF->ReadInt16( lfOrientation ); + pWMF->ReadInt16( lfWeight ); + pWMF->ReadUChar( aLogFont.lfItalic ); + pWMF->ReadUChar( aLogFont.lfUnderline ); + pWMF->ReadUChar( aLogFont.lfStrikeOut ); + pWMF->ReadUChar( aLogFont.lfCharSet ); + pWMF->ReadUChar( aLogFont.lfOutPrecision ); + pWMF->ReadUChar( aLogFont.lfClipPrecision ); + pWMF->ReadUChar( aLogFont.lfQuality ); + pWMF->ReadUChar( aLogFont.lfPitchAndFamily ); pWMF->Read( lfFaceName, LF_FACESIZE ); aLogFont.lfWidth = aFontSize.Width(); aLogFont.lfHeight = aFontSize.Height(); |