cui/source/options/optgdlg.cxx | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-)
New commits: commit 4fd7d1a9e64ed256d442ef997c80bce92afe839b Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Mar 21 08:42:14 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Mar 21 09:53:47 2023 +0000 cid#1524485 'Constant' variable guards dead code Change-Id: I3a4dfb0e35db481c94a1f5cb56f078cc9e060a73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149196 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index b0bca101bdaa..04de401c4121 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -665,7 +665,6 @@ std::unique_ptr<SfxTabPage> OfaViewTabPage::Create( weld::Container* pPage, weld bool OfaViewTabPage::FillItemSet( SfxItemSet* ) { bool bModified = false; - bool bMenuOptModified = false; bool bDarkModeOptModified = false; bool bRepaintWindows(false); std::shared_ptr<comphelper::ConfigurationChanges> xChanges(comphelper::ConfigurationChanges::create()); @@ -799,23 +798,8 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) xChanges->commit(); - if (bMenuOptModified || bDarkModeOptModified) - { - // Set changed settings to the application instance - AllSettings aAllSettings = Application::GetSettings(); - - if (bMenuOptModified) - { - StyleSettings aStyleSettings = aAllSettings.GetStyleSettings(); - aAllSettings.SetStyleSettings(aStyleSettings); - } - - if (bDarkModeOptModified) - MiscSettings::SetDarkMode(m_xAppearanceStyleLB->get_active()); - - Application::MergeSystemSettings( aAllSettings ); - Application::SetSettings(aAllSettings); - } + if (bDarkModeOptModified) + MiscSettings::SetDarkMode(m_xAppearanceStyleLB->get_active()); if ( bAppearanceChanged ) {