diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-24 13:38:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-25 15:31:25 +0200 |
commit | 60fc68e547cf70f82e681c9a17b4f3e5c124aa39 (patch) | |
tree | bf098f4455f68378f9f3182ae85aaa9a86567789 /cui | |
parent | 1d2fb25e268838ccc23b264330b956f1c31f25dd (diff) |
use officecfg to retrieve UseUserData
Change-Id: Ic77555520f2451b12c01423179d3f201daad35b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119472
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgenrl.cxx | 10 | ||||
-rw-r--r-- | cui/source/options/optsave.cxx | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index 66c734af1194..df31ee10522d 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -34,6 +34,7 @@ #include <svl/intitem.hxx> #include <vcl/settings.hxx> +#include <officecfg/Office/Common.hxx> #include <unotools/useroptions.hxx> #include <cuioptgenrl.hxx> #include <svx/svxids.hrc> @@ -349,10 +350,11 @@ bool SvxGeneralTabPage::FillItemSet( SfxItemSet* ) bool bModified = false; bModified |= GetData_Impl(); - SvtSaveOptions aSaveOpt; - if (m_xUseDataCB->get_active() != aSaveOpt.IsUseUserData()) + if (m_xUseDataCB->get_active() != officecfg::Office::Common::Save::Document::UseUserData::get()) { - aSaveOpt.SetUseUserData(m_xUseDataCB->get_active()); + auto xChanges = comphelper::ConfigurationChanges::create(); + officecfg::Office::Common::Save::Document::UseUserData::set(m_xUseDataCB->get_active(), xChanges); + xChanges->commit(); bModified = true; } return bModified; @@ -377,7 +379,7 @@ void SvxGeneralTabPage::Reset( const SfxItemSet* rSet ) vFields.front()->xEdit->grab_focus(); } - m_xUseDataCB->set_active(SvtSaveOptions().IsUseUserData()); + m_xUseDataCB->set_active(officecfg::Office::Common::Save::Document::UseUserData::get()); } diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 8748f55f4a7d..3ac609d8e64f 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -41,6 +41,7 @@ #include <tools/diagnose_ex.h> #include <officecfg/Office/Common.hxx> #include <officecfg/Office/Recovery.hxx> +#include <officecfg/Office/Common.hxx> #include <sfx2/fcontnr.hxx> |