[Libreoffice-commits] core.git: cui/source svtools/source svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 28 20:19:40 UTC 2020
cui/source/options/optgdlg.cxx | 9 ++++-----
svtools/source/control/ctrlbox.cxx | 5 ++---
svx/source/tbxctrls/tbcontrl.cxx | 1 -
3 files changed, 6 insertions(+), 9 deletions(-)
New commits:
commit 56b2214c3aa40c2e2522eba5584063fb34e003ba
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jul 28 19:40:19 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jul 28 22:18:55 2020 +0200
drop use of SvtFontOptions
Change-Id: Ib3ef6ec415d5e61d484e338290030fac2ed7b215
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99647
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 64a85add8440..f9bccb5222d4 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -31,7 +31,6 @@
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <unotools/compatibility.hxx>
-#include <unotools/fontoptions.hxx>
#include <svtools/menuoptions.hxx>
#include <svl/languageoptions.hxx>
#include <svtools/miscopt.hxx>
@@ -801,7 +800,6 @@ std::unique_ptr<SfxTabPage> OfaViewTabPage::Create( weld::Container* pPage, weld
bool OfaViewTabPage::FillItemSet( SfxItemSet* )
{
- SvtFontOptions aFontOpt;
SvtMenuOptions aMenuOpt;
bool bModified = false;
@@ -905,7 +903,9 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
if (m_xFontShowCB->get_state_changed_from_saved())
{
- aFontOpt.EnableFontWYSIWYG(m_xFontShowCB->get_active());
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::set(m_xFontShowCB->get_active(), batch);
+ batch->commit();
bModified = true;
}
@@ -1060,8 +1060,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
m_xAAPointLimit->set_value(pAppearanceCfg->GetFontAntialiasingMinPixelHeight(), FieldUnit::PIXEL);
// WorkingSet
- SvtFontOptions aFontOpt;
- m_xFontShowCB->set_active( aFontOpt.IsFontWYSIWYGEnabled() );
+ m_xFontShowCB->set_active(officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::get());
SvtMenuOptions aMenuOpt;
m_xMenuIconsLB->set_active(aMenuOpt.GetMenuIconsState() == 2 ? 0 : aMenuOpt.GetMenuIconsState() + 1);
m_xMenuIconsLB->save_value();
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 555d35a94aa0..f93ab22fc741 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -21,6 +21,7 @@
#include <comphelper/lok.hxx>
#include <i18nutil/unicode.hxx>
+#include <officecfg/Office/Common.hxx>
#include <tools/stream.hxx>
#include <vcl/builder.hxx>
#include <vcl/customweld.hxx>
@@ -36,7 +37,6 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <unotools/charclass.hxx>
-#include <unotools/fontoptions.hxx>
#include <unotools/localedatawrapper.hxx>
#include <svtools/borderline.hxx>
@@ -390,8 +390,7 @@ void FontNameBox::LoadMRUEntries( const OUString& aFontMRUEntriesFile )
if (aFontMRUEntriesFile.isEmpty())
return;
- SvtFontOptions aFontOpt;
- if (!aFontOpt.IsFontHistoryEnabled())
+ if (!officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::get())
return;
SvFileStream aStream( aFontMRUEntriesFile, StreamMode::READ );
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index c8631acb28f3..bb7818264a0a 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -41,7 +41,6 @@
#include <sfx2/sfxstatuslistener.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <sfx2/viewfrm.hxx>
-#include <unotools/fontoptions.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/virdev.hxx>
More information about the Libreoffice-commits
mailing list