summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-23 20:05:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-24 22:52:27 +0200
commit6f07012a344101f2afbf9c96dc7857127f39a25f (patch)
treef2ae2713ef5d1a6a244252e337c0ee849eb71c2f /sfx2
parentd904a21d5516ce2786f634d0bcc555c4b345e95d (diff)
use officecfg to retrieve AutoSave
Change-Id: I613ca68123cfd316cd4e6384f743aa6756d9291d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appcfg.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index fc4280e8df4b..7f2767107c94 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -160,8 +160,9 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_ATTR_AUTOSAVE :
{
bRet = true;
- if (!aSaveOptions.IsReadOnly(SvtSaveOptions::EOption::AutoSave))
- if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVE ), aSaveOptions.IsAutoSave())))
+ if (!officecfg::Office::Common::Save::Document::AutoSave::isReadOnly())
+ if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVE ),
+ officecfg::Office::Common::Save::Document::AutoSave::get() )))
bRet = false;
}
break;
@@ -455,7 +456,9 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), true, &pItem))
{
DBG_ASSERT(dynamic_cast< const SfxBoolItem *>( pItem ) != nullptr, "BoolItem expected");
- aSaveOptions.SetAutoSave( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
+ officecfg::Office::Common::Save::Document::AutoSave::set(
+ static_cast<const SfxBoolItem*>(pItem)->GetValue(),
+ batch);
}
// AutoSave-Prompt