summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/filtuno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/unoobj/filtuno.cxx')
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 575d66147b64..0bb3db3453f8 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -20,6 +20,8 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <tools/urlobj.hxx>
#include <vcl/svapp.hxx>
+#include <uno/current_context.hxx>
+#include <unotools/filteroptions_settings.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <connectivity/dbtools.hxx>
#include <osl/diagnose.h>
@@ -188,7 +190,14 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute()
ScopedVclPtr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg(Application::GetFrameWeld(xDialogParent), aPrivDatName,
pInStream.get(), SC_IMPORTFILE));
- if ( pDlg->Execute() == RET_OK )
+
+ bool bShow;
+ // The "ShowFilterDialog" flag is passed from SfxApplication::OpenDocExec_Impl
+ if (!(css::uno::getCurrentContext()->getValueByName(u"ShowFilterDialog"_ustr) >>= bShow))
+ bShow = utl::isShowFilterOptionsDialog(aFilterString);
+ const bool bOk = !bShow || pDlg->Execute() == RET_OK;
+
+ if (bOk)
{
ScAsciiOptions aOptions;
pDlg->GetOptions( aOptions );