Kaydet (Commit) 63b90217 authored tarafından Matteo Casalin's avatar Matteo Casalin

Avoid temporary OUStrings

Change-Id: I02f26228f0f9068ce7f497913fb36ac8945e785b
üst 2932e45b
......@@ -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());
......
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