summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-05-14 13:34:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-05-14 16:13:20 +0100
commit4bdde3af25dee11c88d8c83409fa91788cc8dc71 (patch)
tree676443829e0760e17ed805226186c35afa4ec57d /svtools
parentdf6d0af6dd2ccb7fbac0d0ff03bc8f843aa9c104 (diff)
first condition is always true
Change-Id: Ie3934201d99c5dbd3107d6b184a1d575fa38d5c9
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/imagemgr.cxx42
1 files changed, 20 insertions, 22 deletions
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 423d380e5808..45eae7685161 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -533,33 +533,31 @@ OUString SvFileInformationManager::GetDescription_Impl( const INetURLObject& rOb
if ( !bFolder )
{
bool bDetected = false;
- if ( !bDetected )
+
+ if ( rObject.GetProtocol() == INetProtocol::PrivSoffice )
{
- if ( rObject.GetProtocol() == INetProtocol::PrivSoffice )
+ OUString aURLPath = sURL.copy( URL_PREFIX_PRIV_SOFFICE_LEN );
+ OUString aType = aURLPath.getToken( 0, '/' );
+ if ( aType == "factory" )
{
- OUString aURLPath = sURL.copy( URL_PREFIX_PRIV_SOFFICE_LEN );
- OUString aType = aURLPath.getToken( 0, '/' );
- if ( aType == "factory" )
- {
- sDescription = GetDescriptionByFactory_Impl( aURLPath.copy( aURLPath.indexOf( '/' ) + 1 ) );
- bDetected = true;
- }
+ sDescription = GetDescriptionByFactory_Impl( aURLPath.copy( aURLPath.indexOf( '/' ) + 1 ) );
+ bDetected = true;
}
+ }
- if ( !bDetected )
+ if (!bDetected)
+ {
+ // search a description by extension
+ bool bExt = !sExtension.isEmpty();
+ if ( bExt )
{
- // search a description by extension
- bool bExt = !sExtension.isEmpty();
- if ( bExt )
- {
- sExtension = sExtension.toAsciiLowerCase();
- nResId = GetDescriptionId_Impl( sExtension, bShowExt );
- }
- if ( !nResId )
- {
- nResId = STR_DESCRIPTION_FILE;
- bOnlyFile = bExt;
- }
+ sExtension = sExtension.toAsciiLowerCase();
+ nResId = GetDescriptionId_Impl( sExtension, bShowExt );
+ }
+ if ( !nResId )
+ {
+ nResId = STR_DESCRIPTION_FILE;
+ bOnlyFile = bExt;
}
}
}