summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2017-05-01 18:19:41 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2017-05-06 18:08:17 +0200
commite4bd8e218b68a4a70f798a0096cd904fdd344de3 (patch)
treed24d69e2f4dc0859df810c7688bb99b0b6dfc086 /sfx2
parent5e661008a58677e8871abf93209f81200507b29f (diff)
Avoid 'else' after 'return'
Change-Id: I38daa42f0f764e05c8894f26faad14e947ee77ef
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objmisc.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index ab039b5d0e2c..543ac85a0416 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -735,7 +735,8 @@ OUString SfxObjectShell::GetTitle( sal_uInt16 nMaxLength ) const
bRecur = false;
return aTitle;
}
- else if (SFX_TITLE_APINAME == nMaxLength )
+
+ if (SFX_TITLE_APINAME == nMaxLength )
return GetAPIName();
// Picklist/Caption is mapped
@@ -785,9 +786,9 @@ OUString SfxObjectShell::GetTitle( sal_uInt16 nMaxLength ) const
{
if ( nMaxLength == SFX_TITLE_FULLNAME )
return aURL.HasMark() ? INetURLObject( aURL.GetURLNoMark() ).PathToFileName() : aURL.PathToFileName();
- else if ( nMaxLength == SFX_TITLE_FILENAME )
+ if ( nMaxLength == SFX_TITLE_FILENAME )
return aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset);
- else if ( pImpl->aTitle.isEmpty() )
+ if ( pImpl->aTitle.isEmpty() )
pImpl->aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT,
true, INetURLObject::DecodeMechanism::WithCharset );
}
@@ -798,15 +799,14 @@ OUString SfxObjectShell::GetTitle( sal_uInt16 nMaxLength ) const
const OUString aComplete( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( aComplete.getLength() > nMaxLength )
return "..." + aComplete.copy( aComplete.getLength() - nMaxLength + 3, nMaxLength - 3 );
- else
- return aComplete;
+ return aComplete;
}
- else if ( nMaxLength == SFX_TITLE_FILENAME )
+ if ( nMaxLength == SFX_TITLE_FILENAME )
{
const OUString aName = INetURLObject::decode( aURL.GetBase(), INetURLObject::DecodeMechanism::WithCharset );
return aName.isEmpty() ? aURL.GetURLNoPass() : aName;
}
- else if ( nMaxLength == SFX_TITLE_FULLNAME )
+ if ( nMaxLength == SFX_TITLE_FULLNAME )
return aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
// Generate Title from file name if possible