summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-08 12:26:39 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-05-09 11:10:15 +0200
commit70bb74f2ef9bc81aa1141b6ab35ffb2a411bb656 (patch)
treee8144d403159feeb9c803d32d61e900774a35131 /cui
parent1b2aaed5e60e4e41f1d3475d6229d893d49bbeb7 (diff)
merge duplicated TriStateEnabled class
Change-Id: I1c10010eb7fd33a03f477af0cba03ae74859b174 Reviewed-on: https://gerrit.libreoffice.org/71999 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/paragrph.hxx28
-rw-r--r--cui/source/tabpages/paragrph.cxx20
2 files changed, 8 insertions, 40 deletions
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 183dbba699dc..b741934754ef 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -184,18 +184,6 @@ public:
virtual void PageCreated(const SfxAllItemSet& aSet) override;
};
-struct TriStateEnabled
-{
- TriState eState;
- bool bTriStateEnabled;
- TriStateEnabled()
- : eState(TRISTATE_INDET)
- , bTriStateEnabled(true)
- {
- }
- void ButtonToggled(weld::ToggleButton& rToggle);
-};
-
// class SvxExtParagraphTabPage ------------------------------------------
/*
[Description]
@@ -235,14 +223,14 @@ protected:
private:
SvxExtParagraphTabPage(TabPageParent pParent, const SfxItemSet& rSet);
- TriStateEnabled aHyphenState;
- TriStateEnabled aPageBreakState;
- TriStateEnabled aApplyCollState;
- TriStateEnabled aPageNumState;
- TriStateEnabled aKeepTogetherState;
- TriStateEnabled aKeepParaState;
- TriStateEnabled aOrphanState;
- TriStateEnabled aWidowState;
+ weld::TriStateEnabled aHyphenState;
+ weld::TriStateEnabled aPageBreakState;
+ weld::TriStateEnabled aApplyCollState;
+ weld::TriStateEnabled aPageNumState;
+ weld::TriStateEnabled aKeepTogetherState;
+ weld::TriStateEnabled aKeepParaState;
+ weld::TriStateEnabled aOrphanState;
+ weld::TriStateEnabled aWidowState;
bool bPageBreak;
bool bHtmlMode;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index a8d9d8ab6003..35515175c760 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -2063,26 +2063,6 @@ IMPL_LINK(SvxExtParagraphTabPage, WidowHdl_Impl, weld::ToggleButton&, rToggle, v
WidowHdl();
}
-void TriStateEnabled::ButtonToggled(weld::ToggleButton& rToggle)
-{
- if (bTriStateEnabled)
- {
- switch (eState)
- {
- case TRISTATE_INDET:
- rToggle.set_state(TRISTATE_FALSE);
- break;
- case TRISTATE_TRUE:
- rToggle.set_state(TRISTATE_INDET);
- break;
- case TRISTATE_FALSE:
- rToggle.set_state(TRISTATE_TRUE);
- break;
- }
- }
- eState = rToggle.get_state();
-}
-
IMPL_LINK(SvxExtParagraphTabPage, OrphanHdl_Impl, weld::ToggleButton&, rToggle, void)
{
aOrphanState.ButtonToggled(rToggle);