Kaydet (Commit) 17b77c97 authored tarafından Matteo Casalin's avatar Matteo Casalin

Prefer OUString concatenation to OUStringBuffer

Change-Id: Ia4ad18d841368a225e14ee3bfa0e55caca558c8e
üst 8e7ab851
...@@ -153,7 +153,6 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport, ...@@ -153,7 +153,6 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
PTR_CAST( SvXMLAttrContainerItem, &rItem ); PTR_CAST( SvXMLAttrContainerItem, &rItem );
const sal_uInt16 nCount = pUnknown->GetAttrCount(); const sal_uInt16 nCount = pUnknown->GetAttrCount();
OUStringBuffer sName;
for( sal_uInt16 i=0; i < nCount; i++ ) for( sal_uInt16 i=0; i < nCount; i++ )
{ {
const OUString sPrefix( pUnknown->GetAttrPrefix( i ) ); const OUString sPrefix( pUnknown->GetAttrPrefix( i ) );
...@@ -175,20 +174,18 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport, ...@@ -175,20 +174,18 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
} }
pNewNamespaceMap->Add( sPrefix, sNamespace ); pNewNamespaceMap->Add( sPrefix, sNamespace );
sName.append( GetXMLToken(XML_XMLNS) ); rAttrList.AddAttribute( GetXMLToken(XML_XMLNS) + ":" + sPrefix,
sName.append( ':' );
sName.append( sPrefix );
rAttrList.AddAttribute( sName.makeStringAndClear(),
sNamespace ); sNamespace );
} }
sName.append( sPrefix ); rAttrList.AddAttribute( sPrefix + ":" + pUnknown->GetAttrLName(i),
sName.append( ':' ); pUnknown->GetAttrValue(i) );
}
else
{
rAttrList.AddAttribute( pUnknown->GetAttrLName(i),
pUnknown->GetAttrValue(i) );
} }
sName.append( pUnknown->GetAttrLName( i ) );
rAttrList.AddAttribute( sName.makeStringAndClear(),
pUnknown->GetAttrValue(i) );
} }
delete pNewNamespaceMap; delete pNewNamespaceMap;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment