summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-24 22:18:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-25 09:06:38 +0200
commit9117fb44bc7bd6b8764911c731c84a9e5dcc37f0 (patch)
tree9ae340801e5becad5ebd8a098d2d763bc407eecc /cui
parentd5b9283985633fdb423269cab961bba2acc3539e (diff)
use officecfg for help options
Change-Id: I2d19541cff07bf8159715d8f32d771cbf201ece4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119475 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgdlg.cxx19
-rw-r--r--cui/source/options/treeopt.cxx11
2 files changed, 11 insertions, 19 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 9194219d2056..f1f46e144701 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -45,7 +45,6 @@
#include <editeng/editids.hrc>
#include <svx/svxids.hrc>
#include <svl/intitem.hxx>
-#include <svtools/helpopt.hxx>
#include <unotools/searchopt.hxx>
#include <sal/log.hxx>
#include <officecfg/Office/Common.hxx>
@@ -217,16 +216,11 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
bool bModified = false;
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
- SvtHelpOptions aHelpOptions;
if ( m_xPopUpNoHelpCB->get_state_changed_from_saved() )
- {
- auto xChanges = comphelper::ConfigurationChanges::create();
- officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::set(m_xPopUpNoHelpCB->get_active(), xChanges);
- xChanges->commit();
- }
+ officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::set(m_xPopUpNoHelpCB->get_active(), batch);
if ( m_xExtHelpCB->get_state_changed_from_saved() )
- aHelpOptions.SetExtendedHelp( m_xExtHelpCB->get_active() );
+ officecfg::Office::Common::Help::ExtendedTip::set(m_xExtHelpCB->get_active(), batch);
if ( m_xShowTipOfTheDay->get_state_changed_from_saved() )
{
@@ -236,10 +230,7 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
if ( m_xFileDlgCB->get_state_changed_from_saved() )
{
- std::shared_ptr< comphelper::ConfigurationChanges > xChanges(
- comphelper::ConfigurationChanges::create());
- officecfg::Office::Common::Misc::UseSystemFileDialog::set( !m_xFileDlgCB->get_active(), xChanges );
- xChanges->commit();
+ officecfg::Office::Common::Misc::UseSystemFileDialog::set( !m_xFileDlgCB->get_active(), batch );
bModified = true;
}
@@ -287,8 +278,8 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
{
- SvtHelpOptions aHelpOptions;
- m_xExtHelpCB->set_active( aHelpOptions.IsHelpTips() && aHelpOptions.IsExtendedHelp() );
+ m_xExtHelpCB->set_active( officecfg::Office::Common::Help::Tip::get() &&
+ officecfg::Office::Common::Help::ExtendedTip::get() );
m_xExtHelpCB->save_state();
m_xPopUpNoHelpCB->set_active( officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::get() );
m_xPopUpNoHelpCB->save_state();
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 698196afe099..0d617a8d3552 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -90,7 +90,6 @@
#include <svl/flagitem.hxx>
#include <svl/intitem.hxx>
#include <svl/languageoptions.hxx>
-#include <svtools/helpopt.hxx>
#include <svx/databaseregistrationui.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/urlobj.hxx>
@@ -1223,10 +1222,12 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet
}
// evaluate help options
- if ( SvtHelpOptions().IsHelpTips() != Help::IsQuickHelpEnabled() )
- SvtHelpOptions().IsHelpTips() ? Help::EnableQuickHelp() : Help::DisableQuickHelp();
- if ( SvtHelpOptions().IsExtendedHelp() != Help::IsBalloonHelpEnabled() )
- SvtHelpOptions().IsExtendedHelp() ? Help::EnableBalloonHelp() : Help::DisableBalloonHelp();
+ bool bHelpTips = officecfg::Office::Common::Help::Tip::get();
+ if ( bHelpTips != Help::IsQuickHelpEnabled() )
+ bHelpTips ? Help::EnableQuickHelp() : Help::DisableQuickHelp();
+ bool bExtendedHelp = officecfg::Office::Common::Help::ExtendedTip::get();
+ if ( bExtendedHelp != Help::IsBalloonHelpEnabled() )
+ bExtendedHelp ? Help::EnableBalloonHelp() : Help::DisableBalloonHelp();
batch->commit();
}