summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-23 21:03:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-25 08:22:59 +0200
commite192e1542a84b26cb0685860b84339019021de96 (patch)
tree9f0582a0710cdcd170930371b119b48a36be2d38 /sfx2
parent6f07012a344101f2afbf9c96dc7857127f39a25f (diff)
use officecfg to retrieve UserAutoSave
Change-Id: I11f45c43bed9ea9a380026d84a91f48629dffac7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119461 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appcfg.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 7f2767107c94..4a71912fae0e 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -37,6 +37,7 @@
#include <officecfg/Inet.hxx>
#include <officecfg/Office/Common.hxx>
+#include <officecfg/Office/Recovery.hxx>
#include <unotools/saveopt.hxx>
#include <svtools/helpopt.hxx>
#include <unotools/securityoptions.hxx>
@@ -186,8 +187,9 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_ATTR_USERAUTOSAVE :
{
bRet = true;
- if (!aSaveOptions.IsReadOnly(SvtSaveOptions::EOption::UserAutoSave))
- if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_USERAUTOSAVE ), aSaveOptions.IsUserAutoSave())))
+ if (!officecfg::Office::Recovery::AutoSave::UserAutoSaveEnabled::isReadOnly())
+ if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_USERAUTOSAVE ),
+ officecfg::Office::Recovery::AutoSave::UserAutoSaveEnabled::get() )))
bRet = false;
}
break;
@@ -481,7 +483,9 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_USERAUTOSAVE), true, &pItem))
{
DBG_ASSERT(dynamic_cast< const SfxBoolItem *>( pItem ) != nullptr, "BoolItem expected");
- aSaveOptions.SetUserAutoSave( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
+ officecfg::Office::Recovery::AutoSave::UserAutoSaveEnabled::set(
+ static_cast<const SfxBoolItem*>(pItem)->GetValue(),
+ batch);
}
// DocInfo