include/svx/fmview.hxx                   |    2 +-
 include/svx/sdrpaintwindow.hxx           |    6 +-----
 include/svx/svdedxv.hxx                  |    2 +-
 include/svx/svdpntv.hxx                  |    2 +-
 sc/source/ui/view/tabview5.cxx           |    4 ++--
 sd/source/ui/inc/OutlineView.hxx         |    2 +-
 sd/source/ui/slideshow/showwin.cxx       |    2 +-
 sd/source/ui/slideshow/slideshowimpl.cxx |    4 ++--
 sd/source/ui/view/outlview.cxx           |    4 ++--
 svx/source/form/fmview.cxx               |    4 ++--
 svx/source/svdraw/sdrpaintwindow.cxx     |    3 +--
 svx/source/svdraw/svdedxv.cxx            |    4 ++--
 svx/source/svdraw/svdpntv.cxx            |    6 +++---
 sw/inc/view.hxx                          |    1 -
 sw/source/core/view/viewsh.cxx           |    2 +-
 15 files changed, 21 insertions(+), 27 deletions(-)

New commits:
commit 5b9e6ccfa871fa8dbc423ba734592eb4c2e1aac7
Author:     Noel Grandin <[email protected]>
AuthorDate: Fri Jan 23 12:22:35 2026 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Fri Jan 23 15:33:54 2026 +0100

    loplugin:unusedmethods
    
    Change-Id: Ib80bf740b664b4b8ab24e209d7690d8027473c5a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197938
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
index 34031b6d3f4f..6b3ed1529374 100644
--- a/include/svx/fmview.hxx
+++ b/include/svx/fmview.hxx
@@ -84,7 +84,7 @@ public:
     rtl::Reference<SdrObject> CreateXFormsControl( const 
svx::OXFormsDescriptor &_rDesc );
 
     virtual void MarkListHasChanged() override;
-    virtual void AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* 
pWindow) override;
+    virtual void AddDeviceToPaintView(OutputDevice& rNewDev) override;
     virtual void DeleteDeviceFromPaintView(OutputDevice& rOldDev) override;
 
     static void createControlLabelPair(
diff --git a/include/svx/sdrpaintwindow.hxx b/include/svx/sdrpaintwindow.hxx
index 109851aacd80..5c707f3c0918 100644
--- a/include/svx/sdrpaintwindow.hxx
+++ b/include/svx/sdrpaintwindow.hxx
@@ -62,9 +62,6 @@ private:
     // the OutputDevice this window represents
     VclPtr<OutputDevice>                                mpOutputDevice;
 
-    /// In case mrOutputDevice is a buffer for a vcl::Window, this is the 
window.
-    VclPtr<vcl::Window>                                 mpWindow;
-
     // the SdrPaintView this window belongs to
     SdrPaintView&                                       mrPaintView;
 
@@ -90,7 +87,7 @@ private:
     void impCreateOverlayManager();
 
 public:
-    SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut, 
vcl::Window* pWindow = nullptr);
+    SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut);
     ~SdrPaintWindow();
 
     // allow reference to patched, see patchPaintWindow/unpatchPaintWindow
@@ -99,7 +96,6 @@ public:
 
     // data read accesses
     OutputDevice& GetOutputDevice() const { return *mpOutputDevice; }
-    vcl::Window* GetWindow() const { return mpWindow; }
 
     // OVERLAYMANAGER
     rtl::Reference< sdr::overlay::OverlayManager > const & GetOverlayManager() 
const;
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index aebc9fac5934..2fcd9eeb4b86 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -286,7 +286,7 @@ public:
     void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
 
     // Intern: at mounting new OutlinerView...
-    virtual void AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* 
pWindow) override;
+    virtual void AddDeviceToPaintView(OutputDevice& rNewDev) override;
     virtual void DeleteDeviceFromPaintView(OutputDevice& rOldWin) override;
 
     sal_uInt16 GetSelectionLevel() const;
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 1a8fe08c8df1..e54325f68fc2 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -311,7 +311,7 @@ public:
     SdrPageView* GetSdrPageView() const { return mpPageView.get(); }
 
     // A SdrView can be output to multiple devices at the same time
