diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-14 14:43:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-14 14:46:35 +0100 |
commit | 4c1e2c446865b355f50720b8b96ec704822006dc (patch) | |
tree | 30e0d82b0a7b1e1ee976459494fa7f476b2298e4 /vcl | |
parent | 19efa546ab88ea4b3943bb05405752dee7e57623 (diff) |
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
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/text.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 75ac162ff040..f60062b6ea85 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 |