sfx2/source/doc/objserv.cxx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-)
New commits: commit b2c58d86127c802555b933d5c11e80bc308f54e6 Author: Matteo Casalin <matteo.casa...@yahoo.com> Date: Thu Mar 16 21:43:49 2017 +0100 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 <c...@libreoffice.org> Reviewed-by: Matteo Casalin <matteo.casa...@yahoo.com> 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits