diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-21 09:30:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-21 14:33:39 +0200 |
commit | 5e43e888f6b9bc32fc5d3361be5a7962796726ea (patch) | |
tree | 061df26f907bece9cacad5b53290db3f6937d09e /cppcanvas/source/mtfrenderer | |
parent | 5100a06c15ee8d66dc88f58523a35014988fd9fe (diff) |
use tools::Long in comphelper..cui
Change-Id: I65167999c6049038f8f5d530a0c5cb0552ab0e06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104609
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppcanvas/source/mtfrenderer')
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 18 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/textaction.cxx | 6 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/textaction.hxx | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index c78b958f31f5..e957ca79697a 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -857,7 +857,7 @@ namespace cppcanvas::internal const OUString& rString, int nIndex, int nLength, - const long* pCharWidths, + const ::tools::Long* pCharWidths, const ActionFactoryParameters& rParms, bool bSubsettableActions ) { @@ -964,7 +964,7 @@ namespace cppcanvas::internal if ( rState.textStrikeoutStyle == STRIKEOUT_X || rState.textStrikeoutStyle == STRIKEOUT_SLASH ) { - long nWidth = rParms.mrVDev.GetTextWidth( rString,nIndex,nLength ); + ::tools::Long nWidth = rParms.mrVDev.GetTextWidth( rString,nIndex,nLength ); sal_Unicode pChars[4]; if ( rState.textStrikeoutStyle == STRIKEOUT_X ) @@ -973,18 +973,18 @@ namespace cppcanvas::internal pChars[0] = '/'; pChars[3]=pChars[2]=pChars[1]=pChars[0]; - long nStrikeoutWidth = (rParms.mrVDev.GetTextWidth( + ::tools::Long nStrikeoutWidth = (rParms.mrVDev.GetTextWidth( OUString(pChars, SAL_N_ELEMENTS(pChars))) + 2) / 4; if( nStrikeoutWidth <= 0 ) nStrikeoutWidth = 1; - long nMaxWidth = nStrikeoutWidth/2; + ::tools::Long nMaxWidth = nStrikeoutWidth/2; if ( nMaxWidth < 2 ) nMaxWidth = 2; nMaxWidth += nWidth + 1; - long nFullStrikeoutWidth = 0; + ::tools::Long nFullStrikeoutWidth = 0; OUStringBuffer aStrikeoutText; while( (nFullStrikeoutWidth+=nStrikeoutWidth ) < nMaxWidth+1 ) aStrikeoutText.append(pChars[0]); @@ -993,9 +993,9 @@ namespace cppcanvas::internal if( nLen ) { - long nInterval = ( nWidth - nStrikeoutWidth * nLen ) / nLen; + ::tools::Long nInterval = ( nWidth - nStrikeoutWidth * nLen ) / nLen; nStrikeoutWidth += nInterval; - long* pStrikeoutCharWidths = new long[nLen]; + ::tools::Long* pStrikeoutCharWidths = new long[nLen]; for ( int i = 0;i<nLen; i++) { @@ -2575,7 +2575,7 @@ namespace cppcanvas::internal const sal_Int32 nWidthDifference( pAct->GetWidth() - pDXArray[ nLen-1 ] ); // Last entry of pDXArray contains total width of the text - long* p = pDXArray.get(); + ::tools::Long* p = pDXArray.get(); for (sal_Int32 i = 1; i <= nLen; ++i) { // calc ratio for every array entry, to @@ -2584,7 +2584,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<long>(i)*nWidthDifference/nLen; + *p++ += static_cast<::tools::Long>(i)*nWidthDifference/nLen; } createTextAction( diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index 408b180ecf58..df64f58c44e1 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( const long* pCharWidths, + uno::Sequence< double > setupDXArray( const ::tools::Long* pCharWidths, sal_Int32 nLen, const OutDevState& rState ) { @@ -1988,7 +1988,7 @@ namespace cppcanvas::internal const OUString& rText, sal_Int32 nStartPos, sal_Int32 nLen, - const long* pDXArray, + const ::tools::Long* pDXArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, @@ -2118,7 +2118,7 @@ namespace cppcanvas::internal const OUString& rText, sal_Int32 nStartPos, sal_Int32 nLen, - const long* pDXArray, + const ::tools::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 2023aeec74ea..aabad2245727 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, - const long* pDXArray, + const ::tools::Long* pDXArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, |