diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2018-06-14 12:32:48 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-06-18 12:56:57 +0200 |
commit | b1d003af24447a60d1e372caded54e30501b9fd6 (patch) | |
tree | b576e57d291394ce73bfb797eaab1c031b6156e0 /sc | |
parent | 03e81df3441a8175770edd522f592f243b5f9082 (diff) |
tdf#105720: lok: sc: currency symbol is displayed in the preceding cell
Now in online the currency symbol is placed exactly as in the desktop
case. Essentially there was a mapping issue.
Change-Id: I6175cfeab3d8bc3a757c8522aa9c7a7e49c4bf2b
Reviewed-on: https://gerrit.libreoffice.org/55806
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/output2.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index ce51ee47bf0f..61d5211ec5bf 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -66,6 +66,7 @@ #include <com/sun/star/i18n/DirectionProperty.hpp> #include <comphelper/string.hxx> +#include <comphelper/lok.hxx> #include <memory> #include <vector> @@ -565,13 +566,21 @@ 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) return; + + if ( nCharWidth < 1 || (bIsTiledRendering && nCharWidth < TWIPS_PER_PIXEL)) return; + if (bPixelToLogic) nColWidth = pOutput->mpRefDevice->PixelToLogic(Size(nColWidth,0)).Width(); + // Are there restrictions on the cell type we should filter out here ? - long nSpaceToFill = ( nColWidth - aTextSize.Width() ); + long nTextWidth = aTextSize.Width(); + if ( bIsTiledRendering ) + nTextWidth = pOutput->mpRefDevice->PixelToLogic(Size(nTextWidth,0)).Width(); + long nSpaceToFill = ( nColWidth - nTextWidth ); if ( nSpaceToFill <= nCharWidth ) return; |