summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-07-25 21:49:55 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-07-25 21:50:52 +0100
commiteafcb702dbeab1ebcb10bcfb25167613f7a5ea21 (patch)
treedc154738f0c2f14d05cd5a13dbc701fba2ed1d29 /sc
parente5d0ab65f918a3a90d1b7fa4fdf7ee5c2ee89535 (diff)
use XFilePicker2 regardless of service, if possible, it is far more sane
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx13
-rw-r--r--sc/source/ui/vba/vbafiledialog.cxx13
2 files changed, 2 insertions, 24 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 96d1e9df1..10b769eda 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1460,19 +1460,8 @@ ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& Fi
if ( xFilePicker.is() && xFilePicker->execute() )
{
- sal_Bool bUseXFilePicker2 = false;
- uno::Reference< lang::XServiceInfo > xServiceInfo( xFilePicker, UNO_QUERY );
- if ( xServiceInfo.is() )
- {
- rtl::OUString sImplName = xServiceInfo->getImplementationName();
- if ( sImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.comp.fpicker.VistaFileDialog")) ||
- sImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.ui.dialogs.SalGtkFilePicker")) )
- {
- bUseXFilePicker2 = sal_True;
- }
- }
uno::Sequence< rtl::OUString > aSelectedFiles;
- if ( bUseXFilePicker2 && xFilePicker2.is() )
+ if ( xFilePicker2.is() )
{
// On Linux, XFilePicker->getFiles() always return one selected file although we select more than one file, also on Vista
// XFilePicker->getFiles() does not work well too, so we call XFilePicker2->getSelectedFiles() to get selected files.
diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx
index c0d576366..83c72be22 100644
--- a/sc/source/ui/vba/vbafiledialog.cxx
+++ b/sc/source/ui/vba/vbafiledialog.cxx
@@ -103,18 +103,7 @@ ScVbaFileDialog::Show( ) throw (::com::sun::star::uno::RuntimeException)
xFilePicker->setMultiSelectionMode(sal_True);
if ( xFilePicker->execute() )
{
- sal_Bool bUseXFilePicker2 = false;
- Reference< lang::XServiceInfo > xServiceInfo( xFilePicker, UNO_QUERY );
- if (xServiceInfo.is())
- {
- rtl::OUString sImplName = xServiceInfo->getImplementationName();
- if (sImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.comp.fpicker.VistaFileDialog")) ||
- sImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.ui.dialogs.SalGtkFilePicker")))
- {
- bUseXFilePicker2 = sal_True;
- }
- }
- if ( bUseXFilePicker2 && xFilePicker2.is() )
+ if ( xFilePicker2.is() )
{
// On Linux, XFilePicker->getFiles() always return one selected file although we select
// more than one file, also on Vista XFilePicker->getFiles() does not work well too,