summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-02-17 16:47:27 -0400
committerHenry Castro <hcastro@collabora.com>2021-03-03 19:27:41 +0100
commita207551215ca4d7445bf129a3f6863418d75383e (patch)
tree938c161ea2851a9b63d67a0a2b7c593fb2ae18f6 /desktop
parent3c9936a9b77fe18396d048de2f97b9e8eb66a787 (diff)
lok: add batch mode option to load the document
When the LibreOffice Kit is active by default is set to headless mode, with the flag "DialogCancelMode::Silent", according to the documentation it should close the dialog, but it was changed for dialog tunneling. However the dialog tunneling is being deprecated, and in order to not produce any regression, it will be used temporary a new state "DialogCancelMode::LOKSilent", to disable any dialog interactivity. Change-Id: I3b6cce38c37f75dc1b24dda352f6caec19438ff1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111087 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 5f3fbb019bd79bd57eed94e01bd2202efd9a0c06) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111319 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx6
1 files changed, 6 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,