Kaydet (Commit) 37210da0 authored tarafından Marco Cecchetti's avatar Marco Cecchetti Kaydeden (comit) Marco Cecchetti

tdf#105720: lok: sc: currency symbol is displayed in the preceding cell

Change-Id: I6175cfeab3d8bc3a757c8522aa9c7a7e49c4bf2b
Reviewed-on: https://gerrit.libreoffice.org/55790Reviewed-by: 's avatarMarco Cecchetti <mrcekets@gmail.com>
Tested-by: 's avatarMarco Cecchetti <mrcekets@gmail.com>
üst 4bd93b66
......@@ -75,6 +75,7 @@
#include <com/sun/star/i18n/DirectionProperty.hpp>
#include <comphelper/string.hxx>
#include <comphelper/lok.hxx>
#include <memory>
#include <vector>
......@@ -566,13 +567,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment