summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/gdi/sallayout.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 4bd388d38b4c..7edfc7ff7ce7 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1979,9 +1979,12 @@ sal_Int32 MultiSalLayout::GetTextBreak( DeviceCoordinate nMaxWidth, DeviceCoordi
fUnitMul /= rLayout.GetUnitsPerPixel();
for( int i = 0; i < nCharCount; ++i )
{
- DeviceCoordinate w = pCharWidths[ i + nCharCount ];
- w = (DeviceCoordinate)(w * fUnitMul + 0.5);
- pCharWidths[ i ] += w;
+ if( pCharWidths[ i ] == 0 )
+ {
+ DeviceCoordinate w = pCharWidths[ i + nCharCount ];
+ w = (DeviceCoordinate)(w * fUnitMul + 0.5);
+ pCharWidths[ i ] = w;
+ }
}
}