diff options
Diffstat (limited to 'sc/source/ui/view/output2.cxx')
-rw-r--r-- | sc/source/ui/view/output2.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 812975966ab2..8b77601bcdf3 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -1796,10 +1796,10 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co if ( nRepeatCount > 1 ) { OUString aCellStr = aVars.GetString(); - OUString aRepeated = aCellStr; + OUStringBuffer aRepeated = aCellStr; for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ ) - aRepeated += aCellStr; - aVars.SetAutoText( aRepeated ); + aRepeated.append(aCellStr); + aVars.SetAutoText( aRepeated.makeStringAndClear() ); } } } @@ -2966,11 +2966,11 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam) long nRepeatCount = nAvailable / nRepeatSize; if ( nRepeatCount > 1 ) { - OUString aRepeated = aCellStr; + OUStringBuffer aRepeated = aCellStr; for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ ) - aRepeated += aCellStr; + aRepeated.append(aCellStr); - nEngineWidth = SetEngineTextAndGetWidth( rParam, aRepeated, + nEngineWidth = SetEngineTextAndGetWidth( rParam, aRepeated.makeStringAndClear(), nNeededPixel, (nLeftM + nRightM ) ); nEngineHeight = rParam.mpEngine->GetTextHeight(); @@ -3336,11 +3336,11 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam) const long nRepeatCount = nAvailable / nRepeatSize; if ( nRepeatCount > 1 ) { - OUString aRepeated = aCellStr; + OUStringBuffer aRepeated = aCellStr; for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ ) - aRepeated += aCellStr; + aRepeated.append(aCellStr); - nEngineWidth = SetEngineTextAndGetWidth( rParam, aRepeated, + nEngineWidth = SetEngineTextAndGetWidth( rParam, aRepeated.makeStringAndClear(), nNeededPixel, (nLeftM + nRightM ) ); nEngineHeight = rParam.mpEngine->GetTextHeight(); @@ -3580,11 +3580,11 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam) const long nRepeatCount = nAvailable / nRepeatSize; if ( nRepeatCount > 1 ) { - OUString aRepeated = aCellStr; + OUStringBuffer aRepeated = aCellStr; for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ ) - aRepeated += aCellStr; + aRepeated.append(aCellStr); - nEngineWidth = SetEngineTextAndGetWidth( rParam, aRepeated, + nEngineWidth = SetEngineTextAndGetWidth( rParam, aRepeated.makeStringAndClear(), nNeededPixel, (nLeftM + nRightM ) ); nEngineHeight = rParam.mpEngine->GetTextHeight(); |