diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-23 20:39:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-25 08:37:08 +0200 |
commit | d5b9283985633fdb423269cab961bba2acc3539e (patch) | |
tree | 9098cabc94f33ad52f76353bc72728c673d047cc /sfx2 | |
parent | 84f4f7f99f92c0ecec0dd9d754fdfa8c652a7ec0 (diff) |
use officecfg to retrieve AutoSaveTime
Change-Id: I003be64cc46d6e781ab03d83bae0a3114ab6d56e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119460
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
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<sal_uInt16>(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<const SfxUInt16Item *>(pItem)->GetValue()); + officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::set( + static_cast<const SfxUInt16Item *>(pItem)->GetValue(), + batch); } // UserAutoSave |