summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-06-01 19:12:30 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-06-01 20:20:00 +0200
commit63b902175b58b65fb6f385cd084d55d6ac02da17 (patch)
tree77d9269cca265fa9c9643601eda756691bea6a89 /sw
parent2932e45b68a5b0d083532942f997aff94856b995 (diff)
Avoid temporary OUStrings
Change-Id: I02f26228f0f9068ce7f497913fb36ac8945e785b
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unocoll.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 8e992dbbb041..cccb2c3899d4 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -608,7 +608,7 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16
{
uno::Sequence< uno::Any > aArgs(1);
aArgs[ 0 ] <<= pDoc->GetDocShell()->GetModel();
- aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( OUString("ooo.vba.word.Globals"), aArgs );
+ aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( "ooo.vba.word.Globals", aArgs );
pDoc->GetDocShell()->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
}
aGlobs >>= xRet;
@@ -1465,21 +1465,20 @@ uno::Any SwXTextSections::getByIndex(sal_Int32 nIndex)
return makeAny(xRet);
}
-uno::Any SwXTextSections::getByName(const OUString& Name)
+uno::Any SwXTextSections::getByName(const OUString& rName)
throw( NoSuchElementException, WrappedTargetException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
uno::Any aRet;
if(IsValid())
{
- OUString aName(Name);
SwSectionFmts& rFmts = GetDoc()->GetSections();
uno::Reference< XTextSection > xSect;
for(size_t i = 0; i < rFmts.size(); ++i)
{
SwSectionFmt* pFmt = rFmts[i];
if (pFmt->IsInNodesArr()
- && (aName == pFmt->GetSection()->GetSectionName()))
+ && (rName == pFmt->GetSection()->GetSectionName()))
{
xSect = GetObject(*pFmt);
aRet.setValue(&xSect, cppu::UnoType<XTextSection>::get());