sd/inc/PresenterHelper.hxx | 17 ------------- sd/source/console/PresenterButton.cxx | 1 sd/source/console/PresenterNotesView.cxx | 1 sd/source/console/PresenterPaneBase.cxx | 2 - sd/source/console/PresenterPaneBorderPainter.cxx | 14 +++-------- sd/source/console/PresenterScrollBar.cxx | 1 sd/source/ui/presenter/PresenterHelper.cxx | 28 ----------------------- 7 files changed, 6 insertions(+), 58 deletions(-)
New commits: commit 7fd252bd27147d0bf76e01f7a19c97a96044b3de Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Feb 27 11:17:06 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Feb 27 23:00:39 2025 +0100 sd presenter: Drop always false bCreateSystemChildWindow param PresenterHelper::createWindow always gets called with a `bCreateSystemChildWindow` param of false. Drop the param altogether. Change-Id: Ia82dfa6d4826bf2cbe85a164c7645d3e9a7d1fc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182299 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/sd/inc/PresenterHelper.hxx b/sd/inc/PresenterHelper.hxx index c1a1480621f9..2e7566e31e65 100644 --- a/sd/inc/PresenterHelper.hxx +++ b/sd/inc/PresenterHelper.hxx @@ -41,10 +41,6 @@ public: /** Create a new window as child window of the given parent window. @param rxParentWindow The parent window of the new window. - @param bCreateSystemChildWindow - When `true` then the new window will be a system window that, - in the context of the presenter screen, can not be painted over - by other windows that lie behind it. @param bInitiallyVisible When `true` the new window will be visible from the start, i.e. a window listener will not receive a windowShown signal. @@ -59,7 +55,6 @@ public: */ static css::uno::Reference<css::awt::XWindow> createWindow ( const css::uno::Reference<css::awt::XWindow>& rxParentWindow, - bool bCreateSystemChildWindow, bool bInitiallyVisible, bool bEnableChildTransparentMode, bool bEnableParentClip); diff --git a/sd/source/console/PresenterButton.cxx b/sd/source/console/PresenterButton.cxx index 669b995e22a2..d43843349e19 100644 --- a/sd/source/console/PresenterButton.cxx +++ b/sd/source/console/PresenterButton.cxx @@ -100,7 +100,6 @@ PresenterButton::PresenterButton( try { mxWindow = sd::presenter::PresenterHelper::createWindow(rxParentWindow, - false, false, false, false); diff --git a/sd/source/console/PresenterNotesView.cxx b/sd/source/console/PresenterNotesView.cxx index 600890fd1c77..90509beb72a9 100644 --- a/sd/source/console/PresenterNotesView.cxx +++ b/sd/source/console/PresenterNotesView.cxx @@ -175,7 +175,6 @@ void PresenterNotesView::CreateToolBar ( // Create a new window as container of the tool bar. mxToolBarWindow = sd::presenter::PresenterHelper::createWindow( mxParentWindow, - false, true, false, false); diff --git a/sd/source/console/PresenterPaneBase.cxx b/sd/source/console/PresenterPaneBase.cxx index 73eab7572b42..c832a4497c14 100644 --- a/sd/source/console/PresenterPaneBase.cxx +++ b/sd/source/console/PresenterPaneBase.cxx @@ -253,13 +253,11 @@ void PresenterPaneBase::CreateWindows ( mxBorderWindow = sd::presenter::PresenterHelper::createWindow( mxParentWindow, - false, bIsWindowVisibleOnCreation, false, false); mxContentWindow = sd::presenter::PresenterHelper::createWindow( mxBorderWindow, - false, bIsWindowVisibleOnCreation, false, false); diff --git a/sd/source/console/PresenterScrollBar.cxx b/sd/source/console/PresenterScrollBar.cxx index 10d11db0139c..9a505b581c69 100644 --- a/sd/source/console/PresenterScrollBar.cxx +++ b/sd/source/console/PresenterScrollBar.cxx @@ -90,7 +90,6 @@ PresenterScrollBar::PresenterScrollBar ( try { mxWindow = sd::presenter::PresenterHelper::createWindow(rxParentWindow, - false, false, false, false); diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index 76a1d2c4923e..fa3bb2e9531b 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -41,7 +41,6 @@ namespace sd::presenter { Reference<awt::XWindow> PresenterHelper::createWindow ( const Reference<awt::XWindow>& rxParentWindow, - bool bCreateSystemChildWindow, bool bInitiallyVisible, bool bEnableChildTransparentMode, bool bEnableParentClip) @@ -49,15 +48,7 @@ Reference<awt::XWindow> PresenterHelper::createWindow ( VclPtr<vcl::Window> pParentWindow(VCLUnoHelper::GetWindow(rxParentWindow)); // Create a new window. - VclPtr<vcl::Window> pWindow; - if (bCreateSystemChildWindow) - { - pWindow = VclPtr<WorkWindow>::Create(pParentWindow, WB_SYSTEMCHILDWINDOW); - } - else - { - pWindow = VclPtr<vcl::Window>::Create(pParentWindow); - } + VclPtr<vcl::Window> pWindow = VclPtr<vcl::Window>::Create(pParentWindow); Reference<awt::XWindow> xWindow (pWindow->GetComponentInterface(), UNO_QUERY); if (bEnableChildTransparentMode) commit 5d6574613a11dff1c3060d9b7879b4c2cef7904d Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Feb 27 11:07:15 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Feb 27 23:00:31 2025 +0100 sd presenter: Don't allow creating PresenterHelper objs By now, the class is only useful for the static helper methods it provides. The last use of an actual PresenterHelper object was dropped in Change-Id: I7b85ae4f720474faf72d2721545158726b1d745d Author: Michael Weghorn <m.wegh...@posteo.de> Date: Thu Feb 27 11:04:45 2025 +0100 sd presenter: Drop PresenterPaneBorderPainter::Renderer::mxPresenterHelper Make that clear by marking the default ctor as deleted and dropping what has become irrelevant. Change-Id: I411b02b94c8f81bc8cfb19e248e861adfe1a670e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182298 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/sd/inc/PresenterHelper.hxx b/sd/inc/PresenterHelper.hxx index d74057f9b135..c1a1480621f9 100644 --- a/sd/inc/PresenterHelper.hxx +++ b/sd/inc/PresenterHelper.hxx @@ -23,7 +23,6 @@ #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/awt/XWindow.hpp> -#include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/rendering/XCanvas.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp> #include <comphelper/compbase.hxx> @@ -33,18 +32,12 @@ namespace com::sun::star::uno { class XComponentContext; } namespace sd::presenter { class SD_DLLPUBLIC PresenterHelper final - : public comphelper::WeakComponentImplHelper<css::lang::XInitialization> { public: - explicit PresenterHelper (const css::uno::Reference<css::uno::XComponentContext>& rxContext); - virtual ~PresenterHelper() override; + PresenterHelper() = delete; PresenterHelper(const PresenterHelper&) = delete; PresenterHelper& operator=(const PresenterHelper&) = delete; - // XInitialize - - virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments) override; - /** Create a new window as child window of the given parent window. @param rxParentWindow The parent window of the new window. @@ -134,9 +127,6 @@ public: static css::awt::Rectangle getWindowExtentsRelative( const css::uno::Reference<css::awt::XWindow>& rxChildWindow, const css::uno::Reference<css::awt::XWindow>& rxParentWindow); - -private: - css::uno::Reference<css::uno::XComponentContext> mxComponentContext; }; } // end of namespace ::sd::presenter diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index 7de04097bb38..76a1d2c4923e 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -39,23 +39,6 @@ using namespace ::com::sun::star::uno; namespace sd::presenter { -//===== PresenterHelper ======================================================= - -PresenterHelper::PresenterHelper ( - const Reference<XComponentContext>& rxContext) - : mxComponentContext(rxContext) -{ -} - -PresenterHelper::~PresenterHelper() -{ -} - -//----- XInitialize ----------------------------------------------------------- - -void SAL_CALL PresenterHelper::initialize (const Sequence<Any>&) {} - - Reference<awt::XWindow> PresenterHelper::createWindow ( const Reference<awt::XWindow>& rxParentWindow, bool bCreateSystemChildWindow, commit 75696de0e7575afbbfd2113ebeb388f6be78daa1 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Feb 27 11:04:45 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Feb 27 23:00:23 2025 +0100 sd presenter: Drop PresenterPaneBorderPainter::Renderer::mxPresenterHelper It's only set in the ctor, but never used afterwards. Change-Id: I7b85ae4f720474faf72d2721545158726b1d745d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182297 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sd/source/console/PresenterPaneBorderPainter.cxx b/sd/source/console/PresenterPaneBorderPainter.cxx index 89c6f0f0ae76..4fa270b2b43e 100644 --- a/sd/source/console/PresenterPaneBorderPainter.cxx +++ b/sd/source/console/PresenterPaneBorderPainter.cxx @@ -95,9 +95,7 @@ namespace { class PresenterPaneBorderPainter::Renderer { public: - Renderer ( - const Reference<XComponentContext>& rxContext, - std::shared_ptr<PresenterTheme> xTheme); + Renderer(std::shared_ptr<PresenterTheme> xTheme); void SetCanvas (const Reference<rendering::XCanvas>& rxCanvas); void PaintBorder ( @@ -124,7 +122,6 @@ private: typedef ::std::map<OUString, std::shared_ptr<RendererPaneStyle> > RendererPaneStyleContainer; RendererPaneStyleContainer maRendererPaneStyles; Reference<rendering::XCanvas> mxCanvas; - rtl::Reference<sd::presenter::PresenterHelper> mxPresenterHelper; css::rendering::ViewState maViewState; Reference<rendering::XPolyPolygon2D> mxViewStateClip; bool mbHasCallout; @@ -297,7 +294,7 @@ bool PresenterPaneBorderPainter::ProvideTheme (const Reference<rendering::XCanva if (bModified) { if (mpRenderer == nullptr) - mpRenderer.reset(new Renderer(mxContext, mpTheme)); + mpRenderer.reset(new Renderer(mpTheme)); else mpRenderer->SetCanvas(rxCanvas); } @@ -320,7 +317,7 @@ void PresenterPaneBorderPainter::SetTheme (const std::shared_ptr<PresenterTheme> { mpTheme = rpTheme; if (mpRenderer == nullptr) - mpRenderer.reset(new Renderer(mxContext, mpTheme)); + mpRenderer.reset(new Renderer(mpTheme)); } awt::Rectangle PresenterPaneBorderPainter::AddBorder ( @@ -363,14 +360,11 @@ void PresenterPaneBorderPainter::ThrowIfDisposed() const //===== PresenterPaneBorderPainter::Renderer ===================================== -PresenterPaneBorderPainter::Renderer::Renderer ( - const Reference<XComponentContext>& rxContext, - std::shared_ptr<PresenterTheme> xTheme) +PresenterPaneBorderPainter::Renderer::Renderer(std::shared_ptr<PresenterTheme> xTheme) : mpTheme(std::move(xTheme)), maViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), nullptr), mbHasCallout(false) { - mxPresenterHelper = new sd::presenter::PresenterHelper(rxContext); } void PresenterPaneBorderPainter::Renderer::SetCanvas (const Reference<rendering::XCanvas>& rxCanvas)