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 /cppcanvas/source/mtfrenderer/implrenderer.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 'cppcanvas/source/mtfrenderer/implrenderer.cxx')
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 4f261b08a632..0208486ce0df 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -863,7 +863,7 @@ namespace cppcanvas const OUString& rString, int nIndex, int nLength, - const sal_Int32* pCharWidths, + const long* pCharWidths, const ActionFactoryParameters& rParms, bool bSubsettableActions ) { @@ -996,7 +996,7 @@ namespace cppcanvas { long nInterval = ( nWidth - nStrikeoutWidth * nLen ) / nLen; nStrikeoutWidth += nInterval; - sal_Int32* pStrikeoutCharWidths = new sal_Int32[nLen]; + long* pStrikeoutCharWidths = new long[nLen]; for ( int i = 0;i<nLen; i++) { @@ -2602,7 +2602,7 @@ namespace cppcanvas // generating a DX array, and uniformly // distributing the excess/insufficient width // to every logical character. - ::boost::scoped_array< sal_Int32 > pDXArray( new sal_Int32[nLen] ); + ::boost::scoped_array< long > pDXArray( new long[nLen] ); rVDev.GetTextArray( pAct->GetText(), pDXArray.get(), pAct->GetIndex(), pAct->GetLen() ); @@ -2610,8 +2610,8 @@ namespace cppcanvas const sal_Int32 nWidthDifference( pAct->GetWidth() - pDXArray[ nLen-1 ] ); // Last entry of pDXArray contains total width of the text - sal_Int32* p=pDXArray.get(); - for (sal_Int32 i=1; i<=nLen; ++i) + long* p = pDXArray.get(); + for (sal_Int32 i = 1; i <= nLen; ++i) { // calc ratio for every array entry, to // distribute rounding errors 'evenly' @@ -2619,7 +2619,7 @@ namespace cppcanvas // entry represents the 'end' position of // the corresponding character, thus, we // let i run from 1 to nLen. - *p++ += (sal_Int32)i*nWidthDifference/nLen; + *p++ += (long)i*nWidthDifference/nLen; } createTextAction( |