[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

Aron Budea aron.budea at collabora.com
Thu Jun 21 06:43:57 UTC 2018


 sc/source/ui/view/output2.cxx |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit ecd02b76fe2c134abf7fc32572436e1374d9c79b
Author: Aron Budea <aron.budea at collabora.com>
Date:   Wed Jun 20 17:52:13 2018 +0200

    tdf#66089 tdf#105720: only rely on bPixelToLogic
    
    Left-aligned currency symbols were put in preceding cells
    sometimes, because fill width was calculated incorrectly.
    
    Commit 37210da00a9190f7765fa9c1e4a08629d2f4c2c4 fixed the issue
    for LOK, but the bug was still reproducible in Calc if setting
    "Use printer metrics for text formatting" was enabled.
    
    Change-Id: I6cf90493cbf98c5020acd5faf1d0f3cf2def5c25
    Reviewed-on: https://gerrit.libreoffice.org/56172
    Tested-by: Jenkins
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    (cherry picked from commit 93e9a3e2b545c853f53ffe28d2795f55ad29f304)
    Reviewed-on: https://gerrit.libreoffice.org/56213
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 5575a26bc70b..bb9dc4f97118 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -75,7 +75,6 @@
 
 #include <com/sun/star/i18n/DirectionProperty.hpp>
 #include <comphelper/string.hxx>
-#include <comphelper/lok.hxx>
 
 #include <memory>
 #include <vector>
@@ -567,19 +566,18 @@ void ScDrawStringsVars::RepeatToFill( long nColWidth )
     if ( nRepeatPos == -1 || nRepeatPos > aString.getLength() )
         return;
 
-    const bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
-
     long nCharWidth = pOutput->pFmtDevice->GetTextWidth(OUString(nRepeatChar));
 
-    if ( nCharWidth < 1 || (bIsTiledRendering && nCharWidth < TWIPS_PER_PIXEL)) return;
-
-    if (bPixelToLogic)
-        nColWidth = pOutput->mpRefDevice->PixelToLogic(Size(nColWidth,0)).Width();
+    if ( nCharWidth < 1 || (bPixelToLogic && nCharWidth < pOutput->mpRefDevice->PixelToLogic(Size(1,0)).Width()) )
+        return;
 
     // Are there restrictions on the cell type we should filter out here ?
     long nTextWidth = aTextSize.Width();
-    if ( bIsTiledRendering )
+    if ( bPixelToLogic )
+    {
+        nColWidth = pOutput->mpRefDevice->PixelToLogic(Size(nColWidth,0)).Width();
         nTextWidth = pOutput->mpRefDevice->PixelToLogic(Size(nTextWidth,0)).Width();
+    }
 
     long nSpaceToFill = ( nColWidth - nTextWidth );
     if ( nSpaceToFill <= nCharWidth )


More information about the Libreoffice-commits mailing list