diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-31 13:32:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-01 12:51:51 +0100 |
commit | 7f56a80b205555cfc85b01b4f641ab7f78968403 (patch) | |
tree | fc64d77b7cade7eb90d7bb6d678ab0ae44668c4c /sw | |
parent | cb0d41896bf6ce206f5bc5bc0d24fb660c4cb38c (diff) |
use double in SwScriptInfo::Compress
after
commit 11b15571475414ef853e21a6c96afa2ac81f848f
"convert KernArray from sal_Int32 to double"
Change-Id: I566fbb04a20e5d0ed64c1f43e51fe3323e5b2f67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175868
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/text/text.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/porlay.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index 6dc3e933a2dc..b81146642bd4 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -1625,7 +1625,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810) // Assert we are using the expected width for uncompressed chars CPPUNIT_ASSERT_EQUAL(sal_Int32(720), sal_Int32(pDXArray[0])); // Assert we are using the expected width for compressed chars - CPPUNIT_ASSERT_EQUAL(sal_Int32(500), sal_Int32(pDXArray[6] - pDXArray[5])); + CPPUNIT_ASSERT_EQUAL(sal_Int32(499), sal_Int32(pDXArray[6] - pDXArray[5])); break; } } diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 99e00aa071df..e8096fe85b57 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -2092,8 +2092,8 @@ tools::Long SwScriptInfo::Compress(KernArray& rKernArray, TextFrameIndex nIdx, T if( nIdx > nLen || nCompIdx >= nCompCount ) return 0; - tools::Long nSub = 0; - tools::Long nLast = nI ? rKernArray[ nI - 1 ] : 0; + double nSub = 0; + double nLast = nI ? rKernArray[ nI - 1 ] : 0; do { const CompType nType = GetCompType( nCompIdx ); @@ -2119,7 +2119,7 @@ tools::Long SwScriptInfo::Compress(KernArray& rKernArray, TextFrameIndex nIdx, T nLast -= rKernArray[ nI ]; nLast *= nCompress; - tools::Long nMove = 0; + double nMove = 0; if( SwScriptInfo::KANA != nType ) { nLast /= 24000; |