implEnsureURLExtension just returns the first argument, remove it

This commit is contained in:
Caolán McNamara
2011-11-18 21:18:18 +00:00
parent ca02d72808
commit bb997c0019
2 changed files with 3 additions and 13 deletions

View File

@@ -1343,14 +1343,6 @@ void FileDialogHelper_Impl::implStartExecute()
} }
} }
// ------------------------------------------------------------------------
String FileDialogHelper_Impl::implEnsureURLExtension(const String& sURL,
const String& /*sExtension*/)
{
return sURL;
}
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
void lcl_saveLastURLs(SvStringsDtor*& rpURLList , void lcl_saveLastURLs(SvStringsDtor*& rpURLList ,
::comphelper::SequenceAsVector< ::rtl::OUString >& lLastURLs ) ::comphelper::SequenceAsVector< ::rtl::OUString >& lLastURLs )
@@ -1386,7 +1378,7 @@ void FileDialogHelper_Impl::implGetAndCacheFiles(const uno::Reference< XInterfac
::sal_Int32 nFiles = lFiles.getLength(); ::sal_Int32 nFiles = lFiles.getLength();
for (::sal_Int32 i = 0; i < nFiles; i++) for (::sal_Int32 i = 0; i < nFiles; i++)
{ {
String* pURL = new String(implEnsureURLExtension(lFiles[i], sExtension)); String* pURL = new String(lFiles[i]);
rpURLList->Insert( pURL, rpURLList->Count() ); rpURLList->Insert( pURL, rpURLList->Count() );
} }
} }
@@ -1400,7 +1392,7 @@ void FileDialogHelper_Impl::implGetAndCacheFiles(const uno::Reference< XInterfac
if ( nFiles == 1 ) if ( nFiles == 1 )
{ {
rpURLList = new SvStringsDtor; rpURLList = new SvStringsDtor;
String* pURL = new String(implEnsureURLExtension(lFiles[0], sExtension)); String* pURL = new String(lFiles[0]);
rpURLList->Insert( pURL, 0 ); rpURLList->Insert( pURL, 0 );
} }
else else
@@ -1418,7 +1410,7 @@ void FileDialogHelper_Impl::implGetAndCacheFiles(const uno::Reference< XInterfac
else else
aPath.setName( lFiles[i] ); aPath.setName( lFiles[i] );
String* pURL = new String(implEnsureURLExtension(aPath.GetMainURL( INetURLObject::NO_DECODE ), sExtension) ); String* pURL = new String(aPath.GetMainURL( INetURLObject::NO_DECODE ) );
rpURLList->Insert( pURL, rpURLList->Count() ); rpURLList->Insert( pURL, rpURLList->Count() );
} }
} }

View File

@@ -159,8 +159,6 @@ namespace sfx2
void implGetAndCacheFiles( const ::com::sun::star::uno::Reference< XInterface >& xPicker , void implGetAndCacheFiles( const ::com::sun::star::uno::Reference< XInterface >& xPicker ,
SvStringsDtor*& rpURLList, SvStringsDtor*& rpURLList,
const SfxFilter* pFilter ); const SfxFilter* pFilter );
String implEnsureURLExtension(const String& sURL ,
const String& sExtension);
DECL_LINK( TimeOutHdl_Impl, Timer* ); DECL_LINK( TimeOutHdl_Impl, Timer* );
DECL_LINK( HandleEvent, FileDialogHelper* ); DECL_LINK( HandleEvent, FileDialogHelper* );