sd/inc/PresenterHelper.hxx | 6 +++--- sd/source/console/PresenterBitmapContainer.cxx | 10 +++++----- sd/source/console/PresenterScrollBar.cxx | 7 ++----- sd/source/console/PresenterScrollBar.hxx | 1 - sd/source/console/PresenterToolBar.cxx | 2 +- 5 files changed, 11 insertions(+), 15 deletions(-)
New commits: commit 1ab613dcca54f6710c335f5e3251de3afd8d2817 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Feb 27 09:47:18 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Feb 27 22:59:16 2025 +0100 sd presenter: Make PresenterHelper::toTop static Now that PresenterHelper no longer needs to implement the XPresenterHelper interface dropped in commit a80dec4e7bfb64d5331fe59d0feaeede636376f4 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Wed Feb 26 17:17:42 2025 +0100 [API CHANGE] Drop css::drawing::XPresenterHelper , make sd::presenter::PresenterHelper::captureMouse and sd::presenter::PresenterHelper::releaseMouse static. This also makes PresenterScrollBar::mxPresenterHelper unnecessary, so drop it. Change-Id: Id45500f07fd5388abdcc0fc51623287cfc247f51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182288 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sd/inc/PresenterHelper.hxx b/sd/inc/PresenterHelper.hxx index a68b6293ce15..0cdbbe7e1940 100644 --- a/sd/inc/PresenterHelper.hxx +++ b/sd/inc/PresenterHelper.hxx @@ -138,13 +138,13 @@ public: The window for which mouse events will be notified even when the mouse pointer moves outside the window or over other windows. */ - virtual void captureMouse (const css::uno::Reference<css::awt::XWindow>& rxWindow); + static void captureMouse(const css::uno::Reference<css::awt::XWindow>& rxWindow); /** Release a previously captured mouse. @param rxWindow The window from which the mouse will be released. */ - virtual void releaseMouse (const css::uno::Reference<css::awt::XWindow>& rxWindow); + static void releaseMouse(const css::uno::Reference<css::awt::XWindow>& rxWindow); /** Return the bounding box of the given child window relative to the direct or indirect parent window. diff --git a/sd/source/console/PresenterScrollBar.cxx b/sd/source/console/PresenterScrollBar.cxx index 50e6cb73a112..10d11db0139c 100644 --- a/sd/source/console/PresenterScrollBar.cxx +++ b/sd/source/console/PresenterScrollBar.cxx @@ -89,7 +89,6 @@ PresenterScrollBar::PresenterScrollBar ( { try { - mxPresenterHelper = new sd::presenter::PresenterHelper(rxComponentContext); mxWindow = sd::presenter::PresenterHelper::createWindow(rxParentWindow, false, false, @@ -334,8 +333,7 @@ void SAL_CALL PresenterScrollBar::mouseReleased (const css::awt::MouseEvent&) { mpMousePressRepeater->Stop(); - if (mxPresenterHelper.is()) - mxPresenterHelper->releaseMouse(mxWindow); + sd::presenter::PresenterHelper::releaseMouse(mxWindow); } void SAL_CALL PresenterScrollBar::mouseEntered (const css::awt::MouseEvent&) {} @@ -378,8 +376,7 @@ void SAL_CALL PresenterScrollBar::mouseDragged (const css::awt::MouseEvent& rEve mpMousePressRepeater->Stop(); - if (mxPresenterHelper.is()) - mxPresenterHelper->captureMouse(mxWindow); + sd::presenter::PresenterHelper::captureMouse(mxWindow); const double nDragDistance (GetDragDistance(rEvent.X,rEvent.Y)); UpdateDragAnchor(nDragDistance); diff --git a/sd/source/console/PresenterScrollBar.hxx b/sd/source/console/PresenterScrollBar.hxx index 665501f755ba..d09924785c58 100644 --- a/sd/source/console/PresenterScrollBar.hxx +++ b/sd/source/console/PresenterScrollBar.hxx @@ -150,7 +150,6 @@ protected: css::uno::Reference<css::uno::XComponentContext> mxComponentContext; css::uno::Reference<css::awt::XWindow> mxWindow; css::uno::Reference<css::rendering::XCanvas> mxCanvas; - rtl::Reference<sd::presenter::PresenterHelper> mxPresenterHelper; std::shared_ptr<PresenterPaintManager> mpPaintManager; double mnThumbPosition; double mnTotalSize; commit 576a3a82c52c9b36daab36ca679d3a8f6ecabaf7 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Feb 27 09:43:46 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Feb 27 22:59:09 2025 +0100 sd presenter: Make PresenterHelper::loadBitmap static Now that PresenterHelper no longer needs to implement the XPresenterHelper interface dropped in commit a80dec4e7bfb64d5331fe59d0feaeede636376f4 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Wed Feb 26 17:17:42 2025 +0100 [API CHANGE] Drop css::drawing::XPresenterHelper , make PresenterHelper::loadBitmap static. Change-Id: I7741b966e09850412f60d2a3f44d36b401553729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182287 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sd/inc/PresenterHelper.hxx b/sd/inc/PresenterHelper.hxx index 358b65aaec36..a68b6293ce15 100644 --- a/sd/inc/PresenterHelper.hxx +++ b/sd/inc/PresenterHelper.hxx @@ -127,7 +127,7 @@ public: The bitmap is created to be compatible, and possibly optimized, for this canvas. */ - virtual css::uno::Reference<css::rendering::XBitmap> loadBitmap ( + static css::uno::Reference<css::rendering::XBitmap> loadBitmap( std::u16string_view sId, const css::uno::Reference<css::rendering::XCanvas>& rxCanvas); diff --git a/sd/source/console/PresenterBitmapContainer.cxx b/sd/source/console/PresenterBitmapContainer.cxx index a9f0169b4f64..f857251cd718 100644 --- a/sd/source/console/PresenterBitmapContainer.cxx +++ b/sd/source/console/PresenterBitmapContainer.cxx @@ -196,7 +196,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta { pBitmap->SetBitmap( BitmapDescriptor::Normal, - rxPresenterHelper->loadBitmap(sFileName, rxCanvas)); + sd::presenter::PresenterHelper::loadBitmap(sFileName, rxCanvas)); } catch (Exception&) {} @@ -205,7 +205,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta { pBitmap->SetBitmap( BitmapDescriptor::MouseOver, - rxPresenterHelper->loadBitmap(sFileName, rxCanvas)); + sd::presenter::PresenterHelper::loadBitmap(sFileName, rxCanvas)); } catch (Exception&) {} @@ -214,7 +214,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta { pBitmap->SetBitmap( BitmapDescriptor::ButtonDown, - rxPresenterHelper->loadBitmap(sFileName, rxCanvas)); + sd::presenter::PresenterHelper::loadBitmap(sFileName, rxCanvas)); } catch (Exception&) {} @@ -223,7 +223,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta { pBitmap->SetBitmap( BitmapDescriptor::Disabled, - rxPresenterHelper->loadBitmap(sFileName, rxCanvas)); + sd::presenter::PresenterHelper::loadBitmap(sFileName, rxCanvas)); } catch (Exception&) {} @@ -232,7 +232,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta { pBitmap->SetBitmap( BitmapDescriptor::Mask, - rxPresenterHelper->loadBitmap(sFileName, rxCanvas)); + sd::presenter::PresenterHelper::loadBitmap(sFileName, rxCanvas)); } catch (Exception&) {} diff --git a/sd/source/console/PresenterToolBar.cxx b/sd/source/console/PresenterToolBar.cxx index aa0906558065..89ddb37be720 100644 --- a/sd/source/console/PresenterToolBar.cxx +++ b/sd/source/console/PresenterToolBar.cxx @@ -1936,7 +1936,7 @@ void VerticalSeparator::Paint ( PresenterCanvasHelper::SetDeviceColor(aRenderState, pFont->mnColor); } - Reference<rendering::XBitmap> xBitmap(mpToolBar->GetPresenterController()->GetPresenterHelper()->loadBitmap(u"bitmaps/Separator.png", rxCanvas)); + Reference<rendering::XBitmap> xBitmap(sd::presenter::PresenterHelper::loadBitmap(u"bitmaps/Separator.png", rxCanvas)); if (!xBitmap.is()) return;