loplugin:unusedfields in sw part5

Change-Id: I4111ed1dcb04e010ecfb93df3a7e7bf715abf585
Reviewed-on: https://gerrit.libreoffice.org/39044
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 24e5b4e..89ad4b2 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -194,7 +194,6 @@ private:
    sal_uLong m_nAktNode;             // save CursorPos at Start-Action
    sal_Int32 m_nAktContent;
    SwNodeType m_nAktNdTyp;
    bool m_bAktSelection;

    /*
     * Via the Method SttCursorMove and EndCursorMove this counter gets
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index ad7fdac..42bddf7 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -53,7 +53,6 @@ class SW_DLLPUBLIC SwFormat : public SwModify
                                       (is not hard attribution!!!) */
    sal_uInt16 m_nPoolHelpId;       ///< HelpId for this Pool-style.
    sal_uInt8 m_nPoolHlpFileId;     ///< FilePos to Doc to these style helps.
    bool   m_bWritten : 1;      ///< TRUE: already written.
    bool   m_bAutoFormat : 1;      /**< FALSE: it is a template.
                                       default is true! */
    bool   m_bFormatInDTOR : 1;    /**< TRUE: Format becomes deleted. In order to be able
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index ce7c644..1e5049b 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -181,7 +181,6 @@ public:
class SwAutoFormatGetDocNode: public SwMsgPoolItem
{
public:
    const SwContentNode* pContentNode;
    const SwNodes* pNodes;

    SwAutoFormatGetDocNode( const SwNodes* pNds );
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 6a4b563..c3c08e2 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -108,9 +108,6 @@ class SW_DLLPUBLIC SwTextNode: public SwContentNode, public ::sfx2::Metadatable
       Needed to avoid duplicate handling of attribute change actions. */
    bool mbInSetOrResetAttr;

    /// pointer to the list, to whose the text node is added to
    SwList* mpList;

    std::unique_ptr< OUString > m_pNumStringCache;

    css::uno::WeakReference<css::text::XTextContent> m_wXParagraph;
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 83fbbd2..89c6f7f 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -85,7 +85,6 @@ class SW_DLLPUBLIC SwNode

    /// For text nodes: level of auto format. Was put here because we had still free bits.
    sal_uInt8 m_nAFormatNumLvl : 3;
    bool m_bSetNumLSpace : 1;         ///< For numbering: TRUE: set indent.
    bool m_bIgnoreDontExpand : 1;     ///< for Text Attributes - ignore the flag

#ifdef DBG_UTIL
@@ -128,8 +127,6 @@ public:
    sal_uInt8 GetAutoFormatLvl() const     { return m_nAFormatNumLvl; }
    void SetAutoFormatLvl( sal_uInt8 nVal )      { m_nAFormatNumLvl = nVal; }

    void SetNumLSpace( bool bFlag )        { m_bSetNumLSpace = bFlag; }

    bool IsIgnoreDontExpand() const  { return m_bIgnoreDontExpand; }
    void SetIgnoreDontExpand( bool bNew )  { m_bIgnoreDontExpand = bNew; }

diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index 85ae6b4..bf61b59 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -113,7 +113,6 @@ class SwInterHyphInfo
{
    css::uno::Reference< css::linguistic2::XHyphenatedWord >    xHyphWord;
    const Point aCursorPos;
    bool bNoLang : 1;
    bool bCheck  : 1;
public:
    sal_Int32 nStart;
@@ -123,7 +122,6 @@ public:

    SwInterHyphInfo( const Point &rCursorPos )
        : aCursorPos(rCursorPos)
        , bNoLang(false)
        , bCheck(false)
        , nStart(0)
        , nEnd(SAL_MAX_INT32)
@@ -140,7 +138,6 @@ public:
    }
    bool IsCheck() const { return bCheck; }
    void SetCheck( const bool bNew ) { bCheck = bNew; }
    void SetNoLang( const bool bNew ) { bNoLang = bNew; }
    void SetHyphWord(const css::uno::Reference< css::linguistic2::XHyphenatedWord >  &rxHW)
    {
        xHyphWord = rxHW;
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 4e33cdf..15d20cb 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -139,10 +139,6 @@ protected:

    bool        m_bModifyLocked   :1;
    bool        m_bNewModel       :1; // false: old SubTableModel; true: new RowSpanModel
#ifdef DBG_UTIL
    /// This is set by functions (like Merge()) to forbid a late model change.
    bool m_bDontChangeModel;
#endif

    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) override;

@@ -238,18 +234,12 @@ public:
    bool Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
                SwTableBox* pMergeBox, SwUndoTableMerge* pUndo )
    {
#ifdef DBG_UTIL
        m_bDontChangeModel = true;
#endif
        return m_bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pUndo ) :
                             OldMerge( pDoc, rBoxes, pMergeBox, pUndo );
    }
    bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
                   bool bSameHeight )
    {
#ifdef DBG_UTIL
        m_bDontChangeModel = true;
#endif
        return m_bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) :
                           OldSplitRow( pDoc, rBoxes, nCnt, bSameHeight );
    }
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index c47e078..60e0a78 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -248,8 +248,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
                    m_bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
                    m_bOldShellWasPagePreview : 1,
                    m_bIsPreviewDoubleClick : 1, // #i114045#
                    m_bMakeSelectionVisible : 1, // transport the bookmark selection
                    m_bAnnotationMode; ///< The real cursor position is inside an annotation.
                    m_bMakeSelectionVisible : 1; // transport the bookmark selection

    /// LibreOfficeKit has to force the page size for PgUp/PgDown
    /// functionality based on the user's view, instead of using the m_aVisArea.
@@ -627,8 +626,6 @@ public:
    void SelectShellForDrop();

    void UpdateDocStats();
    /// Where is the real cursor: in the annotation or in the main document?
    void SetAnnotationMode(bool bMode);

    // methods for printing
    SAL_DLLPRIVATE virtual   SfxPrinter*     GetPrinter( bool bCreate = false ) override;
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 12f0de1..e3b4639 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -49,7 +49,7 @@ SwFormat::SwFormat( SwAttrPool& rPool, const sal_Char* pFormatNm,
{
    m_bAutoUpdateFormat = false; // LAYER_IMPL
    m_bAutoFormat = true;
    m_bWritten = m_bFormatInDTOR = m_bHidden = false;
    m_bFormatInDTOR = m_bHidden = false;

    if( pDrvdFrame )
        m_aSet.SetParent( &pDrvdFrame->m_aSet );
@@ -68,7 +68,7 @@ SwFormat::SwFormat( SwAttrPool& rPool, const OUString& rFormatNm,
{
    m_bAutoUpdateFormat = false; // LAYER_IMPL
    m_bAutoFormat = true;
    m_bWritten = m_bFormatInDTOR = m_bHidden = false;
    m_bFormatInDTOR = m_bHidden = false;

    if( pDrvdFrame )
        m_aSet.SetParent( &pDrvdFrame->m_aSet );
@@ -83,7 +83,7 @@ SwFormat::SwFormat( const SwFormat& rFormat )
    m_nPoolHelpId( rFormat.GetPoolHelpId() ),
    m_nPoolHlpFileId( rFormat.GetPoolHlpFileId() )
{
    m_bWritten = m_bFormatInDTOR = false; // LAYER_IMPL
    m_bFormatInDTOR = false; // LAYER_IMPL
    m_bAutoFormat = rFormat.m_bAutoFormat;
    m_bHidden = rFormat.m_bHidden;
    m_bAutoUpdateFormat = rFormat.m_bAutoUpdateFormat;
@@ -305,8 +305,6 @@ void SwFormat::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValu
        break;
    case RES_RESET_FMTWRITTEN:
        {
            m_bWritten = false;

            // mba: here we don't use the additional stuff from NotifyClients().
            // should we?!
            // mba: move the code that ignores this event to the clients
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 3ea3732..4fa04d0 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -72,7 +72,7 @@ SwTableFormulaUpdate::SwTableFormulaUpdate( const SwTable* pNewTable )
}

SwAutoFormatGetDocNode::SwAutoFormatGetDocNode( const SwNodes* pNds )
    : SwMsgPoolItem( RES_AUTOFMT_DOCNODE ), pContentNode( nullptr ), pNodes( pNds )
    : SwMsgPoolItem( RES_AUTOFMT_DOCNODE ), pNodes( pNds )
{
}

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 97a5cb3..e80a3cd 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -222,7 +222,6 @@ void SwCursorShell::StartAction()
        m_nAktNode = rNd.GetIndex();
        m_nAktContent = m_pCurrentCursor->GetPoint()->nContent.GetIndex();
        m_nAktNdTyp = rNd.GetNodeType();
        m_bAktSelection = *m_pCurrentCursor->GetPoint() != *m_pCurrentCursor->GetMark();
        if( rNd.IsTextNode() )
            m_nLeftFramePos = SwCallLink::getLayoutFrame( GetLayout(), const_cast<SwTextNode&>(*rNd.GetTextNode()), m_nAktContent, true );
        else
@@ -2648,7 +2647,6 @@ SwCursorShell::SwCursorShell( SwCursorShell& rShell, vcl::Window *pInitWin )
    , m_nAktNode(0)
    , m_nAktContent(0)
    , m_nAktNdTyp(SwNodeType::NONE)
    , m_bAktSelection(false)
    , m_nCursorMove( 0 )
    , m_eMvState( MV_NONE )
    , m_sMarkedListId()
@@ -2685,7 +2683,6 @@ SwCursorShell::SwCursorShell( SwDoc& rDoc, vcl::Window *pInitWin,
    , m_nAktNode(0)
    , m_nAktContent(0)
    , m_nAktNdTyp(SwNodeType::NONE)
    , m_bAktSelection(false)
    , m_nCursorMove( 0 )
    , m_eMvState( MV_NONE ) // state for crsr-travelling - GetCursorOfst
    , m_sMarkedListId()
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index b23fac6..4866fb5 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -283,7 +283,6 @@ long SwNode::s_nSerial = 0;
SwNode::SwNode( const SwNodeIndex &rWhere, const SwNodeType nNdType )
    : m_nNodeType( nNdType )
    , m_nAFormatNumLvl( 0 )
    , m_bSetNumLSpace( false )
    , m_bIgnoreDontExpand( false)
#ifdef DBG_UTIL
    , m_nSerial( s_nSerial++)
@@ -316,7 +315,6 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const SwNodeType nNdType )
SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const SwNodeType nNdType )
    : m_nNodeType( nNdType )
    , m_nAFormatNumLvl( 0 )
    , m_bSetNumLSpace( false )
    , m_bIgnoreDontExpand( false)
#ifdef DBG_UTIL
    , m_nSerial( s_nSerial++)
@@ -1387,7 +1385,6 @@ bool SwContentNode::GetInfo( SfxPoolItem& rInfo ) const
    case RES_AUTOFMT_DOCNODE:
        if( &GetNodes() == static_cast<SwAutoFormatGetDocNode&>(rInfo).pNodes )
        {
            static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode = this;
            return false;
        }
        break;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 06fc8d8..9e5a8e1 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1597,7 +1597,6 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
            }

            m_pCurTextNd->SetAttrListLevel(nLvl);
            m_pCurTextNd->SetNumLSpace( true );

            // start new list
            m_pDoc->SetNumRule( m_aDelPam, aRule, true );
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 281249f..1372c94 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1897,8 +1897,7 @@ bool SwTable::GetInfo( SfxPoolItem& rInfo ) const
                if (!m_TabSortContentBoxes.empty())
                {
                    SwNodeIndex aIdx( *m_TabSortContentBoxes[0]->GetSttNd() );
                    static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode =
                                    GetFrameFormat()->GetDoc()->GetNodes().GoNext( &aIdx );
                    GetFrameFormat()->GetDoc()->GetNodes().GoNext( &aIdx );
                }
                return false;
            }
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index a3ea58f..df41d00 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -241,14 +241,10 @@ bool SwTextFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
        rHyphInf.SetHyphWord( xHyphWord );
        rHyphInf.nWordStart = nWrdStart;
        rHyphInf.nWordLen = nLen;
        rHyphInf.SetNoLang( false );
        rHyphInf.SetCheck( true );
        return true;
    }

    if ( !rHyphInf.IsCheck() )
        rHyphInf.SetNoLang( true );

    return false;
}

diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 1719074..616a591 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -311,7 +311,6 @@ bool SwFormatField::GetInfo( SfxPoolItem& rInfo ) const
        &pTextNd->GetNodes() != static_cast<SwAutoFormatGetDocNode&>(rInfo).pNodes )
        return true;

    static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode = pTextNd;
    return false;
}

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 544b763..7cb4099 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -209,7 +209,6 @@ SwTextNode::SwTextNode( const SwNodeIndex &rWhere, SwTextFormatColl *pTextColl, 
    m_bNotifiable( false ),
    mbEmptyListStyleSetDueToSetOutlineLevelAttr( false ),
    mbInSetOrResetAttr( false ),
    mpList( nullptr ),
    m_pNumStringCache(),
    m_wXParagraph(),
    maFillAttributes()
@@ -3937,7 +3936,6 @@ void SwTextNode::AddToList()
        if ( pList )
        {
            pList->InsertListItem( *CreateNum(), GetAttrListLevel() );
            mpList = pList;
        }
    }
}
@@ -3947,7 +3945,6 @@ void SwTextNode::RemoveFromList()
    if ( IsInList() )
    {
        SwList::RemoveListItem( *mpNodeNum );
        mpList = nullptr;
        delete mpNodeNum;
        mpNodeNum = nullptr;

diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index cc2082e..8abd4af 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -77,7 +77,6 @@ bool SwTextCharFormat::GetInfo( SfxPoolItem& rInfo ) const
        return true;
    }

    static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode = m_pTextNode;
    return false;
}

@@ -191,7 +190,6 @@ bool SwTextINetFormat::GetInfo( SfxPoolItem& rInfo ) const
        return true;
    }

    static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode = m_pTextNode;
    return false;
}

@@ -240,7 +238,6 @@ bool SwTextRuby::GetInfo( SfxPoolItem& rInfo ) const
        return true;
    }

    static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode = m_pTextNode;
    return false;
}

diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index e0c4158..460736f 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1616,8 +1616,6 @@ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf )
    if ( LANGUAGE_NONE == GetSwAttrSet().GetLanguage().GetLanguage()
         && LanguageType(USHRT_MAX) == GetLang(0, m_Text.getLength()))
    {
        if( !rHyphInf.IsCheck() )
            rHyphInf.SetNoLang( true );
        return false;
    }

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index bfa90c8..4848aec 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -2105,9 +2105,7 @@ void SwPostItMgr::SetActiveSidebarWin( SwAnnotationWin* p)
        if (mpActivePostIt)
        {
            mpActivePostIt->GotoPos();
            mpView->SetAnnotationMode(true);
            mpView->AttrChangedNotify(nullptr);
            mpView->SetAnnotationMode(false);
            mpActivePostIt->ActivatePostIt();
        }
    }
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 752cdca..f3e2350 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -708,7 +708,6 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
    m_bInDtor(false),
    m_bOldShellWasPagePreview(false),
    m_bIsPreviewDoubleClick(false),
    m_bAnnotationMode(false),
    m_nLOKPageUpDownOffset(0)
{
    static bool bRequestDoubleBuffering = getenv("VCL_DOUBLEBUFFERING_ENABLE");
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 2250d49..f3049f9 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1251,11 +1251,6 @@ void SwView::UpdateDocStats()
    rBnd.Update( FN_STAT_WORDCOUNT );
}

void SwView::SetAnnotationMode(bool bMode)
{
    m_bAnnotationMode = bMode;
}

/// get status of the status line
void SwView::StateStatusLine(SfxItemSet &rSet)
{