[Libreoffice-commits] core.git: sfx2/source
Matteo Casalin
matteo.casalin at yahoo.com
Fri Mar 17 20:14:37 UTC 2017
sfx2/source/doc/objserv.cxx | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
New commits:
commit b2c58d86127c802555b933d5c11e80bc308f54e6
Author: Matteo Casalin <matteo.casalin at 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 <ci at libreoffice.org>
Reviewed-by: Matteo Casalin <matteo.casalin at 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
More information about the Libreoffice-commits
mailing list