summaryrefslogtreecommitdiff
path: root/svx/source/stbctrls/pszctrl.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-30 20:27:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-10-31 09:14:39 +0100
commitd526bd7dd5b94be6fe5a823372da1facca3d43fa (patch)
tree656b49726096326e7832cde5c177f85fd8c8c454 /svx/source/stbctrls/pszctrl.cxx
parent7eeb484e7d1faf87fbb8774a8bda4328d047dde3 (diff)
Fix StringAdd::isCompileTimeConstant
...to find StringLiteral on the RHS of +=. Which revealed that the VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that s += side_effect(); s += "literal"; s += side_effect(); only gets combined to s += side_effect() + "literal"; s += side_effect(); and not all the way to s += side_effect() + "literal" + side_effect(); Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4 Reviewed-on: https://gerrit.libreoffice.org/81804 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx/source/stbctrls/pszctrl.cxx')
-rw-r--r--svx/source/stbctrls/pszctrl.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 084d251c91dd..1e0c63c06a24 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -407,8 +407,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
pDev->DrawImage( aPnt, pImpl->aPosImage );
aPnt.AdjustX(pImpl->aPosImage.GetSizePixel().Width() );
aPnt.AdjustX(PAINT_OFFSET );
- OUString aStr = GetMetricStr_Impl( pImpl->aPos.X());
- aStr += " / ";
+ OUString aStr = GetMetricStr_Impl( pImpl->aPos.X()) + " / ";
aStr += GetMetricStr_Impl( pImpl->aPos.Y());
tools::Rectangle aRect(aPnt, Point(nSizePosX, rRect.Bottom()));
pDev->DrawRect(aRect);
@@ -426,8 +425,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
aPnt.AdjustX(pImpl->aSizeImage.GetSizePixel().Width() );
Point aDrwPnt = aPnt;
aPnt.AdjustX(PAINT_OFFSET );
- aStr = GetMetricStr_Impl( pImpl->aSize.Width() );
- aStr += " x ";
+ aStr = GetMetricStr_Impl( pImpl->aSize.Width() ) + " x ";
aStr += GetMetricStr_Impl( pImpl->aSize.Height() );
aRect = tools::Rectangle(aDrwPnt, rRect.BottomRight());
pDev->DrawRect(aRect);
@@ -465,16 +463,13 @@ void SvxPosSizeStatusBarControl::ImplUpdateItemText()
int nCharsWidth = -1;
if ( pImpl->bPos || pImpl->bSize )
{
- aText = GetMetricStr_Impl( pImpl->aPos.X());
- aText += " / ";
+ aText = GetMetricStr_Impl( pImpl->aPos.X()) + " / ";
aText += GetMetricStr_Impl( pImpl->aPos.Y());
// widest X/Y string looks like "-999,99"
nCharsWidth = 1 + 6 + 3 + 6; // icon + x + slash + y
if ( pImpl->bSize )
{
- aText += " ";
- aText += GetMetricStr_Impl( pImpl->aSize.Width() );
- aText += " x ";
+ aText += " " + GetMetricStr_Impl( pImpl->aSize.Width() ) + " x ";
aText += GetMetricStr_Impl( pImpl->aSize.Height() );
nCharsWidth += 1 + 1 + 4 + 3 + 4; // icon + space + w + x + h
}