[Libreoffice-commits] core.git: sw/inc sw/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 18 07:13:36 UTC 2021


 sw/inc/AnnotationWin.hxx                                |    2 -
 sw/inc/SwNodeNum.hxx                                    |    5 +-
 sw/inc/cellatr.hxx                                      |    6 +--
 sw/inc/cellfml.hxx                                      |    4 +-
 sw/inc/docsh.hxx                                        |    2 -
 sw/inc/docstyle.hxx                                     |    7 +--
 sw/inc/expfld.hxx                                       |    2 -
 sw/inc/fmtanchr.hxx                                     |    2 -
 sw/inc/fmtclbl.hxx                                      |    2 -
 sw/inc/fmtclds.hxx                                      |    2 -
 sw/inc/fmtcnct.hxx                                      |    2 -
 sw/inc/fmtcntnt.hxx                                     |    2 -
 sw/inc/fmteiro.hxx                                      |    2 -
 sw/inc/fmtfollowtextflow.hxx                            |    2 -
 sw/inc/fmtfordr.hxx                                     |    2 -
 sw/inc/fmtfsize.hxx                                     |    2 -
 sw/inc/fmtftntx.hxx                                     |    4 +-
 sw/inc/fmthdft.hxx                                      |    4 +-
 sw/inc/fmtline.hxx                                      |    2 -
 sw/inc/fmtlsplt.hxx                                     |    2 -
 sw/inc/fmtmeta.hxx                                      |    2 -
 sw/inc/fmtornt.hxx                                      |    4 +-
 sw/inc/fmtpdsc.hxx                                      |    4 +-
 sw/inc/fmtrowsplt.hxx                                   |    2 -
 sw/inc/fmtsrnd.hxx                                      |    2 -
 sw/inc/fmturl.hxx                                       |    2 -
 sw/inc/fmtwrapinfluenceonobjpos.hxx                     |    2 -
 sw/inc/frameformats.hxx                                 |    2 -
 sw/inc/frmfmt.hxx                                       |    3 -
 sw/inc/grfatr.hxx                                       |   24 ++++++------
 sw/inc/hfspacingitem.hxx                                |    2 -
 sw/inc/hhcwrp.hxx                                       |    3 -
 sw/inc/node.hxx                                         |   11 ++---
 sw/inc/pagedesc.hxx                                     |    3 -
 sw/inc/paratr.hxx                                       |    9 ++--
 sw/inc/redline.hxx                                      |    6 +--
 sw/inc/swtable.hxx                                      |    4 +-
 sw/inc/tgrditem.hxx                                     |    2 -
 sw/inc/txtatr.hxx                                       |    2 -
 sw/inc/txtflcnt.hxx                                     |    2 -
 sw/inc/txtftn.hxx                                       |    2 -
 sw/inc/txtrfmrk.hxx                                     |    2 -
 sw/inc/txttxmrk.hxx                                     |    2 -
 sw/inc/undobj.hxx                                       |    2 -
 sw/inc/unodraw.hxx                                      |    3 -
 sw/inc/unotxdoc.hxx                                     |    2 -
 sw/source/core/inc/DateFormFieldButton.hxx              |    2 -
 sw/source/core/inc/DocumentContentOperationsManager.hxx |    2 -
 sw/source/core/inc/DocumentRedlineManager.hxx           |    2 -
 sw/source/core/inc/DropDownFormFieldButton.hxx          |    2 -
 sw/source/core/inc/SwUndoFmt.hxx                        |   24 ++++++------
 sw/source/core/inc/SwUndoPageDesc.hxx                   |    6 +--
 sw/source/core/inc/SwUndoTOXChange.hxx                  |    2 -
 sw/source/core/inc/SwXMLBlockExport.hxx                 |    2 -
 sw/source/core/inc/UndoAttribute.hxx                    |   20 +++++-----
 sw/source/core/inc/UndoBookmark.hxx                     |   14 +++----
 sw/source/core/inc/UndoCore.hxx                         |   12 +++---
 sw/source/core/inc/UndoDelete.hxx                       |    2 -
 sw/source/core/inc/UndoDraw.hxx                         |   10 ++---
 sw/source/core/inc/UndoInsert.hxx                       |    8 ++--
 sw/source/core/inc/UndoManager.hxx                      |    5 +-
 sw/source/core/inc/UndoNumbering.hxx                    |   12 +++---
 sw/source/core/inc/UndoRedline.hxx                      |   10 ++---
 sw/source/core/inc/UndoSection.hxx                      |    4 +-
 sw/source/core/inc/UndoSort.hxx                         |    2 -
 sw/source/core/inc/UndoSplitMove.hxx                    |    4 +-
 sw/source/core/inc/UndoTable.hxx                        |   32 ++++++++--------
 sw/source/core/inc/bodyfrm.hxx                          |    3 -
 sw/source/core/inc/bookmrk.hxx                          |   12 +++---
 sw/source/core/inc/cellfrm.hxx                          |    3 -
 sw/source/core/inc/dview.hxx                            |    3 -
 sw/source/core/inc/fntcache.hxx                         |    6 +--
 sw/source/core/inc/frmtool.hxx                          |    2 -
 sw/source/core/inc/ftnfrm.hxx                           |    2 -
 sw/source/core/inc/rootfrm.hxx                          |    4 --
 sw/source/core/inc/rowfrm.hxx                           |    3 -
 sw/source/core/inc/swfntcch.hxx                         |    4 +-
 sw/source/core/inc/textapi.hxx                          |    2 -
 sw/source/core/inc/txtfrm.hxx                           |    3 -
 sw/source/core/inc/undoflystrattr.hxx                   |    2 -
 sw/source/core/inc/visiturl.hxx                         |    2 -
 sw/source/filter/inc/fltini.hxx                         |    4 +-
 sw/source/filter/inc/fltshell.hxx                       |   12 +++---
 sw/source/filter/inc/msfilter.hxx                       |    2 -
 sw/source/ui/inc/mmresultdialogs.hxx                    |    8 ++--
 sw/source/uibase/inc/DateFormFieldDialog.hxx            |    2 -
 sw/source/uibase/inc/DropDownFieldDialog.hxx            |    2 -
 sw/source/uibase/inc/DropDownFormFieldDialog.hxx        |    2 -
 sw/source/uibase/inc/HeaderFooterWin.hxx                |    2 -
 sw/source/uibase/inc/OutlineContentVisibilityWin.hxx    |    2 -
 sw/source/uibase/inc/PageBreakWin.hxx                   |    2 -
 sw/source/uibase/inc/SwSpellDialogChildWindow.hxx       |    3 -
 sw/source/uibase/inc/SwXFilterOptions.hxx               |    2 -
 sw/source/uibase/inc/UnfloatTableButton.hxx             |    2 -
 sw/source/uibase/inc/abstract.hxx                       |    2 -
 sw/source/uibase/inc/addrdlg.hxx                        |    2 -
 sw/source/uibase/inc/ascfldlg.hxx                       |    2 -
 sw/source/uibase/inc/autoformatpreview.hxx              |    2 -
 sw/source/uibase/inc/barcfg.hxx                         |    2 -
 sw/source/uibase/inc/bmpwin.hxx                         |    2 -
 sw/source/uibase/inc/bookctrl.hxx                       |    2 -
 sw/source/uibase/inc/bookmark.hxx                       |    2 -
 sw/source/uibase/inc/break.hxx                          |    2 -
 sw/source/uibase/inc/cfgitems.hxx                       |   10 ++---
 sw/source/uibase/inc/changedb.hxx                       |    2 -
 sw/source/uibase/inc/chrdlg.hxx                         |    4 +-
 sw/source/uibase/inc/colex.hxx                          |   10 ++---
 sw/source/uibase/inc/column.hxx                         |    4 +-
 sw/source/uibase/inc/condedit.hxx                       |    2 -
 sw/source/uibase/inc/content.hxx                        |    4 +-
 sw/source/uibase/inc/conttree.hxx                       |    4 +-
 sw/source/uibase/inc/convert.hxx                        |    2 -
 sw/source/uibase/inc/cption.hxx                         |    2 -
 sw/source/uibase/inc/dbconfig.hxx                       |    2 -
 sw/source/uibase/inc/dbinsdlg.hxx                       |    2 -
 sw/source/uibase/inc/dbui.hxx                           |    6 +--
 sw/source/uibase/inc/docfnote.hxx                       |    2 -
 sw/source/uibase/inc/drpcps.hxx                         |    6 +--
 sw/source/uibase/inc/dselect.hxx                        |    2 -
 sw/source/uibase/inc/envimg.hxx                         |    4 +-
 sw/source/uibase/inc/envlop.hxx                         |    6 +--
 sw/source/uibase/inc/fldedt.hxx                         |    2 -
 sw/source/uibase/inc/fldtdlg.hxx                        |    2 -
 sw/source/uibase/inc/fldwrap.hxx                        |    4 +-
 sw/source/uibase/inc/fontcfg.hxx                        |    2 -
 sw/source/uibase/inc/frmdlg.hxx                         |    2 -
 sw/source/uibase/inc/frmpage.hxx                        |    8 ++--
 sw/source/uibase/inc/gloslst.hxx                        |    2 -
 sw/source/uibase/inc/glossary.hxx                       |    2 -
 sw/source/uibase/inc/hyp.hxx                            |    3 -
 sw/source/uibase/inc/inpdlg.hxx                         |    2 -
 sw/source/uibase/inc/inputwin.hxx                       |    2 -
 sw/source/uibase/inc/insfnote.hxx                       |    2 -
 sw/source/uibase/inc/instable.hxx                       |    2 -
 sw/source/uibase/inc/javaedit.hxx                       |    2 -
 sw/source/uibase/inc/label.hxx                          |    2 -
 sw/source/uibase/inc/labelcfg.hxx                       |    2 -
 sw/source/uibase/inc/labimg.hxx                         |    4 +-
 sw/source/uibase/inc/linenum.hxx                        |    2 -
 sw/source/uibase/inc/mailconfigpage.hxx                 |    4 +-
 sw/source/uibase/inc/maildispatcher.hxx                 |    7 +--
 sw/source/uibase/inc/mailmergehelper.hxx                |   12 +++---
 sw/source/uibase/inc/mailmergewizard.hxx                |    3 -
 sw/source/uibase/inc/mailmrge.hxx                       |    6 +--
 sw/source/uibase/inc/mergetbl.hxx                       |    2 -
 sw/source/uibase/inc/multmrk.hxx                        |    2 -
 sw/source/uibase/inc/navicfg.hxx                        |    2 -
 sw/source/uibase/inc/navipi.hxx                         |    4 --
 sw/source/uibase/inc/num.hxx                            |    2 -
 sw/source/uibase/inc/numfmtlb.hxx                       |    4 +-
 sw/source/uibase/inc/numprevw.hxx                       |    2 -
 sw/source/uibase/inc/optcomp.hxx                        |    2 -
 sw/source/uibase/inc/optload.hxx                        |   10 ++---
 sw/source/uibase/inc/optpage.hxx                        |   18 ++++-----
 sw/source/uibase/inc/outline.hxx                        |    2 -
 sw/source/uibase/inc/pattern.hxx                        |    2 -
 sw/source/uibase/inc/pgfnote.hxx                        |    2 -
 sw/source/uibase/inc/pggrid.hxx                         |    2 -
 sw/source/uibase/inc/pview.hxx                          |    5 +-
 sw/source/uibase/inc/redlndlg.hxx                       |    6 +--
 sw/source/uibase/inc/regionsw.hxx                       |   12 ++----
 sw/source/uibase/inc/rowht.hxx                          |    2 -
 sw/source/uibase/inc/scroll.hxx                         |    2 -
 sw/source/uibase/inc/splittbl.hxx                       |    2 -
 sw/source/uibase/inc/srcedtw.hxx                        |    7 +--
 sw/source/uibase/inc/srcview.hxx                        |    3 -
 sw/source/uibase/inc/srtdlg.hxx                         |    2 -
 sw/source/uibase/inc/swdtflvr.hxx                       |    3 -
 sw/source/uibase/inc/swmodalredlineacceptdlg.hxx        |    2 -
 sw/source/uibase/inc/swrenamexnameddlg.hxx              |    2 -
 sw/source/uibase/inc/swuiccoll.hxx                      |    2 -
 sw/source/uibase/inc/swuicnttab.hxx                     |    8 ++--
 sw/source/uibase/inc/swuiidxmrk.hxx                     |    8 ++--
 sw/source/uibase/inc/swuipardlg.hxx                     |    2 -
 sw/source/uibase/inc/swwrtshitem.hxx                    |    2 -
 sw/source/uibase/inc/syncbtn.hxx                        |    4 +-
 sw/source/uibase/inc/tabledlg.hxx                       |    2 -
 sw/source/uibase/inc/tautofmt.hxx                       |    2 -
 sw/source/uibase/inc/tblnumfm.hxx                       |    2 -
 sw/source/uibase/inc/titlepage.hxx                      |    2 -
 sw/source/uibase/inc/tmpdlg.hxx                         |    2 -
 sw/source/uibase/inc/tmplctrl.hxx                       |    3 -
 sw/source/uibase/inc/uiborder.hxx                       |    2 -
 sw/source/uibase/inc/uiitems.hxx                        |    8 ++--
 sw/source/uibase/inc/uiobject.hxx                       |   14 ++-----
 sw/source/uibase/inc/uivwimp.hxx                        |    4 +-
 sw/source/uibase/inc/unoatxt.hxx                        |   10 ++---
 sw/source/uibase/inc/unomailmerge.hxx                   |    4 +-
 sw/source/uibase/inc/unotools.hxx                       |    2 -
 sw/source/uibase/inc/usrpref.hxx                        |   10 ++---
 sw/source/uibase/inc/viewlayoutctrl.hxx                 |    2 -
 sw/source/uibase/inc/watermarkdialog.hxx                |    2 -
 sw/source/uibase/inc/wordcountctrl.hxx                  |    2 -
 sw/source/uibase/inc/wordcountdialog.hxx                |    2 -
 sw/source/uibase/inc/workctrl.hxx                       |    6 +--
 sw/source/uibase/inc/wrap.hxx                           |    4 +-
 sw/source/uibase/inc/wrtsh.hxx                          |    2 -
 sw/source/uibase/inc/zoomctrl.hxx                       |    2 -
 198 files changed, 392 insertions(+), 433 deletions(-)

