diff options
Diffstat (limited to 'xmloff/source/forms')
-rw-r--r-- | xmloff/source/forms/elementimport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/eventexport.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/forms/layerimport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/propertyexport.cxx | 12 |
4 files changed, 11 insertions, 16 deletions
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 4850289e346f..2d63175aa17e 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -454,14 +454,12 @@ namespace xmloff return OUString(sUnnamedName); Sequence< OUString > aNames = m_xParentContainer->getElementNames(); - OUString sReturn; const OUString* pNames = nullptr; const OUString* pNamesEnd = aNames.getConstArray() + aNames.getLength(); for (sal_Int32 i=0; i<32768; ++i) // the limit is nearly arbitrary ... { // assemble the new name (suggestion) - sReturn = sUnnamedName; - sReturn += OUString::number(i); + OUString sReturn = sUnnamedName + OUString::number(i); // check the existence (this is the bad performance part ....) for (pNames = aNames.getConstArray(); pNames<pNamesEnd; ++pNames) { diff --git a/xmloff/source/forms/eventexport.cxx b/xmloff/source/forms/eventexport.cxx index 24c6d6cd3bda..9d27751a6c6a 100644 --- a/xmloff/source/forms/eventexport.cxx +++ b/xmloff/source/forms/eventexport.cxx @@ -38,14 +38,13 @@ namespace xmloff // translate the events const ScriptEventDescriptor* pEvents = _rEvents.getConstArray(); - OUString sName; OUString sLibrary, sLocalMacroName; for (sal_Int32 i=0; i<nEvents; ++i, ++pEvents) { // the name of the event is build from listener interface and listener method name - sName = pEvents->ListenerType; - sName += EVENT_NAME_SEPARATOR; - sName += pEvents->EventMethod; + OUString sName = pEvents->ListenerType + + EVENT_NAME_SEPARATOR + + pEvents->EventMethod; Sequence< PropertyValue >& rMappedEvent = m_aMappedEvents[sName]; diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index c4b5ecec73aa..d08060356e6d 100644 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -390,7 +390,6 @@ void OFormLayerXMLImport_Impl::endPage() try { static const sal_Unicode s_nSeparator = ','; - OUString sReferring; OUString sCurrentReferring; OUString sSeparator(&s_nSeparator, 1); Reference< XPropertySet > xCurrentReferring; @@ -405,8 +404,7 @@ void OFormLayerXMLImport_Impl::endPage() // in a list of n ids there are only n-1 separators ... have to catch this last id // -> normalize the list - sReferring = aReferences->second; - sReferring += sSeparator; + OUString sReferring = aReferences->second + sSeparator; nPrevSep = -1; while (-1 != (nSeparator = sReferring.indexOf(s_nSeparator, nPrevSep + 1))) diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 2fad2f4c98d4..c2f168917c04 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -484,7 +484,7 @@ namespace xmloff Sequence< OUString > aItems; m_xProps->getPropertyValue( _rPropertyName ) >>= aItems; - OUString sFinalList; + OUStringBuffer sFinalList; // unfortunately the OUString can't append single sal_Unicode characters ... const OUString sQuote(&_aQuoteCharacter, 1); @@ -504,17 +504,17 @@ namespace xmloff "OPropertyExport::exportStringSequenceAttribute: there is an item which contains the quote character!"); if (bQuote) - sFinalList += sQuote; - sFinalList += *pItems; + sFinalList.append(sQuote); + sFinalList.append(*pItems); if (bQuote) - sFinalList += sQuote; + sFinalList.append(sQuote); if (pItems != pLastElement) - sFinalList += sSeparator; + sFinalList.append(sSeparator); } if (!sFinalList.isEmpty()) - AddAttribute(_nAttributeNamespaceKey, _pAttributeName, sFinalList); + AddAttribute(_nAttributeNamespaceKey, _pAttributeName, sFinalList.makeStringAndClear()); exportedProperty( _rPropertyName ); } |