summaryrefslogtreecommitdiff
path: root/xmloff/source/script
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-30 20:27:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-10-31 09:14:39 +0100
commitd526bd7dd5b94be6fe5a823372da1facca3d43fa (patch)
tree656b49726096326e7832cde5c177f85fd8c8c454 /xmloff/source/script
parent7eeb484e7d1faf87fbb8774a8bda4328d047dde3 (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 'xmloff/source/script')
-rw-r--r--xmloff/source/script/xmlscripti.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx
index 033a99006394..d3c9232f0317 100644
--- a/xmloff/source/script/xmlscripti.cxx
+++ b/xmloff/source/script/xmlscripti.cxx
@@ -73,8 +73,7 @@ SvXMLImportContextRef XMLScriptChildContext::CreateChildContext(
if ( m_xDocumentScripts.is() )
{ // document supports embedding scripts/macros
- OUString aBasic( GetImport().GetNamespaceMap().GetPrefixByKey( XML_NAMESPACE_OOO ) );
- aBasic += ":Basic";
+ OUString aBasic( GetImport().GetNamespaceMap().GetPrefixByKey( XML_NAMESPACE_OOO ) + ":Basic" );
if ( m_aLanguage == aBasic && nPrefix == XML_NAMESPACE_OOO && IsXMLToken( rLocalName, XML_LIBRARIES ) )
xContext = new XMLBasicImportContext( GetImport(), nPrefix, rLocalName, m_xModel );
@@ -118,8 +117,7 @@ SvXMLImportContextRef XMLScriptContext::CreateChildContext(
}
else if ( IsXMLToken( rLName, XML_SCRIPT ) )
{
- OUString aAttrName( GetImport().GetNamespaceMap().GetPrefixByKey( XML_NAMESPACE_SCRIPT ) );
- aAttrName += ":language";
+ OUString aAttrName( GetImport().GetNamespaceMap().GetPrefixByKey( XML_NAMESPACE_SCRIPT ) + ":language" );
if ( xAttrList.is() )
{
OUString aLanguage = xAttrList->getValueByName( aAttrName );