From d5b9283985633fdb423269cab961bba2acc3539e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 Jul 2021 20:39:57 +0200 Subject: use officecfg to retrieve AutoSaveTime Change-Id: I003be64cc46d6e781ab03d83bae0a3114ab6d56e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119460 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/appl/appcfg.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 4a71912fae0e..4a5913bbe4b7 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -179,8 +179,9 @@ void SfxApplication::GetOptions( SfxItemSet& rSet ) case SID_ATTR_AUTOSAVEMINUTE : { bRet = true; - if (!aSaveOptions.IsReadOnly(SvtSaveOptions::EOption::AutoSaveTime)) - if (!rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_AUTOSAVEMINUTE ), static_cast(aSaveOptions.GetAutoSaveTime())))) + if (!officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::isReadOnly()) + if (!rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_AUTOSAVEMINUTE ), + officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::get() ))) bRet = false; } break; @@ -476,7 +477,9 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), true, &pItem)) { DBG_ASSERT(dynamic_cast< const SfxUInt16Item *>( pItem ) != nullptr, "UInt16Item expected"); - aSaveOptions.SetAutoSaveTime(static_cast(pItem)->GetValue()); + officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::set( + static_cast(pItem)->GetValue(), + batch); } // UserAutoSave -- cgit