diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-30 20:27:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-31 09:14:39 +0100 |
commit | d526bd7dd5b94be6fe5a823372da1facca3d43fa (patch) | |
tree | 656b49726096326e7832cde5c177f85fd8c8c454 /sd | |
parent | 7eeb484e7d1faf87fbb8774a8bda4328d047dde3 (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 'sd')
-rw-r--r-- | sd/source/core/sdpage.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationList.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/slideshow/showwin.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsa.cxx | 4 |
6 files changed, 7 insertions, 16 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index eedeb4056d44..ffbd3ff1041f 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1936,8 +1936,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN } else if (pObj == GetPresObj(PRESOBJ_OUTLINE, 0)) { - OUString aName(GetLayoutName()); - aName += " "; + OUString aName(GetLayoutName() + " "); for (sal_Int32 i=1; i<=9; i++) { diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 04da532ca255..2e295a0eaf56 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -889,8 +889,7 @@ uno::Reference<XAccessible> AccessibleDrawDocumentView::GetSelAccContextInTable( void AccessibleDrawDocumentView::UpdateAccessibleName() { - OUString sNewName (CreateAccessibleName()); - sNewName += ": "; + OUString sNewName (CreateAccessibleName() + ": "); // Add the number of the current slide. uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY); @@ -918,8 +917,7 @@ void AccessibleDrawDocumentView::UpdateAccessibleName() Reference<container::XIndexAccess> xPages = xPagesSupplier->getDrawPages(); if (xPages.is()) { - sNewName += " / "; - sNewName += OUString::number(xPages->getCount()); + sNewName += " / " + OUString::number(xPages->getCount()); } } diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 83def14415df..e14f266d6c72 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -151,8 +151,7 @@ OUString getShapeDescription( const Reference< XShape >& xShape, bool bWithText if (bAppendIndex) { - aDescription += " "; - aDescription += OUString::number(getShapeIndex(xShape)); + aDescription += " " + OUString::number(getShapeIndex(xShape)); } if( bWithText ) diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index a61c7858937d..eaf7e0a3b7cf 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -506,9 +506,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly ) SvtSysLocale aSysLocale; const LocaleDataWrapper& aLocaleData = aSysLocale.GetLocaleData(); - aText += " ( "; - aText += aLocaleData.getDuration( ::tools::Time( 0, 0, mnPauseTimeout ) ); - aText += " )"; + aText += " ( " + aLocaleData.getDuration( ::tools::Time( 0, 0, mnPauseTimeout ) ) + " )"; pVDev->DrawText( Point( aOffset.Width(), 0 ), aText ); DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, *pVDev ); bDrawn = true; diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index bd4f39205b3d..caa352e3b152 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1359,8 +1359,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { SdrGrafObj* pNewObject = dialog.GetCompressedSdrGrafObj(); SdrPageView* pPageView = mpDrawView->GetSdrPageView(); - OUString aUndoString = mpDrawView->GetDescriptionOfMarkedObjects(); - aUndoString += " Compress"; + OUString aUndoString = mpDrawView->GetDescriptionOfMarkedObjects() + " Compress"; mpDrawView->BegUndo( aUndoString ); mpDrawView->ReplaceObjectAtView( pObj, *pPageView, pNewObject ); mpDrawView->EndUndo(); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index e9437eaed638..53fc3cfa941d 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -696,9 +696,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) SdrLayer* pLayer = rLayerAdmin.GetLayerPerID( nLayer ); if( pLayer ) { - aOUString += " (" ; - aOUString += LayerTabBar::convertToLocalizedName(pLayer->GetName()); - aOUString += ")"; + aOUString += " (" + LayerTabBar::convertToLocalizedName(pLayer->GetName()) + ")"; } } } |