diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-07-18 18:21:12 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-07-20 22:10:59 +0200 |
commit | cd3d26b7edbce67805259a71e4118223e02ebdd4 (patch) | |
tree | fbb103d9877275f80eab075f22a8e0753fccf151 /vcl/source/gdi/metaact.cxx | |
parent | 8e21a02520cbd2fdc09df1ca675f4aa46a02d5f6 (diff) |
vcl consitent use of long for corrdinate
most of length in vcl are calculated in 'long'
but array of X position tend to be in sal_Int32.
As a prep work to be able to support 'double'
as the base type of Device Coordinate, harmonize
the use of 'long' for non-float coordinate.
Change-Id: I7cb33301ff6a5e2c62247b36a4e07e168a58a323
Diffstat (limited to 'vcl/source/gdi/metaact.cxx')
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 0158a6d003ba..25f14fec2618 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -1176,8 +1176,8 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) : { const sal_Int32 nAryLen = mnLen; - mpDXAry = new sal_Int32[ nAryLen ]; - memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( sal_Int32 ) ); + mpDXAry = new long[ nAryLen ]; + memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( long ) ); } else mpDXAry = NULL; @@ -1185,7 +1185,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) : MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt, const OUString& rStr, - const sal_Int32* pDXAry, + const long* pDXAry, sal_Int32 nIndex, sal_Int32 nLen ) : MetaAction ( META_TEXTARRAY_ACTION ), @@ -1198,7 +1198,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt, if( nAryLen ) { - mpDXAry = new sal_Int32[ nAryLen ]; + mpDXAry = new long[ nAryLen ]; memcpy( mpDXAry, pDXAry, nAryLen * sizeof( sal_Int32 ) ); } else @@ -1293,13 +1293,16 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData ) // #i9762#, #106172# Ensure that DX array is at least mnLen entries long if ( mnLen >= nAryLen ) { - mpDXAry = new (std::nothrow)sal_Int32[ mnLen ]; + mpDXAry = new (std::nothrow)long[ mnLen ]; if ( mpDXAry ) { sal_Int32 i; + sal_Int32 val; for( i = 0; i < nAryLen; i++ ) - rIStm.ReadInt32( mpDXAry[ i ] ); - + { + rIStm.ReadInt32( val); + mpDXAry[ i ] = val; + } // #106172# setup remainder for( ; i < mnLen; i++ ) mpDXAry[ i ] = 0; |