diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2017-03-16 21:43:49 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2017-03-17 20:14:13 +0000 |
commit | b2c58d86127c802555b933d5c11e80bc308f54e6 (patch) | |
tree | 9400c6f414d3e710590484d1bcaa315f2fa4e04e /sfx2 | |
parent | b93a015f9bbed007a8800ef040ec2b6211d33858 (diff) |
Simplify same assignment in both branches of a conditional
aTitle was assigned GetTitle() in both branches since initial commit (2007)
Remove the (used just once) temporary, while at it.
Change-Id: I0c6cb0ef8f720fea7f4105edf8233a2c64377e4f
Reviewed-on: https://gerrit.libreoffice.org/35372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index f354797da5a1..e357c82533c6 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -448,18 +448,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // e.g. if a readonly document is saved elsewhere and user asks for editing DocInfo before bReadOnly = pROItem->GetValue(); - // collect data for dialog - OUString aURL, aTitle; - if ( HasName() ) - { - aURL = GetMedium()->GetName(); - aTitle = GetTitle(); - } - else - { - aURL = GetFactory().GetFactoryURL(); - aTitle = GetTitle(); - } + // URL for dialog + const OUString aURL( HasName() ? GetMedium()->GetName() : GetFactory().GetFactoryURL() ); Reference< XCmisDocument > xCmisDoc( GetModel(), uno::UNO_QUERY ); uno::Sequence< document::CmisProperty> aCmisProperties = xCmisDoc->getCmisProperties(); @@ -475,7 +465,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) 0L ); aSet.Put( aDocInfoItem ); aSet.Put( SfxBoolItem( SID_DOC_READONLY, bReadOnly ) ); - aSet.Put( SfxStringItem( SID_EXPLORER_PROPS_START, aTitle ) ); + aSet.Put( SfxStringItem( SID_EXPLORER_PROPS_START, GetTitle() ) ); aSet.Put( SfxStringItem( SID_BASEURL, GetMedium()->GetBaseURL() ) ); // creating dialog is done via virtual method; application will |