diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-08 09:08:08 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-08 14:59:30 +0100 |
commit | 194bdbde25dd70988c94ff5e1af43b530d47d94b (patch) | |
tree | 285dcce9c2f74c727e0dd727e3ad9acf238ae70e /svtools | |
parent | daa654fb44772009017b0c918903093147df1620 (diff) |
Revert "make FilePicker::createWithMode not crash"
This reverts commit 58ea27124af27bfac21a796b0d13d72354bd0dd3.
It's probably better to fix it another way.
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/uno/fpicker.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/svtools/source/uno/fpicker.cxx b/svtools/source/uno/fpicker.cxx index 1034bafa3bdb..a9d06ad6d5c7 100644 --- a/svtools/source/uno/fpicker.cxx +++ b/svtools/source/uno/fpicker.cxx @@ -57,22 +57,19 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_svt_FilePicker_get_implementation( css::uno::XComponentContext *context, uno_Sequence * arguments) { - assert(arguments != 0 && (arguments->nElements == 0 || arguments->nElements == 1)); - css::uno::Sequence<css::uno::Any> aArgs(reinterpret_cast<css::uno::Any *>(arguments->elements), - arguments->nElements); + assert(arguments != 0 && arguments->nElements == 0); (void) arguments; Reference< css::uno::XInterface > xResult; Reference< css::lang::XMultiComponentFactory > xFactory (context->getServiceManager()); if (xFactory.is() && SvtMiscOptions().UseSystemFileDialog()) { - xResult = Reference<css::uno::XInterface>(Application::createFilePicker(aArgs, context)); + xResult = Reference< css::uno::XInterface >( Application::createFilePicker( context ) ); if (!xResult.is()) { try { - xResult = xFactory->createInstanceWithArgumentsAndContext( + xResult = xFactory->createInstanceWithContext ( FilePicker_getSystemPickerServiceName(), - aArgs, context); } catch (css::uno::Exception const &) @@ -86,9 +83,8 @@ com_sun_star_comp_svt_FilePicker_get_implementation( if (!xResult.is() && xFactory.is()) { // Always fall back to OfficeFilePicker. - xResult = xFactory->createInstanceWithArgumentsAndContext( - "com.sun.star.ui.dialogs.OfficeFilePicker", - aArgs, + xResult = xFactory->createInstanceWithContext ( + OUString( "com.sun.star.ui.dialogs.OfficeFilePicker"), context); } if (xResult.is()) |