diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-10-30 11:03:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-30 15:43:23 +0200 |
commit | bc413e15fae3672f580894a3cd7b077d533d8e6c (patch) | |
tree | 0e6306258a5f0086354f4972bd9eeb628672bfab /cppcanvas | |
parent | 70db0942c3f63bed8c2ff517e80c06cef9b52267 (diff) |
tools::Long->sal_Int32 in the DX arrays
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/inc/implrenderer.hxx | 2 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 10 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/textaction.cxx | 10 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/textaction.hxx | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 2a77639e4ae8..1df9ac93207f 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -192,7 +192,7 @@ namespace cppcanvas::internal const OUString& rString, int nIndex, int nLength, - o3tl::span<const tools::Long> pCharWidths, + o3tl::span<const sal_Int32> pCharWidths, const ActionFactoryParameters& rParms, bool bSubsettable ); diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 3ea609e2530e..730fc11b1845 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -847,7 +847,7 @@ namespace cppcanvas::internal const OUString& rString, int nIndex, int nLength, - o3tl::span<const ::tools::Long> pCharWidths, + o3tl::span<const sal_Int32> pCharWidths, const ActionFactoryParameters& rParms, bool bSubsettableActions ) { @@ -985,7 +985,7 @@ namespace cppcanvas::internal { ::tools::Long nInterval = ( nWidth - nStrikeoutWidth * nLen ) / nLen; nStrikeoutWidth += nInterval; - std::vector<::tools::Long> aStrikeoutCharWidths(nLen); + std::vector<sal_Int32> aStrikeoutCharWidths(nLen); for ( int i = 0;i<nLen; i++) { @@ -2557,7 +2557,7 @@ namespace cppcanvas::internal // generating a DX array, and uniformly // distributing the excess/insufficient width // to every logical character. - std::vector<::tools::Long> aDXArray; + std::vector<sal_Int32> aDXArray; rVDev.GetTextArray( pAct->GetText(), &aDXArray, pAct->GetIndex(), pAct->GetLen() ); @@ -2565,7 +2565,7 @@ namespace cppcanvas::internal const sal_Int32 nWidthDifference( pAct->GetWidth() - aDXArray[ nLen-1 ] ); // Last entry of pDXArray contains total width of the text - ::tools::Long* p = aDXArray.data(); + sal_Int32* p = aDXArray.data(); for (sal_Int32 i = 1; i <= nLen; ++i) { // calc ratio for every array entry, to @@ -2574,7 +2574,7 @@ namespace cppcanvas::internal // entry represents the 'end' position of // the corresponding character, thus, we // let i run from 1 to nLen. - *p++ += static_cast<::tools::Long>(i)*nWidthDifference/nLen; + *p++ += i * nWidthDifference / nLen; } createTextAction( diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index 735bcb685555..c63c92a5b851 100644 --- a/cppcanvas/source/mtfrenderer/textaction.cxx +++ b/cppcanvas/source/mtfrenderer/textaction.cxx @@ -157,7 +157,7 @@ namespace cppcanvas::internal rLayoutWidth = *(std::max_element(rOffsets.begin(), rOffsets.end())); } - uno::Sequence< double > setupDXArray( o3tl::span<const ::tools::Long> rCharWidths, + uno::Sequence< double > setupDXArray( o3tl::span<const sal_Int32> rCharWidths, sal_Int32 nLen, const OutDevState& rState ) { @@ -169,7 +169,7 @@ namespace cppcanvas::internal // array, by circumventing integer-based // OutDev-mapping const double nScale( rState.mapModeTransform.get(0,0) ); - ::tools::Long const * pCharWidths = rCharWidths.data(); + sal_Int32 const * pCharWidths = rCharWidths.data(); for( int i = 0; i < nLen; ++i ) { // TODO(F2): use correct scale direction @@ -187,7 +187,7 @@ namespace cppcanvas::internal { // no external DX array given, create one from given // string - std::vector<::tools::Long> aCharWidths; + std::vector<sal_Int32> aCharWidths; rVDev.GetTextArray( rText, &aCharWidths, nStartPos, nLen ); @@ -1966,7 +1966,7 @@ namespace cppcanvas::internal const OUString& rText, sal_Int32 nStartPos, sal_Int32 nLen, - o3tl::span<const ::tools::Long> pDXArray, + o3tl::span<const sal_Int32> pDXArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, @@ -2096,7 +2096,7 @@ namespace cppcanvas::internal const OUString& rText, sal_Int32 nStartPos, sal_Int32 nLen, - o3tl::span<const ::tools::Long> pDXArray, + o3tl::span<const sal_Int32> pDXArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, diff --git a/cppcanvas/source/mtfrenderer/textaction.hxx b/cppcanvas/source/mtfrenderer/textaction.hxx index 4cbdd46284bf..279f810f8efb 100644 --- a/cppcanvas/source/mtfrenderer/textaction.hxx +++ b/cppcanvas/source/mtfrenderer/textaction.hxx @@ -67,7 +67,7 @@ namespace cppcanvas::internal const OUString& rText, sal_Int32 nStartPos, sal_Int32 nLen, - o3tl::span<const ::tools::Long> pDXArray, + o3tl::span<const sal_Int32> pDXArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, |