[Libreoffice-commits] .: sc/source
Michael Meeks
michael at kemper.freedesktop.org
Mon Jul 25 13:52:28 PDT 2011
sc/source/ui/vba/vbaapplication.cxx | 13 +------------
sc/source/ui/vba/vbafiledialog.cxx | 13 +------------
2 files changed, 2 insertions(+), 24 deletions(-)
New commits:
commit eafcb702dbeab1ebcb10bcfb25167613f7a5ea21
Author: Michael Meeks <michael.meeks at novell.com>
Date: Mon Jul 25 21:49:55 2011 +0100
use XFilePicker2 regardless of service, if possible, it is far more sane
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 96d1e9d..10b769e 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 c0d5763..83c72be 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,
More information about the Libreoffice-commits
mailing list