-    virtual void AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* 
pWindow);
+    virtual void AddDeviceToPaintView(OutputDevice& rNewDev);
     virtual void DeleteDeviceFromPaintView(OutputDevice& rOldDev);
 
     void SetLayerVisible(const OUString& rName, bool bShow);
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 4f1a3f182d26..121e57edc316 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -240,7 +240,7 @@ void ScTabView::MakeDrawView( TriState nForceDesignMode )
         if (pGridWin[i])
         {
             if ( SC_SPLIT_BOTTOMLEFT != static_cast<ScSplitPos>(i) )
-                pDrawView->AddDeviceToPaintView(*pGridWin[i]->GetOutDev(), 
nullptr);
+                pDrawView->AddDeviceToPaintView(*pGridWin[i]->GetOutDev());
         }
     pDrawView->RecalcScale();
     for (i=0; i<4; i++)
@@ -273,7 +273,7 @@ void ScTabView::DoAddWin( ScGridWindow* pWin )
 {
     if (pDrawView)
     {
-        pDrawView->AddDeviceToPaintView(*pWin->GetOutDev(), nullptr);
+        pDrawView->AddDeviceToPaintView(*pWin->GetOutDev());
         pWin->DrawLayerCreated();
     }
     pWin->SetAutoSpellContext(mpSpellCheckCxt);
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 3775e4848cbf..a2a8c0cc18b1 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -98,7 +98,7 @@ public:
     static SdrTextObj*     CreateTitleTextObject(SdPage* pPage);
     static SdrTextObj*     CreateOutlineTextObject(SdPage* pPage);
 
-    virtual void AddDeviceToPaintView(OutputDevice& rDev, vcl::Window* 
pWindow) override;
+    virtual void AddDeviceToPaintView(OutputDevice& rDev) override;
     virtual void DeleteDeviceFromPaintView(OutputDevice& rDev) override;
 
     OutlinerView*   GetViewByWindow(vcl::Window const * pWin) const override;
diff --git a/sd/source/ui/slideshow/showwin.cxx 
b/sd/source/ui/slideshow/showwin.cxx
index dc0a55d2ca2e..2c402950a8e0 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -597,7 +597,7 @@ void ShowWindow::DeleteWindowFromPaintView()
 void ShowWindow::AddWindowToPaintView()
 {
     if( mpViewShell->GetView() )
-        mpViewShell->GetView()->AddDeviceToPaintView( *GetOutDev(), nullptr );
+        mpViewShell->GetView()->AddDeviceToPaintView( *GetOutDev() );
 
     sal_uInt16 nChild = GetChildCount();
     while (nChild)
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 406cb99681df..f2091b93c7d5 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -980,7 +980,7 @@ bool SlideshowImpl::startPreview(
 
         if( mpView )
         {
-            mpView->AddDeviceToPaintView( *mpShowWindow->GetOutDev(), nullptr 
);
+            mpView->AddDeviceToPaintView( *mpShowWindow->GetOutDev() );
             mpView->SetAnimationPause( true );
         }
 
@@ -1169,7 +1169,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx 
const * pPresSettings )
 
             if( mpView )
             {
-                mpView->AddDeviceToPaintView( *mpShowWindow->GetOutDev(), 
nullptr );
+                mpView->AddDeviceToPaintView( *mpShowWindow->GetOutDev() );
                 mpView->SetAnimationPause( true );
             }
 
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index ad33f0a01644..5aca5f0c5970 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -414,7 +414,7 @@ void OutlineView::DisconnectFromApplication()
     Application::RemoveEventListener(LINK(this, OutlineView, 
AppEventListenerHdl));
 }
 
-void OutlineView::AddDeviceToPaintView(OutputDevice& rDev, vcl::Window* 
pWindow)
+void OutlineView::AddDeviceToPaintView(OutputDevice& rDev)
 {
     bool bAdded = false;
     bool bValidArea = false;
@@ -448,7 +448,7 @@ void OutlineView::AddDeviceToPaintView(OutputDevice& rDev, 
vcl::Window* pWindow)
     // white background in Outliner
     rDev.SetBackground( Wallpaper( aWhiteColor ) );
 
-    ::sd::View::AddDeviceToPaintView(rDev, pWindow);
+    ::sd::View::AddDeviceToPaintView(rDev);
 }
 
 void OutlineView::DeleteDeviceFromPaintView(OutputDevice& rDev)
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 991a44fa979f..1b5b1414dc3e 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -171,9 +171,9 @@ namespace
 }
 
 
