[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/source

Caolán McNamara caolanm at redhat.com
Tue May 27 13:09:28 PDT 2014


 vcl/source/gdi/metaact.cxx |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 86823db3412fc10ca75fa1e0b1900118582149c6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 27 21:03:26 2014 +0100

    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
    (cherry picked from commit 5326c563463a8682e0433c0badf39657446f1053)

diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index eb9217e..fee3d80 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() )
     {


More information about the Libreoffice-commits mailing list