[Libreoffice-commits] core.git: sc/source
Aron Budea
aron.budea at collabora.com
Wed Jun 20 19:44:09 UTC 2018
sc/source/ui/view/output2.cxx | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
New commits:
commit 93e9a3e2b545c853f53ffe28d2795f55ad29f304
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>
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index bf10567aa2eb..ab6f0065d71c 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