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>
This commit is contained in:
Noel Grandin
2021-10-30 11:03:48 +02:00
committed by Noel Grandin
parent 70db0942c3
commit bc413e15fa
62 changed files with 166 additions and 166 deletions

View File

@@ -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 );

View File

@@ -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(

View File

@@ -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,

View File

@@ -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,