Kaydet (Commit) 4bdde3af authored tarafından Caolán McNamara's avatar Caolán McNamara

first condition is always true

Change-Id: Ie3934201d99c5dbd3107d6b184a1d575fa38d5c9
üst df6d0af6
...@@ -533,33 +533,31 @@ OUString SvFileInformationManager::GetDescription_Impl( const INetURLObject& rOb ...@@ -533,33 +533,31 @@ OUString SvFileInformationManager::GetDescription_Impl( const INetURLObject& rOb
if ( !bFolder ) if ( !bFolder )
{ {
bool bDetected = false; 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 ); sDescription = GetDescriptionByFactory_Impl( aURLPath.copy( aURLPath.indexOf( '/' ) + 1 ) );
OUString aType = aURLPath.getToken( 0, '/' ); bDetected = true;
if ( aType == "factory" )
{
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 sExtension = sExtension.toAsciiLowerCase();
bool bExt = !sExtension.isEmpty(); nResId = GetDescriptionId_Impl( sExtension, bShowExt );
if ( bExt ) }
{ if ( !nResId )
sExtension = sExtension.toAsciiLowerCase(); {
nResId = GetDescriptionId_Impl( sExtension, bShowExt ); nResId = STR_DESCRIPTION_FILE;
} bOnlyFile = bExt;
if ( !nResId )
{
nResId = STR_DESCRIPTION_FILE;
bOnlyFile = bExt;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment