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 /xmloff/source | |
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 'xmloff/source')
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/ximpstyl.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/script/xmlscripti.cxx | 6 |
4 files changed, 5 insertions, 10 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 8821edab6381..59dcf10f60a5 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1470,8 +1470,7 @@ void SvXMLExport::ExportScripts_() // export Basic macros (only for FlatXML) if ( mnExportFlags & SvXMLExportFlags::EMBEDDED ) { - OUString aValue( GetNamespaceMap().GetPrefixByKey( XML_NAMESPACE_OOO ) ); - aValue += ":Basic"; + OUString aValue( GetNamespaceMap().GetPrefixByKey( XML_NAMESPACE_OOO ) + ":Basic" ); AddAttribute( XML_NAMESPACE_SCRIPT, XML_LANGUAGE, aValue ); SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_SCRIPT, true, true ); diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 212f6060edae..d5b7d906ecfc 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1591,9 +1591,8 @@ void SdXMLExport::ImpWritePresentationStyles() rtl::Reference<XMLStyleExport> aStEx(new XMLStyleExport(*this, GetAutoStylePool().get())); const rtl::Reference< SvXMLExportPropertyMapper > aMapperRef( GetPropertySetMapper() ); - OUString aPrefix( xNamed->getName() ); + OUString aPrefix( xNamed->getName() + "-" ); - aPrefix += "-"; aStEx->exportStyleFamily(xNamed->getName(), OUString(XML_STYLE_FAMILY_SD_PRESENTATION_NAME), aMapperRef, false, diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index a6f3592e015e..e44881f0aa62 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -1121,8 +1121,7 @@ void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext const & rMas try { uno::Reference< container::XNameAccess > xMasterPageStyles( rStyleFamilies->getByName(rMaster.GetDisplayName()), UNO_QUERY_THROW ); - OUString sPrefix(rMaster.GetDisplayName()); - sPrefix += "-"; + OUString sPrefix(rMaster.GetDisplayName() + "-"); ImpSetGraphicStyles(xMasterPageStyles, XML_STYLE_FAMILY_SD_PRESENTATION_ID, sPrefix); } catch (const uno::Exception&) 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 ); |