diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-27 21:03:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-27 21:08:39 +0100 |
commit | 5326c563463a8682e0433c0badf39657446f1053 (patch) | |
tree | 4747b667937cff345db4feb43e4fd471f2fb82ab | |
parent | c26ba0d35e91bc16b2bede7de2466633ec240b51 (diff) |
Resolves: fdo#78040 nAryLen is traditionally 32bit not 16bit
30bb1eddba2b4a36b4354303ffcb37a3a15f38a6 originally incorrectly
changed some different 16bit numbers to 32bit, then
02abb559fb506e3d3911bbf058c9a60d28b0a3b5 reverted those 16bit->32bit
changes but accidentally changed the 32bit nAryLen to 16bit but
that was 32bit before 30bb1eddba2b4a36b4354303ffcb37a3a15f38a6
Change-Id: I36863b62418d7a3b5ccce51aef86c63c523f9598
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index eb9217e41cde..fee3d80ac249 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -1094,7 +1094,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) : { if( rAction.mpDXAry ) { - const sal_uLong nAryLen = mnLen; + const sal_Int32 nAryLen = mnLen; mpDXAry = new sal_Int32[ nAryLen ]; memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( sal_Int32 ) ); @@ -1114,7 +1114,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt, mnIndex ( nIndex ), mnLen ( nLen ) { - const sal_uLong nAryLen = pDXAry ? mnLen : 0; + const sal_Int32 nAryLen = pDXAry ? mnLen : 0; if( nAryLen ) { @@ -1177,7 +1177,7 @@ void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData ) rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet ); rOStm.WriteUInt16(mnIndex); rOStm.WriteUInt16(mnLen); - rOStm.WriteUInt16(nAryLen); + rOStm.WriteInt32(nAryLen); for (sal_Int32 i = 0; i < nAryLen; ++i) rOStm.WriteInt32( mpDXAry[ i ] ); @@ -1187,8 +1187,6 @@ void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData ) void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData ) { - sal_Int32 nAryLen; - delete[] mpDXAry; VersionCompat aCompat(rIStm, STREAM_READ); @@ -1200,9 +1198,8 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData ) sal_uInt16 nTmpLen(0); rIStm.ReadUInt16(nTmpLen); mnLen = nTmpLen; - sal_uInt16 nTmpAryLen(0); - rIStm.ReadUInt16(nTmpAryLen); - nAryLen = nTmpAryLen; + sal_Int32 nAryLen(0); + rIStm.ReadInt32(nAryLen); if ( mnIndex + mnLen > maStr.getLength() ) { |