diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-17 15:02:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-18 09:12:57 +0200 |
commit | 4968b6484707cb40b70a3115084e19433d1fec7f (patch) | |
tree | 58c1926a62f4e7681076e1585e81b875b43cfb6b /sw/inc | |
parent | a3d89265e0be3f9ee8ae813e4aeaa90af1714348 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'sw/inc')
46 files changed, 76 insertions, 86 deletions
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; |