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 /ucb/source/ucp/package | |
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 'ucb/source/ucp/package')
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
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() ) { |