From 471bbaf15fb392a194b9392d982cf2e33495f4b3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 16 Mar 2024 17:58:30 +0200 Subject: loplugin:unusedfields Change-Id: I91ec189ea1f389a978ef56339bbf6b43cbec6798 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164929 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/inc/tox.hxx | 8 +++----- sw/qa/unit/sw-dialogs-test.cxx | 2 -- sw/qa/unit/sw-dialogs-test_2.cxx | 3 --- sw/source/core/crsr/crstrvl.cxx | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) (limited to 'sw') diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 74b26b9515d7..bd1c25f50668 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -54,11 +54,9 @@ namespace sw { }; struct FindContentFrameHint final : SfxHint { SwContentFrame*& m_rpContentFrame; - const SwDoc& m_rDoc; const SwRootFrame& m_rLayout; - FindContentFrameHint(SwContentFrame*& rpContentFrame, const SwDoc& rDoc, const SwRootFrame& rLayout) + FindContentFrameHint(SwContentFrame*& rpContentFrame,const SwRootFrame& rLayout) : m_rpContentFrame(rpContentFrame) - , m_rDoc(rDoc) , m_rLayout(rLayout) {} }; @@ -185,10 +183,10 @@ public: SwDoc& GetDoc() const { return m_rDoc; } void CollectTextMarks(SwTOXMarks& rMarks) const { const_cast(this)->GetNotifier().Broadcast(sw::CollectTextMarksHint(rMarks)); } - SwContentFrame* FindContentFrame(const SwDoc& rDoc, const SwRootFrame& rLayout) const + SwContentFrame* FindContentFrame(const SwRootFrame& rLayout) const { SwContentFrame* pContentFrame = nullptr; - const_cast(this)->GetNotifier().Broadcast(sw::FindContentFrameHint(pContentFrame, rDoc, rLayout)); + const_cast(this)->GetNotifier().Broadcast(sw::FindContentFrameHint(pContentFrame, rLayout)); return pContentFrame; } void CollectTextTOXMarksForLayout(std::vector>& rMarks, const SwRootFrame* pLayout) const diff --git a/sw/qa/unit/sw-dialogs-test.cxx b/sw/qa/unit/sw-dialogs-test.cxx index 0e9bd50db309..ee5d3dec4d11 100644 --- a/sw/qa/unit/sw-dialogs-test.cxx +++ b/sw/qa/unit/sw-dialogs-test.cxx @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -28,7 +27,6 @@ class SwDialogsTest : public ScreenshotTest { private: css::uno::Reference component_; - osl::Module libSwui_; /// helper method to populate KnownDialogs, called in setUp(). Needs to be /// written and has to add entries to KnownDialogs diff --git a/sw/qa/unit/sw-dialogs-test_2.cxx b/sw/qa/unit/sw-dialogs-test_2.cxx index e0de86d276d3..d6bb345e6cfe 100644 --- a/sw/qa/unit/sw-dialogs-test_2.cxx +++ b/sw/qa/unit/sw-dialogs-test_2.cxx @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -28,8 +27,6 @@ extern "C" { using Fn = SwAbstractDialogFactory * (*)(); } class SwDialogsTest2 : public ScreenshotTest { private: - osl::Module libSwui_; - /// helper method to populate KnownDialogs, called in setUp(). Needs to be /// written and has to add entries to KnownDialogs virtual void registerKnownDialogsByID(mapType& rKnownDialogs) override; diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 0a2c404ce399..3972071383ab 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -367,7 +367,7 @@ void SwCursorShell::GotoTOXMarkBase() return; // Take the 1. and get the index type. Ask it for the actual index. const SwTOXType* pType = aMarks[0]->GetTOXType(); - auto pContentFrame = pType->FindContentFrame(*GetDoc(), *GetLayout()); + auto pContentFrame = pType->FindContentFrame(*GetLayout()); if(!pContentFrame) return; SwCallLink aLk(*this); // watch Cursor-Moves -- cgit