summaryrefslogtreecommitdiff
path: root/cui/source/options/optgdlg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-10-31 14:53:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-01 17:11:17 +0100
commitfabaabbd01c84cbdea465382e42387a452b54046 (patch)
tree29f597f61a9afc6d5fbb2f7e14c1a50cc491ea0d /cui/source/options/optgdlg.cxx
parent6e81dad4c2b23017cb0c996a4ab9a81e24fab16f (diff)
use officecfg for UseSystemFileDialog
Change-Id: I1419af229a67d6ebb1cf2c63757656beb3f512db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105142 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/options/optgdlg.cxx')
-rw-r--r--cui/source/options/optgdlg.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 487cff1f6883..6b71b125e078 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -268,7 +268,7 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, weld::DialogController* p
{
if (!lcl_HasSystemFilePicker())
m_xFileDlgFrame->hide();
- else if (SvtMiscOptions().IsUseSystemFileDialogReadOnly())
+ else if (officecfg::Office::Common::Misc::UseSystemFileDialog::isReadOnly())
{
m_xFileDlgROImage->show();
m_xFileDlgCB->set_sensitive(false);
@@ -330,8 +330,10 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
if ( m_xFileDlgCB->get_state_changed_from_saved() )
{
- SvtMiscOptions aMiscOpt;
- aMiscOpt.SetUseSystemFileDialog( !m_xFileDlgCB->get_active() );
+ std::shared_ptr< comphelper::ConfigurationChanges > xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::UseSystemFileDialog::set( !m_xFileDlgCB->get_active(), xChanges );
+ xChanges->commit();
bModified = true;
}
@@ -392,8 +394,7 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
m_xPopUpNoHelpCB->save_state();
m_xShowTipOfTheDay->set_active( officecfg::Office::Common::Misc::ShowTipOfTheDay::get() );
m_xShowTipOfTheDay->save_state();
- SvtMiscOptions aMiscOpt;
- m_xFileDlgCB->set_active( !aMiscOpt.UseSystemFileDialog() );
+ m_xFileDlgCB->set_active( !officecfg::Office::Common::Misc::UseSystemFileDialog::get() );
m_xFileDlgCB->save_state();
m_xPrintDlgCB->set_active( !officecfg::Office::Common::Misc::UseSystemPrintDialog::get() );
m_xPrintDlgCB->save_state();