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/core | |
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/core')
-rw-r--r-- | ucb/source/core/ucbstore.cxx | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index a32e8d69607a..ea5e23d38f9b 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -685,8 +685,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, try { OUString aOldValuesKey - = makeHierarchalNameSegment( rOldKey ); - aOldValuesKey += "/Values"; + = makeHierarchalNameSegment( rOldKey ) + "/Values"; Reference< XNameAccess > xOldNameAccess; xRootHierNameAccess->getByHierarchicalName( @@ -705,8 +704,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, if ( aElems.hasElements() ) { OUString aNewValuesKey - = makeHierarchalNameSegment( rNewKey ); - aNewValuesKey += "/Values"; + = makeHierarchalNameSegment( rNewKey ) + "/Values"; Reference< XSingleServiceFactory > xNewFac; xRootHierNameAccess->getByHierarchicalName( @@ -1189,8 +1187,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty m_pImpl->m_pCreator->getRootConfigReadAccess(), UNO_QUERY ); if ( xRootHierNameAccess.is() ) { - OUString aFullPropName( getFullKey() ); - aFullPropName += "/"; + OUString aFullPropName( getFullKey() + "/" ); aFullPropName += makeHierarchalNameSegment( aPropertyName ); // Does property exist? @@ -1285,10 +1282,8 @@ Any SAL_CALL PersistentPropertySet::getPropertyValue( m_pImpl->m_pCreator->getRootConfigReadAccess(), UNO_QUERY ); if ( xNameAccess.is() ) { - OUString aFullPropName( getFullKey() ); - aFullPropName += "/"; - aFullPropName += makeHierarchalNameSegment( PropertyName ); - aFullPropName += "/Value"; + OUString aFullPropName( getFullKey() + "/" ); + aFullPropName += makeHierarchalNameSegment( PropertyName ) + "/Value"; try { return xNameAccess->getByHierarchicalName( aFullPropName ); @@ -1863,8 +1858,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( { std::vector< PropertyChangeEvent > aEvents; - OUString aFullPropNamePrefix( getFullKey() ); - aFullPropNamePrefix += "/"; + OUString aFullPropNamePrefix( getFullKey() + "/" ); // Iterate over given property value sequence. for ( const PropertyValue& rNewValue : aProps ) @@ -2210,8 +2204,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( UNO_QUERY ); if ( xRootHierNameAccess.is() ) { - OUString aFullPropName( m_pOwner->getFullKey() ); - aFullPropName += "/"; + OUString aFullPropName( m_pOwner->getFullKey() + "/" ); aFullPropName += makeHierarchalNameSegment( aName ); // Does property exist? @@ -2290,8 +2283,7 @@ sal_Bool SAL_CALL PropertySetInfo_Impl::hasPropertyByName( UNO_QUERY ); if ( xRootHierNameAccess.is() ) { - OUString aFullPropName( m_pOwner->getFullKey() ); - aFullPropName += "/"; + OUString aFullPropName( m_pOwner->getFullKey() + "/" ); aFullPropName += makeHierarchalNameSegment( Name ); return xRootHierNameAccess->hasByHierarchicalName( aFullPropName ); |