summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-07-03 08:58:12 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-07-04 06:31:18 +0200
commit1bffb064a0fbffebd2e33e3b6fdfdbc17b310489 (patch)
treedf165851565089da0bc6ac85abc9f8b7a1c6efb4 /vcl/source
parentd4d81421918209456c4669ef48c3f4f2afd8d97f (diff)
tdf#161853 Drop SvxIconChoiceCtrl_Impl::MouseButtonUp
Since commit af9413cb4ad49c0b4854c08cc2804644220755ae Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Jul 2 11:53:27 2024 +0200 tdf#161853 icon choice ctrl: Drop support for non-single selection modes , the `IconChoiceFlags::DownDeselect` and `IconChoiceFlags::DownCtrl` flags are never set, so `SvxIconChoiceCtrl_Impl::MouseButtonUp` wouldn't effectively do anything. Drop it and the now unused flags. Also drop the `SvtIconChoiceCtrl` override for `Control::MouseButtonUp`. Change-Id: I06808726389f31a426cba36e627b4305fb362bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169903 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/imivctl.hxx9
-rw-r--r--vcl/source/control/imivctl1.cxx35
-rw-r--r--vcl/source/control/ivctrl.cxx6
3 files changed, 3 insertions, 47 deletions
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index 90f9c4bb1986..99a8dee83a25 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -53,11 +53,9 @@ enum class IconChoiceFlags {
NONE = 0x0000,
AddMode = 0x0001,
SelectingRect = 0x0002,
- DownCtrl = 0x0004,
- DownDeselect = 0x0008,
- EntryListPosValid = 0x0010,
- ClearingSelection = 0x0020,
- Arranging = 0x0040
+ EntryListPosValid = 0x0004,
+ ClearingSelection = 0x0008,
+ Arranging = 0x0010,
};
namespace o3tl {
template<> struct typed_flags<IconChoiceFlags> : is_typed_flags<IconChoiceFlags, 0x007f> {};
@@ -236,7 +234,6 @@ public:
);
void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
bool MouseButtonDown( const MouseEvent& );
- bool MouseButtonUp( const MouseEvent& );
bool MouseMove( const MouseEvent&);
bool RequestHelp( const HelpEvent& rHEvt );
void SetCursor_Impl(SvxIconChoiceCtrlEntry* pNewCursor);
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 9fcd4b83ab7c..e8864d4b4a97 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -615,41 +615,6 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
return bHandled;
}
-bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
-{
- bool bHandled = false;
- if( rMEvt.IsRight() && (nFlags & (IconChoiceFlags::DownCtrl | IconChoiceFlags::DownDeselect) ))
- {
- nFlags &= ~IconChoiceFlags(IconChoiceFlags::DownCtrl | IconChoiceFlags::DownDeselect);
- bHandled = true;
- }
-
- Point aDocPos( rMEvt.GetPosPixel() );
- ToDocPos( aDocPos );
- SvxIconChoiceCtrlEntry* pDocEntry = GetEntry( aDocPos );
- if( pDocEntry )
- {
- if( nFlags & IconChoiceFlags::DownCtrl )
- {
- // Ctrl & MultiSelection
- ToggleSelection( pDocEntry );
- SetCursor( pDocEntry );
- bHandled = true;
- }
- else if( nFlags & IconChoiceFlags::DownDeselect )
- {
- DeselectAllBut( pDocEntry );
- SetCursor( pDocEntry );
- SelectEntry( pDocEntry, true, false );
- bHandled = true;
- }
- }
-
- nFlags &= ~IconChoiceFlags(IconChoiceFlags::DownCtrl | IconChoiceFlags::DownDeselect);
-
- return bHandled;
-}
-
bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt )
{
const Point aDocPos( pView->PixelToLogic(rMEvt.GetPosPixel()) );
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index 4fa8b92997a9..9d4da5e434ce 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -131,12 +131,6 @@ void SvtIconChoiceCtrl::MouseButtonDown( const MouseEvent& rMEvt )
Control::MouseButtonDown( rMEvt );
}
-void SvtIconChoiceCtrl::MouseButtonUp( const MouseEvent& rMEvt )
-{
- if( !_pImpl->MouseButtonUp( rMEvt ) )
- Control::MouseButtonUp( rMEvt );
-}
-
void SvtIconChoiceCtrl::MouseMove( const MouseEvent& rMEvt )
{
if( !_pImpl->MouseMove( rMEvt ) )