cui/source/dialogs/colorpicker.cxx | 6 +----- sd/source/ui/animations/CustomAnimationPane.cxx | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-)
New commits: commit a629b5db885087d77f9d4dfa243ea3b5ff7ee75f Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon May 12 21:44:50 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue May 13 08:18:40 2025 +0200 cui: Use existing CustomWidgetController::IsMouseCaptured ... in ColorFieldControl, instead of manually keeping track of whether the mouse was captured/released. Change-Id: I452762e34ec0be6ec62ffb5926f35962377c38c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185236 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 6ca351c883d4..296ca82b9e7a 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -203,7 +203,6 @@ public: , mnBaseValue(USHRT_MAX) , mdX( -1.0 ) , mdY( -1.0 ) - , mbMouseCaptured(false) { } @@ -241,7 +240,6 @@ private: sal_uInt16 mnBaseValue; double mdX; double mdY; - bool mbMouseCaptured; Point maPosition; VclPtr<VirtualDevice> mxBitmap; Link<ColorFieldControl&,void> maModifyHdl; @@ -443,7 +441,6 @@ void ColorFieldControl::ShowPosition( const Point& rPos, bool bUpdate ) bool ColorFieldControl::MouseButtonDown(const MouseEvent& rMEvt) { CaptureMouse(); - mbMouseCaptured = true; ShowPosition(rMEvt.GetPosPixel(), true); Modify(); return true; @@ -451,7 +448,7 @@ bool ColorFieldControl::MouseButtonDown(const MouseEvent& rMEvt) bool ColorFieldControl::MouseMove(const MouseEvent& rMEvt) { - if (mbMouseCaptured) + if (IsMouseCaptured()) { ShowPosition(rMEvt.GetPosPixel(), true); Modify(); @@ -462,7 +459,6 @@ bool ColorFieldControl::MouseMove(const MouseEvent& rMEvt) bool ColorFieldControl::MouseButtonUp(const MouseEvent&) { ReleaseMouse(); - mbMouseCaptured = false; return true; } commit a32d5ac87ffecf3ee8fbe0e64cffbf39ec8d8cd8 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon May 12 21:44:13 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue May 13 08:18:31 2025 +0200 sd: Drop redundant static_cast Change-Id: I0312daf25a76f45545b6ae5c929168b05aad8f75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185235 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index aa4161697f8e..f38390e4aee4 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -164,7 +164,7 @@ css::ui::LayoutSize CustomAnimationPane::GetHeightForWidth(const sal_Int32 /*nWi void CustomAnimationPane::initialize() { mxLBAnimation->connect_selection_changed(LINK(this, CustomAnimationPane, AnimationSelectHdl)); - mxCustomAnimationList->setController( static_cast<ICustomAnimationListController*> ( this ) ); + mxCustomAnimationList->setController(this); mxCustomAnimationList->set_size_request(mxCustomAnimationList->get_approximate_digit_width() * 15, mxCustomAnimationList->get_height_rows(4));