summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-09-13 12:45:08 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-09-14 22:40:29 +0200
commit02d1aaf12cd1c9a6b7c79d7fbb5f65dd12199ab0 (patch)
tree4bf5e2baa36e28aa8d84e8ef52faf09494c83e6f /cui
parent9f3222789fa6684701b9f2088a7bb3b198274e20 (diff)
Reduce OUString copies
Change-Id: I443a327ce2f089b7930678d21572a43a28cdea51
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optpath.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index bfc0b73ec2ee..3cc1dcef7e37 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -317,8 +317,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
if ( !sTmpPath.isEmpty() && !sWritable.isEmpty() )
sTmpPath += OUStringLiteral1<MULTIPATH_DELIMITER>();
sTmpPath += sWritable;
- OUString aValue( sTmpPath );
- aValue = Convert_Impl( aValue );
+ const OUString aValue = Convert_Impl( sTmpPath );
nWidth2 = std::max(nWidth2, pPathBox->GetTextWidth(aValue));
aStr += aValue;
SvTreeListEntry* pEntry = pPathBox->InsertEntry( aStr );
@@ -481,12 +480,11 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder )
// old path is an URL?
INetURLObject aObj( sWritable );
bool bURL = ( aObj.GetProtocol() != INetProtocol::NotValid );
- OUString aPathStr( _rFolder );
- INetURLObject aNewObj( aPathStr );
+ INetURLObject aNewObj( _rFolder );
aNewObj.removeFinalSlash();
// then the new path also an URL else system path
- OUString sNewPathStr = bURL ? aPathStr : aNewObj.getFSysPath( INetURLObject::FSYS_DETECT );
+ OUString sNewPathStr = bURL ? _rFolder : aNewObj.getFSysPath( INetURLObject::FSYS_DETECT );
bool bChanged =
#ifdef UNX
@@ -564,9 +562,8 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, Button*, void)
sPath += sWritable;
pMultiDlg->SetPath( sPath );
- OUString sPathName = SvTabListBox::GetEntryText( pEntry, 0 );
- OUString sNewTitle( pImpl->m_sMultiPathDlg );
- sNewTitle = sNewTitle.replaceFirst( VAR_ONE, sPathName );
+ const OUString sPathName = SvTabListBox::GetEntryText( pEntry, 0 );
+ const OUString sNewTitle = pImpl->m_sMultiPathDlg.replaceFirst( VAR_ONE, sPathName );
pMultiDlg->SetTitle( sNewTitle );
if ( pMultiDlg->Execute() == RET_OK && pEntry )
@@ -799,7 +796,7 @@ void SvxPathTabPage::SetPathList(
sCfgName + POSTFIX_USER, aValue);
// then the writable path
- aValue = makeAny( OUString( _rWritablePath ) );
+ aValue = makeAny( _rWritablePath );
pImpl->m_xPathSettings->setPropertyValue(
sCfgName + POSTFIX_WRITABLE, aValue);
}