New commits:
commit 4968b6484707cb40b70a3115084e19433d1fec7f
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 17 15:02:53 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jun 18 09:12:57 2021 +0200

    loplugin:finalclasses in sw
    
    Change-Id: I5f228e839e0d5a51ece868b55715b04f0affc28d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117397
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 862a7b53347c..69335760f4fe 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -55,7 +55,7 @@ namespace sw::sidebarwindows {
 
 namespace sw::annotation {
 
-class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public InterimItemWindow
+class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public InterimItemWindow
 {
     public:
         SwAnnotationWin( SwEditWin& rEditWin,
diff --git a/sw/inc/SwNodeNum.hxx b/sw/inc/SwNodeNum.hxx
index 61efa42f8c7a..81809630d3b8 100644
--- a/sw/inc/SwNodeNum.hxx
+++ b/sw/inc/SwNodeNum.hxx
@@ -26,7 +26,7 @@ class SwTextNode;
 struct SwPosition;
 class SwNumRule;
 
-class SAL_DLLPUBLIC_RTTI SwNodeNum : public SwNumberTreeNode
+class SAL_DLLPUBLIC_RTTI SwNodeNum final : public SwNumberTreeNode
 {
 public:
     explicit SwNodeNum(SwTextNode* pTextNode, bool isHiddenRedlines);
@@ -68,7 +68,7 @@ public:
     */
     const SwNodeNum* GetPrecedingNodeNumOf(const SwTextNode& rTextNode) const;
 
-protected:
+private:
     virtual SwNumberTreeNode* Create() const override;
 
     // --> #i64010#
@@ -80,7 +80,6 @@ protected:
     // method called at a child after this child has been removed from the list tree
     virtual void PostRemove() override;
 
-private:
     SwTextNode* const mpTextNode;
     SwNumRule* mpNumRule;
     bool m_isHiddenRedlines;
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index e17226829cef..f5d4909fd1b6 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -33,7 +33,7 @@
  */
 constexpr sal_uInt32 getSwDefaultTextFormat() { return NF_STANDARD_FORMAT_TEXT; }
 
-class SW_DLLPUBLIC SwTableBoxNumFormat : public SfxUInt32Item
+class SW_DLLPUBLIC SwTableBoxNumFormat final : public SfxUInt32Item
 {
 public:
     SwTableBoxNumFormat( sal_uInt32 nFormat = getSwDefaultTextFormat() );
@@ -49,7 +49,7 @@ public:
     }
 };
 
-class SAL_DLLPUBLIC_RTTI SwTableBoxFormula : public SfxPoolItem, public SwTableFormula
+class SW_DLLPUBLIC SwTableBoxFormula final : public SfxPoolItem, public SwTableFormula
 {
     sw::BroadcastingModify* m_pDefinedIn;   // Modify object where the formula is located
                             // can only be TableBoxFormat
@@ -75,7 +75,7 @@ public:
     void Calc( SwTableCalcPara& rCalcPara, double& rValue );
 };
 
-class SW_DLLPUBLIC SwTableBoxValue : public SfxPoolItem
+class SW_DLLPUBLIC SwTableBoxValue final : public SfxPoolItem
 {
     double m_nValue;
 public:
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
index a3934a8003dd..6f90bca53715 100644
--- a/sw/inc/cellfml.hxx
+++ b/sw/inc/cellfml.hxx
@@ -57,7 +57,7 @@ public:
     void SetLastTableBox( const SwTableBox* pBox )    { m_pLastTableBox = pBox; }
 };
 
-class SAL_DLLPUBLIC_RTTI SwTableFormula
+class SW_DLLPUBLIC SwTableFormula
 {
 typedef void (SwTableFormula::*FnScanFormula)( const SwTable&, OUStringBuffer&,
                                                 OUString&, OUString*, void* ) const;
@@ -121,7 +121,7 @@ public:
     SwTableFormula & operator =(SwTableFormula &&) = default;
 
     /// create from the internal formula (for CORE) the external formula (for UI)
-    SW_DLLPUBLIC void PtrToBoxNm( const SwTable* pTable );
+    void PtrToBoxNm( const SwTable* pTable );
     /// create from the external formula the internal
     void BoxNmToPtr( const SwTable* pTable );
     /// create from the external/internal formula the relative formula
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 070033306af4..5dd105e1fdb3 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -323,7 +323,7 @@ public:
     virtual std::unique_ptr<LockAllViewsGuard> LockAllViews() override;
 
 protected:
-    class LockAllViewsGuard_Impl : public LockAllViewsGuard
+    class LockAllViewsGuard_Impl final : public LockAllViewsGuard
     {
         std::vector<SwViewShell*> m_aViewWasUnLocked;
 
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 77925dd5f670..0413fef7917c 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -152,7 +152,7 @@ struct hash<std::pair<char,OUString>>
 
 
 // Iterator for Pool.
-class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
+class SwStyleSheetIterator final : public SfxStyleSheetIterator, public SfxListener
 {
     // Local helper class.
     class SwPoolFormatList
@@ -201,7 +201,7 @@ public:
     void InvalidateIterator();
 };
 
-class SwDocStyleSheetPool : public SfxStyleSheetBasePool
+class SwDocStyleSheetPool final : public SfxStyleSheetBasePool
 {
     rtl::Reference< SwDocStyleSheet > mxStyleSheet;
     SwDoc&              m_rDoc;
@@ -236,10 +236,9 @@ public:
 
     void InvalidateIterator();
 
-protected:
+private:
     virtual ~SwDocStyleSheetPool() override;
 
-private:
     SwDocStyleSheetPool( const SwDocStyleSheetPool& ) = delete;
 };
 
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 465379112c58..e82f9b23772f 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -196,7 +196,7 @@ inline sal_uInt16 SwSetExpFieldType::GetType() const
 inline const OUString& SwSetExpFieldType::GetSetRefName() const
     { return m_sName; }
 
-class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
+class SW_DLLPUBLIC SwSetExpField final : public SwFormulaField
 {
     double          m_fValueRLHidden; ///< SwValueField; hidden redlines
     OUString        msExpand;
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index 59c165cab701..05a190bd5e1d 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -31,7 +31,7 @@ struct SwPosition;
 class IntlWrapper;
 
 /// FlyAnchors
-class SW_DLLPUBLIC SwFormatAnchor: public SfxPoolItem
+class SW_DLLPUBLIC SwFormatAnchor final : public SfxPoolItem
 {
     std::unique_ptr<SwPosition> m_pContentAnchor; /**< 0 for page-bound frames.
                                                      Index for paragraph-bound frames.
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
index 9520f438e5d6..c521b45bd8bb 100644
--- a/sw/inc/fmtclbl.hxx
+++ b/sw/inc/fmtclbl.hxx
@@ -25,7 +25,7 @@
 #include "swdllapi.h"
 
 /// If text in multi-column sections should be evenly distributed.
-class SW_DLLPUBLIC SwFormatNoBalancedColumns : public SfxBoolItem
+class SW_DLLPUBLIC SwFormatNoBalancedColumns final : public SfxBoolItem
 {
 public:
     SwFormatNoBalancedColumns( bool bFlag = false )
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 1828e5f11eac..d560561d2c15 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -64,7 +64,7 @@ enum SwColLineAdj
     COLADJ_BOTTOM
 };
 
-class SW_DLLPUBLIC SwFormatCol : public SfxPoolItem
+class SW_DLLPUBLIC SwFormatCol final : public SfxPoolItem
 {
     SvxBorderLineStyle m_eLineStyle;     ///< style of the separator line
     sal_uLong   m_nLineWidth;                 ///< Width of the separator line.
diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
index e34299748e55..56184ab96b34 100644
--- a/sw/inc/fmtcnct.hxx
+++ b/sw/inc/fmtcnct.hxx
@@ -28,7 +28,7 @@
 class IntlWrapper;
 
 /// Connection (text flow) between two FlyFrames.
-class SW_DLLPUBLIC SwFormatChain: public SfxPoolItem
+class SW_DLLPUBLIC SwFormatChain final : public SfxPoolItem
 {
     SwClient m_aPrev, ///< Previous SwFlyFrameFormat (if existent).
              m_aNext; ///< Next SwFlyFrameFormat (if existent).
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
index afb8ce66fc01..f579dd1c1676 100644
--- a/sw/inc/fmtcntnt.hxx
+++ b/sw/inc/fmtcntnt.hxx
@@ -28,7 +28,7 @@ class SwNodeIndex;
 class SwStartNode;
 
 /// Content, content of frame (header, footer, fly).
-class SAL_DLLPUBLIC_RTTI SwFormatContent: public SfxPoolItem
+class SAL_DLLPUBLIC_RTTI SwFormatContent final : public SfxPoolItem
 {
     std::unique_ptr<SwNodeIndex> m_pStartNode;
 
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
index f3e2d5d6de18..15643f41d925 100644
--- a/sw/inc/fmteiro.hxx
+++ b/sw/inc/fmteiro.hxx
@@ -26,7 +26,7 @@
 
 class IntlWrapper;
 
-class SW_DLLPUBLIC SwFormatEditInReadonly : public SfxBoolItem
+class SW_DLLPUBLIC SwFormatEditInReadonly final : public SfxBoolItem
 {
 public:
     SwFormatEditInReadonly( sal_uInt16 nId = RES_EDIT_IN_READONLY,
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
index 01e6da304c4d..60e02a4163f1 100644
--- a/sw/inc/fmtfollowtextflow.hxx
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -26,7 +26,7 @@
 
 class IntlWrapper;
 
-class SW_DLLPUBLIC SwFormatFollowTextFlow : public SfxBoolItem
+class SW_DLLPUBLIC SwFormatFollowTextFlow final : public SfxBoolItem
 {
 public:
 
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
index d9f922a1272f..6c08df6e340a 100644
--- a/sw/inc/fmtfordr.hxx
+++ b/sw/inc/fmtfordr.hxx
@@ -33,7 +33,7 @@ enum SwFillOrder
     SW_FILL_ORDER_END
 };
 
-class SwFormatFillOrder: public SfxEnumItem<SwFillOrder>
+class SwFormatFillOrder final : public SfxEnumItem<SwFillOrder>
 {
 public:
     SwFormatFillOrder( SwFillOrder = ATT_TOP_DOWN );
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index cf890371a2f1..9f8676c87dda 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -40,7 +40,7 @@ enum class SwFrameSize
                     (can be exceeded but not be less). */
 };
 
-class SW_DLLPUBLIC SwFormatFrameSize: public SvxSizeItem
+class SW_DLLPUBLIC SwFormatFrameSize final : public SvxSizeItem
 {
     SwFrameSize m_eFrameHeightType;
     SwFrameSize m_eFrameWidthType;
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
index c3783178b714..b8db58f8c1ed 100644
--- a/sw/inc/fmtftntx.hxx
+++ b/sw/inc/fmtftntx.hxx
@@ -81,7 +81,7 @@ public:
     void SetSuffix(const OUString& rSet)   { m_sSuffix = rSet; }
 };
 
-class SW_DLLPUBLIC SwFormatFootnoteAtTextEnd : public SwFormatFootnoteEndAtTextEnd
+class SW_DLLPUBLIC SwFormatFootnoteAtTextEnd final : public SwFormatFootnoteEndAtTextEnd
 {
 public:
     SwFormatFootnoteAtTextEnd( SwFootnoteEndPosEnum ePos = FTNEND_ATPGORDOCEND )
@@ -91,7 +91,7 @@ public:
     virtual SwFormatFootnoteAtTextEnd* Clone( SfxItemPool *pPool = nullptr ) const override;
 };
 
-class SW_DLLPUBLIC SwFormatEndAtTextEnd : public SwFormatFootnoteEndAtTextEnd
+class SW_DLLPUBLIC SwFormatEndAtTextEnd final : public SwFormatFootnoteEndAtTextEnd
 {
 public:
     SwFormatEndAtTextEnd( SwFootnoteEndPosEnum ePos = FTNEND_ATPGORDOCEND )
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index 1a9e634dc91b..fb68df76c0fa 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -30,7 +30,7 @@ class IntlWrapper;
  /** Header, for PageFormats
  Client of FrameFormat describing the header. */
 
-class SW_DLLPUBLIC SwFormatHeader: public SfxPoolItem, public SwClient
+class SW_DLLPUBLIC SwFormatHeader final : public SfxPoolItem, public SwClient
 {
     bool m_bActive;       ///< Only for controlling (creation of content).
 
@@ -61,7 +61,7 @@ public:
  /**Footer, for pageformats
  Client of FrameFormat describing the footer */
 
-class SW_DLLPUBLIC SwFormatFooter: public SfxPoolItem, public SwClient
+class SW_DLLPUBLIC SwFormatFooter final : public SfxPoolItem, public SwClient
 {
     bool m_bActive;       // Only for controlling (creation of content).
 
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
index 82a444829f77..7eaf2e29221b 100644
--- a/sw/inc/fmtline.hxx
+++ b/sw/inc/fmtline.hxx
@@ -27,7 +27,7 @@
 
 class IntlWrapper;
 
-class SW_DLLPUBLIC SwFormatLineNumber: public SfxPoolItem
+class SW_DLLPUBLIC SwFormatLineNumber final : public SfxPoolItem
 {
     sal_uLong m_nStartValue   :24; ///< Starting value for the paragraph. 0 == no starting value.
     bool      m_bCountLines   :1;  ///< Also count lines of paragraph.
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
index 4d473f29b26a..75feda2a04aa 100644
--- a/sw/inc/fmtlsplt.hxx
+++ b/sw/inc/fmtlsplt.hxx
@@ -26,7 +26,7 @@
 
 class IntlWrapper;
 
-class SW_DLLPUBLIC SwFormatLayoutSplit : public SfxBoolItem
+class SW_DLLPUBLIC SwFormatLayoutSplit final : public SfxBoolItem
 {
 public:
     SwFormatLayoutSplit( bool bSplit = true ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 441a7d5e6e68..ab98b5537f3e 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -87,7 +87,7 @@ namespace sw {
     class MetaFieldManager;
 }
 
-class SwFormatMeta
+class SwFormatMeta final
     : public SfxPoolItem
 {
 private:
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index 59afdb46f26a..504c24e2da28 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -30,7 +30,7 @@
 
 class IntlWrapper;
 
-class SW_DLLPUBLIC SwFormatVertOrient: public SfxPoolItem
+class SW_DLLPUBLIC SwFormatVertOrient final : public SfxPoolItem
 {
     SwTwips         m_nYPos;  ///< Contains *always* the current RelPos.
     sal_Int16       m_eOrient;
@@ -62,7 +62,7 @@ public:
     void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
-class SW_DLLPUBLIC SwFormatHoriOrient: public SfxPoolItem
+class SW_DLLPUBLIC SwFormatHoriOrient final : public SfxPoolItem
 {
     SwTwips         m_nXPos;              ///< Contains *always* the current RelPos.
     sal_Int16       m_eOrient;
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index f66eb3db4128..c9617624a682 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -32,12 +32,12 @@ class IntlWrapper;
 /** Pagedescriptor
  Client of SwPageDesc that is "described" by the attribute. */
 
-class SW_DLLPUBLIC SwFormatPageDesc : public SfxPoolItem, public SwClient
+class SW_DLLPUBLIC SwFormatPageDesc final : public SfxPoolItem, public SwClient
 {
     ::std::optional<sal_uInt16> m_oNumOffset;          ///< Offset page number.
     sw::BroadcastingModify* m_pDefinedIn;       /**< Points to the object in which the
                                  attribute was set (ContentNode/Format). */
-protected:
+
     virtual void SwClientNotify( const SwModify&, const SfxHint& rHint ) override;
 
 public:
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
index f216aba8766b..c9aad4a80078 100644
--- a/sw/inc/fmtrowsplt.hxx
+++ b/sw/inc/fmtrowsplt.hxx
@@ -26,7 +26,7 @@
 
 class IntlWrapper;
 
-class SW_DLLPUBLIC SwFormatRowSplit : public SfxBoolItem
+class SW_DLLPUBLIC SwFormatRowSplit final : public SfxBoolItem
 {
 public:
     SwFormatRowSplit( bool bSplit = true ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index e672d84f06eb..77d2a3c9d16d 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -28,7 +28,7 @@
 class IntlWrapper;
 
 // SwFormatSurround: How document content under the frame shall behave.
-class SW_DLLPUBLIC SwFormatSurround: public SfxEnumItem<css::text::WrapTextMode>
+class SW_DLLPUBLIC SwFormatSurround final : public SfxEnumItem<css::text::WrapTextMode>
 {
     bool    m_bAnchorOnly :1;
     bool    m_bContour    :1;
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
index 0f14b6dd3648..c5418cd3c4b2 100644
--- a/sw/inc/fmturl.hxx
+++ b/sw/inc/fmturl.hxx
@@ -30,7 +30,7 @@ class IntlWrapper;
 
 // URL, ServerMap and ClientMap
 
-class SW_DLLPUBLIC SwFormatURL: public SfxPoolItem
+class SW_DLLPUBLIC SwFormatURL final : public SfxPoolItem
 {
     OUString  m_sTargetFrameName; ///< Target frame for URL.
     OUString  m_sURL;             ///< Simple URL.
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
index 84d3961a3a5d..1166c341c6fc 100644
--- a/sw/inc/fmtwrapinfluenceonobjpos.hxx
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -25,7 +25,7 @@
 #include <svl/poolitem.hxx>
 #include <com/sun/star/text/WrapInfluenceOnPosition.hpp>
 
-class SW_DLLPUBLIC SwFormatWrapInfluenceOnObjPos: public SfxPoolItem
+class SW_DLLPUBLIC SwFormatWrapInfluenceOnObjPos final : public SfxPoolItem
 {
 private:
     sal_Int16 mnWrapInfluenceOnPosition;
diff --git a/sw/inc/frameformats.hxx b/sw/inc/frameformats.hxx
index 92b34d49e252..54ad87fa87f8 100644
--- a/sw/inc/frameformats.hxx
+++ b/sw/inc/frameformats.hxx
@@ -44,7 +44,7 @@ typedef boost::multi_index_container<
     SwFrameFormatsBase;
 
 /// Specific frame formats (frames, DrawObjects).
-class SW_DLLPUBLIC SwFrameFormats : public SwFormatsBase
+class SW_DLLPUBLIC SwFrameFormats final : public SwFormatsBase
 {
     // function updating ByName index via modify
     friend void SwFrameFormat::SetName(const OUString&, bool);
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 316db344a2b8..71f9a59e312c 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -349,7 +349,7 @@ namespace sw
     };
 }
 
-class SW_DLLPUBLIC SwDrawFrameFormat: public SwFrameFormat
+class SW_DLLPUBLIC SwDrawFrameFormat final : public SwFrameFormat
 {
     friend class SwDoc;
 
@@ -365,7 +365,6 @@ class SW_DLLPUBLIC SwDrawFrameFormat: public SwFrameFormat
 
     bool mbPosAttrSet;
 
-protected:
     SwDrawFrameFormat( SwAttrPool& rPool, const OUString &rFormatNm,
                     SwFrameFormat *pDrvdFrame )
         : SwFrameFormat( rPool, rFormatNm, pDrvdFrame, RES_DRAWFRMFMT ),
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index 05bf13ae591c..34c9454d83b5 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -36,7 +36,7 @@ enum class MirrorGraph
     Both
 };
 
-class SW_DLLPUBLIC SwMirrorGrf : public SfxEnumItem<MirrorGraph>
+class SW_DLLPUBLIC SwMirrorGrf final : public SfxEnumItem<MirrorGraph>
 {
     bool m_bGrfToggle; // Flip graphics on even pages.
 
@@ -66,7 +66,7 @@ public:
     void SetGrfToggle( bool bNew )   { m_bGrfToggle = bNew; }
 };
 
-class SW_DLLPUBLIC SwCropGrf : public SvxGrfCrop
+class SW_DLLPUBLIC SwCropGrf final : public SvxGrfCrop
 {
 public:
     SwCropGrf();
@@ -77,7 +77,7 @@ public:
     virtual SwCropGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
 };
 
-class SAL_DLLPUBLIC_RTTI SwRotationGrf : public SfxUInt16Item
+class SAL_DLLPUBLIC_RTTI SwRotationGrf final : public SfxUInt16Item
 {
 private:
     Size m_aUnrotatedSize;
@@ -110,7 +110,7 @@ public:
     void SetValue(Degree10 d) { SfxUInt16Item::SetValue(d.get()); }
 };
 
-class SW_DLLPUBLIC SwLuminanceGrf : public SfxInt16Item
+class SW_DLLPUBLIC SwLuminanceGrf final : public SfxInt16Item
 {
 public:
     SwLuminanceGrf( sal_Int16 nVal = 0 )
@@ -126,7 +126,7 @@ public:
                                   const IntlWrapper& rIntl ) const override;
 };
 
-class SW_DLLPUBLIC SwContrastGrf : public SfxInt16Item
+class SW_DLLPUBLIC SwContrastGrf final : public SfxInt16Item
 {
 public:
     SwContrastGrf( sal_Int16 nVal = 0 )
@@ -158,7 +158,7 @@ public:
                                   const IntlWrapper& rIntl ) const override;
 };
 
-class SwChannelRGrf : public SwChannelGrf
+class SwChannelRGrf final : public SwChannelGrf
 {
 public:
     SwChannelRGrf( sal_Int16 nVal = 0 )
@@ -166,7 +166,7 @@ public:
     {}
     virtual SwChannelRGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
 };
-class SwChannelGGrf : public SwChannelGrf
+class SwChannelGGrf final : public SwChannelGrf
 {
 public:
     SwChannelGGrf( sal_Int16 nVal = 0 )
@@ -174,7 +174,7 @@ public:
     {}
     virtual SwChannelGGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
 };
-class SwChannelBGrf : public SwChannelGrf
+class SwChannelBGrf final : public SwChannelGrf
 {
 public:
     SwChannelBGrf( sal_Int16 nVal = 0 )
@@ -183,7 +183,7 @@ public:
     virtual SwChannelBGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
 };
 
-class SW_DLLPUBLIC SwGammaGrf : public SfxPoolItem
+class SW_DLLPUBLIC SwGammaGrf final : public SfxPoolItem
 {
     double m_nValue;
 public:
@@ -211,7 +211,7 @@ public:
     const double& GetValue() const              { return m_nValue; }
 };
 
-class SwInvertGrf: public SfxBoolItem
+class SwInvertGrf final : public SfxBoolItem
 {
 public:
     SwInvertGrf( bool bVal = false )
@@ -227,7 +227,7 @@ public:
                                   const IntlWrapper& rIntl ) const override;
 };
 
-class SwTransparencyGrf : public SfxByteItem
+class SwTransparencyGrf final : public SfxByteItem
 {
 public:
     SwTransparencyGrf( sal_Int8 nVal = 0 )
@@ -254,7 +254,7 @@ protected:
         SfxEnumItem(RES_GRFATR_DRAWMODE, nMode) {}
 };
 
-class SW_DLLPUBLIC SwDrawModeGrf : public SwDrawModeGrf_Base
+class SW_DLLPUBLIC SwDrawModeGrf final : public SwDrawModeGrf_Base
 {
 public:
     SwDrawModeGrf( GraphicDrawMode nMode = GraphicDrawMode::Standard )
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
index 4b061bd50dde..a18ae742a3a0 100644
--- a/sw/inc/hfspacingitem.hxx
+++ b/sw/inc/hfspacingitem.hxx
@@ -25,7 +25,7 @@
 
 class IntlWrapper;
 
-class SW_DLLPUBLIC SwHeaderAndFooterEatSpacingItem : public SfxBoolItem
+class SW_DLLPUBLIC SwHeaderAndFooterEatSpacingItem final : public SfxBoolItem
 {
 public:
     SwHeaderAndFooterEatSpacingItem( sal_uInt16 nId = RES_HEADER_FOOTER_EAT_SPACING,
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index 17874777c882..accde1e11ba9 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -30,7 +30,7 @@ class SwWrtShell;
 struct SwConversionArgs;
 class SwPaM;
 
-class SW_DLLPUBLIC SwHHCWrapper : public editeng::HangulHanjaConversion
+class SW_DLLPUBLIC SwHHCWrapper final : public editeng::HangulHanjaConversion
 {
     SwView *    m_pView;
     VclPtr<vcl::Window>     m_pWin;
@@ -70,7 +70,6 @@ class SW_DLLPUBLIC SwHHCWrapper : public editeng::HangulHanjaConversion
                             SwPaM *pCursor );
     void        ChangeText_impl( const OUString &rNewText, bool bKeepAttributes );
 
-protected:
     virtual void    GetNextPortion( OUString& rNextPortion,
                             LanguageType& rLangOfPortion,
                             bool bAllowImplicitChangesForNotConvertibleText ) override;
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 53e2a79d0068..6639aefb5f97 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -339,7 +339,7 @@ private:
 };
 
 /// Ends a section of nodes in the document model.
-class SwEndNode : public SwNode
+class SwEndNode final : public SwNode
 {
     friend class SwNodes;
     friend class SwTableNode;       ///< To enable creation of its EndNote.
@@ -348,10 +348,8 @@ class SwEndNode : public SwNode
     /// for the initial StartNode
     SwEndNode( SwNodes& rNodes, sal_uLong nPos, SwStartNode& rSttNd );
 
-protected:
     SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd );
 
-private:
     SwEndNode( const SwEndNode & rNode ) = delete;
     SwEndNode & operator= ( const SwEndNode & rNode ) = delete;
 };
@@ -488,11 +486,11 @@ private:
 
 // SwTableNode
 
-class SW_DLLPUBLIC SwTableNode : public SwStartNode, public sw::BroadcastingModify
+class SW_DLLPUBLIC SwTableNode final : public SwStartNode, public sw::BroadcastingModify
 {
     friend class SwNodes;
     std::unique_ptr<SwTable> m_pTable;
-protected:
+
     virtual ~SwTableNode() override;
 
 public:
@@ -524,7 +522,7 @@ private:
     SwTableNode & operator= ( const SwTableNode & rNode ) = delete;
 };
 
-class SAL_DLLPUBLIC_RTTI SwSectionNode
+class SAL_DLLPUBLIC_RTTI SwSectionNode final
     : public SwStartNode
 {
     friend class SwNodes;
@@ -535,7 +533,6 @@ private:
 
     std::unique_ptr<SwSection> const m_pSection;
 
-protected:
     virtual ~SwSectionNode() override;
 
 public:
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index efeb6539b400..382bbb5f00cd 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -135,7 +135,7 @@ namespace o3tl {
     template<> struct typed_flags<UseOnPage> : is_typed_flags<UseOnPage, 0xffff> {};
 }
 
-class SW_DLLPUBLIC SwPageDesc
+class SW_DLLPUBLIC SwPageDesc final
     : public sw::BroadcastingModify
 {
     friend class SwDoc;
@@ -190,7 +190,6 @@ class SW_DLLPUBLIC SwPageDesc
         const OUString &mName;
     };
 
-protected:
     virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
 
 public:
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index 241397937b17..c6848491f8e9 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -59,7 +59,7 @@ namespace sw {
    DropCaps. If it is not a Client, formatting uses the CharFormat of the paragraph.
    If the CharFormat is modified, this change is propagated to the paragraphs
    via the Modify of SwFormatDrop. */
-class SW_DLLPUBLIC SwFormatDrop: public SfxPoolItem, public SwClient
+class SW_DLLPUBLIC SwFormatDrop final : public SfxPoolItem, public SwClient
 {
     sw::FormatDropDefiner* m_pDefinedIn;  ///< TextNode or FormatColl that contains the CapDrops.
     sal_uInt16 m_nDistance;       ///< Distance to beginning of text.
@@ -78,7 +78,6 @@ private:
     // @@@ public copy ctor, but no copy assignment?
     SwFormatDrop & operator= (const SwFormatDrop &) = delete;
 
-protected:
     virtual void SwClientNotify(const SwModify&, const SfxHint&) override
     {
         if (!m_pDefinedIn)
@@ -122,7 +121,7 @@ public:
             { m_pDefinedIn = const_cast<sw::FormatDropDefiner*>(pDefiner); };
 };
 
-class SwRegisterItem : public SfxBoolItem
+class SwRegisterItem final : public SfxBoolItem
 {
 public:
     static SfxPoolItem* CreateDefault();
@@ -142,7 +141,7 @@ inline SwRegisterItem::SwRegisterItem( const bool bRegister ) :
     SfxBoolItem( RES_PARATR_REGISTER, bRegister )
 {}
 
-class SW_DLLPUBLIC SwNumRuleItem : public SfxStringItem
+class SW_DLLPUBLIC SwNumRuleItem final : public SfxStringItem
 {
 public:
     static SfxPoolItem* CreateDefault();
@@ -170,7 +169,7 @@ public:
     void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
-class SwParaConnectBorderItem : public SfxBoolItem
+class SwParaConnectBorderItem final : public SfxBoolItem
 {
 public:
 
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 8d352b2b423c..5a25a7d83aff 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -149,7 +149,7 @@ public:
     OUString GetDescr() const;
 };
 
-class SW_DLLPUBLIC SwRangeRedline : public SwPaM
+class SW_DLLPUBLIC SwRangeRedline final : public SwPaM
 {
     SwRedlineData* m_pRedlineData;
     SwNodeIndex* m_pContentSect;
@@ -277,7 +277,7 @@ public:
 };
 
 /// Redline that holds information about a table-row that had some change
-class SW_DLLPUBLIC SwTableRowRedline : public SwExtraRedline
+class SW_DLLPUBLIC SwTableRowRedline final : public SwExtraRedline
 {
 private:
     SwRedlineData m_aRedlineData;
@@ -298,7 +298,7 @@ public:
 };
 
 /// Redline that holds information about a table-cell that had some change
-class SW_DLLPUBLIC SwTableCellRedline : public SwExtraRedline
+class SW_DLLPUBLIC SwTableCellRedline final : public SwExtraRedline
 {
 private:
     SwRedlineData m_aRedlineData;
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 6b27c9ea21e4..8838c54ec76e 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -348,7 +348,7 @@ public:
 };
 
 /// SwTableLine is one table row in the document model.
-class SW_DLLPUBLIC SwTableLine: public SwClient     // Client of FrameFormat.
+class SW_DLLPUBLIC SwTableLine final : public SwClient     // Client of FrameFormat.
 {
     SwTableBoxes m_aBoxes;
     SwTableBox *m_pUpper;
@@ -389,7 +389,7 @@ public:
 };
 
 /// SwTableBox is one table cell in the document model.
-class SW_DLLPUBLIC SwTableBox: public SwClient      //Client of FrameFormat.
+class SW_DLLPUBLIC SwTableBox final : public SwClient      //Client of FrameFormat.
 {
     friend class SwNodes;           // Transpose index.
     friend void DelBoxNode(SwTableSortBoxes const &);  // Delete StartNode* !
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
index 8e4977344f38..4afcb24d9d92 100644
--- a/sw/inc/tgrditem.hxx
+++ b/sw/inc/tgrditem.hxx
@@ -29,7 +29,7 @@ class IntlWrapper;
 
 enum SwTextGrid { GRID_NONE, GRID_LINES_ONLY, GRID_LINES_CHARS };
 
-class SW_DLLPUBLIC SwTextGridItem : public SfxPoolItem
+class SW_DLLPUBLIC SwTextGridItem final : public SfxPoolItem
 {
 private:
     Color m_aColor;
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index 55e094842c03..558ed937a724 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -30,7 +30,7 @@ namespace sw {
     class MetaFieldManager;
 }
 
-class SwTextCharFormat : public SwTextAttrEnd
+class SwTextCharFormat final : public SwTextAttrEnd
 {
     SwTextNode * m_pTextNode;
     sal_uInt16 m_nSortNumber;
diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx
index b580039446ab..a4a0de1d609b 100644
--- a/sw/inc/txtflcnt.hxx
+++ b/sw/inc/txtflcnt.hxx
@@ -27,7 +27,7 @@ class SwTextNode;
 class SwDoc;
 
 // Attribute for line-bound frames (without end index).
-class SwTextFlyCnt : public SwTextAttr
+class SwTextFlyCnt final : public SwTextAttr
 {
     SwFlyInContentFrame  *GetFlyFrame_( const SwFrame *pCurrFrame );
 public:
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index c451b89e7abe..cd3af3c2074e 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -28,7 +28,7 @@ class SwNodes;
 class SwDoc;
 class SwRootFrame;
 
-class SW_DLLPUBLIC SwTextFootnote : public SwTextAttr
+class SW_DLLPUBLIC SwTextFootnote final : public SwTextAttr
 {
     std::unique_ptr<SwNodeIndex> m_pStartNode;
     SwTextNode * m_pTextNode;
diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx
index c8261c0e5ce4..0d25090197c1 100644
--- a/sw/inc/txtrfmrk.hxx
+++ b/sw/inc/txtrfmrk.hxx
@@ -24,7 +24,7 @@
 class SwTextNode;
 
 // Attribute for content-/position references in text.
-class SwTextRefMark : public SwTextAttrEnd
+class SwTextRefMark final : public SwTextAttrEnd
 {
     SwTextNode * m_pTextNode;
     sal_Int32 * m_pEnd; // end is optional (point reference)
diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx
index 4606fd597a99..96239e947e3b 100644
--- a/sw/inc/txttxmrk.hxx
+++ b/sw/inc/txttxmrk.hxx
@@ -25,7 +25,7 @@ class SwTextNode;
 class SwDoc;
 
 // Attribute for indices/tables of contents.
-class SAL_DLLPUBLIC_RTTI SwTextTOXMark : public SwTextAttrEnd
+class SAL_DLLPUBLIC_RTTI SwTextTOXMark final : public SwTextAttrEnd
 {
     SwTextNode * m_pTextNode;
     sal_Int32 * m_pEnd;   // 0 if SwTOXMark without AlternativeText
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index d48db259c77d..2e7ea18740a3 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -317,7 +317,7 @@ public:
 
 };
 
-class SwUndoInsLayFormat : public SwUndoFlyBase
+class SwUndoInsLayFormat final : public SwUndoFlyBase
 {
     sal_uLong mnCursorSaveIndexPara;           // Cursor position
     sal_Int32 mnCursorSaveIndexPos;            // for undo
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index e4e5f3a40272..28a4dc612357 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -261,11 +261,10 @@ public:
     static void AddExistingShapeToFormat( SdrObject const & _rObj );
 };
 
-class SwXGroupShape :
+class SwXGroupShape final :
     public SwXShape,
     public css::drawing::XShapes
 {
-protected:
     virtual ~SwXGroupShape() override;
 public:
     SwXGroupShape(css::uno::Reference<css::uno::XInterface> & xShape, SwDoc const* pDoc);
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index bac33118dd71..5e2619819095 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -614,7 +614,7 @@ enum class SwCreateDrawTable {
     Dash = 1, Gradient, Hatch, Bitmap, TransGradient, Marker, Defaults
 };
 
-class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
+class SwXDocumentPropertyHelper final : public SvxUnoForbiddenCharsTable
 {
     css::uno::Reference < css::uno::XInterface > m_xDashTable;
     css::uno::Reference < css::uno::XInterface > m_xGradientTable;
diff --git a/sw/source/core/inc/DateFormFieldButton.hxx b/sw/source/core/inc/DateFormFieldButton.hxx
index a03bfc9117be..3d74706a8a5d 100644
--- a/sw/source/core/inc/DateFormFieldButton.hxx
+++ b/sw/source/core/inc/DateFormFieldButton.hxx
@@ -23,7 +23,7 @@ class DateFieldmark;
  * This button is shown when the cursor is on a date form field.
  * The user can select a date from a date picker while filling in a form.
  */
-class DateFormFieldButton : public FormFieldButton
+class DateFormFieldButton final : public FormFieldButton
 {
 private:
     SvNumberFormatter* m_pNumberFormatter;
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index b3cabeb85dab..3b2d82d75b6b 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -31,7 +31,7 @@ class SwHistory;
 namespace sw
 {
 
-class DocumentContentOperationsManager : public IDocumentContentOperations
+class DocumentContentOperationsManager final : public IDocumentContentOperations
 {
 public:
     DocumentContentOperationsManager( SwDoc& i_rSwdoc );
diff --git a/sw/source/core/inc/DocumentRedlineManager.hxx b/sw/source/core/inc/DocumentRedlineManager.hxx
index 9f3a3e8bf806..ffdd07f0f8fa 100644
--- a/sw/source/core/inc/DocumentRedlineManager.hxx
+++ b/sw/source/core/inc/DocumentRedlineManager.hxx
@@ -28,7 +28,7 @@ class SwDoc;
 namespace sw
 {
 
-class SAL_DLLPUBLIC_RTTI DocumentRedlineManager : public IDocumentRedlineAccess
+class SAL_DLLPUBLIC_RTTI DocumentRedlineManager final : public IDocumentRedlineAccess
 {
 public:
     DocumentRedlineManager( SwDoc& i_rSwdoc );
diff --git a/sw/source/core/inc/DropDownFormFieldButton.hxx b/sw/source/core/inc/DropDownFormFieldButton.hxx
index 9853c57a3116..6f8aa42edd1d 100644
--- a/sw/source/core/inc/DropDownFormFieldButton.hxx
+++ b/sw/source/core/inc/DropDownFormFieldButton.hxx
@@ -21,7 +21,7 @@ class DropDownFieldmark;
  * This button is shown when the cursor is on a drop-down form field.
  * The user can select an item of the field using this button while filling in a form.
  */
-class DropDownFormFieldButton : public FormFieldButton
+class DropDownFormFieldButton final : public FormFieldButton
 {
 private:
     std::unique_ptr<weld::TreeView> m_xTreeView;
diff --git a/sw/source/core/inc/SwUndoFmt.hxx b/sw/source/core/inc/SwUndoFmt.hxx
index f02776339c90..499a6fcd65b3 100644
--- a/sw/source/core/inc/SwUndoFmt.hxx
+++ b/sw/source/core/inc/SwUndoFmt.hxx
@@ -121,21 +121,21 @@ public:
     virtual SwFormat * Find(const OUString & rName) const override;
 };
 
-class SwUndoCondTextFormatCollCreate : public SwUndoTextFormatCollCreate
+class SwUndoCondTextFormatCollCreate final : public SwUndoTextFormatCollCreate
 {
 public:
     SwUndoCondTextFormatCollCreate(SwConditionTextFormatColl * pNew, SwTextFormatColl const * pDerivedFrom, SwDoc& rDoc);
     virtual SwFormat * Create(SwFormat * pDerivedFrom) override;
 };
 
-class SwUndoCondTextFormatCollDelete : public SwUndoTextFormatCollDelete
+class SwUndoCondTextFormatCollDelete final : public SwUndoTextFormatCollDelete
 {
 public:
     SwUndoCondTextFormatCollDelete(SwTextFormatColl const * pOld, SwDoc& rDoc);
     virtual SwFormat * Create(SwFormat * pDerivedFrom) override;
 };
 
-class SwUndoRenameFormatColl : public SwUndoRenameFormat
+class SwUndoRenameFormatColl final : public SwUndoRenameFormat
 {
 public:
     SwUndoRenameFormatColl(const OUString & sOldName,
@@ -145,7 +145,7 @@ public:
     virtual SwFormat * Find(const OUString & rName) const override;
 };
 
-class SwUndoCharFormatCreate : public SwUndoFormatCreate
+class SwUndoCharFormatCreate final : public SwUndoFormatCreate
 {
 public:
     SwUndoCharFormatCreate(SwCharFormat * pNew, SwCharFormat const * pDerivedFrom,
@@ -156,7 +156,7 @@ public:
     virtual SwFormat * Find(const OUString & rName) const override;
 };
 
-class SwUndoCharFormatDelete : public SwUndoFormatDelete
+class SwUndoCharFormatDelete final : public SwUndoFormatDelete
 {
 public:
     SwUndoCharFormatDelete(SwCharFormat const * pOld, SwDoc& rDoc);
@@ -166,7 +166,7 @@ public:
     virtual SwFormat * Find(const OUString & rName) const override;
 };
 
-class SwUndoRenameCharFormat : public SwUndoRenameFormat
+class SwUndoRenameCharFormat final : public SwUndoRenameFormat
 {
 public:
     SwUndoRenameCharFormat(const OUString & sOldName,
@@ -176,7 +176,7 @@ public:
     virtual SwFormat * Find(const OUString & rName) const override;
 };
 
-class SwUndoFrameFormatCreate : public SwUndoFormatCreate
+class SwUndoFrameFormatCreate final : public SwUndoFormatCreate
 {
 public:
     SwUndoFrameFormatCreate(SwFrameFormat * pNew, SwFrameFormat const * pDerivedFrom,
@@ -187,7 +187,7 @@ public:
     virtual SwFormat * Find(const OUString & rName) const override;
 };
 
-class SwUndoFrameFormatDelete : public SwUndoFormatDelete
+class SwUndoFrameFormatDelete final : public SwUndoFormatDelete
 {
 public:
     SwUndoFrameFormatDelete(SwFrameFormat const * pOld, SwDoc& rDoc);
@@ -197,7 +197,7 @@ public:
     virtual SwFormat * Find(const OUString & rName) const override;
 };
 
-class SwUndoRenameFrameFormat : public SwUndoRenameFormat
+class SwUndoRenameFrameFormat final : public SwUndoRenameFormat
 {
 public:
     SwUndoRenameFrameFormat(const OUString & sOldName,
@@ -207,7 +207,7 @@ public:
     virtual SwFormat * Find(const OUString & rName) const override;
 };
 
-class SwUndoNumruleCreate : public SwUndo
+class SwUndoNumruleCreate final : public SwUndo
 {
     const SwNumRule * m_pNew;
     mutable SwNumRule m_aNew;
@@ -223,7 +223,7 @@ public:
     SwRewriter GetRewriter() const override;
 };
 
-class SwUndoNumruleDelete : public SwUndo
+class SwUndoNumruleDelete final : public SwUndo
 {
     SwNumRule m_aOld;
     SwDoc& m_rDoc;
@@ -237,7 +237,7 @@ public:
     SwRewriter GetRewriter() const override;
 };
 
-class SwUndoNumruleRename : public SwUndo
+class SwUndoNumruleRename final : public SwUndo
 {
     OUString m_aOldName, m_aNewName;
     SwDoc& m_rDoc;
diff --git a/sw/source/core/inc/SwUndoPageDesc.hxx b/sw/source/core/inc/SwUndoPageDesc.hxx
index acdaed7cc259..c8d88f6cbd04 100644
--- a/sw/source/core/inc/SwUndoPageDesc.hxx
+++ b/sw/source/core/inc/SwUndoPageDesc.hxx
@@ -25,7 +25,7 @@
 
 class SwDoc;
 
-class SwUndoPageDesc : public SwUndo
+class SwUndoPageDesc final : public SwUndo
 {
     SwPageDescExt m_aOld, m_aNew;
     SwDoc * m_pDoc;
@@ -45,7 +45,7 @@ public:
     virtual SwRewriter GetRewriter() const override;
 };
 
-class SwUndoPageDescCreate : public SwUndo
+class SwUndoPageDescCreate final : public SwUndo
 {
     const SwPageDesc * m_pDesc;
     SwPageDescExt m_aNew;
@@ -64,7 +64,7 @@ public:
     virtual SwRewriter GetRewriter() const override;
 };
 
-class SwUndoPageDescDelete : public SwUndo
+class SwUndoPageDescDelete final : public SwUndo
 {
     SwPageDescExt m_aOld;
     SwDoc * m_pDoc;
diff --git a/sw/source/core/inc/SwUndoTOXChange.hxx b/sw/source/core/inc/SwUndoTOXChange.hxx
index b3acd453fc75..b3b5d57a88cc 100644
--- a/sw/source/core/inc/SwUndoTOXChange.hxx
+++ b/sw/source/core/inc/SwUndoTOXChange.hxx
@@ -25,7 +25,7 @@
 class SwDoc;
 class SwTOXBaseSection;
 
-class SwUndoTOXChange : public SwUndo
+class SwUndoTOXChange final : public SwUndo
 {
 private:
     SwTOXBase m_Old;
diff --git a/sw/source/core/inc/SwXMLBlockExport.hxx b/sw/source/core/inc/SwXMLBlockExport.hxx
index d9db25cbd9c0..0468cab1912e 100644
--- a/sw/source/core/inc/SwXMLBlockExport.hxx
+++ b/sw/source/core/inc/SwXMLBlockExport.hxx
@@ -41,7 +41,7 @@ public:
     void ExportContent_() override {}
 };
 
-class SwXMLTextBlockExport : public SvXMLExport
+class SwXMLTextBlockExport final : public SvXMLExport
 {
 private:
     SwXMLTextBlocks &m_rBlockList;
diff --git a/sw/source/core/inc/UndoAttribute.hxx b/sw/source/core/inc/UndoAttribute.hxx
index 4aa7001db613..c1387cbda734 100644
--- a/sw/source/core/inc/UndoAttribute.hxx
+++ b/sw/source/core/inc/UndoAttribute.hxx
@@ -34,7 +34,7 @@ class SwFootnoteInfo;
 class SwEndNoteInfo;
 class SwDoc;
 
-class SwUndoAttr : public SwUndo, private SwUndRng
+class SwUndoAttr final : public SwUndo, private SwUndRng
 {
     SfxItemSet m_AttrSet;                           // attributes for Redo
     const std::unique_ptr<SwHistory> m_pHistory;      // History for Undo
@@ -61,7 +61,7 @@ public:
     SwHistory& GetHistory() { return *m_pHistory; }
 };
 
-class SwUndoResetAttr : public SwUndo, private SwUndRng
+class SwUndoResetAttr final : public SwUndo, private SwUndRng
 {
     const std::unique_ptr<SwHistory> m_pHistory;
     o3tl::sorted_vector<sal_uInt16> m_Ids;
@@ -82,7 +82,7 @@ public:
     SwHistory& GetHistory() { return *m_pHistory; }
 };
 
-class SwUndoFormatAttr : public SwUndo
+class SwUndoFormatAttr final : public SwUndo
 {
     friend class SwUndoDefaultAttr;
     OUString m_sFormatName;
@@ -127,7 +127,7 @@ public:
 };
 
 // --> OD 2008-02-12 #newlistlevelattrs#
-class SwUndoFormatResetAttr : public SwUndo
+class SwUndoFormatResetAttr final : public SwUndo
 {
     public:
         SwUndoFormatResetAttr( SwFormat& rChangedFormat,
@@ -146,7 +146,7 @@ class SwUndoFormatResetAttr : public SwUndo
         std::unique_ptr<SfxPoolItem> m_pOldItem;
 };
 
-class SwUndoDontExpandFormat : public SwUndo
+class SwUndoDontExpandFormat final : public SwUndo
 {
     const sal_uLong m_nNodeIndex;
     const sal_Int32 m_nContentIndex;
@@ -176,7 +176,7 @@ public:
     std::unique_ptr<SwUndoFormatAttr> ReleaseUndo() { return std::move(m_pUndo); }
 };
 
-class SwUndoMoveLeftMargin : public SwUndo, private SwUndRng
+class SwUndoMoveLeftMargin final : public SwUndo, private SwUndRng
 {
     const std::unique_ptr<SwHistory> m_pHistory;
     const bool m_bModulus;
@@ -194,7 +194,7 @@ public:
 
 };
 
-class SwUndoDefaultAttr : public SwUndo
+class SwUndoDefaultAttr final : public SwUndo
 {
     std::unique_ptr<SfxItemSet> m_pOldSet;          // the old attributes
     std::unique_ptr<SvxTabStopItem> m_pTabStop;
@@ -209,7 +209,7 @@ public:
     virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
 };
 
-class SwUndoChangeFootNote : public SwUndo, private SwUndRng
+class SwUndoChangeFootNote final : public SwUndo, private SwUndRng
 {
     const std::unique_ptr<SwHistory> m_pHistory;
     const OUString m_Text;
@@ -227,7 +227,7 @@ public:
     SwHistory& GetHistory() { return *m_pHistory; }
 };
 
-class SwUndoFootNoteInfo : public SwUndo
+class SwUndoFootNoteInfo final : public SwUndo
 {
     std::unique_ptr<SwFootnoteInfo> m_pFootNoteInfo;
 
@@ -240,7 +240,7 @@ public:
     virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
 };
 
-class SwUndoEndNoteInfo : public SwUndo
+class SwUndoEndNoteInfo final : public SwUndo
 {
     std::unique_ptr<SwEndNoteInfo> m_pEndNoteInfo;
 
diff --git a/sw/source/core/inc/UndoBookmark.hxx b/sw/source/core/inc/UndoBookmark.hxx
index f8fb3dd54dc9..dc57ad300635 100644
--- a/sw/source/core/inc/UndoBookmark.hxx
+++ b/sw/source/core/inc/UndoBookmark.hxx
@@ -64,7 +64,7 @@ public:
     virtual SwRewriter GetRewriter() const override;
 };
 
-class SwUndoInsBookmark : public SwUndoBookmark
+class SwUndoInsBookmark final : public SwUndoBookmark
 {
 public:
     SwUndoInsBookmark(const ::sw::mark::IMark&);
@@ -73,7 +73,7 @@ public:
     virtual void RedoImpl(::sw::UndoRedoContext&) override;
 };
 
-class SwUndoDeleteBookmark : public SwUndoBookmark
+class SwUndoDeleteBookmark final : public SwUndoBookmark
 {
 public:
     SwUndoDeleteBookmark(const ::sw::mark::IMark&);
@@ -82,7 +82,7 @@ public:
     virtual void RedoImpl(::sw::UndoRedoContext&) override;
 };
 
-class SwUndoRenameBookmark : public SwUndo
+class SwUndoRenameBookmark final : public SwUndo
 {
     const OUString m_sOldName;
     const OUString m_sNewName;
@@ -99,7 +99,7 @@ private:
 };
 
 /// Handling undo / redo of checkbox and drop-down form field insertion
-class SwUndoInsNoTextFieldmark : public SwUndo
+class SwUndoInsNoTextFieldmark final : public SwUndo
 {
 private:
     const std::unique_ptr<SwHistoryNoTextFieldmark> m_pHistoryNoTextFieldmark;
@@ -112,7 +112,7 @@ public:
 };
 
 /// Handling undo / redo of checkbox and drop-down form field deletion
-class SwUndoDelNoTextFieldmark : public SwUndo
+class SwUndoDelNoTextFieldmark final : public SwUndo
 {
 private:
     const std::unique_ptr<SwHistoryNoTextFieldmark> m_pHistoryNoTextFieldmark;
@@ -126,7 +126,7 @@ public:
 };
 
 /// Handling undo / redo of text form field insertion
-class SwUndoInsTextFieldmark : public SwUndo
+class SwUndoInsTextFieldmark final : public SwUndo
 {
 private:
     const std::unique_ptr<SwHistoryTextFieldmark> m_pHistoryTextFieldmark;
@@ -139,7 +139,7 @@ public:
 };
 
 /// Handling undo / redo of text form field deletion
-class SwUndoDelTextFieldmark : public SwUndo
+class SwUndoDelTextFieldmark final : public SwUndo
 {
 private:
     const std::unique_ptr<SwHistoryTextFieldmark> m_pHistoryTextFieldmark;
diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx
index 8fb5e8dcf3f7..1fcfae22f6e2 100644
--- a/sw/source/core/inc/UndoCore.hxx
+++ b/sw/source/core/inc/UndoCore.hxx
@@ -40,7 +40,7 @@ namespace sw {
     class IShellCursorSupplier;
 }
 
-class SwRedlineSaveData: public SwUndRng, public SwRedlineData, private SwUndoSaveSection
+class SwRedlineSaveData final : public SwUndRng, public SwRedlineData, private SwUndoSaveSection
 {
 public:
     SwRedlineSaveData(
@@ -80,7 +80,7 @@ public:
 };
 
 namespace sw {
-class UndoRedoContext
+class UndoRedoContext final
     : public SfxUndoContext
 {
 public:
@@ -113,7 +113,7 @@ private:
     SdrMarkList * m_pMarkList;
 };
 
-class RepeatContext
+class RepeatContext final
     : public SfxRepeatTarget
 {
 public:
@@ -141,7 +141,7 @@ private:
 
 } // namespace sw
 
-class SwUndoFormatColl : public SwUndo, private SwUndRng
+class SwUndoFormatColl final : public SwUndo, private SwUndRng
 {
     OUString maFormatName;
     std::unique_ptr<SwHistory> mpHistory;
@@ -184,7 +184,7 @@ public:
 
 };
 
-class SwUndoSetFlyFormat : public SwUndo, public SwClient
+class SwUndoSetFlyFormat final : public SwUndo, public SwClient
 {
     SwFrameFormat* m_pFrameFormat;                  // saved FlyFormat
     const OUString m_DerivedFromFormatName;
@@ -209,7 +209,7 @@ public:
     virtual SwRewriter GetRewriter() const override;
 };
 
-class SwUndoOutlineLeftRight : public SwUndo, private SwUndRng
+class SwUndoOutlineLeftRight final : public SwUndo, private SwUndRng
 {
     short m_nOffset;
 
diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx
index 6ecc3385a2af..9656d59e3ca6 100644
--- a/sw/source/core/inc/UndoDelete.hxx
+++ b/sw/source/core/inc/UndoDelete.hxx
@@ -33,7 +33,7 @@ namespace sfx2 {
     class MetadatableUndo;
 }
 
-class SwUndoDelete
+class SwUndoDelete final
     : public SwUndo
     , private SwUndRng
     , private SwUndoSaveContent
diff --git a/sw/source/core/inc/UndoDraw.hxx b/sw/source/core/inc/UndoDraw.hxx
index 07dfca71ca74..951902817b02 100644
--- a/sw/source/core/inc/UndoDraw.hxx
+++ b/sw/source/core/inc/UndoDraw.hxx
@@ -33,7 +33,7 @@ class SwDrawFrameFormat;
 class SwDoc;
 
 // Undo for Draw Objects
-class SwSdrUndo : public SwUndo
+class SwSdrUndo final : public SwUndo
 {
     std::unique_ptr<SdrUndoAction> m_pSdrUndo;
     std::unique_ptr<SdrMarkList> m_pMarkList; // MarkList for all selected SdrObjects
@@ -49,7 +49,7 @@ public:
     virtual OUString GetComment() const override;
 };
 
-class SwUndoDrawGroup : public SwUndo
+class SwUndoDrawGroup final : public SwUndo
 {
     std::unique_ptr<SwUndoGroupObjImpl[]> m_pObjArray;
     sal_uInt16 m_nSize;
@@ -78,7 +78,7 @@ public:
 // - Existing class <SwUndoDrawUnGroup> takes over the part for the formats.
 // - New class <SwUndoDrawUnGroupConnectToLayout> takes over the part for
 //   contact object.
-class SwUndoDrawUnGroup : public SwUndo
+class SwUndoDrawUnGroup final : public SwUndo
 {
     std::unique_ptr<SwUndoGroupObjImpl[]> m_pObjArray;
     sal_uInt16 m_nSize;
@@ -95,7 +95,7 @@ public:
     void AddObj(sal_uInt16 nPos, SwDrawFrameFormat*);
 };
 
-class SwUndoDrawUnGroupConnectToLayout : public SwUndo
+class SwUndoDrawUnGroupConnectToLayout final : public SwUndo
 {
 private:
     std::vector<std::pair<SwDrawFrameFormat*, SdrObject*>> m_aDrawFormatsAndObjs;
@@ -111,7 +111,7 @@ public:
     void AddFormatAndObj(SwDrawFrameFormat* pDrawFrameFormat, SdrObject* pDrawObject);
 };
 
-class SwUndoDrawDelete : public SwUndo
+class SwUndoDrawDelete final : public SwUndo
 {
     std::unique_ptr<SwUndoGroupObjImpl[]> m_pObjArray;
     std::unique_ptr<SdrMarkList> m_pMarkList; // MarkList for all selected SdrObjects
diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx
index 801997d65e39..7263bbcafab4 100644
--- a/sw/source/core/inc/UndoInsert.hxx
+++ b/sw/source/core/inc/UndoInsert.hxx
@@ -37,7 +37,7 @@ class SwDoc;
 namespace sw { class DocumentContentOperationsManager; }
 enum class MirrorGraph;
 
-class SwUndoInsert: public SwUndo, private SwUndoSaveContent
+class SwUndoInsert final : public SwUndo, private SwUndoSaveContent
 {
     /// start of Content in UndoNodes for Redo
     std::unique_ptr<SwNodeIndex> m_pUndoNodeIndex;
@@ -92,7 +92,7 @@ SwRewriter
 MakeUndoReplaceRewriter(sal_uLong const occurrences,
     OUString const& sOld, OUString const& sNew);
 
-class SwUndoReplace
+class SwUndoReplace final
     : public SwUndo
 {
 public:
@@ -132,7 +132,7 @@ private:
     std::unique_ptr<Impl> m_pImpl;
 };
 
-class SwUndoReRead : public SwUndo
+class SwUndoReRead final : public SwUndo
 {
     std::unique_ptr<Graphic> mpGraphic;
     std::optional<OUString> maNm;
@@ -152,7 +152,7 @@ public:
     virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
 };
 
-class SwUndoInsertLabel : public SwUndo
+class SwUndoInsertLabel final : public SwUndo
 {
     union {
         struct {
diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx
index 4113d54d8f52..4690fd171492 100644
--- a/sw/source/core/inc/UndoManager.hxx
+++ b/sw/source/core/inc/UndoManager.hxx
@@ -33,7 +33,7 @@ class SwView;
 
 namespace sw {
 
-class SAL_DLLPUBLIC_RTTI UndoManager
+class SW_DLLPUBLIC UndoManager final
     : public IDocumentUndoRedo
     , public SdrUndoManager
 {
@@ -95,10 +95,9 @@ public:
     SwNodes      & GetUndoNodes();
     void SetDocShell(SwDocShell* pDocShell);
 
-protected:
+private:
     virtual void EmptyActionsChanged() override;
 
-private:
     IDocumentDrawModelAccess & m_rDrawModelAccess;
     IDocumentRedlineAccess & m_rRedlineAccess;
     IDocumentState & m_rState;
diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx
index 5414b70257a2..77567f772639 100644
--- a/sw/source/core/inc/UndoNumbering.hxx
+++ b/sw/source/core/inc/UndoNumbering.hxx
@@ -26,7 +26,7 @@
 #include <rtl/ustring.hxx>
 #include <numrule.hxx>
 
-class SwUndoInsNum : public SwUndo, private SwUndRng
+class SwUndoInsNum final : public SwUndo, private SwUndRng
 {
     SwNumRule m_aNumRule;
     std::unique_ptr<SwHistory> m_pHistory;
@@ -56,7 +56,7 @@ public:
 
 };
 
-class SwUndoDelNum : public SwUndo, private SwUndRng
+class SwUndoDelNum final : public SwUndo, private SwUndRng
 {
     struct NodeLevel
     {
@@ -80,7 +80,7 @@ public:
     SwHistory* GetHistory() { return m_pHistory.get(); }
 };
 
-class SwUndoMoveNum : public SwUndo, private SwUndRng
+class SwUndoMoveNum final : public SwUndo, private SwUndRng
 {
     sal_uLong m_nNewStart;
     tools::Long m_nOffset;
@@ -95,7 +95,7 @@ public:
     void SetStartNode( sal_uLong nValue ) { m_nNewStart = nValue; }
 };
 
-class SwUndoNumUpDown : public SwUndo, private SwUndRng
+class SwUndoNumUpDown final : public SwUndo, private SwUndRng
 {
     short m_nOffset;
 
@@ -107,7 +107,7 @@ public:
     virtual void RepeatImpl( ::sw::RepeatContext & ) override;
 };
 
-class SwUndoNumOrNoNum : public SwUndo
+class SwUndoNumOrNoNum final : public SwUndo
 {
     sal_uLong m_nIndex;
     bool mbNewNum, mbOldNum;
@@ -121,7 +121,7 @@ public:
     virtual void RepeatImpl( ::sw::RepeatContext & ) override;
 };
 
-class SwUndoNumRuleStart : public SwUndo
+class SwUndoNumRuleStart final : public SwUndo
 {
     sal_uLong m_nIndex;
     sal_uInt16 m_nOldStart, m_nNewStart;
diff --git a/sw/source/core/inc/UndoRedline.hxx b/sw/source/core/inc/UndoRedline.hxx
index 7eaf23a62a22..e5a0029f0aea 100644
--- a/sw/source/core/inc/UndoRedline.hxx
+++ b/sw/source/core/inc/UndoRedline.hxx
@@ -51,7 +51,7 @@ public:
     sal_uInt16 GetRedlSaveCount() const;
 };
 
-class SwUndoRedlineDelete : public SwUndoRedline
+class SwUndoRedlineDelete final : public SwUndoRedline
 {
     bool m_bCanGroup : 1;
     bool m_bIsDelim : 1;
@@ -75,7 +75,7 @@ public:
     void SetRedlineText(const OUString & rText);
 };
 
-class SwUndoRedlineSort : public SwUndoRedline
+class SwUndoRedlineSort final : public SwUndoRedline
 {
     std::unique_ptr<SwSortOptions> m_pOpt;
     sal_uLong m_nSaveEndNode;
@@ -94,7 +94,7 @@ public:
     void SetSaveRange( const SwPaM& rRange );
 };
 
-class SwUndoAcceptRedline : public SwUndoRedline
+class SwUndoAcceptRedline final : public SwUndoRedline
 {
 private:
     virtual void RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) override;
@@ -105,7 +105,7 @@ public:
     virtual void RepeatImpl( ::sw::RepeatContext & ) override;
 };
 
-class SwUndoRejectRedline : public SwUndoRedline
+class SwUndoRejectRedline final : public SwUndoRedline
 {
 private:
     virtual void RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) override;
@@ -116,7 +116,7 @@ public:
     virtual void RepeatImpl( ::sw::RepeatContext & ) override;
 };
 
-class SwUndoCompDoc : public SwUndo, public SwUndRng
+class SwUndoCompDoc final : public SwUndo, public SwUndRng
 {
     std::unique_ptr<SwRedlineData> m_pRedlineData;
     std::unique_ptr<SwUndoDelete> m_pUndoDelete, m_pUndoDelete2;
diff --git a/sw/source/core/inc/UndoSection.hxx b/sw/source/core/inc/UndoSection.hxx
index 25d51ccb9660..1e514b0e2b0f 100644
--- a/sw/source/core/inc/UndoSection.hxx
+++ b/sw/source/core/inc/UndoSection.hxx
@@ -37,7 +37,7 @@ namespace sw {
     enum class FieldmarkMode;
 };
 
-class SwUndoInsSection : public SwUndo, private SwUndRng
+class SwUndoInsSection final : public SwUndo, private SwUndRng
 {
 private:
     const std::unique_ptr<SwSectionData> m_pSectionData;
@@ -77,7 +77,7 @@ std::unique_ptr<SwUndo> MakeUndoUpdateSection(SwSectionFormat const&, bool const
 class SwTOXBaseSection;
 class SwUndoDelSection;
 
-class SwUndoUpdateIndex : public SwUndo
+class SwUndoUpdateIndex final : public SwUndo
 {
 private:
     std::unique_ptr<SwUndoDelSection> m_pTitleSectionUpdated;
diff --git a/sw/source/core/inc/UndoSort.hxx b/sw/source/core/inc/UndoSort.hxx
index 798a5ea1894f..70ec29ada13e 100644
--- a/sw/source/core/inc/UndoSort.hxx
+++ b/sw/source/core/inc/UndoSort.hxx
@@ -57,7 +57,7 @@ struct SwSortUndoElement
     ~SwSortUndoElement();
 };
 
-class SwUndoSort : public SwUndo, private SwUndRng
+class SwUndoSort final : public SwUndo, private SwUndRng
 {
     std::unique_ptr<SwSortOptions>    m_pSortOptions;
     std::vector<std::unique_ptr<SwSortUndoElement>> m_SortList;
diff --git a/sw/source/core/inc/UndoSplitMove.hxx b/sw/source/core/inc/UndoSplitMove.hxx
index 1a8546238c12..361f1281d596 100644
--- a/sw/source/core/inc/UndoSplitMove.hxx
+++ b/sw/source/core/inc/UndoSplitMove.hxx
@@ -22,7 +22,7 @@
 
 #include <undobj.hxx>
 
-class SwUndoSplitNode: public SwUndo
+class SwUndoSplitNode final : public SwUndo
 {
     std::unique_ptr<SwHistory> m_pHistory;
     std::unique_ptr<SwRedlineData> m_pRedlineData;
@@ -44,7 +44,7 @@ public:
     void SetTableFlag()       { m_bTableFlag = true; }
 };
 
-class SwUndoMove : public SwUndo, private SwUndRng, private SwUndoSaveContent
+class SwUndoMove final : public SwUndo, private SwUndRng, private SwUndoSaveContent
 {
     // nDest... - destination range of move (after move!)
     // nIns...  - source Position of move (after move!)
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index c15f0f10ca1c..a3fab2eed2d4 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -44,7 +44,7 @@ class SwTableNode;
 class SwTableAutoFormat;
 class SwTableSortBoxes;
 
-class SwUndoInsTable : public SwUndo
+class SwUndoInsTable final : public SwUndo
 {
     OUString m_sTableName;
     SwInsertTableOptions m_aInsTableOptions;
@@ -71,7 +71,7 @@ public:
     virtual SwRewriter GetRewriter() const override;
 };
 
-class SwUndoTextToTable : public SwUndo, public SwUndRng
+class SwUndoTextToTable final : public SwUndo, public SwUndRng
 {
     OUString m_sTableName;
     SwInsertTableOptions m_aInsertTableOpts;
@@ -97,7 +97,7 @@ public:
     void AddFillBox( const SwTableBox& rBox );
 };
 
-class SwUndoTableToText : public SwUndo
+class SwUndoTableToText final : public SwUndo
 {
     OUString m_sTableName;
     std::unique_ptr<SwDDEFieldType> m_pDDEFieldType;
@@ -123,7 +123,7 @@ public:
                     sal_Int32 nContentIdx = SAL_MAX_INT32);
 };
 
-class SwUndoAttrTable : public SwUndo
+class SwUndoAttrTable final : public SwUndo
 {
     sal_uLong m_nStartNode;
     std::unique_ptr<SaveTable> m_pSaveTable;
@@ -140,7 +140,7 @@ public:
 
 class SwUndoTableNumFormat;
 
-class SwUndoTableAutoFormat : public SwUndo
+class SwUndoTableAutoFormat final : public SwUndo
 {
     OUString m_TableStyleName;
     sal_uLong m_nStartNode;
@@ -164,7 +164,7 @@ public:
 
 using SwUndoSaveSections = std::vector<std::unique_ptr<SwUndoSaveSection, o3tl::default_delete<SwUndoSaveSection>>>;
 
-class SwUndoTableNdsChg : public SwUndo
+class SwUndoTableNdsChg final : public SwUndo
 {
     std::unique_ptr<SaveTable> m_pSaveTable;
     std::set<sal_uLong> m_Boxes;
@@ -208,7 +208,7 @@ public:
 
 class SwUndoMove;
 
-class SwUndoTableMerge : public SwUndo, private SwUndRng
+class SwUndoTableMerge final : public SwUndo, private SwUndRng
 {
     sal_uLong m_nTableNode;
     std::unique_ptr<SaveTable> m_pSaveTable;
@@ -235,7 +235,7 @@ public:
     void SaveCollection( const SwTableBox& rBox );
 };
 
-class SwUndoTableNumFormat : public SwUndo
+class SwUndoTableNumFormat final : public SwUndo
 {
     std::unique_ptr<SfxItemSet> m_pBoxSet;
     std::unique_ptr<SwHistory> m_pHistory;
@@ -265,7 +265,7 @@ public:
 
 struct UndoTableCpyTable_Entry;
 
-class SwUndoTableCpyTable : public SwUndo
+class SwUndoTableCpyTable final : public SwUndo
 {
     std::vector<std::unique_ptr<UndoTableCpyTable_Entry>> m_vArr;
     std::unique_ptr<SwUndoTableNdsChg> m_pInsRowUndo;
@@ -292,7 +292,7 @@ public:
     void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
-class SwUndoCpyTable : public SwUndo
+class SwUndoCpyTable final : public SwUndo
 {
     std::unique_ptr<SwUndoDelete> m_pDelete;
     sal_uLong m_nTableNode;
@@ -308,7 +308,7 @@ public:
     void SetTableSttIdx( sal_uLong nIdx )           { m_nTableNode = nIdx; }
 };
 
-class SwUndoSplitTable : public SwUndo
+class SwUndoSplitTable final : public SwUndo
 {
     sal_uLong m_nTableNode, m_nOffset;
     std::unique_ptr<SwSaveRowSpan> mpSaveRowSpan; // stores row span values at the splitting row
@@ -333,7 +333,7 @@ public:
     void SaveFormula( SwHistory& rHistory );
 };
 
-class SwUndoMergeTable : public SwUndo
+class SwUndoMergeTable final : public SwUndo
 {
     OUString m_aName;
     sal_uLong m_nTableNode;
@@ -355,7 +355,7 @@ public:
     void SaveFormula( SwHistory& rHistory );
 };
 
-class SwUndoTableHeadline : public SwUndo
+class SwUndoTableHeadline final : public SwUndo
 {
     sal_uLong m_nTableNode;
     sal_uInt16 m_nOldHeadline;
@@ -371,7 +371,7 @@ public:
 
 void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx );
 
-class SwUndoTableStyleMake : public SwUndo
+class SwUndoTableStyleMake final : public SwUndo
 {
     OUString m_sName;
     std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
@@ -386,7 +386,7 @@ public:
     virtual SwRewriter GetRewriter() const override;
 };
 
-class SwUndoTableStyleDelete : public SwUndo
+class SwUndoTableStyleDelete final : public SwUndo
 {
     std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
     std::vector<SwTable*> m_rAffectedTables;
@@ -401,7 +401,7 @@ public:
     virtual SwRewriter GetRewriter() const override;
 };
 
-class SwUndoTableStyleUpdate : public SwUndo
+class SwUndoTableStyleUpdate final : public SwUndo
 {
     std::unique_ptr<SwTableAutoFormat> m_pOldFormat, m_pNewFormat;
 public:
diff --git a/sw/source/core/inc/bodyfrm.hxx b/sw/source/core/inc/bodyfrm.hxx
index f6b046e9dd32..436b8fbb465a 100644
--- a/sw/source/core/inc/bodyfrm.hxx
+++ b/sw/source/core/inc/bodyfrm.hxx
@@ -25,9 +25,8 @@ class SwBorderAttrs;
 
 /// Container of body content (i.e. not header or footer). Typical parent is an
 /// SwPageFrame, typical lower is an SwTextFrame.
-class SAL_DLLPUBLIC_RTTI SwBodyFrame: public SwLayoutFrame
+class SAL_DLLPUBLIC_RTTI SwBodyFrame final : public SwLayoutFrame
 {
-protected:
     virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
 
 public:
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index a954890f2caa..6a99309d3294 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -119,14 +119,14 @@ namespace sw::mark {
             css::uno::WeakReference< css::text::XTextContent> m_wXBookmark;
         };
 
-        class NavigatorReminder
+        class NavigatorReminder final
             : public MarkBase
         {
         public:
             NavigatorReminder(const SwPaM& rPaM);
         };
 
-        class UnoMark
+        class UnoMark final
             : public MarkBase
         {
         public:
@@ -235,7 +235,7 @@ namespace sw::mark {
             IFieldmark::parameter_map_t m_vParams;
         };
 
-        class TextFieldmark
+        class TextFieldmark final
             : public Fieldmark
         {
         public:
@@ -255,7 +255,7 @@ namespace sw::mark {
         };
 
         /// Fieldmark representing a checkbox form field.
-        class CheckboxFieldmark
+        class CheckboxFieldmark final
             : virtual public ICheckboxFieldmark
             , public NonTextFieldmark
         {
@@ -281,7 +281,7 @@ namespace sw::mark {
         };
 
         /// Fieldmark representing a drop-down form field.
-        class DropDownFieldmark
+        class DropDownFieldmark final
             : public FieldmarkWithDropDownButton
         {
         public:
@@ -302,7 +302,7 @@ namespace sw::mark {
         };
 
         /// Fieldmark representing a date form field.
-        class DateFieldmark
+        class DateFieldmark final
             : virtual public IDateFieldmark
             , public FieldmarkWithDropDownButton
         {
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index e8f894af3058..7a3f393880df 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -27,14 +27,13 @@ struct SwCursorMoveState;
 class SwBorderAttrs;
 
 /// SwCellFrame is one table cell in the document layout.
-class SwCellFrame: public SwLayoutFrame
+class SwCellFrame final : public SwLayoutFrame
 {
     const SwTableBox* m_pTabBox;
 
     virtual void DestroyImpl() override;
     virtual ~SwCellFrame() override;
 
-protected:
     virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
     virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
 
diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx
index 2251efa48a76..6b6910d0e77a 100644
--- a/sw/source/core/inc/dview.hxx
+++ b/sw/source/core/inc/dview.hxx
@@ -29,7 +29,7 @@ class SwFlyFrame;
 class SwAnchoredObject;
 class SdrUndoManager;
 
-class SwDrawView : public FmFormView
+class SwDrawView final : public FmFormView
 {
     Point           m_aAnchorPoint;       // anchor position
     SwViewShellImp      &m_rImp;               // a view is always part of a shell
@@ -68,7 +68,6 @@ class SwDrawView : public FmFormView
     void MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
                             const std::vector<SdrObject*>& _rMovedChildObjs ) const;
 
-protected:
     // add custom handles (used by other apps, e.g. AnchorPos)
     virtual void AddCustomHdl() override;
 
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index 710b10088d7f..44a1483ed499 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -64,7 +64,7 @@ struct SwTextGlyphsKey;
 bool operator<(const SwTextGlyphsKey& l, const SwTextGlyphsKey& r);
 struct SwTextGlyphsData;
 
-class SwFntObj : public SwCacheObj
+class SwFntObj final : public SwCacheObj
 {
     friend class SwFntAccess;
     friend void InitCore();
@@ -139,10 +139,10 @@ SwFntObj *SwFntCache::Next( SwFntObj *pFntObj)
     return static_cast<SwFntObj *>(SwCache::Next( pFntObj ));
 }
 
-class SwFntAccess : public SwCacheAccess
+class SwFntAccess final : public SwCacheAccess
 {
     SwViewShell const *m_pShell;
-protected:
+
     virtual SwCacheObj *NewObj( ) override;
 
 public:
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 6481e6c0be6f..1974338f7936 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -294,7 +294,7 @@ public:
 
 // WARNING! If more attributes should be cached also adjust the method
 //          Modify::Modify!
-class SwBorderAttrs : public SwCacheObj
+class SwBorderAttrs final : public SwCacheObj
 {
     const SwAttrSet      &m_rAttrSet;
     const SvxULSpaceItem &m_rUL;
diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx
index e0538e3692bb..1d56901bd94b 100644
--- a/sw/source/core/inc/ftnfrm.hxx
+++ b/sw/source/core/inc/ftnfrm.hxx
@@ -76,7 +76,7 @@ inline SwFootnoteFrame* SwFootnoteContFrame::PrependChained(SwFrame* pThis, bool
     return AddChained(false, pThis, bDefaultFormat);
 }
 
-class SwFootnoteFrame: public SwLayoutFrame
+class SwFootnoteFrame final : public SwLayoutFrame
 {
     // Pointer to FootnoteFrame in which the footnote will be continued:
     //  - 0     no following existent
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index fbc95b8a8691..41bea3fa7211 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -79,7 +79,7 @@ using SwDestroyList = o3tl::sorted_vector<SwSectionFrame*>;
 
 /// The root element of a Writer document layout. Lower frames are expected to
 /// be SwPageFrame instances.
-class SAL_DLLPUBLIC_RTTI SwRootFrame: public SwLayoutFrame
+class SW_DLLPUBLIC SwRootFrame final : public SwLayoutFrame
 {
     // Needs to disable the Superfluous temporarily
     friend void AdjustSizeChgNotify( SwRootFrame *pRoot );
@@ -181,8 +181,6 @@ class SAL_DLLPUBLIC_RTTI SwRootFrame: public SwLayoutFrame
     virtual void DestroyImpl() override;
     virtual ~SwRootFrame() override;
 
-protected:
-
     virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
 
 public:
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index a37b72255be6..99c12107c64b 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -25,7 +25,7 @@ class SwTableLine;
 class SwBorderAttrs;
 
 /// SwRowFrame is one table row in the document layout.
-class SwRowFrame : public SwLayoutFrame
+class SwRowFrame final : public SwLayoutFrame
 {
     virtual void Format(vcl::RenderContext* pRenderContext,
                         const SwBorderAttrs* pAttrs = nullptr) override;
@@ -50,7 +50,6 @@ class SwRowFrame : public SwLayoutFrame
     virtual void DestroyImpl() override;
     virtual ~SwRowFrame() override;
 
-protected:
     virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
     virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
 
diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx
index 59baaefd94c8..8c9e59b6897f 100644
--- a/sw/source/core/inc/swfntcch.hxx
+++ b/sw/source/core/inc/swfntcch.hxx
@@ -60,10 +60,10 @@ public:
     const SfxPoolItem** GetDefault() { return m_pDefaultArray; }
 };
 
-class SwFontAccess : public SwCacheAccess
+class SwFontAccess final : public SwCacheAccess
 {
     SwViewShell *m_pShell;
-protected:
+
     virtual SwCacheObj *NewObj( ) override;
 
 public:
diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx
index 1e5e78e4a079..261388446333 100644
--- a/sw/source/core/inc/textapi.hxx
+++ b/sw/source/core/inc/textapi.hxx
@@ -27,7 +27,7 @@
 class SwDoc;
 
 struct SwTextAPIEditSource_Impl;
-class SwTextAPIEditSource : public SvxEditSource
+class SwTextAPIEditSource final : public SvxEditSource
 {
     SwTextAPIEditSource_Impl* m_pImpl;
 
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 0a2f4fbbd2bc..4a3ce62e2c43 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -155,7 +155,7 @@ bool HasNumberingWhichNeedsLayoutUpdate(const SwTextNode& rTextNode);
 
 /// Represents the visualization of a paragraph. Typical upper is an
 /// SwBodyFrame. The first text portion of the first line is az SwParaPortion.
-class SW_DLLPUBLIC SwTextFrame: public SwContentFrame
+class SW_DLLPUBLIC SwTextFrame final : public SwContentFrame
 {
     friend class SwTextIter;
     friend class SwTestFormat;
@@ -323,7 +323,6 @@ class SW_DLLPUBLIC SwTextFrame: public SwContentFrame
     void UpdateOutlineContentVisibilityButton(SwWrtShell* pWrtSh) const;
     void PaintOutlineContentVisibilityButton() const;
 
-protected:
     virtual void SwClientNotify(SwModify const& rModify, SfxHint const& rHint) override;
 
 public:
diff --git a/sw/source/core/inc/undoflystrattr.hxx b/sw/source/core/inc/undoflystrattr.hxx
index 4110b91e6acf..5032c26c14b6 100644
--- a/sw/source/core/inc/undoflystrattr.hxx
+++ b/sw/source/core/inc/undoflystrattr.hxx
@@ -24,7 +24,7 @@
 
 class SwFlyFrameFormat;
 
-class SwUndoFlyStrAttr : public SwUndo
+class SwUndoFlyStrAttr final : public SwUndo
 {
     public:
         SwUndoFlyStrAttr( SwFlyFrameFormat& rFlyFrameFormat,
diff --git a/sw/source/core/inc/visiturl.hxx b/sw/source/core/inc/visiturl.hxx
index d2d3b25ac52d..f273f33bb7f4 100644
--- a/sw/source/core/inc/visiturl.hxx
+++ b/sw/source/core/inc/visiturl.hxx
@@ -24,7 +24,7 @@
 
 class SwDoc;
 
-class SwURLStateChanged : public SfxListener
+class SwURLStateChanged final : public SfxListener
 {
     SwDoc& m_rDoc;
 
diff --git a/sw/source/filter/inc/fltini.hxx b/sw/source/filter/inc/fltini.hxx
index f66ea56ebac6..500247cdb29a 100644
--- a/sw/source/filter/inc/fltini.hxx
+++ b/sw/source/filter/inc/fltini.hxx
@@ -29,7 +29,7 @@ class SwNodeIndex;
 
 // the special readers
 
-class HTMLReader : public Reader
+class HTMLReader final : public Reader
 {
     // we don't want to have the streams/storages open
     virtual bool SetStrmStgPtr() override;
@@ -45,7 +45,7 @@ public:
     virtual ErrCode Read(SwDoc&, const OUString& rBaseURL, SwPaM&, const OUString&) override;
 };
 
-class XMLReader : public Reader
+class XMLReader final : public Reader
 {
     virtual ErrCode Read(SwDoc&, const OUString& rBaseURL, SwPaM&, const OUString&) override;
 
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 9f7ccd3ac2fd..8156dfd8b210 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -163,7 +163,7 @@ public:
 
 class SwFltAnchorListener;
 
-class SW_DLLPUBLIC SwFltAnchor: public SfxPoolItem
+class SW_DLLPUBLIC SwFltAnchor final : public SfxPoolItem
 {
     SwFrameFormat* m_pFrameFormat;
     std::unique_ptr<SwFltAnchorListener> m_pListener;
@@ -181,7 +181,7 @@ public:
           SwFrameFormat* GetFrameFormat() { return m_pFrameFormat; }
 };
 
-class SwFltAnchorListener : public SvtListener
+class SwFltAnchorListener final : public SvtListener
 {
     SwFltAnchor* m_pFltAnchor;
     public:
@@ -189,7 +189,7 @@ class SwFltAnchorListener : public SvtListener
         virtual void Notify(const SfxHint&) override;
 };
 
-class SW_DLLPUBLIC SwFltRedline : public SfxPoolItem
+class SW_DLLPUBLIC SwFltRedline final : public SfxPoolItem
 {
 public:
     DateTime        m_aStamp;
@@ -210,7 +210,7 @@ public:
     virtual SwFltRedline* Clone(SfxItemPool* = nullptr) const override;
 };
 
-class SW_DLLPUBLIC SwFltBookmark : public SfxPoolItem
+class SW_DLLPUBLIC SwFltBookmark final : public SfxPoolItem
 {
 private:
 
@@ -239,7 +239,7 @@ public:
 };
 
 /// Stores RDF statements on a paragraph (key-value pairs where the subject is the paragraph).
-class SW_DLLPUBLIC SwFltRDFMark : public SfxPoolItem
+class SW_DLLPUBLIC SwFltRDFMark final : public SfxPoolItem
 {
     tools::Long m_nHandle;
     std::vector< std::pair<OUString, OUString> > m_aAttributes;
@@ -256,7 +256,7 @@ public:
     const std::vector< std::pair<OUString, OUString> >& GetAttributes() const;
 };
 
-class SW_DLLPUBLIC SwFltTOX : public SfxPoolItem
+class SW_DLLPUBLIC SwFltTOX final : public SfxPoolItem
 {
     std::shared_ptr<SwTOXBase> m_xTOXBase;
     bool m_bHadBreakItem; // there was a break item BEFORE insertion of the TOX
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index 5bf126833afe..ce6f82a7dd82 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -248,7 +248,7 @@ namespace sw
             explicit FontMapExport(const OUString &rFontDescription);
         };
 
-        class InsertedTableListener: public SvtListener
+        class InsertedTableListener final : public SvtListener
         {
             SwTableNode* m_pTableNode;
         public:
diff --git a/sw/source/ui/inc/mmresultdialogs.hxx b/sw/source/ui/inc/mmresultdialogs.hxx
index 72d86389ac8e..a2cd01f85a7a 100644
--- a/sw/source/ui/inc/mmresultdialogs.hxx
+++ b/sw/source/ui/inc/mmresultdialogs.hxx
@@ -31,7 +31,7 @@ namespace com::sun::star::mail { class XMailMessage; }
 
 
 /// Dialog implementing the saving as of the result document.
-class SwMMResultSaveDialog : public SfxDialogController
+class SwMMResultSaveDialog final : public SfxDialogController
 {
     bool                   m_bCancelSaving;
 
@@ -52,7 +52,7 @@ public:
 };
 
 /// Dialog implementing the printing of the result document.
-class SwMMResultPrintDialog : public SfxDialogController
+class SwMMResultPrintDialog final : public SfxDialogController
 {
     VclPtr<Printer>        m_pTempPrinter;
 
@@ -79,7 +79,7 @@ public:
 };
 
 /// Dialog implementing the sending as email of the result document.
-class SwMMResultEmailDialog : public SfxDialogController
+class SwMMResultEmailDialog final : public SfxDialogController
 {
     OUString        m_sConfigureMail;
     OUString        m_sCC;
@@ -135,7 +135,7 @@ struct SwMailDescriptor
 };
 struct SwSendMailDialog_Impl;
 class SwMailMergeConfigItem;
-class SwSendMailDialog : public weld::GenericDialogController
+class SwSendMailDialog final : public weld::GenericDialogController
 {
     OUString                m_sContinue;
     OUString                m_sStop;
diff --git a/sw/source/uibase/inc/DateFormFieldDialog.hxx b/sw/source/uibase/inc/DateFormFieldDialog.hxx
index f56626aac2a9..2b4573af7dea 100644
--- a/sw/source/uibase/inc/DateFormFieldDialog.hxx
+++ b/sw/source/uibase/inc/DateFormFieldDialog.hxx
@@ -23,7 +23,7 @@ class IDateFieldmark;
 /// Dialog to specify the properties of date form field
 namespace sw
 {
-class DateFormFieldDialog : public weld::GenericDialogController
+class DateFormFieldDialog final : public weld::GenericDialogController
 {
 private:
     sw::mark::IDateFieldmark* m_pDateField;
diff --git a/sw/source/uibase/inc/DropDownFieldDialog.hxx b/sw/source/uibase/inc/DropDownFieldDialog.hxx
index 59510d37b751..b8b60f20c293 100644
--- a/sw/source/uibase/inc/DropDownFieldDialog.hxx
+++ b/sw/source/uibase/inc/DropDownFieldDialog.hxx
@@ -28,7 +28,7 @@ class SwWrtShell;
 // Dialog to edit drop down field selection
 namespace sw
 {
-class DropDownFieldDialog : public weld::GenericDialogController
+class DropDownFieldDialog final : public weld::GenericDialogController
 {
     SwWrtShell                 &m_rSh;
     SwDropDownField*           m_pDropField;
diff --git a/sw/source/uibase/inc/DropDownFormFieldDialog.hxx b/sw/source/uibase/inc/DropDownFormFieldDialog.hxx
index 0719b740163a..c6bcc9837304 100644
--- a/sw/source/uibase/inc/DropDownFormFieldDialog.hxx
+++ b/sw/source/uibase/inc/DropDownFormFieldDialog.hxx
@@ -20,7 +20,7 @@ class IFieldmark;
 /// Dialog to specify the properties of drop-down form field
 namespace sw
 {
-class DropDownFormFieldDialog : public weld::GenericDialogController
+class DropDownFormFieldDialog final : public weld::GenericDialogController
 {
 private:
     mark::IFieldmark* m_pDropDownField;
diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx
index 5b83bbc79548..95dcbd243d55 100644
--- a/sw/source/uibase/inc/HeaderFooterWin.hxx
+++ b/sw/source/uibase/inc/HeaderFooterWin.hxx
@@ -32,7 +32,7 @@ public:
     This control is showing the header / footer style name and provides
     a few useful actions to the user.
   */
-class SwHeaderFooterWin : public SwFrameMenuButtonBase
+class SwHeaderFooterWin final : public SwFrameMenuButtonBase
 {
     std::unique_ptr<weld::MenuButton> m_xMenuButton;
     std::unique_ptr<weld::Button> m_xPushButton;
diff --git a/sw/source/uibase/inc/OutlineContentVisibilityWin.hxx b/sw/source/uibase/inc/OutlineContentVisibilityWin.hxx
index 36f096ae3df4..a03c3c1f1e2c 100644
--- a/sw/source/uibase/inc/OutlineContentVisibilityWin.hxx
+++ b/sw/source/uibase/inc/OutlineContentVisibilityWin.hxx
@@ -19,7 +19,7 @@ enum class ButtonSymbol
     NONE
 };
 
-class SwOutlineContentVisibilityWin : public InterimItemWindow, public ISwFrameControl
+class SwOutlineContentVisibilityWin final : public InterimItemWindow, public ISwFrameControl
 {
 private:
     std::unique_ptr<weld::Button> m_xShowBtn;
diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx
index 761a983eeb8b..53d2eec4c1a9 100644
--- a/sw/source/uibase/inc/PageBreakWin.hxx
+++ b/sw/source/uibase/inc/PageBreakWin.hxx
@@ -22,7 +22,7 @@ class SwPageFrame;
     This control shows a line indicating a manual page break and a
     button providing a few actions on that page break.
   */
-class SwPageBreakWin : public SwFrameMenuButtonBase
+class SwPageBreakWin final : public SwFrameMenuButtonBase
 {
     std::unique_ptr<weld::MenuButton> m_xMenuButton;
     VclPtr<vcl::Window>   m_pLine;
diff --git a/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx b/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
index 82cd29204457..8599256da21c 100644
--- a/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
@@ -25,7 +25,7 @@
 
 class SwWrtShell;
 struct SpellState;
-class SwSpellDialogChildWindow
+class SwSpellDialogChildWindow final
     : public svx::SpellDialogChildWindow
 {
     bool            m_bIsGrammarCheckingOn;
@@ -37,7 +37,6 @@ class SwSpellDialogChildWindow
     bool            SpellDrawText_Impl(SwWrtShell& rSh, svx::SpellPortions& rPortions);
     void            LockFocusNotification(bool bLock);
 
-protected:
     virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck) override;
     virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck) override;
     virtual void AddAutoCorrection(const OUString& rOld, const OUString& rNew, LanguageType eLanguage) override;
diff --git a/sw/source/uibase/inc/SwXFilterOptions.hxx b/sw/source/uibase/inc/SwXFilterOptions.hxx
index e9e036b5f193..ce1f991465ba 100644
--- a/sw/source/uibase/inc/SwXFilterOptions.hxx
+++ b/sw/source/uibase/inc/SwXFilterOptions.hxx
@@ -30,7 +30,7 @@
 
 namespace com::sun::star::io { class XInputStream; }
 
-class SwXFilterOptions : public ::cppu::WeakImplHelper<
+class SwXFilterOptions final : public ::cppu::WeakImplHelper<
                             css::beans::XPropertyAccess,
                             css::ui::dialogs::XExecutableDialog,
                             css::document::XImporter,
diff --git a/sw/source/uibase/inc/UnfloatTableButton.hxx b/sw/source/uibase/inc/UnfloatTableButton.hxx
index 99598bcc2a15..164b240f28b1 100644
--- a/sw/source/uibase/inc/UnfloatTableButton.hxx
+++ b/sw/source/uibase/inc/UnfloatTableButton.hxx
@@ -22,7 +22,7 @@
  * floating properties.
  *
  */
-class UnfloatTableButton : public SwFrameMenuButtonBase
+class UnfloatTableButton final : public SwFrameMenuButtonBase
 {
     std::unique_ptr<weld::Button> m_xPushButton;
     OUString m_sLabel;
diff --git a/sw/source/uibase/inc/abstract.hxx b/sw/source/uibase/inc/abstract.hxx
index 3a9e16f9888e..ded62f0ff598 100644
--- a/sw/source/uibase/inc/abstract.hxx
+++ b/sw/source/uibase/inc/abstract.hxx
@@ -20,7 +20,7 @@
 
 #include <sfx2/basedlgs.hxx>
 
-class SwInsertAbstractDlg : public SfxDialogController
+class SwInsertAbstractDlg final : public SfxDialogController
 {
     std::unique_ptr<weld::SpinButton> m_xLevelNF;
     std::unique_ptr<weld::SpinButton> m_xParaNF;
diff --git a/sw/source/uibase/inc/addrdlg.hxx b/sw/source/uibase/inc/addrdlg.hxx
index feb839afdd51..66706915aa6c 100644
--- a/sw/source/uibase/inc/addrdlg.hxx
+++ b/sw/source/uibase/inc/addrdlg.hxx
@@ -21,7 +21,7 @@
 
 #include <sfx2/basedlgs.hxx>
 
-class SwAddrDlg : public SfxSingleTabDialogController
+class SwAddrDlg final : public SfxSingleTabDialogController
 {
 public:
     SwAddrDlg(weld::Window* pParent, const SfxItemSet& rSet);
diff --git a/sw/source/uibase/inc/ascfldlg.hxx b/sw/source/uibase/inc/ascfldlg.hxx
index fc652fab3da3..f62e6574f2c8 100644
--- a/sw/source/uibase/inc/ascfldlg.hxx
+++ b/sw/source/uibase/inc/ascfldlg.hxx
@@ -28,7 +28,7 @@ class SwAsciiOptions;
 class SvStream;
 class SwDocShell;
 
-class SwAsciiFilterDlg : public SfxDialogController
+class SwAsciiFilterDlg final : public SfxDialogController
 {
     bool m_bSaveLineStatus;
     OUString m_sExtraData;
diff --git a/sw/source/uibase/inc/autoformatpreview.hxx b/sw/source/uibase/inc/autoformatpreview.hxx
index 8617e35e02f8..f9825bc91951 100644
--- a/sw/source/uibase/inc/autoformatpreview.hxx
+++ b/sw/source/uibase/inc/autoformatpreview.hxx
@@ -31,7 +31,7 @@
 #include "wrtsh.hxx"
 #include <tblafmt.hxx>
 
-class AutoFormatPreview : public weld::CustomWidgetController
+class AutoFormatPreview final : public weld::CustomWidgetController
 {
 public:
     AutoFormatPreview();
diff --git a/sw/source/uibase/inc/barcfg.hxx b/sw/source/uibase/inc/barcfg.hxx
index a980cbc064e9..f194c431ccd0 100644
--- a/sw/source/uibase/inc/barcfg.hxx
+++ b/sw/source/uibase/inc/barcfg.hxx
@@ -24,7 +24,7 @@
 
 enum class SelectionType : sal_Int32;
 
-class SwToolbarConfigItem : public utl::ConfigItem
+class SwToolbarConfigItem final : public utl::ConfigItem
 {
     sal_Int32 aTbxIdArray[5];
 
diff --git a/sw/source/uibase/inc/bmpwin.hxx b/sw/source/uibase/inc/bmpwin.hxx
index 46d9544b7cbd..20d31100b83b 100644
--- a/sw/source/uibase/inc/bmpwin.hxx
+++ b/sw/source/uibase/inc/bmpwin.hxx
@@ -25,7 +25,7 @@
 #include <vcl/graph.hxx>
 
 // extended page for graphics
-class BmpWindow : public weld::CustomWidgetController
+class BmpWindow final : public weld::CustomWidgetController
 {
 private:
     Graphic     aGraphic;
diff --git a/sw/source/uibase/inc/bookctrl.hxx b/sw/source/uibase/inc/bookctrl.hxx
index f87395e516a3..d35252ceac4c 100644
--- a/sw/source/uibase/inc/bookctrl.hxx
+++ b/sw/source/uibase/inc/bookctrl.hxx
@@ -22,7 +22,7 @@
 #include <rtl/ustring.hxx>
 #include <sfx2/stbitem.hxx>
 
-class SwBookmarkControl : public SfxStatusBarControl
+class SwBookmarkControl final : public SfxStatusBarControl
 {
     virtual void Command(const CommandEvent& rCEvt) override;
 
diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx
index 2c3b81ffe69e..6441a5f16f63 100644
--- a/sw/source/uibase/inc/bookmark.hxx
+++ b/sw/source/uibase/inc/bookmark.hxx
@@ -60,7 +60,7 @@ public:
     static const char     cSeparator;
 };
 
-class SwInsertBookmarkDlg : public SfxDialogController
+class SwInsertBookmarkDlg final : public SfxDialogController
 {
     SwWrtShell&                         rSh;
     std::vector<std::pair<sw::mark::IMark*, OUString>> aTableBookmarks;
diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx
index 8b021d0d6d1a..928761305027 100644
--- a/sw/source/uibase/inc/break.hxx
+++ b/sw/source/uibase/inc/break.hxx
@@ -25,7 +25,7 @@
 
 class SwWrtShell;
 
-class SwBreakDlg : public weld::GenericDialogController
+class SwBreakDlg final : public weld::GenericDialogController
 {
     std::unique_ptr<weld::RadioButton> m_xLineBtn;
     std::unique_ptr<weld::RadioButton> m_xColumnBtn;
diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx
index 0aa6c2c8d135..34ffa2d24e12 100644
--- a/sw/source/uibase/inc/cfgitems.hxx
+++ b/sw/source/uibase/inc/cfgitems.hxx
@@ -38,7 +38,7 @@ class SwShdwCursorOptionsTabPage;
 enum class SwFillMode;
 
 /// Item for settings dialog - document view
-class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
+class SW_DLLPUBLIC SwDocDisplayItem final : public SfxPoolItem
 {
     friend class SwShdwCursorOptionsTabPage;
     friend class SwModule;
@@ -64,7 +64,7 @@ public:
 
 // OS 12.01.95
 // Item for settings dialog, element page
-class SW_DLLPUBLIC SwElemItem : public SfxPoolItem
+class SW_DLLPUBLIC SwElemItem final : public SfxPoolItem
 {
     //view
     bool m_bVertRuler     :1;
@@ -99,7 +99,7 @@ public:
 
 // OS 12.01.95
 // Item for settings dialog - printer/add-ons
-class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
+class SW_DLLPUBLIC SwAddPrinterItem final : public SfxPoolItem, public SwPrintData
 {
     using  SwPrintData::operator ==;
 
@@ -113,7 +113,7 @@ public:
 };
 
 /// Item for settings dialog, ShadowCursorPage
-class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
+class SW_DLLPUBLIC SwShadowCursorItem final : public SfxPoolItem
 {
     SwFillMode m_eMode;
     bool m_bOn;
@@ -136,7 +136,7 @@ public:
 #ifdef DBG_UTIL
 
 // Item for settings dialog - test settings
-class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
+class SW_DLLPUBLIC SwTestItem final : public SfxPoolItem
 {
     friend class SwModule;
     friend class SwTestTabPage;
diff --git a/sw/source/uibase/inc/changedb.hxx b/sw/source/uibase/inc/changedb.hxx
index a56144bd995d..a928a5d3074f 100644
--- a/sw/source/uibase/inc/changedb.hxx
+++ b/sw/source/uibase/inc/changedb.hxx
@@ -28,7 +28,7 @@ class SwWrtShell;
 struct SwDBData;
 
 // exchange database at fields
-class SwChangeDBDlg : public SfxDialogController
+class SwChangeDBDlg final : public SfxDialogController
 {
     SwWrtShell      *pSh;
 
diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx
index 09138b5ccb51..8527f15e2693 100644
--- a/sw/source/uibase/inc/chrdlg.hxx
+++ b/sw/source/uibase/inc/chrdlg.hxx
@@ -25,7 +25,7 @@
 class SwView;
 class SvxMacroItem;
 
-class SwCharDlg : public SfxTabDialogController
+class SwCharDlg final : public SfxTabDialogController
 {
     SwView&   m_rView;
     SwCharDlgMode m_nDialogMode;
@@ -39,7 +39,7 @@ public:
     virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
 };
 
-class SwCharURLPage : public SfxTabPage
+class SwCharURLPage final : public SfxTabPage
 {
     std::unique_ptr<SvxMacroItem> pINetItem;
     bool                bModified;
diff --git a/sw/source/uibase/inc/colex.hxx b/sw/source/uibase/inc/colex.hxx
index 41f7e4143a71..07c007465da2 100644
--- a/sw/source/uibase/inc/colex.hxx
+++ b/sw/source/uibase/inc/colex.hxx
@@ -42,10 +42,10 @@ public:
     void UpdateExample( const SfxItemSet& rSet );
 };
 
-class SW_DLLPUBLIC SwPageGridExample : public SwPageExample
+class SW_DLLPUBLIC SwPageGridExample final : public SwPageExample
 {
     std::unique_ptr<SwTextGridItem> pGridItem;
-protected:
+
     virtual void DrawPage(vcl::RenderContext& rRenderContext,
                           const Point& rPoint,
                           const bool bSecond,
@@ -57,13 +57,12 @@ public:
 };
 
 
-class SW_DLLPUBLIC SwColExample : public SwPageExample
+class SW_DLLPUBLIC SwColExample final : public SwPageExample
 {
     SwColMgr*   pColMgr;
 
     using SwPageExample::UpdateExample;
 
-protected:
     virtual void DrawPage(vcl::RenderContext& rRenderContext,
                           const Point& rPoint,
                           const bool bSecond,
@@ -82,7 +81,7 @@ public:
     }
 };
 
-class SW_DLLPUBLIC SwColumnOnlyExample : public weld::CustomWidgetController
+class SW_DLLPUBLIC SwColumnOnlyExample final : public weld::CustomWidgetController
 {
 private:
     Size        m_aWinSize;
@@ -90,7 +89,6 @@ private:
     Size        m_aFrameSize;
     SwFormatCol    m_aCols;
 
-protected:
     virtual void Resize() override;
     virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
 
diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx
index e7c39cb7db90..133757a77d52 100644
--- a/sw/source/uibase/inc/column.hxx
+++ b/sw/source/uibase/inc/column.hxx
@@ -33,7 +33,7 @@ class SwColMgr;
 class SwWrtShell;
 class SwColumnPage;
 
-class SwColumnDlg : public SfxDialogController
+class SwColumnDlg final : public SfxDialogController
 {
     SwWrtShell&         m_rWrtShell;
     std::unique_ptr<SwColumnPage> m_xTabPage;
@@ -81,7 +81,7 @@ public:
 };
 
 // column dialog now as TabPage
-class SwColumnPage : public SfxTabPage
+class SwColumnPage final : public SfxTabPage
 {
     std::unique_ptr<SwColMgr> m_xColMgr;
 
diff --git a/sw/source/uibase/inc/condedit.hxx b/sw/source/uibase/inc/condedit.hxx
index 1c4df0086b55..a4599508c000 100644
--- a/sw/source/uibase/inc/condedit.hxx
+++ b/sw/source/uibase/inc/condedit.hxx
@@ -25,7 +25,7 @@
 
 class ConditionEdit;
 
-class SW_DLLPUBLIC ConditionEditDropTarget : public DropTargetHelper
+class SW_DLLPUBLIC ConditionEditDropTarget final : public DropTargetHelper
 {
 private:
     ConditionEdit& m_rEdit;
diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx
index 69f9696158ee..64b1e265f10b 100644
--- a/sw/source/uibase/inc/content.hxx
+++ b/sw/source/uibase/inc/content.hxx
@@ -152,7 +152,7 @@ public:
  * GetMember. It is reloaded after Invalidate() only if the content
  * should be read again.
 */
-class SwContentType : public SwTypeNumber
+class SwContentType final : public SwTypeNumber
 {
     SwWrtShell*         m_pWrtShell;
     std::unique_ptr<SwContentArr>
@@ -166,7 +166,7 @@ class SwContentType : public SwTypeNumber
     bool                m_bDataValid :    1;
     bool                m_bEdit:          1;  // can this type be edited?
     bool                m_bDelete:        1;  // can this type be deleted?
-protected:
+
         static OUString     RemoveNewline(const OUString&);
 public:
         SwContentType(SwWrtShell* pParent, ContentTypeId nType, sal_uInt8 nLevel );
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index f572bc76a983..4ac942e9ecd7 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -71,7 +71,7 @@ namespace o3tl {
 
 class SwContentTree;
 
-class SwContentTreeDropTarget : public DropTargetHelper
+class SwContentTreeDropTarget final : public DropTargetHelper
 {
 private:
     SwContentTree& m_rTreeView;
@@ -270,7 +270,7 @@ namespace sfx2 { class FileDialogHelper; }
 
 class SwGlobalTree;
 
-class SwGlobalTreeDropTarget : public DropTargetHelper
+class SwGlobalTreeDropTarget final : public DropTargetHelper
 {
 private:
     SwGlobalTree& m_rTreeView;
diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx
index 867ae46ce21a..fabfeca26a53 100644
--- a/sw/source/uibase/inc/convert.hxx
+++ b/sw/source/uibase/inc/convert.hxx
@@ -28,7 +28,7 @@ class SwView;
 class SwWrtShell;
 struct SwInsertTableOptions;
 
-class SwConvertTableDlg : public SfxDialogController
+class SwConvertTableDlg final : public SfxDialogController
 {
     std::unique_ptr<weld::RadioButton> m_xTabBtn;
     std::unique_ptr<weld::RadioButton> m_xSemiBtn;
diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx
index b26a1fb2178f..b442857a44b8 100644
--- a/sw/source/uibase/inc/cption.hxx
+++ b/sw/source/uibase/inc/cption.hxx
@@ -29,7 +29,7 @@
 class SwFieldMgr;
 class SwView;
 
-class SwCaptionDialog : public SfxDialogController
+class SwCaptionDialog final : public SfxDialogController
 {
     OUString m_sNone;
     TextFilterAutoConvert m_aTextFilter;
diff --git a/sw/source/uibase/inc/dbconfig.hxx b/sw/source/uibase/inc/dbconfig.hxx
index 5a611f5d8be0..a21319690a9a 100644
--- a/sw/source/uibase/inc/dbconfig.hxx
+++ b/sw/source/uibase/inc/dbconfig.hxx
@@ -24,7 +24,7 @@
 
 struct SwDBData;
 
-class SW_DLLPUBLIC SwDBConfig : public utl::ConfigItem
+class SW_DLLPUBLIC SwDBConfig final : public utl::ConfigItem
 {
 private:
     SAL_DLLPRIVATE static const css::uno::Sequence<OUString>& GetPropertyNames();
diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx
index 3cd7a76a6b26..be1496229f91 100644
--- a/sw/source/uibase/inc/dbinsdlg.hxx
+++ b/sw/source/uibase/inc/dbinsdlg.hxx
@@ -76,7 +76,7 @@ class SwInsDBColumns : public o3tl::sorted_vector<std::unique_ptr<SwInsDBColumn>
 {
 };
 
-class SwInsertDBColAutoPilot : public SfxDialogController, public utl::ConfigItem
+class SwInsertDBColAutoPilot final : public SfxDialogController, public utl::ConfigItem
 {
     SwInsDBColumns  aDBColumns;
     const SwDBData  aDBData;
diff --git a/sw/source/uibase/inc/dbui.hxx b/sw/source/uibase/inc/dbui.hxx
index ea42bb44da13..b58b2abed951 100644
--- a/sw/source/uibase/inc/dbui.hxx
+++ b/sw/source/uibase/inc/dbui.hxx
@@ -23,7 +23,7 @@
 
 #include <swdllapi.h>
 
-class PrintMonitor : public weld::GenericDialogController
+class PrintMonitor final : public weld::GenericDialogController
 {
 public:
     std::unique_ptr<weld::Label> m_xDocName;
@@ -34,7 +34,7 @@ public:
     virtual ~PrintMonitor() override;
 };
 
-class SW_DLLPUBLIC SaveMonitor : public weld::GenericDialogController
+class SW_DLLPUBLIC SaveMonitor final : public weld::GenericDialogController
 {
 public:
     std::unique_ptr<weld::Label> m_xDocName;
@@ -45,7 +45,7 @@ public:
     virtual ~SaveMonitor() override;
 };
 
-class CreateMonitor : public weld::GenericDialogController
+class CreateMonitor final : public weld::GenericDialogController
 {
 public:
     CreateMonitor(weld::Window* pParent);
diff --git a/sw/source/uibase/inc/docfnote.hxx b/sw/source/uibase/inc/docfnote.hxx
index 6e232c85ac63..1719349ab5ef 100644
--- a/sw/source/uibase/inc/docfnote.hxx
+++ b/sw/source/uibase/inc/docfnote.hxx
@@ -23,7 +23,7 @@
 
 class SwWrtShell;
 
-class SwFootNoteOptionDlg : public SfxTabDialogController
+class SwFootNoteOptionDlg final : public SfxTabDialogController
 {
     SwWrtShell& rSh;
 
diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx
index bf02a7284b09..d07746a0386a 100644
--- a/sw/source/uibase/inc/drpcps.hxx
+++ b/sw/source/uibase/inc/drpcps.hxx
@@ -28,7 +28,7 @@
 
 class SwWrtShell;
 
-class SwDropCapsDlg : public SfxSingleTabDialogController
+class SwDropCapsDlg final : public SfxSingleTabDialogController
 {
 public:
     SwDropCapsDlg(weld::Window *pParent, const SfxItemSet &rSet);
@@ -36,7 +36,7 @@ public:
 
 class SwDropCapsPage;
 
-class SwDropCapsPict : public weld::CustomWidgetController
+class SwDropCapsPict final : public weld::CustomWidgetController
 {
     SwDropCapsPage* mpPage;
     OUString        maText;
@@ -107,7 +107,7 @@ public:
     void DrawPrev(vcl::RenderContext& rRenderContext, const Point& rPt);
 };
 
-class SwDropCapsPage : public SfxTabPage
+class SwDropCapsPage final : public SfxTabPage
 {
 friend class SwDropCapsPict;
     SwDropCapsPict  m_aPict;
diff --git a/sw/source/uibase/inc/dselect.hxx b/sw/source/uibase/inc/dselect.hxx
index e6002e1d6107..4f53feb31006 100644
--- a/sw/source/uibase/inc/dselect.hxx
+++ b/sw/source/uibase/inc/dselect.hxx
@@ -22,7 +22,7 @@
 #include "drawbase.hxx"
 
 // draw rectangle
-class DrawSelection : public SwDrawBase
+class DrawSelection final : public SwDrawBase
 {
 public:
     DrawSelection(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
diff --git a/sw/source/uibase/inc/envimg.hxx b/sw/source/uibase/inc/envimg.hxx
index b63d6b0a5d15..15c2560b9b00 100644
--- a/sw/source/uibase/inc/envimg.hxx
+++ b/sw/source/uibase/inc/envimg.hxx
@@ -35,7 +35,7 @@ enum SwEnvAlign
     ENV_VER_RGHT
 };
 
-class SW_DLLPUBLIC SwEnvItem : public SfxPoolItem
+class SW_DLLPUBLIC SwEnvItem final : public SfxPoolItem
 {
 public:
 
@@ -66,7 +66,7 @@ public:
     virtual bool             PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
 };
 
-class SwEnvCfgItem : public utl::ConfigItem
+class SwEnvCfgItem final : public utl::ConfigItem
 {
 private:
     SwEnvItem m_aEnvItem;
diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx
index 00abb7ab2889..49a1d9429578 100644
--- a/sw/source/uibase/inc/envlop.hxx
+++ b/sw/source/uibase/inc/envlop.hxx
@@ -43,7 +43,7 @@ class SwEnvFormatPage;
 class SwWrtShell;
 class Printer;
 
-class SwEnvPreview : public weld::CustomWidgetController
+class SwEnvPreview final : public weld::CustomWidgetController
 {
 private:
     SwEnvDlg* m_pDialog;
@@ -56,7 +56,7 @@ public:
     void SetDialog(SwEnvDlg* pDialog) { m_pDialog = pDialog; }
 };
 
-class SwEnvDlg : public SfxTabDialogController
+class SwEnvDlg final : public SfxTabDialogController
 {
     friend class SwEnvPage;
     friend class SwEnvFormatPage;
@@ -80,7 +80,7 @@ public:
     virtual ~SwEnvDlg() override;
 };
 
-class SwEnvPage : public SfxTabPage
+class SwEnvPage final : public SfxTabPage
 {
     SwEnvDlg* m_pDialog;
     SwWrtShell* m_pSh;
diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx
index 9f512ea3f7b8..ecb2ff04abf3 100644
--- a/sw/source/uibase/inc/fldedt.hxx
+++ b/sw/source/uibase/inc/fldedt.hxx
@@ -27,7 +27,7 @@ class SwView;
 class SwWrtShell;
 class SwFieldMgr;
 
-class SwFieldEditDlg : public SfxSingleTabDialogController
+class SwFieldEditDlg final : public SfxSingleTabDialogController
 {
     SwWrtShell* pSh;
     std::unique_ptr<weld::Button> m_xPrevBT;
diff --git a/sw/source/uibase/inc/fldtdlg.hxx b/sw/source/uibase/inc/fldtdlg.hxx
index f55e84e2c202..b2cd767e41f1 100644
--- a/sw/source/uibase/inc/fldtdlg.hxx
+++ b/sw/source/uibase/inc/fldtdlg.hxx
@@ -30,7 +30,7 @@ class SfxTabPage;
 class SwChildWinWrapper;
 struct SfxChildWinInfo;
 
-class SwFieldDlg : public SfxTabDialogController
+class SwFieldDlg final : public SfxTabDialogController
 {
     SwChildWinWrapper*  m_pChildWin;
     SfxBindings*        m_pBindings;
diff --git a/sw/source/uibase/inc/fldwrap.hxx b/sw/source/uibase/inc/fldwrap.hxx
index 6532ff7db891..a0d0b9d9dfbc 100644
--- a/sw/source/uibase/inc/fldwrap.hxx
+++ b/sw/source/uibase/inc/fldwrap.hxx
@@ -26,7 +26,7 @@
 #include "chldwrap.hxx"
 class AbstractSwFieldDlg;
 
-class SwFieldDlgWrapper : public SwChildWinWrapper
+class SwFieldDlgWrapper final : public SwChildWinWrapper
 {
     ScopedVclPtr<AbstractSwFieldDlg> pDlgInterface;
 public:
@@ -40,7 +40,7 @@ public:
 };
 
 // field dialog only showing database page to support mail merge
-class SwFieldDataOnlyDlgWrapper : public SwChildWinWrapper
+class SwFieldDataOnlyDlgWrapper final : public SwChildWinWrapper
 {
     ScopedVclPtr<AbstractSwFieldDlg> pDlgInterface;
 public:
diff --git a/sw/source/uibase/inc/fontcfg.hxx b/sw/source/uibase/inc/fontcfg.hxx
index 388f16d81c2b..e752d90f08f6 100644
--- a/sw/source/uibase/inc/fontcfg.hxx
+++ b/sw/source/uibase/inc/fontcfg.hxx
@@ -52,7 +52,7 @@
 #define FONTSIZE_CJK_DEFAULT        210
 #define FONTSIZE_OUTLINE            280
 
-class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem
+class SW_DLLPUBLIC SwStdFontConfig final : public utl::ConfigItem
 {
     OUString    sDefaultFonts[DEF_FONT_COUNT];
     sal_Int32   nDefaultFontHeight[DEF_FONT_COUNT];
diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx
index e3c079a2228f..87f03d8cc97a 100644
--- a/sw/source/uibase/inc/frmdlg.hxx
+++ b/sw/source/uibase/inc/frmdlg.hxx

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list