diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2022-04-06 16:59:53 +0300 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2022-08-11 14:59:00 +0200 |
commit | b1560344c4ff2d1c5065eccdde31a8d4669510e4 (patch) | |
tree | b1e63c8683c8377f49d0dd238606e615d2af4a50 /desktop/source | |
parent | 3f410b62672d5cef71ae16010b1a74b9eee52825 (diff) |
lok: load template documents as regular documents
otherwise lok cannot save them directly because
libreoffice will try to open a save-as dialog
For odg, change the draw8_template type draw8
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I34b0ed03adcac89eaa926f8ae6c57e6f622a90f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132633
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138074
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138098
Tested-by: Jenkins
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6f1135248675..7f27f96d9efa 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2563,10 +2563,14 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, document::MacroExecMode::NEVER_EXECUTE; #endif + // set AsTemplate explicitly false to be able to load template files + // as regular files, otherwise we cannot save them; it will try + // to bring saveas dialog which cannot work with LOK case uno::Sequence<css::beans::PropertyValue> aFilterOptions{ comphelper::makePropertyValue("FilterOptions", sFilterOptions), comphelper::makePropertyValue("InteractionHandler", xInteraction), - comphelper::makePropertyValue("MacroExecutionMode", nMacroExecMode) + comphelper::makePropertyValue("MacroExecutionMode", nMacroExecMode), + comphelper::makePropertyValue("AsTemplate", false) }; /* TODO |