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 /drawinglayer | |
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 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 2 | ||||
-rw-r--r-- | drawinglayer/source/primitive2d/textlayoutdevice.cxx | 4 | ||||
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 7 |
3 files changed, 6 insertions, 7 deletions
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index dc922b5a4759..943e16a37acd 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -1997,7 +1997,7 @@ namespace { // preapare DXArray (if used) std::vector< double > aDXArray; - sal_Int32* pDXArray = pA->GetDXArray(); + long* pDXArray = pA->GetDXArray(); if(pDXArray) { diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 3abe03d78b0a..cbd21e37d898 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -241,7 +241,7 @@ namespace drawinglayer if(nDXArrayCount) { OSL_ENSURE(nDXArrayCount == nTextLength, "DXArray size does not correspond to text portion size (!)"); - std::vector< sal_Int32 > aIntegerDXArray(nDXArrayCount); + std::vector< long > aIntegerDXArray(nDXArrayCount); for(sal_uInt32 a(0); a < nDXArrayCount; a++) { @@ -347,7 +347,7 @@ namespace drawinglayer if(nTextLength) { aRetval.reserve(nTextLength); - ::std::vector<sal_Int32> aArray(nTextLength); + ::std::vector<long> aArray(nTextLength); mrDevice.GetTextArray(rText, &aArray[0], nIndex, nLength); aRetval.assign(aArray.begin(), aArray.end()); } diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 9b904718d9d2..137901eb3f9e 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -242,7 +242,7 @@ namespace drawinglayer } // create transformed integer DXArray in view coordinate system - ::std::vector< sal_Int32 > aTransformedDXArray; + ::std::vector< long > aTransformedDXArray; if(rTextCandidate.getDXArray().size()) { @@ -277,7 +277,7 @@ namespace drawinglayer sal_Int32 nPos = rTextCandidate.getTextPosition(); sal_Int32 nLen = rTextCandidate.getTextLength(); - sal_Int32* pDXArray = aTransformedDXArray.size() ? &(aTransformedDXArray[0]) : NULL ; + long* pDXArray = aTransformedDXArray.size() ? &(aTransformedDXArray[0]) : NULL ; if ( rTextCandidate.isFilled() ) { @@ -287,8 +287,7 @@ namespace drawinglayer long nWidthToFill = static_cast<long>(rTextCandidate.getWidthToFill( ) * aFontScaling.getX() / aOldFontScaling.getX()); - long nWidth = mpOutputDevice->GetTextArray( - rTextCandidate.getText(), pDXArray, 0, 1 ); + long nWidth = mpOutputDevice->GetTextArray( rTextCandidate.getText(), pDXArray, 0, 1 ); long nChars = 2; if ( nWidth ) nChars = nWidthToFill / nWidth; |