summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/doc/iframe.cxx4
-rw-r--r--sfx2/source/doc/objcont.cxx7
-rw-r--r--sfx2/source/doc/objmisc.cxx6
3 files changed, 8 insertions, 9 deletions
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index ad44a090ef2a..8070c90c1e2c 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -327,12 +327,12 @@ uno::Any SAL_CALL IFrameObject::getPropertyValue(const OUString& aPropertyName)
{
case WID_FRAME_URL:
{
- aAny <<= OUString( maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
+ aAny <<= maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
break;
case WID_FRAME_NAME:
{
- aAny <<= OUString( maFrmDescr.GetName() );
+ aAny <<= maFrmDescr.GetName();
}
break;
case WID_FRAME_IS_AUTO_SCROLL:
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 61d736c027bf..148e265ae524 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -187,7 +187,7 @@ void SfxObjectShell::UpdateDocInfoForSave()
}
else if ( IsModified() )
{
- OUString aUserName = SvtUserOptions().GetFullName();
+ const OUString aUserName = SvtUserOptions().GetFullName();
if ( !IsUseUserData() )
{
// remove all data pointing to the current user
@@ -394,7 +394,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
// created from template?
uno::Reference<document::XDocumentProperties> xDocProps(getDocProperties());
- OUString aTemplName( xDocProps->getTemplateName() );
+ const OUString aTemplName( xDocProps->getTemplateName() );
OUString aTemplURL( xDocProps->getTemplateURL() );
OUString aFoundName;
@@ -462,8 +462,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
bLoad = true;
else if ( bCanUpdateFromTemplate == document::UpdateDocMode::ACCORDING_TO_CONFIG )
{
- OUString sMessage( SfxResId(STR_QRYTEMPL_MESSAGE).toString() );
- sMessage = sMessage.replaceAll( "$(ARG1)", aTemplName );
+ const OUString sMessage( SfxResId(STR_QRYTEMPL_MESSAGE).toString().replaceAll( "$(ARG1)", aTemplName ) );
ScopedVclPtrInstance< sfx2::QueryTemplateBox > aBox(GetDialogParent(), sMessage);
if ( RET_YES == aBox->Execute() )
bLoad = true;
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index c91acbf1b401..ab039b5d0e2c 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -203,7 +203,7 @@ void SfxObjectShell::FlushDocInfo()
SetModified();
uno::Reference<document::XDocumentProperties> xDocProps(getDocProperties());
DoFlushDocInfo(); // call template method
- OUString url(xDocProps->getAutoloadURL());
+ const OUString url(xDocProps->getAutoloadURL());
sal_Int32 delay(xDocProps->getAutoloadSecs());
SetAutoLoad( INetURLObject(url), delay * 1000,
(delay > 0) || !url.isEmpty() );
@@ -758,11 +758,11 @@ OUString SfxObjectShell::GetTitle( sal_uInt16 nMaxLength ) const
return pImpl->aTitle;
// must it be numbered?
- OUString aNoName(SFX2_RESSTR(STR_NONAME));
+ const OUString aNoName(SFX2_RESSTR(STR_NONAME));
if (pImpl->bIsNamedVisible)
{
// Append number
- aNoName += " " + OUString::number(pImpl->nVisualDocumentNumber);
+ return aNoName + " " + OUString::number(pImpl->nVisualDocumentNumber);
}
// Document called "Untitled" for the time being