summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/button.hxx9
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx4
-rw-r--r--sc/source/ui/inc/checklistmenu.hxx2
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx3
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx3
-rw-r--r--vcl/source/control/button.cxx6
-rw-r--r--vcl/source/window/builder.cxx7
7 files changed, 9 insertions, 25 deletions
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 35e98c52bba6..97fc939e9c1e 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -489,15 +489,6 @@ public:
ImageButton( vcl::Window* pParent, WinBits nStyle = 0 );
};
-class VCL_DLLPUBLIC TriStateBox final : public CheckBox
-{
- TriStateBox( const TriStateBox & ) = delete;
- TriStateBox & operator= ( const TriStateBox & ) = delete;
-
-public:
- explicit TriStateBox( vcl::Window* pParent, WinBits nStyle );
-};
-
#endif // INCLUDED_VCL_BUTTON_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 69903842c2f0..d892e8015443 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -881,7 +881,7 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* p
ScMenuFloatingWindow(pParent, pDoc),
maEdSearch(VclPtr<ScSearchEdit>::Create(this)),
maChecks(VclPtr<ScCheckListBox>::Create(this)),
- maChkToggleAll(VclPtr<TriStateBox>::Create(this, 0)),
+ maChkToggleAll(VclPtr<CheckBox>::Create(this, 0)),
maBtnSelectSingle(VclPtr<ImageButton>::Create(this, 0)),
maBtnUnselectSingle(VclPtr<ImageButton>::Create(this, 0)),
maBtnOk(VclPtr<OKButton>::Create(this)),
@@ -890,6 +890,8 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* p
mePrevToggleAllState(TRISTATE_INDET),
maTabStops(this)
{
+ maChkToggleAll->EnableTriState(true);
+
float fScaleFactor = GetDPIScaleFactor();
nWidth = std::max<int>(nWidth, 200 * fScaleFactor);
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 2ff574a15252..6fba5f249840 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -421,7 +421,7 @@ private:
VclPtr<ScSearchEdit> maEdSearch;
VclPtr<ScCheckListBox> maChecks;
- VclPtr<TriStateBox> maChkToggleAll;
+ VclPtr<CheckBox> maChkToggleAll;
VclPtr<ImageButton> maBtnSelectSingle;
VclPtr<ImageButton> maBtnUnselectSingle;
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 27261014908a..c90561c6a89a 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -230,7 +230,8 @@ namespace svt
EnableChildTransparentMode();
- pBox = VclPtr<TriStateBox>::Create(this,WB_CENTER|WB_VCENTER);
+ pBox = VclPtr<CheckBox>::Create(this,WB_CENTER|WB_VCENTER);
+ pBox->EnableTriState( true );
pBox->SetLegacyNoTextAlign( true );
pBox->EnableChildTransparentMode();
pBox->SetPaintTransparent( true );
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 69d4c01d1e4d..773b3e930537 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -1668,7 +1668,8 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
*ppNewComp = new VCLXToolBox;
break;
case WindowType::TRISTATEBOX:
- pNewWindow = VclPtr<TriStateBox>::Create( pParent, nWinBits );
+ pNewWindow = VclPtr<CheckBox>::Create( pParent, nWinBits );
+ static_cast<CheckBox*>(pNewWindow.get())->EnableTriState(true);
break;
case WindowType::WARNINGBOX:
pNewWindow = VclPtr<WarningBox>::Create( pParent, nMessBoxStyle, nWinBits, OUString() );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 20528189da18..45c922dcb362 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -3696,10 +3696,4 @@ void ImageButton::ImplInitStyle()
SetStyle( nStyle );
}
-TriStateBox::TriStateBox( vcl::Window* pParent, WinBits nStyle ) :
- CheckBox( pParent, nStyle )
-{
- EnableTriState();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 9aef02f6c887..6189412ac8b9 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1983,13 +1983,8 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
OUString sWrap = BuilderUtils::extractCustomProperty(rMap);
if (!sWrap.isEmpty())
nBits |= WB_WORDBREAK;
- //maybe always import as TriStateBox and enable/disable tristate
bool bIsTriState = extractInconsistent(rMap);
- VclPtr<CheckBox> xCheckBox;
- if (bIsTriState && m_bLegacy)
- xCheckBox = VclPtr<TriStateBox>::Create(pParent, nBits);
- else
- xCheckBox = VclPtr<CheckBox>::Create(pParent, nBits);
+ VclPtr<CheckBox> xCheckBox = VclPtr<CheckBox>::Create(pParent, nBits);
if (bIsTriState)
{
xCheckBox->EnableTriState(true);