summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2017-04-22 19:04:22 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2017-04-23 15:30:08 +0200
commit7c6345c5e9be7c377c11c0bd30b6739286075b2a (patch)
treecd0cdbcb933852da3d039a40d24af0a00b542868 /sfx2
parent1e3261a2eac642c762a1b667a3653a470894446e (diff)
OUStrings: avoid temporaries and constify
Change-Id: Id6b4b26df09ddb750f3e5430636b41c89e4d9e8e
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/doctemplateslocal.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index 0e850095fff4..30ca595a7fec 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -46,8 +46,7 @@ const OUStringLiteral g_sUINameAttr("groupuinames:default-ui-name");
std::vector< beans::StringPair > DocTemplLocaleHelper::ReadGroupLocalizationSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext >& xContext )
{
- OUString aStringID = "groupuinames.xml";
- return ReadLocalizationSequence_Impl( xInStream, aStringID, xContext );
+ return ReadLocalizationSequence_Impl( xInStream, "groupuinames.xml", xContext );
}
@@ -61,8 +60,8 @@ void SAL_CALL DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::R
xWriterHandler->setOutputStream( xOutStream );
- OUString aCDATAString( "CDATA" );
- OUString aWhiteSpace( " " );
+ const OUString aCDATAString( "CDATA" );
+ const OUString aWhiteSpace( " " );
// write the namespace
::comphelper::AttributeList* pRootAttrList = new ::comphelper::AttributeList;
@@ -163,11 +162,11 @@ void SAL_CALL DocTemplLocaleHelper::startElement( const OUString& aName, const u
sal_Int32 nNewEntryNum = m_aResultSeq.size() + 1;
m_aResultSeq.resize( nNewEntryNum );
- OUString aNameValue = xAttribs->getValueByName( g_sNameAttr );
+ const OUString aNameValue = xAttribs->getValueByName( g_sNameAttr );
if ( aNameValue.isEmpty() )
throw xml::sax::SAXException(); // TODO: the ID value must present
- OUString aUINameValue = xAttribs->getValueByName( g_sUINameAttr );
+ const OUString aUINameValue = xAttribs->getValueByName( g_sUINameAttr );
if ( aUINameValue.isEmpty() )
throw xml::sax::SAXException(); // TODO: the ID value must present