sd/inc/PresenterHelper.hxx                   |   21 ++++++++++-----------
 sd/source/console/PresenterButton.cxx        |    2 +-
 sd/source/console/PresenterNotesView.cxx     |    2 +-
 sd/source/console/PresenterPaneBase.cxx      |    7 +++----
 sd/source/console/PresenterPaneContainer.cxx |    7 ++-----
 sd/source/console/PresenterPaneContainer.hxx |    6 +-----
 sd/source/console/PresenterScreen.cxx        |    6 +++---
 sd/source/console/PresenterScrollBar.cxx     |    2 +-
 sd/source/ui/presenter/PresenterHelper.cxx   |    8 ++++----
 9 files changed, 26 insertions(+), 35 deletions(-)

New commits:
commit cf2dd3be95586ec4b1db83c38b615b89058eb801
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Feb 27 08:56:43 2025 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Feb 27 22:58:41 2025 +0100

    sd presenter: Use bool instead of sal_Bool
    
    sd presenter: Make PresenterHelper::createWindow 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
    
    , there's no more reason to use sal_Bool.
    
    Change-Id: I0333f7c1a05fe0bca4ce3920d8142bb89c03418d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182277
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/sd/inc/PresenterHelper.hxx b/sd/inc/PresenterHelper.hxx
index 200382b7ff19..fb1aebefad48 100644
--- a/sd/inc/PresenterHelper.hxx
+++ b/sd/inc/PresenterHelper.hxx
@@ -49,27 +49,27 @@ public:
         @param xParentWindow
             The parent window of the new window.
         @param bCreateSystemChildWindow
-            When `TRUE` then the new window will be a system window that,
+            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,
+            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
+            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
+            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,
-        sal_Bool bCreateSystemChildWindow,
-        sal_Bool bInitiallyVisible,
-        sal_Bool bEnableChildTransparentMode,
-        sal_Bool bEnableParentClip);
+        bool bCreateSystemChildWindow,
+        bool bInitiallyVisible,
+        bool bEnableChildTransparentMode,
+        bool bEnableParentClip);
 
     /** 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/ui/presenter/PresenterHelper.cxx 
b/sd/source/ui/presenter/PresenterHelper.cxx
index 8254aed7c42e..45a65502c22d 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -58,10 +58,10 @@ void SAL_CALL PresenterHelper::initialize (const 
Sequence<Any>&) {}
 
 Reference<awt::XWindow> PresenterHelper::createWindow (
     const Reference<awt::XWindow>& rxParentWindow,
-    sal_Bool bCreateSystemChildWindow,
-    sal_Bool bInitiallyVisible,
-    sal_Bool bEnableChildTransparentMode,
-    sal_Bool bEnableParentClip)
+    bool bCreateSystemChildWindow,
+    bool bInitiallyVisible,
+    bool bEnableChildTransparentMode,
+    bool bEnableParentClip)
 {
     VclPtr<vcl::Window> pParentWindow(VCLUnoHelper::GetWindow(rxParentWindow));
 
commit 513e3084b43e8364db1b9529f1a3d3fc11b4e77a
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Feb 27 08:53:21 2025 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Feb 27 22:58:35 2025 +0100

    sd presenter: Make PresenterHelper::createWindow 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::createWindow static.
    
    Change-Id: I8d43904294e130b8f50bc4986c740b92a1a3cf4d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182276
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sd/inc/PresenterHelper.hxx b/sd/inc/PresenterHelper.hxx
index dae53667f910..200382b7ff19 100644
--- a/sd/inc/PresenterHelper.hxx
+++ b/sd/inc/PresenterHelper.hxx
@@ -64,7 +64,7 @@ public:
             child windows are painted.  This is the other half of allowing
             child windows to be transparent.
     */
