diff options
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 42 |
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; } } } |