diff options
-rw-r--r-- | desktop/source/lib/init.cxx | 6 | ||||
-rw-r--r-- | include/vcl/svapp.hxx | 1 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d62ceac29c74..2b56bdb2112d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2239,6 +2239,12 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, const OUString aDeviceFormFactor = extractParameter(aOptions, u"DeviceFormFactor"); SfxLokHelper::setDeviceFormFactor(aDeviceFormFactor); + const OUString aBatch = extractParameter(aOptions, u"Batch"); + if (!aBatch.isEmpty()) + { + Application::SetDialogCancelMode(DialogCancelMode::LOKSilent); + } + uno::Sequence<css::beans::PropertyValue> aFilterOptions(3); aFilterOptions[0] = css::beans::PropertyValue( "FilterOptions", 0, diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index bfa92cf88321..b0b5a069af4b 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -212,6 +212,7 @@ private: enum class DialogCancelMode { Off, ///< do not automatically cancel dialogs Silent, ///< silently cancel any dialogs + LOKSilent, ///< silently cancel any dialogs (LOK case) Fatal ///< cancel any dialogs by std::abort }; diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 67dc19a7be99..f354e8a32d85 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -950,6 +950,10 @@ bool Dialog::ImplStartExecute() "Dialog \"" << ImplGetDialogText(this) << "\"cancelled in silent mode"); return false; + + case DialogCancelMode::LOKSilent: + return false; + default: // default cannot happen case DialogCancelMode::Fatal: std::abort(); |