-    virtual css::uno::Reference<css::awt::XWindow> createWindow (
+    static css::uno::Reference<css::awt::XWindow> createWindow (
         const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
         sal_Bool bCreateSystemChildWindow,
         sal_Bool bInitiallyVisible,
diff --git a/sd/source/console/PresenterButton.cxx 
b/sd/source/console/PresenterButton.cxx
index c9a174f8e0a0..f119d114bf7d 100644
--- a/sd/source/console/PresenterButton.cxx
+++ b/sd/source/console/PresenterButton.cxx
@@ -102,7 +102,7 @@ PresenterButton::PresenterButton (
     try
     {
         mxPresenterHelper = new 
sd::presenter::PresenterHelper(rxComponentContext);
-        mxWindow = mxPresenterHelper->createWindow(rxParentWindow,
+        mxWindow = sd::presenter::PresenterHelper::createWindow(rxParentWindow,
             false,
             false,
             false,
diff --git a/sd/source/console/PresenterNotesView.cxx 
b/sd/source/console/PresenterNotesView.cxx
index edfd581c9e9a..891ddfe4be88 100644
--- a/sd/source/console/PresenterNotesView.cxx
+++ b/sd/source/console/PresenterNotesView.cxx
@@ -178,7 +178,7 @@ void PresenterNotesView::CreateToolBar (
         return;
 
     // Create a new window as container of the tool bar.
-    mxToolBarWindow = xPresenterHelper->createWindow(
+    mxToolBarWindow = sd::presenter::PresenterHelper::createWindow(
         mxParentWindow,
         false,
         true,
diff --git a/sd/source/console/PresenterPaneBase.cxx 
b/sd/source/console/PresenterPaneBase.cxx
index 605f02d8ef9d..ce9ef8b3c0c1 100644
--- a/sd/source/console/PresenterPaneBase.cxx
+++ b/sd/source/console/PresenterPaneBase.cxx
@@ -253,13 +253,13 @@ void PresenterPaneBase::CreateWindows (
     if (!(mxPresenterHelper.is() && mxParentWindow.is()))
         return;
 
-    mxBorderWindow = mxPresenterHelper->createWindow(
+    mxBorderWindow = sd::presenter::PresenterHelper::createWindow(
         mxParentWindow,
         false,
         bIsWindowVisibleOnCreation,
         false,
         false);
-    mxContentWindow = mxPresenterHelper->createWindow(
+    mxContentWindow = sd::presenter::PresenterHelper::createWindow(
         mxBorderWindow,
         false,
         bIsWindowVisibleOnCreation,
diff --git a/sd/source/console/PresenterScrollBar.cxx 
b/sd/source/console/PresenterScrollBar.cxx
index 154fa02f9e19..50e6cb73a112 100644
--- a/sd/source/console/PresenterScrollBar.cxx
+++ b/sd/source/console/PresenterScrollBar.cxx
@@ -90,7 +90,7 @@ PresenterScrollBar::PresenterScrollBar (
     try
     {
         mxPresenterHelper = new 
sd::presenter::PresenterHelper(rxComponentContext);
-        mxWindow = mxPresenterHelper->createWindow(rxParentWindow,
+        mxWindow = sd::presenter::PresenterHelper::createWindow(rxParentWindow,
             false,
             false,
             false,
commit 13ffb1d41f24f142074ebef5e6f0c5c45d4e6a0f
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Feb 27 08:45:51 2025 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Feb 27 22:58:28 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 PresenterHelper::toTop static and adjust callers.
    This also makes PresenterParseContainer::mxPresenterHelper
    unnecessary, so drop it and the PresenterParseContainer ctor
    param only needed to initialize it.
    
    Change-Id: Ifc4e1447e11f4a3b73277f8610875ba8294e0975
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182275
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sd/inc/PresenterHelper.hxx b/sd/inc/PresenterHelper.hxx
index d54efa002ecb..dae53667f910 100644
--- a/sd/inc/PresenterHelper.hxx
+++ b/sd/inc/PresenterHelper.hxx
@@ -118,8 +118,7 @@ public:
         @param xWindow
             This window will be moved to the top of its stacking order.
     */
-    virtual void toTop (
-        const css::uno::Reference<css::awt::XWindow>& rxWindow);
+    static void toTop(const css::uno::Reference<css::awt::XWindow>& rxWindow);
 
     /** Load a bitmap with a given ID.
         @param id
diff --git a/sd/source/console/PresenterPaneBase.cxx 
b/sd/source/console/PresenterPaneBase.cxx
index 5b44f9215b79..605f02d8ef9d 100644
--- a/sd/source/console/PresenterPaneBase.cxx
+++ b/sd/source/console/PresenterPaneBase.cxx
@@ -274,8 +274,7 @@ const Reference<awt::XWindow>& 
PresenterPaneBase::GetBorderWindow() const
 
 void PresenterPaneBase::ToTop()
 {
-    if (mxPresenterHelper.is())
-        mxPresenterHelper->toTop(mxContentWindow);
+    sd::presenter::PresenterHelper::toTop(mxContentWindow);
 }
 
 void PresenterPaneBase::PaintBorder (const awt::Rectangle& rUpdateBox)
diff --git a/sd/source/console/PresenterPaneContainer.cxx 
b/sd/source/console/PresenterPaneContainer.cxx
index 93eae375ea3a..6d81dfa370ed 100644
--- a/sd/source/console/PresenterPaneContainer.cxx
+++ b/sd/source/console/PresenterPaneContainer.cxx
@@ -26,11 +26,9 @@ using namespace ::com::sun::star::drawing::framework;
 
 namespace sdext::presenter {
 
-PresenterPaneContainer::PresenterPaneContainer (
-    const Reference<XComponentContext>& rxContext)
+PresenterPaneContainer::PresenterPaneContainer()
     : PresenterPaneContainerInterfaceBase(m_aMutex)
 {
-    mxPresenterHelper = new sd::presenter::PresenterHelper(rxContext);
 }
 
 PresenterPaneContainer::~PresenterPaneContainer()
@@ -291,8 +289,7 @@ void PresenterPaneContainer::ToTop (const 
SharedPaneDescriptor& rpDescriptor)
     if (iPane == iEnd)
         return;
 
-    if (mxPresenterHelper.is())
-        mxPresenterHelper->toTop(rpDescriptor->mxBorderWindow);
+    sd::presenter::PresenterHelper::toTop(rpDescriptor->mxBorderWindow);
 
     maPanes.erase(iPane);
     maPanes.push_back(rpDescriptor);
diff --git a/sd/source/console/PresenterPaneContainer.hxx 
b/sd/source/console/PresenterPaneContainer.hxx
index bd863923e1b1..58d449837de4 100644
--- a/sd/source/console/PresenterPaneContainer.hxx
+++ b/sd/source/console/PresenterPaneContainer.hxx
@@ -52,8 +52,7 @@ class PresenterPaneContainer
       public PresenterPaneContainerInterfaceBase
 {
 public:
-    explicit PresenterPaneContainer (
-        const css::uno::Reference<css::uno::XComponentContext>& rxContext);
+    explicit PresenterPaneContainer();
     virtual ~PresenterPaneContainer() override;
     PresenterPaneContainer(const PresenterPaneContainer&) = delete;
     PresenterPaneContainer& operator=(const PresenterPaneContainer&) = delete;
@@ -149,9 +148,6 @@ public:
 
     virtual void SAL_CALL disposing (
         const css::lang::EventObject& rEvent) override;
-
-private:
-    rtl::Reference<sd::presenter::PresenterHelper> mxPresenterHelper;
 };
 
 } // end of namespace ::sdext::presenter
diff --git a/sd/source/console/PresenterScreen.cxx 
b/sd/source/console/PresenterScreen.cxx
index 6a479de6b297..a73bfffeb732 100644
--- a/sd/source/console/PresenterScreen.cxx
+++ b/sd/source/console/PresenterScreen.cxx
@@ -332,8 +332,7 @@ void PresenterScreen::InitializePresenterScreen()
 
     try
     {
-        Reference<XComponentContext> xContext (mxContextWeak);
-        mpPaneContainer = new PresenterPaneContainer(xContext);
+        mpPaneContainer = new PresenterPaneContainer();
 
         Reference<XPresentationSupplier> xPS ( mxModel, UNO_QUERY_THROW);
         Reference<XPresentation2> xPresentation(xPS->getPresentation(), 
UNO_QUERY_THROW);
@@ -363,6 +362,7 @@ void PresenterScreen::InitializePresenterScreen()
         rtl::Reference<::sd::framework::ConfigurationController> xCC( 
mxController->getConfigurationControllerImpl());
         mxConfigurationControllerWeak = xCC.get();
 
+        Reference<XComponentContext> xContext(mxContextWeak);
         Reference<drawing::framework::XResourceId> xMainPaneId(
             GetMainPaneId(xPresentation, xContext));
         // An empty reference means that the presenter screen can
@@ -632,7 +632,7 @@ void PresenterScreen::ShutdownPresenterScreen()
         mpPresenterController->dispose();
         mpPresenterController.clear();
     }
-    mpPaneContainer = new 
PresenterPaneContainer(Reference<XComponentContext>(mxContextWeak));
+    mpPaneContainer = new PresenterPaneContainer();
 }
 
 void PresenterScreen::SetupPaneFactory (const Reference<XComponentContext>& 
rxContext)

Reply via email to