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 /framework/source/xml | |
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 'framework/source/xml')
-rw-r--r-- | framework/source/xml/imagesdocumenthandler.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index 381b0f1aec2a..00aa56bef709 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -133,8 +133,7 @@ void SAL_CALL OReadImagesDocumentHandler::endDocument() if (m_bImageContainerStartFound != m_bImageContainerEndFound) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += "No matching start or end element 'image:imagecontainer' found!"; + OUString aErrorMessage = getErrorLineString() + "No matching start or end element 'image:imagecontainer' found!"; throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -154,8 +153,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement( // image:imagecontainer element (container element for all further image elements) if ( m_bImageContainerStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += "Element 'image:imagecontainer' cannot be embedded into 'image:imagecontainer'!"; + OUString aErrorMessage = getErrorLineString() + "Element 'image:imagecontainer' cannot be embedded into 'image:imagecontainer'!"; throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -167,15 +165,13 @@ void SAL_CALL OReadImagesDocumentHandler::startElement( { if ( !m_bImageContainerStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += "Element 'image:images' must be embedded into element 'image:imagecontainer'!"; + OUString aErrorMessage = getErrorLineString() + "Element 'image:images' must be embedded into element 'image:imagecontainer'!"; throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } if ( m_bImagesStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += "Element 'image:images' cannot be embedded into 'image:images'!"; + OUString aErrorMessage = getErrorLineString() + "Element 'image:images' cannot be embedded into 'image:images'!"; throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -188,8 +184,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement( // Check that image:entry is embedded into image:images! if ( !m_bImagesStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += "Element 'image:entry' must be embedded into element 'image:images'!"; + OUString aErrorMessage = getErrorLineString() + "Element 'image:entry' must be embedded into element 'image:images'!"; throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -219,8 +214,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement( // Check required attribute "command" if ( aItem.aCommandURL.isEmpty() ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += "Required attribute 'image:command' must have a value!"; + OUString aErrorMessage = getErrorLineString() + "Required attribute 'image:command' must have a value!"; throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } |