sd/inc/PresenterHelper.hxx | 12 +----------- sd/source/console/PresenterButton.cxx | 5 +---- sd/source/console/PresenterNotesView.cxx | 5 +---- sd/source/console/PresenterPaneBase.cxx | 10 ++-------- sd/source/console/PresenterScrollBar.cxx | 5 +---- sd/source/ui/presenter/PresenterHelper.cxx | 24 +++--------------------- 6 files changed, 9 insertions(+), 52 deletions(-)
New commits: commit a155c12fca28bbd9a790b5a9c438717c3a138c7d Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Feb 27 11:22:26 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Feb 27 23:00:46 2025 +0100 sd presenter: Drop always false params All callers of PresenterHelper::createWindow pass false for both, the `bEnableChildTransparentMode` and the `bEnableParentClip` params. Drop them altogether, which allows to simplify PresenterHelper::createWindow a bit. Change-Id: Id4dc1ddb81833cdd303ec8314a80eeeee1cd89ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182300 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sd/inc/PresenterHelper.hxx b/sd/inc/PresenterHelper.hxx index 2e7566e31e65..35f1debd7a4c 100644 --- a/sd/inc/PresenterHelper.hxx +++ b/sd/inc/PresenterHelper.hxx @@ -44,20 +44,10 @@ public: @param bInitiallyVisible When `true` the new window will be visible from the start, i.e. a window listener will not receive a windowShown signal. - @param bEnableChildTransparentMode - When `true` the parent window is painted behind its child - windows. This is one half of allowing child windows to be - transparent. - @param bEnableParentClip - When `true` then the parent window is not clipped where its - child windows are painted. This is the other half of allowing - child windows to be transparent. */ static css::uno::Reference<css::awt::XWindow> createWindow ( const css::uno::Reference<css::awt::XWindow>& rxParentWindow, - bool bInitiallyVisible, - bool bEnableChildTransparentMode, - bool bEnableParentClip); + bool bInitiallyVisible); /** Create a new canvas for the given window. The new canvas is a wrapper around the given shared canvas. The wrapper only modifies diff --git a/sd/source/console/PresenterButton.cxx b/sd/source/console/PresenterButton.cxx index d43843349e19..e493252ce123 100644 --- a/sd/source/console/PresenterButton.cxx +++ b/sd/source/console/PresenterButton.cxx @@ -99,10 +99,7 @@ PresenterButton::PresenterButton( { try { - mxWindow = sd::presenter::PresenterHelper::createWindow(rxParentWindow, - false, - false, - false); + mxWindow = sd::presenter::PresenterHelper::createWindow(rxParentWindow, false); // Make the background transparent. Reference<awt::XWindowPeer> xPeer (mxWindow, UNO_QUERY_THROW); diff --git a/sd/source/console/PresenterNotesView.cxx b/sd/source/console/PresenterNotesView.cxx index 90509beb72a9..24b5538c9663 100644 --- a/sd/source/console/PresenterNotesView.cxx +++ b/sd/source/console/PresenterNotesView.cxx @@ -174,10 +174,7 @@ void PresenterNotesView::CreateToolBar ( // Create a new window as container of the tool bar. mxToolBarWindow = sd::presenter::PresenterHelper::createWindow( - mxParentWindow, - true, - false, - false); + mxParentWindow, true); mxToolBarCanvas = sd::presenter::PresenterHelper::createSharedCanvas ( Reference<rendering::XSpriteCanvas>(mxCanvas, UNO_QUERY), mxParentWindow, diff --git a/sd/source/console/PresenterPaneBase.cxx b/sd/source/console/PresenterPaneBase.cxx index c832a4497c14..c9920303c9f5 100644 --- a/sd/source/console/PresenterPaneBase.cxx +++ b/sd/source/console/PresenterPaneBase.cxx @@ -252,15 +252,9 @@ void PresenterPaneBase::CreateWindows ( return; mxBorderWindow = sd::presenter::PresenterHelper::createWindow( - mxParentWindow, - bIsWindowVisibleOnCreation, - false, - false); + mxParentWindow, bIsWindowVisibleOnCreation); mxContentWindow = sd::presenter::PresenterHelper::createWindow( - mxBorderWindow, - bIsWindowVisibleOnCreation, - false, - false); + mxBorderWindow, bIsWindowVisibleOnCreation); } const Reference<awt::XWindow>& PresenterPaneBase::GetBorderWindow() const diff --git a/sd/source/console/PresenterScrollBar.cxx b/sd/source/console/PresenterScrollBar.cxx index 9a505b581c69..3a5cddb09af9 100644 --- a/sd/source/console/PresenterScrollBar.cxx +++ b/sd/source/console/PresenterScrollBar.cxx @@ -89,10 +89,7 @@ PresenterScrollBar::PresenterScrollBar ( { try { - mxWindow = sd::presenter::PresenterHelper::createWindow(rxParentWindow, - false, - false, - false); + mxWindow = sd::presenter::PresenterHelper::createWindow(rxParentWindow, false); // Make the background transparent. The slide show paints its own background. Reference<awt::XWindowPeer> xPeer (mxWindow, UNO_QUERY_THROW); diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index fa3bb2e9531b..441c637a0b8c 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -41,9 +41,7 @@ namespace sd::presenter { Reference<awt::XWindow> PresenterHelper::createWindow ( const Reference<awt::XWindow>& rxParentWindow, - bool bInitiallyVisible, - bool bEnableChildTransparentMode, - bool bEnableParentClip) + bool bInitiallyVisible) { VclPtr<vcl::Window> pParentWindow(VCLUnoHelper::GetWindow(rxParentWindow)); @@ -51,28 +49,12 @@ Reference<awt::XWindow> PresenterHelper::createWindow ( VclPtr<vcl::Window> pWindow = VclPtr<vcl::Window>::Create(pParentWindow); Reference<awt::XWindow> xWindow (pWindow->GetComponentInterface(), UNO_QUERY); - if (bEnableChildTransparentMode) - { - // Make the frame window transparent and make the parent able to - // draw behind it. - if (pParentWindow) - pParentWindow->EnableChildTransparentMode(); - } - pWindow->Show(bInitiallyVisible); pWindow->SetMapMode(MapMode(MapUnit::MapPixel)); pWindow->SetBackground(); - if ( ! bEnableParentClip) - { - pWindow->SetParentClipMode(ParentClipMode::NoClip); - pWindow->SetPaintTransparent(true); - } - else - { - pWindow->SetParentClipMode(ParentClipMode::Clip); - pWindow->SetPaintTransparent(false); - } + pWindow->SetParentClipMode(ParentClipMode::NoClip); + pWindow->SetPaintTransparent(true); return xWindow; }