sc/source/ui/inc/opredlin.hxx | 10 +++---- sc/source/ui/optdlg/opredlin.cxx | 47 ++++++++++++++++----------------- sc/uiconfig/scalc/ui/optchangespage.ui | 24 ++++++++++++++-- 3 files changed, 48 insertions(+), 33 deletions(-)
New commits: commit 84b2779288d0abce4364bbf23a282e86f53f86a0 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jul 29 13:08:33 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Jul 29 20:29:22 2019 +0200 weld ScRedlineOptionsTabPage Change-Id: I80151384f5e75eac08665f45ce87468e10fb987e Reviewed-on: https://gerrit.libreoffice.org/76553 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/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx index 1d834af2c784..37181873b4d6 100644 --- a/sc/source/ui/inc/opredlin.hxx +++ b/sc/source/ui/inc/opredlin.hxx @@ -25,14 +25,14 @@ class SvxColorListBox; class ScRedlineOptionsTabPage : public SfxTabPage { - VclPtr<SvxColorListBox> m_pContentColorLB; - VclPtr<SvxColorListBox> m_pRemoveColorLB; - VclPtr<SvxColorListBox> m_pInsertColorLB; - VclPtr<SvxColorListBox> m_pMoveColorLB; + std::unique_ptr<ColorListBox> m_xContentColorLB; + std::unique_ptr<ColorListBox> m_xRemoveColorLB; + std::unique_ptr<ColorListBox> m_xInsertColorLB; + std::unique_ptr<ColorListBox> m_xMoveColorLB; public: - ScRedlineOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); + ScRedlineOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet ); virtual ~ScRedlineOptionsTabPage() override; virtual void dispose() override; static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet ); diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx index 49e952dc18e9..b442462b0b10 100644 --- a/sc/source/ui/optdlg/opredlin.cxx +++ b/sc/source/ui/optdlg/opredlin.cxx @@ -28,18 +28,17 @@ #include <opredlin.hxx> -ScRedlineOptionsTabPage::ScRedlineOptionsTabPage( vcl::Window* pParent, - const SfxItemSet& rSet ) - : SfxTabPage(pParent,"OptChangesPage", "modules/scalc/ui/optchangespage.ui", &rSet) +ScRedlineOptionsTabPage::ScRedlineOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet) + : SfxTabPage(pParent, "modules/scalc/ui/optchangespage.ui", "OptChangesPage", &rSet) + , m_xContentColorLB(new ColorListBox(m_xBuilder->weld_menu_button("changes"), pParent.GetFrameWeld())) + , m_xRemoveColorLB(new ColorListBox(m_xBuilder->weld_menu_button("deletions"), pParent.GetFrameWeld())) + , m_xInsertColorLB(new ColorListBox(m_xBuilder->weld_menu_button("entries"), pParent.GetFrameWeld())) + , m_xMoveColorLB(new ColorListBox(m_xBuilder->weld_menu_button("insertions"), pParent.GetFrameWeld())) { - get(m_pContentColorLB, "changes"); - m_pContentColorLB->SetSlotId(SID_AUTHOR_COLOR); - get(m_pRemoveColorLB, "deletions"); - m_pRemoveColorLB->SetSlotId(SID_AUTHOR_COLOR); - get(m_pInsertColorLB, "entries"); - m_pInsertColorLB->SetSlotId(SID_AUTHOR_COLOR); - get(m_pMoveColorLB, "insertions"); - m_pMoveColorLB->SetSlotId(SID_AUTHOR_COLOR); + m_xContentColorLB->SetSlotId(SID_AUTHOR_COLOR); + m_xRemoveColorLB->SetSlotId(SID_AUTHOR_COLOR); + m_xInsertColorLB->SetSlotId(SID_AUTHOR_COLOR); + m_xMoveColorLB->SetSlotId(SID_AUTHOR_COLOR); } ScRedlineOptionsTabPage::~ScRedlineOptionsTabPage() @@ -49,32 +48,32 @@ ScRedlineOptionsTabPage::~ScRedlineOptionsTabPage() void ScRedlineOptionsTabPage::dispose() { - m_pContentColorLB.clear(); - m_pRemoveColorLB.clear(); - m_pInsertColorLB.clear(); - m_pMoveColorLB.clear(); + m_xContentColorLB.reset(); + m_xRemoveColorLB.reset(); + m_xInsertColorLB.reset(); + m_xMoveColorLB.reset(); SfxTabPage::dispose(); } VclPtr<SfxTabPage> ScRedlineOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rSet ) { - return VclPtr<ScRedlineOptionsTabPage>::Create( pParent.pParent, *rSet ); + return VclPtr<ScRedlineOptionsTabPage>::Create( pParent, *rSet ); } bool ScRedlineOptionsTabPage::FillItemSet( SfxItemSet* /* rSet */ ) { ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); - Color nNew = m_pContentColorLB->GetSelectEntryColor(); + Color nNew = m_xContentColorLB->GetSelectEntryColor(); aAppOptions.SetTrackContentColor(nNew); - nNew = m_pMoveColorLB->GetSelectEntryColor(); + nNew = m_xMoveColorLB->GetSelectEntryColor(); aAppOptions.SetTrackMoveColor(nNew); - nNew = m_pInsertColorLB->GetSelectEntryColor(); + nNew = m_xInsertColorLB->GetSelectEntryColor(); aAppOptions.SetTrackInsertColor(nNew); - nNew = m_pRemoveColorLB->GetSelectEntryColor(); + nNew = m_xRemoveColorLB->GetSelectEntryColor(); aAppOptions.SetTrackDeleteColor(nNew); SC_MOD()->SetAppOptions(aAppOptions); @@ -93,16 +92,16 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet* /* rSet */ ) ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); Color nColor = aAppOptions.GetTrackContentColor(); - m_pContentColorLB->SelectEntry(nColor); + m_xContentColorLB->SelectEntry(nColor); nColor = aAppOptions.GetTrackMoveColor(); - m_pMoveColorLB->SelectEntry(nColor); + m_xMoveColorLB->SelectEntry(nColor); nColor = aAppOptions.GetTrackInsertColor(); - m_pInsertColorLB->SelectEntry(nColor); + m_xInsertColorLB->SelectEntry(nColor); nColor = aAppOptions.GetTrackDeleteColor(); - m_pRemoveColorLB->SelectEntry(nColor); + m_xRemoveColorLB->SelectEntry(nColor); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/uiconfig/scalc/ui/optchangespage.ui b/sc/uiconfig/scalc/ui/optchangespage.ui index 416e0bd15797..58f237bc2d16 100644 --- a/sc/uiconfig/scalc/ui/optchangespage.ui +++ b/sc/uiconfig/scalc/ui/optchangespage.ui @@ -87,9 +87,13 @@ </packing> </child> <child> - <object class="svxcorelo-SvxColorListBox" id="changes"> + <object class="GtkMenuButton" id="changes"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="label" translatable="no"></property> </object> <packing> <property name="left_attach">1</property> @@ -97,9 +101,13 @@ </packing> </child> <child> - <object class="svxcorelo-SvxColorListBox" id="deletions"> + <object class="GtkMenuButton" id="deletions"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="label" translatable="no"></property> </object> <packing> <property name="left_attach">1</property> @@ -107,9 +115,13 @@ </packing> </child> <child> - <object class="svxcorelo-SvxColorListBox" id="entries"> + <object class="GtkMenuButton" id="entries"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="label" translatable="no"></property> </object> <packing> <property name="left_attach">1</property> @@ -117,9 +129,13 @@ </packing> </child> <child> - <object class="svxcorelo-SvxColorListBox" id="insertions"> + <object class="GtkMenuButton" id="insertions"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="label" translatable="no"></property> </object> <packing> <property name="left_attach">1</property> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits