summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-06 14:40:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-09 11:33:43 +0100
commitabe39f7781f59b96c5a8d3dd5b41c60fdf04ad84 (patch)
tree0f72d1968e5f25e3f280688a414398e3f4a7cce8 /sw/source
parentbdb1c72198f60fdd91460e26282134d43bc0e2df (diff)
improve loplugin:unusedfields
noticed something that wasn't being picked up, wrote some tests, and found an unhandled case in Plugin::getParentFunctionDecl Change-Id: I52b4ea273be6614e197392dfc4d6053bbc1704de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/edit/acorrect.cxx5
-rw-r--r--sw/source/core/view/viewsh.cxx17
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx35
-rw-r--r--sw/source/uibase/inc/swuipardlg.hxx1
5 files changed, 22 insertions, 38 deletions
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index d6232c468411..b5f7716aeeee 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -40,7 +40,6 @@ namespace {
class PaMIntoCursorShellRing
{
- SwCursorShell& rSh;
SwPaM &rDelPam, &rCursor;
SwPaM* pPrevDelPam;
SwPaM* pPrevCursor;
@@ -55,9 +54,9 @@ public:
PaMIntoCursorShellRing::PaMIntoCursorShellRing( SwCursorShell& rCSh,
SwPaM& rShCursor, SwPaM& rPam )
- : rSh( rCSh ), rDelPam( rPam ), rCursor( rShCursor )
+ : rDelPam( rPam ), rCursor( rShCursor )
{
- SwPaM* pShCursor = rSh.GetCursor_();
+ SwPaM* pShCursor = rCSh.GetCursor_();
pPrevDelPam = rDelPam.GetPrev();
pPrevCursor = rCursor.GetPrev();
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 555f17436b03..97339e82a6d2 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1714,25 +1714,18 @@ namespace
/// Similar to comphelper::FlagRestorationGuard, but for vcl::RenderContext.
class RenderContextGuard
{
- VclPtr<vcl::RenderContext>& m_pRef;
- VclPtr<vcl::RenderContext> m_pOriginalValue;
- SwViewShell* m_pShell;
std::unique_ptr<SdrPaintWindow> m_TemporaryPaintWindow;
SdrPageWindow* m_pPatchedPageWindow;
public:
RenderContextGuard(VclPtr<vcl::RenderContext>& pRef, vcl::RenderContext* pValue, SwViewShell* pShell)
- : m_pRef(pRef),
- m_pOriginalValue(m_pRef),
- m_pShell(pShell),
- m_TemporaryPaintWindow(),
- m_pPatchedPageWindow(nullptr)
+ : m_pPatchedPageWindow(nullptr)
{
- m_pRef = pValue;
+ pRef = pValue;
- if (pValue != m_pShell->GetWin())
+ if (pValue != pShell->GetWin())
{
- SdrView* pDrawView(m_pShell->Imp()->GetDrawView());
+ SdrView* pDrawView(pShell->Imp()->GetDrawView());
if (nullptr != pDrawView)
{
@@ -1740,7 +1733,7 @@ public:
if (nullptr != pSdrPageView)
{
- m_pPatchedPageWindow = pSdrPageView->FindPageWindow(*m_pShell->GetWin());
+ m_pPatchedPageWindow = pSdrPageView->FindPageWindow(*pShell->GetWin());
if (nullptr != m_pPatchedPageWindow)
{
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 99751fed15c9..80388415f486 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -52,7 +52,7 @@ SwParaDlg::SwParaDlg(weld::Window *pParent,
, rView(rVw)
, bDrawParaDlg(bDraw)
{
- nHtmlMode = ::GetHtmlMode(rVw.GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(rVw.GetDocShell());
bool bHtmlMode = (nHtmlMode & HTMLMODE_ON) == HTMLMODE_ON;
if(pTitle)
{
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 60ced0cbbf30..16959698f976 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -134,13 +134,6 @@ class SwEntryBrowseBox : public SwEntryBrowseBox_Base
VclPtr<Edit> m_aCellEdit;
VclPtr< ::svt::CheckBoxControl> m_aCellCheckBox;
- OUString m_sSearch;
- OUString m_sAlternative;
- OUString m_sPrimKey;
- OUString m_sSecKey;
- OUString m_sComment;
- OUString m_sCaseSensitive;
- OUString m_sWordOnly;
OUString m_sYes;
OUString m_sNo;
@@ -3565,13 +3558,13 @@ SwEntryBrowseBox::SwEntryBrowseBox(const css::uno::Reference<css::awt::XWindow>
, m_nCurrentRow(0)
, m_bModified(false)
{
- m_sSearch = SwResId(STR_AUTOMARK_SEARCHTERM);
- m_sAlternative = SwResId(STR_AUTOMARK_ALTERNATIVE);
- m_sPrimKey = SwResId(STR_AUTOMARK_KEY1);
- m_sSecKey = SwResId(STR_AUTOMARK_KEY2);
- m_sComment = SwResId(STR_AUTOMARK_COMMENT);
- m_sCaseSensitive = SwResId(STR_AUTOMARK_CASESENSITIVE);
- m_sWordOnly = SwResId(STR_AUTOMARK_WORDONLY);
+ OUString sSearch = SwResId(STR_AUTOMARK_SEARCHTERM);
+ OUString sAlternative = SwResId(STR_AUTOMARK_ALTERNATIVE);
+ OUString sPrimKey = SwResId(STR_AUTOMARK_KEY1);
+ OUString sSecKey = SwResId(STR_AUTOMARK_KEY2);
+ OUString sComment = SwResId(STR_AUTOMARK_COMMENT);
+ OUString sCaseSensitive = SwResId(STR_AUTOMARK_CASESENSITIVE);
+ OUString sWordOnly = SwResId(STR_AUTOMARK_WORDONLY);
m_sYes = SwResId(STR_AUTOMARK_YES);
m_sNo = SwResId(STR_AUTOMARK_NO);
@@ -3591,13 +3584,13 @@ SwEntryBrowseBox::SwEntryBrowseBox(const css::uno::Reference<css::awt::XWindow>
const OUString* aTitles[7] =
{
- &m_sSearch,
- &m_sAlternative,
- &m_sPrimKey,
- &m_sSecKey,
- &m_sComment,
- &m_sCaseSensitive,
- &m_sWordOnly
+ &sSearch,
+ &sAlternative,
+ &sPrimKey,
+ &sSecKey,
+ &sComment,
+ &sCaseSensitive,
+ &sWordOnly
};
long nWidth = GetSizePixel().Width();
diff --git a/sw/source/uibase/inc/swuipardlg.hxx b/sw/source/uibase/inc/swuipardlg.hxx
index ac50f0a520db..dd385845eccc 100644
--- a/sw/source/uibase/inc/swuipardlg.hxx
+++ b/sw/source/uibase/inc/swuipardlg.hxx
@@ -26,7 +26,6 @@
class SwParaDlg: public SfxTabDialogController
{
SwView& rView;
- sal_uInt16 nHtmlMode;
bool const bDrawParaDlg;
void PageCreated(const OString& rId, SfxTabPage& rPage) override;