[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Thu Aug 14 06:47:07 PDT 2014
vcl/source/outdev/text.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 4c1e2c446865b355f50720b8b96ec704822006dc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Aug 14 14:43:17 2014 +0100
Resolves: fdo#82550 MacOSX GetTextBreak always return -1
so multiline text ends up splitting over a huge number of
lines leading to massively tall dialogs when they contain
text which is supposed to line break
regression from 6ca2d0d6645a697d323593a401ea8b1da02445bf
Change-Id: I51cecd9164112af3208bffced63aed7e261ea9e2
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 75ac162..f60062b 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1428,12 +1428,12 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
long nWidthFactor = pSalLayout->GetUnitsPerPixel();
long nSubPixelFactor = (nWidthFactor < 64 ) ? 64 : 1;
nTextWidth *= nWidthFactor * nSubPixelFactor;
- DeviceCoordinate nTextPixelWidth = LogicWidthToDeviceCoordinate( nTextWidth );
- DeviceCoordinate nExtraPixelWidth = 0;
+ long nTextPixelWidth = ImplLogicWidthToDevicePixel( nTextWidth );
+ long nExtraPixelWidth = 0;
if( nCharExtra != 0 )
{
nCharExtra *= nWidthFactor * nSubPixelFactor;
- nExtraPixelWidth = LogicWidthToDeviceCoordinate( nCharExtra );
+ nExtraPixelWidth = ImplLogicWidthToDevicePixel( nCharExtra );
}
nRetVal = pSalLayout->GetTextBreak( nTextPixelWidth, nExtraPixelWidth, nSubPixelFactor );
@@ -1462,12 +1462,12 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
long nSubPixelFactor = (nWidthFactor < 64 ) ? 64 : 1;
nTextWidth *= nWidthFactor * nSubPixelFactor;
- DeviceCoordinate nTextPixelWidth = LogicWidthToDeviceCoordinate( nTextWidth );
- DeviceCoordinate nExtraPixelWidth = 0;
+ long nTextPixelWidth = ImplLogicWidthToDevicePixel( nTextWidth );
+ long nExtraPixelWidth = 0;
if( nCharExtra != 0 )
{
nCharExtra *= nWidthFactor * nSubPixelFactor;
- nExtraPixelWidth = LogicWidthToDeviceCoordinate( nCharExtra );
+ nExtraPixelWidth = ImplLogicWidthToDevicePixel( nCharExtra );
}
// calculate un-hyphenated break position
More information about the Libreoffice-commits
mailing list