sfx2/source/appl/appcfg.cxx | 3 ++- sfx2/source/doc/objstor.cxx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit 8bdd832d2088af4f81402e2c0cb2ee36788238da Author: Miklos Vajna <[email protected]> AuthorDate: Fri Jan 13 08:14:39 2023 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Fri Jan 13 08:09:53 2023 +0000 sfx2 lok: conditionally revert CreateBackup changes This was enabled by default in commit 5cb7fed2a5a02ff1cb4551752a0bd8d3001a1f22 (tdf#152463 Turn on AutoSave and Backup by default, 2022-12-12), and it makes sense on the desktop, but this breaks LOK clients, e.g. online.git unit-wopi-save-on-exit. Keep the desktop case unchanged, but disable it again for the LOK case to make the failing test pass again. Change-Id: I3a7eed8fdd6d394e9c7e75a477cbc11a6f40f7c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145426 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 3c8c8c301be7..b001f83f01af 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -49,6 +49,7 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> +#include <comphelper/lok.hxx> #include <objshimp.hxx> #include "shutdownicon.hxx" @@ -130,7 +131,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet ) bRet = true; if (!officecfg::Office::Common::Save::Document::CreateBackup::isReadOnly()) if (!rSet.Put( SfxBoolItem( SID_ATTR_BACKUP, - officecfg::Office::Common::Save::Document::CreateBackup::get() ))) + (officecfg::Office::Common::Save::Document::CreateBackup::get() && !comphelper::LibreOfficeKit::isActive()) ))) bRet = false; } break; diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 3b75c7e79ba9..2cc7c3c932f0 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1243,7 +1243,7 @@ bool SfxObjectShell::SaveTo_Impl // before we overwrite the original file, we will make a backup if there is a demand for that // if the backup is not created here it will be created internally and will be removed in case of successful saving - const bool bDoBackup = officecfg::Office::Common::Save::Document::CreateBackup::get(); + const bool bDoBackup = officecfg::Office::Common::Save::Document::CreateBackup::get() && !comphelper::LibreOfficeKit::isActive(); if ( bDoBackup ) { rMedium.DoBackup_Impl();