-void FmFormView::AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* 
pWindow)
+void FmFormView::AddDeviceToPaintView(OutputDevice& rNewDev)
 {
-    E3dView::AddDeviceToPaintView(rNewDev, pWindow);
+    E3dView::AddDeviceToPaintView(rNewDev);
 
     // look up the PageViewWindow for the newly inserted window, and care for 
it
     // #i39269# / 2004-12-20 / [email protected]
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx 
b/svx/source/svdraw/sdrpaintwindow.cxx
index 8ad724c3793f..9bca773d9d99 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -239,9 +239,8 @@ void SdrPaintWindow::impCreateOverlayManager()
         mxOverlayManager = mrPaintView.CreateOverlayManager(GetOutputDevice());
 }
 
-SdrPaintWindow::SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& 
rOut, vcl::Window* pWindow)
+SdrPaintWindow::SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut)
 :   mpOutputDevice(&rOut),
-    mpWindow(pWindow),
     mrPaintView(rNewPaintView),
     mbTemporaryTarget(false), // #i72889#
     mbOutputToWindow(OUTDEV_WINDOW == mpOutputDevice->GetOutDevType()),
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 9f749954610d..64e670b47118 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2570,9 +2570,9 @@ void SdrObjEditView::SetStyleSheet(SfxStyleSheet* 
pStyleSheet, bool bDontRemoveH
     SdrGlueEditView::SetStyleSheet(pStyleSheet, bDontRemoveHardAttr);
 }
 
-void SdrObjEditView::AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* 
pWindow)
+void SdrObjEditView::AddDeviceToPaintView(OutputDevice& rNewDev)
 {
-    SdrGlueEditView::AddDeviceToPaintView(rNewDev, pWindow);
+    SdrGlueEditView::AddDeviceToPaintView(rNewDev);
 
     if (mxWeakTextEditObj.get() && !mbTextEditOnlyOneView
         && rNewDev.GetOutDevType() == OUTDEV_WINDOW)
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 48f4def24eba..f74dd16bd683 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -175,7 +175,7 @@ SdrPaintView::SdrPaintView(SdrModel& rSdrModel, 
OutputDevice* pOut)
     SetDefaultStyleSheet(GetModel().GetDefaultStyleSheet(), true);
 
     if (pOut)
-        AddDeviceToPaintView(*pOut, nullptr);
+        AddDeviceToPaintView(*pOut);
 
     maColorConfig.AddListener(this);
     onChangeColorConfig();
@@ -405,9 +405,9 @@ void SdrPaintView::HideSdrPage()
     }
 }
 
-void SdrPaintView::AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window 
*pWindow)
+void SdrPaintView::AddDeviceToPaintView(OutputDevice& rNewDev)
 {
-    SdrPaintWindow* pNewPaintWindow = new SdrPaintWindow(*this, rNewDev, 
pWindow);
+    SdrPaintWindow* pNewPaintWindow = new SdrPaintWindow(*this, rNewDev);
     maPaintWindows.emplace_back(pNewPaintWindow);
 
     if(mpPageView)
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index eaf65e7637d2..629dec9c0bc2 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -681,7 +681,6 @@ public:
     SAL_DLLPRIVATE virtual std::unique_ptr<SfxTabPage> 
CreatePrintOptionsPage(weld::Container* pPage, weld::DialogController* 
pController,
                                                     const SfxItemSet& rSet) 
override;
     static SvxSearchItem* GetSearchItem() { return s_pSrchItem; }
-    static void SetSearchItem(SvxSearchItem* pSearchItem) { s_pSrchItem = 
pSearchItem; }
 
     /// See SfxViewShell::getPart().
     int getPart() const override;
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index a814216b2f19..7cfa7fe8384f 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1562,7 +1562,7 @@ bool SwViewShell::SmoothScroll( tools::Long lXDiff, 
tools::Long lYDiff, const to
                 if(!HasDrawView())
                     MakeDrawView();
                 SdrView* pDrawView = GetDrawView();
-                pDrawView->AddDeviceToPaintView(*pVout, nullptr);
+                pDrawView->AddDeviceToPaintView(*pVout);
 
                 // clear mpWin during DLPrePaint2 to get paint preparation for 
mpOut, but set it again
                 // immediately afterwards. There are many decisions in SW 
which imply that Printing

Reply via email to