From d526bd7dd5b94be6fe5a823372da1facca3d43fa Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 30 Oct 2019 20:27:26 +0100 Subject: 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 --- ucb/source/ucp/package/pkgcontent.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'ucb/source/ucp/package') diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 8b645a0b70fb..08e5129b1cfb 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -647,8 +647,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) getContentType( m_aUri.getScheme(), false ) ) ) return uno::Reference< ucb::XContent >(); - OUString aURL = m_aUri.getUri(); - aURL += "/"; + OUString aURL = m_aUri.getUri() + "/"; if ( Info.Type.equalsIgnoreAsciiCase( getContentType( m_aUri.getScheme(), true ) ) ) @@ -1256,8 +1255,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( uno::Reference< ucb::XContentIdentifier > xOldId = m_xIdentifier; // Assemble new content identifier... - OUString aNewURL = m_aUri.getParentUri(); - aNewURL += "/"; + OUString aNewURL = m_aUri.getParentUri() + "/"; aNewURL += ::ucb_impl::urihelper::encodeSegment( aNewTitle ); uno::Reference< ucb::XContentIdentifier > xNewId = new ::ucbhelper::ContentIdentifier( aNewURL ); @@ -1536,8 +1534,7 @@ void Content::insert( do { - OUString aNew = aNewUri.getUri(); - aNew += "_"; + OUString aNew = aNewUri.getUri() + "_"; aNew += OUString::number( ++nTry ); aNewUri.setUri( aNew ); } @@ -1692,8 +1689,7 @@ void Content::transfer( } // Is source not a parent of me / not me? - OUString aId = m_aUri.getParentUri(); - aId += "/"; + OUString aId = m_aUri.getParentUri() + "/"; if ( rInfo.SourceURL.getLength() <= aId.getLength() ) { -- cgit