sc/source/ui/inc/tpcompatibility.hxx | 6 ++---- sc/source/ui/optdlg/tpcompatibility.cxx | 25 +++++++++---------------- sc/uiconfig/scalc/ui/optcompatibilitypage.ui | 11 ++++------- 3 files changed, 15 insertions(+), 27 deletions(-)
New commits: commit 67413b23c785343bfdc75f5c7c511701bff19eca Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Jul 27 21:44:38 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Jul 28 22:14:23 2019 +0200 weld ScTpCompatOptions Change-Id: Id67570b53604489fa0b2194a0f9ad0b67d535f0e Reviewed-on: https://gerrit.libreoffice.org/76487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx index ad9d19fb195d..7d895a644279 100644 --- a/sc/source/ui/inc/tpcompatibility.hxx +++ b/sc/source/ui/inc/tpcompatibility.hxx @@ -11,7 +11,6 @@ #define INCLUDED_SC_SOURCE_UI_INC_TPCOMPATIBILITY_HXX #include <sfx2/tabdlg.hxx> -#include <vcl/lstbox.hxx> class ScTpCompatOptions : public SfxTabPage { @@ -26,11 +25,10 @@ public: virtual DeactivateRC DeactivatePage(SfxItemSet* pSet ) override; virtual ~ScTpCompatOptions() override; - virtual void dispose() override; private: - explicit ScTpCompatOptions(vcl::Window* pParent, const SfxItemSet& rCoreAttrs); + explicit ScTpCompatOptions(TabPageParent pParent, const SfxItemSet& rCoreAttrs); private: - VclPtr<ListBox> m_pLbKeyBindings; + std::unique_ptr<weld::ComboBox> m_xLbKeyBindings; }; #endif diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx index efd464e4750d..a7b2dd16dd35 100644 --- a/sc/source/ui/optdlg/tpcompatibility.cxx +++ b/sc/source/ui/optdlg/tpcompatibility.cxx @@ -15,36 +15,29 @@ #include <sc.hrc> #include <optutil.hxx> -ScTpCompatOptions::ScTpCompatOptions(vcl::Window *pParent, const SfxItemSet &rCoreAttrs) : - SfxTabPage(pParent, "OptCompatibilityPage","modules/scalc/ui/optcompatibilitypage.ui", &rCoreAttrs) +ScTpCompatOptions::ScTpCompatOptions(TabPageParent pParent, const SfxItemSet &rCoreAttrs) + : SfxTabPage(pParent, "modules/scalc/ui/optcompatibilitypage.ui", "OptCompatibilityPage", &rCoreAttrs) + , m_xLbKeyBindings(m_xBuilder->weld_combo_box("keybindings")) { - get(m_pLbKeyBindings,"keybindings"); } ScTpCompatOptions::~ScTpCompatOptions() { - disposeOnce(); -} - -void ScTpCompatOptions::dispose() -{ - m_pLbKeyBindings.clear(); - SfxTabPage::dispose(); } VclPtr<SfxTabPage> ScTpCompatOptions::Create(TabPageParent pParent, const SfxItemSet *rCoreAttrs) { - return VclPtr<ScTpCompatOptions>::Create(pParent.pParent, *rCoreAttrs); + return VclPtr<ScTpCompatOptions>::Create(pParent, *rCoreAttrs); } bool ScTpCompatOptions::FillItemSet(SfxItemSet *rCoreAttrs) { bool bRet = false; - if (m_pLbKeyBindings->IsValueChangedFromSaved()) + if (m_xLbKeyBindings->get_value_changed_from_saved()) { rCoreAttrs->Put( SfxUInt16Item( - SID_SC_OPT_KEY_BINDING_COMPAT, m_pLbKeyBindings->GetSelectedEntryPos())); + SID_SC_OPT_KEY_BINDING_COMPAT, m_xLbKeyBindings->get_active())); bRet = true; } return bRet; @@ -62,17 +55,17 @@ void ScTpCompatOptions::Reset(const SfxItemSet *rCoreAttrs) switch (eKeyB) { case ScOptionsUtil::KEY_DEFAULT: - m_pLbKeyBindings->SelectEntryPos(0); + m_xLbKeyBindings->set_active(0); break; case ScOptionsUtil::KEY_OOO_LEGACY: - m_pLbKeyBindings->SelectEntryPos(1); + m_xLbKeyBindings->set_active(1); break; default: ; } } - m_pLbKeyBindings->SaveValue(); + m_xLbKeyBindings->save_value(); } DeactivateRC ScTpCompatOptions::DeactivatePage(SfxItemSet* /*pSet*/) diff --git a/sc/uiconfig/scalc/ui/optcompatibilitypage.ui b/sc/uiconfig/scalc/ui/optcompatibilitypage.ui index cbc3c85baa05..20fadcd95777 100644 --- a/sc/uiconfig/scalc/ui/optcompatibilitypage.ui +++ b/sc/uiconfig/scalc/ui/optcompatibilitypage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.16.0 on Wed Jan 8 18:42:59 2014 --> +<!-- Generated with glade 3.22.1 --> <interface domain="sc"> <requires lib="gtk+" version="3.18"/> <object class="GtkBox" id="OptCompatibilityPage"> @@ -38,19 +38,18 @@ <property name="can_focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> <property name="label" translatable="yes" context="optcompatibilitypage|label2">Select desired _key binding type. Changing the key binding type may overwrite some of the existing key bindings.</property> <property name="use_underline">True</property> <property name="wrap">True</property> <property name="mnemonic_widget">keybindings</property> + <property name="width_chars">60</property> <property name="max_width_chars">60</property> + <property name="xalign">0</property> + <property name="yalign">0</property> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -66,8 +65,6 @@ <packing> <property name="left_attach">1</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits