summaryrefslogtreecommitdiff
path: root/cppcanvas/source
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-07-18 18:21:12 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-07-20 22:10:59 +0200
commitcd3d26b7edbce67805259a71e4118223e02ebdd4 (patch)
treefbb103d9877275f80eab075f22a8e0753fccf151 /cppcanvas/source
parent8e21a02520cbd2fdc09df1ca675f4aa46a02d5f6 (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')
-rw-r--r--cppcanvas/source/inc/implrenderer.hxx2
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx12
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx8
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.hxx2
4 files changed, 12 insertions, 12 deletions
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx
index 76a86c882dce..7ff185efe19b 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -269,7 +269,7 @@ static float GetSwapFloat( SvStream& rSt )
const OUString& rString,
int nIndex,
int nLength,
- const sal_Int32* pCharWidths,
+ const long* pCharWidths,
const ActionFactoryParameters& rParms,
bool bSubsettable );
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(
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 6849a3e68800..717335790dad 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -168,7 +168,7 @@ namespace cppcanvas
rTextLineInfo );
}
- uno::Sequence< double > setupDXArray( const sal_Int32* pCharWidths,
+ uno::Sequence< double > setupDXArray( const long* pCharWidths,
sal_Int32 nLen,
const OutDevState& rState )
{
@@ -197,7 +197,7 @@ namespace cppcanvas
{
// no external DX array given, create one from given
// string
- ::boost::scoped_array< sal_Int32 > pCharWidths( new sal_Int32[nLen] );
+ ::boost::scoped_array< long > pCharWidths( new long[nLen] );
rVDev.GetTextArray( rText, pCharWidths.get(),
nStartPos, nLen );
@@ -1939,7 +1939,7 @@ namespace cppcanvas
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
- const sal_Int32* pDXArray,
+ const long* pDXArray,
VirtualDevice& rVDev,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState,
@@ -2089,7 +2089,7 @@ namespace cppcanvas
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
- const sal_Int32* pDXArray,
+ const long* pDXArray,
VirtualDevice& rVDev,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState,
diff --git a/cppcanvas/source/mtfrenderer/textaction.hxx b/cppcanvas/source/mtfrenderer/textaction.hxx
index 7afe47aeba01..622360240cc1 100644
--- a/cppcanvas/source/mtfrenderer/textaction.hxx
+++ b/cppcanvas/source/mtfrenderer/textaction.hxx
@@ -73,7 +73,7 @@ namespace cppcanvas
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
- const sal_Int32* pDXArray,
+ const long* pDXArray,
VirtualDevice& rVDev,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState,