diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-04 10:23:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-04 10:29:24 +0100 |
commit | daa344f3e9683c16479ef5081fb03325af103c07 (patch) | |
tree | 9eaad4d46de6e6cbbbee9f2e0d911563cf5cd12d | |
parent | fa7f07d23de31e5f1660a643d83ca8a2e565f69c (diff) |
loplugin:finalclasses in sw/inc
Change-Id: I084502d8c5607f103ef987b54252ef95341f0bef
Reviewed-on: https://gerrit.libreoffice.org/81981
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
87 files changed, 227 insertions, 254 deletions
diff --git a/sw/inc/PageColumnPopup.hxx b/sw/inc/PageColumnPopup.hxx index f01a9116deb6..b0df45df4a96 100644 --- a/sw/inc/PageColumnPopup.hxx +++ b/sw/inc/PageColumnPopup.hxx @@ -22,7 +22,7 @@ #include <sfx2/tbxctrl.hxx> #include "swdllapi.h" -class PageColumnPopup : public SfxToolBoxControl +class PageColumnPopup final : public SfxToolBoxControl { public: SFX_DECL_TOOLBOX_CONTROL(); diff --git a/sw/inc/PageMarginPopup.hxx b/sw/inc/PageMarginPopup.hxx index 2bb9617858f0..d06dc3364069 100644 --- a/sw/inc/PageMarginPopup.hxx +++ b/sw/inc/PageMarginPopup.hxx @@ -22,7 +22,7 @@ #include <sfx2/tbxctrl.hxx> #include "swdllapi.h" -class PageMarginPopup : public SfxToolBoxControl +class PageMarginPopup final : public SfxToolBoxControl { public: SFX_DECL_TOOLBOX_CONTROL(); diff --git a/sw/inc/PageOrientationPopup.hxx b/sw/inc/PageOrientationPopup.hxx index ff88d7af5300..b1390e5b544d 100644 --- a/sw/inc/PageOrientationPopup.hxx +++ b/sw/inc/PageOrientationPopup.hxx @@ -22,7 +22,7 @@ #include <sfx2/tbxctrl.hxx> #include "swdllapi.h" -class PageOrientationPopup : public SfxToolBoxControl +class PageOrientationPopup final : public SfxToolBoxControl { public: SFX_DECL_TOOLBOX_CONTROL(); diff --git a/sw/inc/PageSizePopup.hxx b/sw/inc/PageSizePopup.hxx index b67779552201..5315863bf2b2 100644 --- a/sw/inc/PageSizePopup.hxx +++ b/sw/inc/PageSizePopup.hxx @@ -22,7 +22,7 @@ #include <sfx2/tbxctrl.hxx> #include "swdllapi.h" -class PageSizePopup : public SfxToolBoxControl +class PageSizePopup final : public SfxToolBoxControl { public: SFX_DECL_TOOLBOX_CONTROL(); diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 8a6330dcecb3..743e78503b47 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -85,7 +85,7 @@ struct FieldShadowState } }; -class SwNoteProps: public utl::ConfigItem +class SwNoteProps final : public utl::ConfigItem { private: bool m_bIsShowAnchor; @@ -124,7 +124,7 @@ class SwNoteProps: public utl::ConfigItem virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override; }; -class SAL_DLLPUBLIC_RTTI SwPostItMgr: public SfxListener +class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public SfxListener { private: SwView* mpView; diff --git a/sw/inc/SwDocIdle.hxx b/sw/inc/SwDocIdle.hxx index 708dc1c1cb78..ac15b34eee28 100644 --- a/sw/inc/SwDocIdle.hxx +++ b/sw/inc/SwDocIdle.hxx @@ -33,12 +33,11 @@ namespace sw { * quite probably not a problem, as busy documents have a high chance to have * generated idle tasks. */ -class SwDocIdle : public Idle +class SwDocIdle final : public Idle { private: SwDoc &m_rDoc; -protected: virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const override; public: diff --git a/sw/inc/SwSmartTagMgr.hxx b/sw/inc/SwSmartTagMgr.hxx index b8240f685823..3a9c1dbe57ac 100644 --- a/sw/inc/SwSmartTagMgr.hxx +++ b/sw/inc/SwSmartTagMgr.hxx @@ -23,7 +23,7 @@ #include <svx/SmartTagMgr.hxx> // Wrapper for the svx SmartTagMgr -class SwSmartTagMgr : public SmartTagMgr +class SwSmartTagMgr final : public SmartTagMgr { private: static SwSmartTagMgr* spTheSwSmartTagMgr; diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx index f275e701f9bf..91938ebfe0a5 100644 --- a/sw/inc/SwUndoField.hxx +++ b/sw/inc/SwUndoField.hxx @@ -41,7 +41,7 @@ public: virtual ~SwUndoField() override; }; -class SwUndoFieldFromDoc : public SwUndoField +class SwUndoFieldFromDoc final : public SwUndoField { std::unique_ptr<SwField> pOldField, pNewField; SwMsgPoolItem * const pHint; @@ -61,7 +61,7 @@ public: virtual void RepeatImpl( ::sw::RepeatContext & ) override; }; -class SwUndoFieldFromAPI : public SwUndoField +class SwUndoFieldFromAPI final : public SwUndoField { css::uno::Any aOldVal, aNewVal; sal_uInt16 const nWhich; diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx index 82c8f66340dd..af8c8cb20831 100644 --- a/sw/inc/SwXMLSectionList.hxx +++ b/sw/inc/SwXMLSectionList.hxx @@ -21,9 +21,8 @@ #include <xmloff/xmlimp.hxx> -class SwXMLSectionList : public SvXMLImport +class SwXMLSectionList final : public SvXMLImport { -protected: virtual SvXMLImportContext *CreateDocumentContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/sw/inc/ToxTabStopTokenHandler.hxx b/sw/inc/ToxTabStopTokenHandler.hxx index 23a66cc405db..f951fb229583 100644 --- a/sw/inc/ToxTabStopTokenHandler.hxx +++ b/sw/inc/ToxTabStopTokenHandler.hxx @@ -49,7 +49,7 @@ public: }; /** The default implementation of ToxTabStopTokenHandler */ -class DefaultToxTabStopTokenHandler : public ToxTabStopTokenHandler +class DefaultToxTabStopTokenHandler final : public ToxTabStopTokenHandler { public: diff --git a/sw/inc/UndoParagraphSignature.hxx b/sw/inc/UndoParagraphSignature.hxx index c75eb4679a67..c465da17ffd3 100644 --- a/sw/inc/UndoParagraphSignature.hxx +++ b/sw/inc/UndoParagraphSignature.hxx @@ -30,7 +30,7 @@ namespace com { namespace sun { namespace star { namespace text { class XTextCon namespace com { namespace sun { namespace star { namespace text { class XTextField; } } } } /// Undo/Redo Paragraph Signature. -class SwUndoParagraphSigning : public SwUndo +class SwUndoParagraphSigning final : public SwUndo { private: SwDoc* m_pDoc; diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 658bb171df91..3eac9b4886ea 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -85,7 +85,7 @@ namespace o3tl template<> struct typed_flags<AccessibleStates> : is_typed_flags<AccessibleStates, 0x3e3> {}; } -class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder, +class SwAccessibleMap final : public ::accessibility::IAccessibleViewForwarder, public ::accessibility::IAccessibleParent , public std::enable_shared_from_this<SwAccessibleMap> { diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx index 2f7a1b6a44d8..e6d2a802cd8c 100644 --- a/sw/inc/anchoreddrawobject.hxx +++ b/sw/inc/anchoreddrawobject.hxx @@ -25,7 +25,7 @@ namespace tools { class Rectangle; } /** class for the positioning of drawing objects */ -class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject +class SW_DLLPUBLIC SwAnchoredDrawObject final : public SwAnchoredObject { private: // boolean, indicating that the object position has been invalidated @@ -88,7 +88,6 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject /** method to invalidate the given page frame */ void InvalidatePage_( SwPageFrame* _pPageFrame ); - protected: virtual void ObjectAttachedToAnchorFrame() override; /** method to assure that anchored object is registered at the correct diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx index 171febb19bed..fe631d7715a0 100644 --- a/sw/inc/authfld.hxx +++ b/sw/inc/authfld.hxx @@ -29,7 +29,7 @@ #include <memory> #include <vector> -class SwAuthEntry : public salhelper::SimpleReferenceObject +class SwAuthEntry final : public salhelper::SimpleReferenceObject { OUString aAuthFields[AUTH_FIELD_END]; public: @@ -54,7 +54,7 @@ struct SwTOXSortKey typedef std::vector<SwTOXSortKey> SortKeyArr; typedef std::vector<rtl::Reference<SwAuthEntry>> SwAuthDataArr; -class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType +class SW_DLLPUBLIC SwAuthorityFieldType final : public SwFieldType { SwDoc* m_pDoc; SwAuthDataArr m_DataArr; @@ -68,8 +68,7 @@ class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType LanguageType m_eLanguage; OUString m_sSortAlgorithm; -protected: -virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override; + virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override; public: SwAuthorityFieldType(SwDoc* pDoc); @@ -145,7 +144,7 @@ public: one of the instances with the same m_nHandle is actually in the document, they're all cloned via CopyField()... */ -class SAL_DLLPUBLIC_RTTI SwAuthorityField : public SwField +class SAL_DLLPUBLIC_RTTI SwAuthorityField final : public SwField { rtl::Reference<SwAuthEntry> m_xAuthEntry; mutable sal_IntPtr m_nTempSequencePos; diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index c3404d8b402e..5edec81f5e96 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -100,7 +100,7 @@ enum class SwCalcError Overflow, // overflow }; -class SwSbxValue : public SbxValue +class SwSbxValue final : public SbxValue { bool m_bVoid; bool m_bDBvalue; @@ -129,7 +129,7 @@ struct SwHash std::unique_ptr<SwHash> pNext; }; -struct SwCalcExp : public SwHash +struct SwCalcExp final : public SwHash { SwSbxValue nValue; const SwFieldType* pFieldType; diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx index de1ada052b8a..9fa8e7468321 100644 --- a/sw/inc/ccoll.hxx +++ b/sw/inc/ccoll.hxx @@ -37,7 +37,7 @@ struct CommandStruct sal_Int16 GetCommandContextIndex( const OUString &rContextName ); OUString GetCommandContextByIndex( sal_Int16 nIndex ); -class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem +class SW_DLLPUBLIC SwCondCollItem final : public SfxPoolItem { static const CommandStruct aCmds[COND_COMMAND_COUNT]; diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx index 796268eccb71..5196a06fa5bd 100644 --- a/sw/inc/charfmt.hxx +++ b/sw/inc/charfmt.hxx @@ -22,7 +22,7 @@ #include "format.hxx" #include "hintids.hxx" -class SW_DLLPUBLIC SwCharFormat : public SwFormat +class SW_DLLPUBLIC SwCharFormat final : public SwFormat { friend class SwDoc; friend class SwTextFormatColl; diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx index 2eab37afe536..4f605de8c722 100644 --- a/sw/inc/chpfld.hxx +++ b/sw/inc/chpfld.hxx @@ -36,7 +36,7 @@ enum SwChapterFormat CF_NUM_NOPREPST_TITLE, ///< chapter number without post-/prefix and title }; -class SW_DLLPUBLIC SwChapterFieldType : public SwFieldType +class SW_DLLPUBLIC SwChapterFieldType final : public SwFieldType { public: SwChapterFieldType(); @@ -45,7 +45,7 @@ public: }; -class SW_DLLPUBLIC SwChapterField : public SwField +class SW_DLLPUBLIC SwChapterField final : public SwField { friend class SwChapterFieldType; friend class ToxTextGeneratorTest; // the unittest needs to mock the chapter fields. diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index 0145c9171d93..34aafa04e6b2 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -26,7 +26,7 @@ class SwDoc; // Database field. -class SW_DLLPUBLIC SwDBFieldType : public SwValueFieldType +class SW_DLLPUBLIC SwDBFieldType final : public SwValueFieldType { SwDBData m_aDBData; OUString m_sName; ///< only used in ::GetName() ! @@ -53,7 +53,7 @@ public: // Classes derived from SwFields. They overlay the expand-function. // Content is formatted according to the format (if available). -class SW_DLLPUBLIC SwDBField : public SwValueField +class SW_DLLPUBLIC SwDBField final : public SwValueField { OUString m_aContent; OUString m_sFieldCode; ///< contains Word's field code @@ -146,7 +146,7 @@ public: }; // Database field next record. -class SW_DLLPUBLIC SwDBNextSetFieldType : public SwFieldType +class SW_DLLPUBLIC SwDBNextSetFieldType final : public SwFieldType { public: SwDBNextSetFieldType(); @@ -155,7 +155,7 @@ public: }; // Next data record with condition. -class SW_DLLPUBLIC SwDBNextSetField : public SwDBNameInfField +class SW_DLLPUBLIC SwDBNextSetField final : public SwDBNameInfField { OUString m_aCond; bool m_bCondValid; @@ -185,7 +185,7 @@ inline void SwDBNextSetField::SetCondValid(bool bCond) { m_bCondValid = bCond; } // Database field next record. -class SwDBNumSetFieldType : public SwFieldType +class SwDBNumSetFieldType final : public SwFieldType { public: SwDBNumSetFieldType(); @@ -195,7 +195,7 @@ public: // Data record with number xxx. // Number is in nFormat (bit of a misuse!) -class SwDBNumSetField : public SwDBNameInfField +class SwDBNumSetField final : public SwDBNameInfField { OUString m_aCond; OUString m_aPar2; @@ -231,7 +231,7 @@ inline void SwDBNumSetField::SetCondValid(bool bCond) { m_bCondValid = bCond; } // Database name. -class SwDBNameFieldType : public SwFieldType +class SwDBNameFieldType final : public SwFieldType { SwDoc *m_pDoc; public: @@ -242,7 +242,7 @@ public: }; // Database field. -class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField +class SW_DLLPUBLIC SwDBNameField final : public SwDBNameInfField { public: SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData); @@ -254,7 +254,7 @@ public: }; // Number of data record. -class SW_DLLPUBLIC SwDBSetNumberFieldType : public SwFieldType +class SW_DLLPUBLIC SwDBSetNumberFieldType final : public SwFieldType { public: SwDBSetNumberFieldType(); @@ -263,7 +263,7 @@ public: }; // Database field. -class SW_DLLPUBLIC SwDBSetNumberField : public SwDBNameInfField +class SW_DLLPUBLIC SwDBSetNumberField final : public SwDBNameInfField { long m_nNumber; public: diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 9955225a488b..713388c827f2 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -207,7 +207,7 @@ public: /** new class for re-direct methods calls at a 'virtual' drawing object to its referenced object. */ -class SwDrawVirtObj : public SdrVirtObj +class SwDrawVirtObj final : public SdrVirtObj { private: // data for connection to writer layout @@ -220,7 +220,6 @@ class SwDrawVirtObj : public SdrVirtObj inserted into the drawing layer. */ SwDrawContact& mrDrawContact; - protected: /** AW: Need own sdr::contact::ViewContact since AnchorPos from parent is not used but something own (top left of new SnapRect minus top left of original SnapRect) */ diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx index d0404f2bf05b..f1965acdfc95 100644 --- a/sw/inc/ddefld.hxx +++ b/sw/inc/ddefld.hxx @@ -48,7 +48,7 @@ namespace sw } // FieldType for DDE -class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType +class SW_DLLPUBLIC SwDDEFieldType final : public SwFieldType { OUString const aName; OUString aExpansion; @@ -102,7 +102,7 @@ public: }; // DDE-field -class SwDDEField : public SwField +class SwDDEField final : public SwField { private: virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override; diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx index 87e768466f37..2bebbddcf105 100644 --- a/sw/inc/dlelstnr.hxx +++ b/sw/inc/dlelstnr.hxx @@ -39,7 +39,7 @@ namespace com { namespace sun { namespace star { Happens when relevant changes (to the dictionaries of the dictionary list, or properties) were made. */ -class SwLinguServiceEventListener : +class SwLinguServiceEventListener final : public cppu::WeakImplHelper < css::linguistic2::XLinguServiceEventListener, diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 0e025c996bfc..de0dc00d2db4 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -173,7 +173,7 @@ public: } }; -class SwGrfFormatColls : public SwFormatsModifyBase<SwGrfFormatColl*> +class SwGrfFormatColls final : public SwFormatsModifyBase<SwGrfFormatColl*> { public: SwGrfFormatColls() : SwFormatsModifyBase( DestructorPolicy::KeepElements ) {} @@ -276,19 +276,19 @@ public: /// Unsorted, undeleting SwFrameFormat vector -class SwFrameFormatsV : public SwFormatsModifyBase<SwFrameFormat*> +class SwFrameFormatsV final : public SwFormatsModifyBase<SwFrameFormat*> { public: SwFrameFormatsV() : SwFormatsModifyBase( DestructorPolicy::KeepElements ) {} }; -class SwCharFormats : public SwFormatsModifyBase<SwCharFormat*> +class SwCharFormats final : public SwFormatsModifyBase<SwCharFormat*> { public: void dumpAsXml(xmlTextWriterPtr pWriter) const; }; -class SwTextFormatColls : public SwFormatsModifyBase<SwTextFormatColl*> +class SwTextFormatColls final : public SwFormatsModifyBase<SwTextFormatColl*> { public: SwTextFormatColls() : SwFormatsModifyBase( DestructorPolicy::KeepElements ) {} @@ -296,7 +296,7 @@ public: }; /// Array of Undo-history. -class SW_DLLPUBLIC SwSectionFormats : public SwFormatsModifyBase<SwSectionFormat*> +class SW_DLLPUBLIC SwSectionFormats final : public SwFormatsModifyBase<SwSectionFormat*> { public: void dumpAsXml(xmlTextWriterPtr pWriter) const; @@ -309,7 +309,7 @@ public: class SwTOXTypes : public std::vector<std::unique_ptr<SwTOXType>> {}; -class SW_DLLPUBLIC SwNumRuleTable : public SwVectorModifyBase<SwNumRule*> { +class SW_DLLPUBLIC SwNumRuleTable final : public SwVectorModifyBase<SwNumRule*> { public: void dumpAsXml(xmlTextWriterPtr pWriter) const; }; diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index 472ba6cd6c18..609cee5c9426 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -42,7 +42,7 @@ class SwBoxAutoFormat; enum class SwGetPoolIdFromName : sal_uInt16; // Temporary StyleSheet. -class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase +class SW_DLLPUBLIC SwDocStyleSheet final : public SfxStyleSheetBase { friend class SwDocStyleSheetPool; friend class SwStyleSheetIterator; @@ -73,7 +73,6 @@ class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase SAL_DLLPRIVATE bool FillStyleSheet(FillStyleType eFType, std::unique_ptr<SfxItemSet> * o_ppFlatSet = nullptr); -protected: virtual ~SwDocStyleSheet() override; public: diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index cb6f0c2159c2..b8ea4866eff0 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -123,7 +123,7 @@ enum SwJumpEditFormat JE_FMT_OLE }; -class SAL_DLLPUBLIC_RTTI SwPageNumberFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwPageNumberFieldType final : public SwFieldType { SvxNumType m_nNumberingType; bool m_bVirtual; @@ -139,7 +139,7 @@ public: }; // Page numbering. -class SW_DLLPUBLIC SwPageNumberField : public SwField +class SW_DLLPUBLIC SwPageNumberField final : public SwField { OUString m_sUserStr; sal_uInt16 m_nSubType; @@ -171,7 +171,7 @@ public: void SetUserString( const OUString& rS ) { m_sUserStr = rS; } }; -class SwAuthorFieldType : public SwFieldType +class SwAuthorFieldType final : public SwFieldType { public: SwAuthorFieldType(); @@ -180,7 +180,7 @@ public: virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SwAuthorField : public SwField +class SwAuthorField final : public SwField { OUString m_aContent; @@ -196,7 +196,7 @@ public: virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; -class SAL_DLLPUBLIC_RTTI SwFileNameFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwFileNameFieldType final : public SwFieldType { SwDoc *m_pDoc; public: @@ -206,7 +206,7 @@ public: virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SW_DLLPUBLIC SwFileNameField : public SwField +class SW_DLLPUBLIC SwFileNameField final : public SwField { OUString m_aContent; @@ -222,7 +222,7 @@ public: virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; -class SAL_DLLPUBLIC_RTTI SwTemplNameFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwTemplNameFieldType final : public SwFieldType { SwDoc *m_pDoc; public: @@ -232,7 +232,7 @@ public: virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SW_DLLPUBLIC SwTemplNameField : public SwField +class SW_DLLPUBLIC SwTemplNameField final : public SwField { public: SwTemplNameField(SwTemplNameFieldType*, sal_uInt32 nFormat); @@ -244,7 +244,7 @@ public: }; // Document statistics -class SAL_DLLPUBLIC_RTTI SwDocStatFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwDocStatFieldType final : public SwFieldType { SwDoc* m_pDoc; SvxNumType m_nNumberingType; @@ -257,7 +257,7 @@ public: void SetNumFormat( SvxNumType eFormat ) { m_nNumberingType = eFormat; } }; -class SW_DLLPUBLIC SwDocStatField : public SwField +class SW_DLLPUBLIC SwDocStatField final : public SwField { sal_uInt16 m_nSubType; @@ -276,7 +276,7 @@ public: virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; -class SAL_DLLPUBLIC_RTTI SwHiddenTextFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwHiddenTextFieldType final : public SwFieldType { bool m_bHidden; public: @@ -288,7 +288,7 @@ public: bool GetHiddenFlag() const { return m_bHidden; } }; -class SW_DLLPUBLIC SwHiddenTextField : public SwField +class SW_DLLPUBLIC SwHiddenTextField final : public SwField { OUString m_aTRUEText; ///< Text if condition true. OUString m_aFALSEText; ///< If condition false. @@ -346,7 +346,7 @@ public: }; // Field that expands to an empty line (without height). -class SwHiddenParaFieldType : public SwFieldType +class SwHiddenParaFieldType final : public SwFieldType { public: SwHiddenParaFieldType(); @@ -354,7 +354,7 @@ public: virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SwHiddenParaField : public SwField +class SwHiddenParaField final : public SwField { OUString m_aCond; bool m_bIsHidden; @@ -375,7 +375,7 @@ public: virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; -class SAL_DLLPUBLIC_RTTI SwMacroFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwMacroFieldType final : public SwFieldType { SwDoc* const m_pDoc; @@ -385,7 +385,7 @@ public: virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SW_DLLPUBLIC SwMacroField : public SwField +class SW_DLLPUBLIC SwMacroField final : public SwField { OUString m_aMacro; OUString m_aText; @@ -423,7 +423,7 @@ public: static bool isScriptURL( const OUString& str ); }; -class SAL_DLLPUBLIC_RTTI SwPostItFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwPostItFieldType final : public SwFieldType { private: SwDoc* const mpDoc; @@ -438,7 +438,7 @@ public: }; }; -class SW_DLLPUBLIC SwPostItField : public SwField +class SW_DLLPUBLIC SwPostItField final : public SwField { OUString m_sText; OUString m_sAuthor; @@ -502,7 +502,7 @@ public: virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; -class SAL_DLLPUBLIC_RTTI SwDocInfoFieldType : public SwValueFieldType +class SAL_DLLPUBLIC_RTTI SwDocInfoFieldType final : public SwValueFieldType { public: SwDocInfoFieldType(SwDoc* pDc); @@ -511,7 +511,7 @@ public: virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SW_DLLPUBLIC SwDocInfoField : public SwValueField +class SW_DLLPUBLIC SwDocInfoField final : public SwValueField { sal_uInt16 m_nSubType; OUString m_aContent; @@ -536,7 +536,7 @@ public: }; // Extended User settings. -class SwExtUserFieldType : public SwFieldType +class SwExtUserFieldType final : public SwFieldType { public: SwExtUserFieldType(); @@ -545,7 +545,7 @@ public: virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SwExtUserField : public SwField +class SwExtUserField final : public SwField { OUString m_aContent; sal_uInt16 m_nType; @@ -566,20 +566,20 @@ public: }; // Relative page numbers - field. -class SwRefPageSetFieldType : public SwFieldType +class SwRefPageSetFieldType final : public SwFieldType { public: SwRefPageSetFieldType(); virtual std::unique_ptr<SwFieldType> Copy() const override; -protected: +private: /// Overlay, because there is nothing to update! virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ) override; }; // Relative page numbering. -class SAL_DLLPUBLIC_RTTI SwRefPageSetField : public SwField +class SAL_DLLPUBLIC_RTTI SwRefPageSetField final : public SwField { short m_nOffset; bool m_bOn; @@ -602,7 +602,7 @@ public: }; // Relative page numbers - query field. -class SwRefPageGetFieldType : public SwFieldType +class SwRefPageGetFieldType final : public SwFieldType { SwDoc* m_pDoc; sal_Int16 m_nNumberingType; @@ -610,7 +610,6 @@ class SwRefPageGetFieldType : public SwFieldType void UpdateField(SwTextField const * pTextField, SetGetExpFields const & rSetList, SwRootFrame const* pLayout); -protected: /// overwritten to update all RefPageGet fields virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ) override; public: @@ -621,7 +620,7 @@ public: }; // Query relative page numbering. -class SwRefPageGetField : public SwField +class SwRefPageGetField final : public SwField { OUString m_sText; OUString m_sTextRLHidden; ///< hidden redlines @@ -640,7 +639,7 @@ public: }; // Field to jump to and edit. -class SwJumpEditFieldType : public SwFieldType +class SwJumpEditFieldType final : public SwFieldType { SwDoc* m_pDoc; sw::WriterMultiListener m_aDep; @@ -652,7 +651,7 @@ public: SwCharFormat* GetCharFormat(); }; -class SwJumpEditField : public SwField +class SwJumpEditField final : public SwField { OUString m_sText; OUString m_sHelp; @@ -677,7 +676,7 @@ public: virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; -class SwScriptFieldType : public SwFieldType +class SwScriptFieldType final : public SwFieldType { SwDoc* const m_pDoc; public: @@ -686,7 +685,7 @@ public: virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SAL_DLLPUBLIC_RTTI SwScriptField : public SwField +class SW_DLLPUBLIC SwScriptField final : public SwField { OUString m_sType; ///< Type of Code (Java/VBScript/...) OUString m_sCode; /**< Code as text. @@ -717,7 +716,7 @@ public: }; // Combined Character Fieldtype -class SAL_DLLPUBLIC_RTTI SwCombinedCharFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwCombinedCharFieldType final : public SwFieldType { public: SwCombinedCharFieldType(); @@ -728,7 +727,7 @@ public: // ScriptField #define MAX_COMBINED_CHARACTERS 6 -class SW_DLLPUBLIC SwCombinedCharField : public SwField +class SW_DLLPUBLIC SwCombinedCharField final : public SwField { OUString m_sCharacters; ///< combine these characters diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx index b607cb9e100a..de45437efbc2 100644 --- a/sw/inc/drawdoc.hxx +++ b/sw/inc/drawdoc.hxx @@ -23,7 +23,7 @@ class SwDoc; -class SwDrawModel : public FmFormModel +class SwDrawModel final : public FmFormModel { private: SwDoc* m_pDoc; @@ -41,7 +41,7 @@ public: virtual css::uno::Reference<css::embed::XStorage> GetDocumentStorage() const override; -protected: +private: /// override of <SdrModel::createUnoModel()> is needed to provide corresponding uno model. virtual css::uno::Reference< css::uno::XInterface > createUnoModel() override; }; diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index 01611c4aa8ea..e223e4fa3dd5 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -67,7 +67,7 @@ public: void Clear() { maData.clear(); } }; -class SAL_DLLPUBLIC_RTTI SwGetExpFieldType : public SwValueFieldType +class SAL_DLLPUBLIC_RTTI SwGetExpFieldType final : public SwValueFieldType { public: SwGetExpFieldType(SwDoc* pDoc); @@ -75,11 +75,11 @@ public: /** Overlay, because get-field cannot be changed and therefore does not need to be updated. Update at changing of set-values! */ -protected: +private: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override; }; -class SW_DLLPUBLIC SwGetExpField : public SwFormulaField +class SW_DLLPUBLIC SwGetExpField final : public SwFormulaField { double m_fValueRLHidden; ///< SwValueField; hidden redlines OUString m_sExpand; @@ -141,7 +141,7 @@ inline void SwGetExpField::ChgBodyTextFlag( bool bIsInBody ) class SwSetExpField; -class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType +class SW_DLLPUBLIC SwSetExpFieldType final : public SwValueFieldType { OUString const m_sName; OUString m_sDelim; @@ -149,7 +149,6 @@ class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType sal_uInt8 m_nLevel; bool m_bDeleted; -protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override; public: @@ -268,7 +267,7 @@ inline bool SwSetExpField::GetInputFlag() const inline bool SwSetExpField::IsSequenceField() const { return 0 != (nsSwGetSetExpType::GSE_SEQ & static_cast<SwSetExpFieldType*>(GetTyp())->GetType()); } -class SAL_DLLPUBLIC_RTTI SwInputFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwInputFieldType final : public SwFieldType { SwDoc* const mpDoc; public: @@ -279,7 +278,7 @@ public: SwDoc* GetDoc() const { return mpDoc; } }; -class SW_DLLPUBLIC SwInputField : public SwField +class SW_DLLPUBLIC SwInputField final : public SwField { mutable OUString maContent; OUString maPText; @@ -364,14 +363,14 @@ private: }; /// Implementation in tblcalc.cxx. -class SwTableFieldType : public SwValueFieldType +class SwTableFieldType final : public SwValueFieldType { public: SwTableFieldType(SwDoc* pDocPtr); virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SwTableField : public SwValueField, public SwTableFormula +class SwTableField final : public SwValueField, public SwTableFormula { OUString m_sExpand; sal_uInt16 m_nSubType; diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx index ab06a6d8a01d..fd510511e388 100644 --- a/sw/inc/extinput.hxx +++ b/sw/inc/extinput.hxx @@ -24,7 +24,7 @@ #include <vcl/commandevent.hxx> #include <vector> -class SwExtTextInput : public SwPaM +class SwExtTextInput final : public SwPaM { std::vector<ExtTextInputAttr> aAttrs; OUString sOverwriteText; diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx index c42ba44fbcd0..bef670ffef5f 100644 --- a/sw/inc/fchrfmt.hxx +++ b/sw/inc/fchrfmt.hxx @@ -27,7 +27,7 @@ class SwTextCharFormat; class IntlWrapper; -class SW_DLLPUBLIC SwFormatCharFormat: public SfxPoolItem, public SwClient +class SW_DLLPUBLIC SwFormatCharFormat final : public SfxPoolItem, public SwClient { friend class SwTextCharFormat; SwTextCharFormat* m_pTextAttribute; ///< My text attribute. @@ -39,10 +39,10 @@ public: /// @@@ public copy ctor, but no copy assignment? SwFormatCharFormat( const SwFormatCharFormat& rAttr ); -protected: - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; private: + virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; + /// @@@ public copy ctor, but no copy assignment? SwFormatCharFormat & operator= (const SwFormatCharFormat &) = delete; public: diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx index a09555657fb1..66f13c98bf51 100644 --- a/sw/inc/flddat.hxx +++ b/sw/inc/flddat.hxx @@ -34,7 +34,7 @@ enum SwDateSubFormat DATE_VAR }; -class SAL_DLLPUBLIC_RTTI SwDateTimeFieldType : public SwValueFieldType +class SAL_DLLPUBLIC_RTTI SwDateTimeFieldType final : public SwValueFieldType { public: SwDateTimeFieldType(SwDoc* pDoc); @@ -42,7 +42,7 @@ public: virtual std::unique_ptr<SwFieldType> Copy() const override; }; -class SW_DLLPUBLIC SwDateTimeField : public SwValueField +class SW_DLLPUBLIC SwDateTimeField final : public SwValueField { sal_uInt16 m_nSubType; long m_nOffset; // Offset in minutes. diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx index 2fbf8d0b6bb2..20ed29ac638f 100644 --- a/sw/inc/flddropdown.hxx +++ b/sw/inc/flddropdown.hxx @@ -28,7 +28,7 @@ /** Field type for dropdown boxes. */ -class SAL_DLLPUBLIC_RTTI SwDropDownFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwDropDownFieldType final : public SwFieldType { public: /** @@ -55,7 +55,7 @@ public: The dropdown field contains a list of strings. At most one of them can be selected. */ -class SW_DLLPUBLIC SwDropDownField : public SwField +class SW_DLLPUBLIC SwDropDownField final : public SwField { /** the possible values (aka items) of the dropdown box diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx index 5d00fdab4c59..6c6aea5e47e0 100644 --- a/sw/inc/flypos.hxx +++ b/sw/inc/flypos.hxx @@ -27,7 +27,7 @@ class SwFrameFormat; class SwNodeIndex; /// For querying current flys in document. -class SW_DLLPUBLIC SwPosFlyFrame +class SW_DLLPUBLIC SwPosFlyFrame final { const SwFrameFormat* m_pFrameFormat; ///< FlyFrameFormat SwNodeIndex* m_pNodeIndex; ///< Index for node is sufficient. diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx index 822f1ac4adb1..9d7638b67a44 100644 --- a/sw/inc/fmtautofmt.hxx +++ b/sw/inc/fmtautofmt.hxx @@ -23,7 +23,7 @@ #include <svl/poolitem.hxx> #include <memory> -class SAL_DLLPUBLIC_RTTI SwFormatAutoFormat: public SfxPoolItem +class SAL_DLLPUBLIC_RTTI SwFormatAutoFormat final : public SfxPoolItem { std::shared_ptr<SfxItemSet> mpHandle; diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index 76fe1a997b72..08879efc5594 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -169,7 +169,7 @@ enum class Master_CollCondition PARA_IN_ENDNOTE }; -class SW_DLLPUBLIC SwCollCondition : public SwClient +class SW_DLLPUBLIC SwCollCondition final : public SwClient { Master_CollCondition m_nCondition; sal_uLong m_nSubCondition; diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx index ffe143e434f6..dcda6c11aff7 100644 --- a/sw/inc/fmtflcnt.hxx +++ b/sw/inc/fmtflcnt.hxx @@ -29,7 +29,7 @@ class SwTextFlyCnt; * * A pool item that is attached to the placeholder character of an as-character frame. (TextFrame, etc.) */ -class SAL_DLLPUBLIC_RTTI SwFormatFlyCnt : public SfxPoolItem +class SAL_DLLPUBLIC_RTTI SwFormatFlyCnt final : public SfxPoolItem { friend class SwTextFlyCnt; SwTextFlyCnt* m_pTextAttr; diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx index f945bbcc0aa2..34c7d73aab5d 100644 --- a/sw/inc/fmtfld.hxx +++ b/sw/inc/fmtfld.hxx @@ -34,7 +34,7 @@ class SwFieldType; namespace com { namespace sun { namespace star { namespace text { class XTextField; } } } } // ATT_FLD -class SW_DLLPUBLIC SwFormatField +class SW_DLLPUBLIC SwFormatField final : public SfxPoolItem , public sw::BroadcastingModify , public SfxBroadcaster @@ -47,7 +47,6 @@ class SW_DLLPUBLIC SwFormatField std::unique_ptr<SwField> mpField; SwTextField* mpTextField; // the TextAttribute -protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) override; @@ -118,7 +117,7 @@ enum class SwFormatFieldHintWhich RESOLVED = 6 }; -class SW_DLLPUBLIC SwFormatFieldHint : public SfxHint +class SW_DLLPUBLIC SwFormatFieldHint final : public SfxHint { const SwFormatField* m_pField; SwFormatFieldHintWhich const m_nWhich; diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx index 247a6c5342b7..de36d8b29e96 100644 --- a/sw/inc/fmtftn.hxx +++ b/sw/inc/fmtftn.hxx @@ -37,7 +37,7 @@ class SwRootFrame; // ATT_FTN -class SW_DLLPUBLIC SwFormatFootnote +class SW_DLLPUBLIC SwFormatFootnote final : public SfxPoolItem , public SwModify , public sw::BroadcasterMixin diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx index 9a3242afd2b4..731773f6f2b3 100644 --- a/sw/inc/fmtinfmt.hxx +++ b/sw/inc/fmtinfmt.hxx @@ -32,7 +32,7 @@ enum class SvMacroItemId : sal_uInt16; // ATT_INETFMT -class SW_DLLPUBLIC SwFormatINetFormat +class SW_DLLPUBLIC SwFormatINetFormat final : public SfxPoolItem , public sw::BroadcasterMixin { diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx index d2d403751211..498376e0e871 100644 --- a/sw/inc/fmtmeta.hxx +++ b/sw/inc/fmtmeta.hxx @@ -168,7 +168,7 @@ public: virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override; }; -class MetaField +class MetaField final : public Meta { private: diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx index 0b10bfeb8ed6..a11d7b6e32bd 100644 --- a/sw/inc/fmtrfmrk.hxx +++ b/sw/inc/fmtrfmrk.hxx @@ -33,7 +33,7 @@ class SwTextRefMark; // ATT_REFMARK -class SAL_DLLPUBLIC_RTTI SwFormatRefMark +class SAL_DLLPUBLIC_RTTI SwFormatRefMark final : public SfxPoolItem , public SwModify , public sw::BroadcasterMixin diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx index 9154e7913594..a2b7379531c3 100644 --- a/sw/inc/fmtruby.hxx +++ b/sw/inc/fmtruby.hxx @@ -25,7 +25,7 @@ class SwTextRuby; -class SW_DLLPUBLIC SwFormatRuby : public SfxPoolItem +class SW_DLLPUBLIC SwFormatRuby final : public SfxPoolItem { friend class SwTextRuby; diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx index 226aa98bb783..b40c8d441bb8 100644 --- a/sw/inc/ftninfo.hxx +++ b/sw/inc/ftninfo.hxx @@ -86,7 +86,7 @@ enum SwFootnoteNum : unsigned FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC }; -class SW_DLLPUBLIC SwFootnoteInfo: public SwEndNoteInfo +class SW_DLLPUBLIC SwFootnoteInfo final : public SwEndNoteInfo { using SwEndNoteInfo::operator ==; diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx index 91b47eedff65..d83e0d10128c 100644 --- a/sw/inc/globdoc.hxx +++ b/sw/inc/globdoc.hxx @@ -21,7 +21,7 @@ #include "docsh.hxx" -class SwGlobalDocShell : public SwDocShell +class SwGlobalDocShell final : public SwDocShell { public: diff --git a/sw/inc/gotodlg.hxx b/sw/inc/gotodlg.hxx index f6c5d5d97e09..0c79484553aa 100644 --- a/sw/inc/gotodlg.hxx +++ b/sw/inc/gotodlg.hxx @@ -25,7 +25,7 @@ class SwView; -class SwGotoPageDlg : public weld::GenericDialogController +class SwGotoPageDlg final : public weld::GenericDialogController { public: SwGotoPageDlg(weld::Window *parent, SfxBindings* _pBindings); diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx index 3caa88e03da7..dded9cc5f089 100644 --- a/sw/inc/hints.hxx +++ b/sw/inc/hints.hxx @@ -47,7 +47,7 @@ public: // SwPtrMsgPoolItem (old SwObjectDying!) -class SwPtrMsgPoolItem : public SwMsgPoolItem +class SwPtrMsgPoolItem final : public SwMsgPoolItem { public: void * pObject; @@ -61,14 +61,14 @@ public: * SwFormatChg is sent when a format has changed to another format. 2 Hints are always sent * the old and the new format */ -class SwFormatChg: public SwMsgPoolItem +class SwFormatChg final : public SwMsgPoolItem { public: SwFormat * const pChangedFormat; SwFormatChg( SwFormat *pFormat ); }; -class SwInsText: public SwMsgPoolItem +class SwInsText final : public SwMsgPoolItem { public: sal_Int32 const nPos; @@ -77,7 +77,7 @@ public: SwInsText( sal_Int32 nP, sal_Int32 nL ); }; -class SwDelChr: public SwMsgPoolItem +class SwDelChr final : public SwMsgPoolItem { public: sal_Int32 const nPos; @@ -85,7 +85,7 @@ public: SwDelChr( sal_Int32 nP ); }; -class SwDelText: public SwMsgPoolItem +class SwDelText final : public SwMsgPoolItem { public: sal_Int32 const nStart; @@ -97,7 +97,7 @@ public: namespace sw { /// text is moved into pDestNode -class MoveText : public SfxHint +class MoveText final : public SfxHint { public: SwTextNode * pDestNode; @@ -109,7 +109,7 @@ public: }; /// new delete redline is created -class RedlineDelText : public SfxHint +class RedlineDelText final : public SfxHint { public: sal_Int32 const nStart; @@ -119,7 +119,7 @@ public: }; /// delete redline is removed -class RedlineUnDelText : public SfxHint +class RedlineUnDelText final : public SfxHint { public: sal_Int32 nStart; @@ -130,7 +130,7 @@ public: } -class SwUpdateAttr : public SwMsgPoolItem +class SwUpdateAttr final : public SwMsgPoolItem { private: sal_Int32 const m_nStart; @@ -166,7 +166,7 @@ public: /** SwRefMarkFieldUpdate is sent when the referencemarks should be updated. To determine Page- / chapternumbers the current frame has to be asked. For this we need the current outputdevice */ -class SwRefMarkFieldUpdate : public SwMsgPoolItem +class SwRefMarkFieldUpdate final : public SwMsgPoolItem { VclPtr<OutputDevice> pOut; ///< pointer to the current output device public: @@ -180,7 +180,7 @@ public: /** SwDocPosUpdate is sent to signal that only the frames from or to a specified document-global position have to be updated. At the moment this is only needed when updating pagenumber fields. */ -class SwDocPosUpdate : public SwMsgPoolItem +class SwDocPosUpdate final : public SwMsgPoolItem { public: const SwTwips nDocPos; @@ -195,7 +195,7 @@ enum TableFormulaUpdateFlags { TBL_CALC = 0, TBL_MERGETBL, TBL_SPLITTBL }; -class SwTableFormulaUpdate : public SwMsgPoolItem +class SwTableFormulaUpdate final : public SwMsgPoolItem { public: const SwTable* m_pTable; ///< Pointer to the current table @@ -213,7 +213,7 @@ public: SwTableFormulaUpdate( const SwTable* ); }; -class SwAutoFormatGetDocNode: public SwMsgPoolItem +class SwAutoFormatGetDocNode final : public SwMsgPoolItem { public: const SwNodes* pNodes; @@ -225,7 +225,7 @@ public: * SwAttrSetChg is sent when something has changed in the SwAttrSet rTheChgdSet. * 2 Hints are always sent, the old and the new items in the rTheChgdSet. */ -class SwAttrSetChg: public SwMsgPoolItem +class SwAttrSetChg final : public SwMsgPoolItem { bool const m_bDelSet; SwAttrSet* m_pChgSet; ///< what has changed @@ -251,14 +251,14 @@ public: #endif }; -class SwCondCollCondChg: public SwMsgPoolItem +class SwCondCollCondChg final : public SwMsgPoolItem { public: SwFormat * const pChangedFormat; SwCondCollCondChg( SwFormat *pFormat ); }; -class SwVirtPageNumInfo: public SwMsgPoolItem +class SwVirtPageNumInfo final : public SwMsgPoolItem { const SwPageFrame *m_pPage; const SwPageFrame *m_pOrigPage; @@ -275,7 +275,7 @@ public: const SwFrame *pF ) { m_pFrame = pF; m_pPage = pPg; } }; -class SwFindNearestNode : public SwMsgPoolItem +class SwFindNearestNode final : public SwMsgPoolItem { const SwNode *m_pNode, *m_pFound; public: @@ -285,7 +285,7 @@ public: const SwNode* GetFoundNode() const { return m_pFound; } }; -class SwStringMsgPoolItem : public SwMsgPoolItem +class SwStringMsgPoolItem final : public SwMsgPoolItem { OUString const m_sStr; public: diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx index 9f29ff499e2c..4846a1e55a0c 100644 --- a/sw/inc/lineinfo.hxx +++ b/sw/inc/lineinfo.hxx @@ -34,7 +34,7 @@ enum LineNumberPosition LINENUMBER_POS_OUTSIDE }; -class SW_DLLPUBLIC SwLineNumberInfo : public SwClient /**< purpose of derivation from SwClient: +class SW_DLLPUBLIC SwLineNumberInfo final : public SwClient /**< purpose of derivation from SwClient: character style for displaying the numbers. */ { SvxNumberType aType; ///< e.g. roman linenumbers @@ -49,7 +49,6 @@ class SW_DLLPUBLIC SwLineNumberInfo : public SwClient /**< purpose of derivation bool bCountInFlys; ///< Count also within FlyFrames? bool bRestartEachPage; /**< Restart counting at the first paragraph of each page (even on follows when paragraphs are split) */ -protected: virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; public: diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index 217be9327139..58b721af8007 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -58,7 +58,7 @@ public: void Insert(InsCaptionOpt* pObj); }; -class SAL_DLLPUBLIC_RTTI SwRevisionConfig : public utl::ConfigItem +class SAL_DLLPUBLIC_RTTI SwRevisionConfig final : public utl::ConfigItem { friend class SwModuleOptions; @@ -91,7 +91,7 @@ enum class SwCompareMode ByChar }; -class SAL_DLLPUBLIC_RTTI SwCompareConfig : public utl::ConfigItem +class SAL_DLLPUBLIC_RTTI SwCompareConfig final : public utl::ConfigItem { friend class SwModuleOptions; @@ -115,7 +115,7 @@ public: using ConfigItem::SetModified; }; -class SAL_DLLPUBLIC_RTTI SwInsertConfig : public utl::ConfigItem +class SAL_DLLPUBLIC_RTTI SwInsertConfig final : public utl::ConfigItem { friend class SwModuleOptions; @@ -143,7 +143,7 @@ public: using ConfigItem::SetModified; }; -class SAL_DLLPUBLIC_RTTI SwTableConfig : public utl::ConfigItem +class SAL_DLLPUBLIC_RTTI SwTableConfig final : public utl::ConfigItem { friend class SwModuleOptions; @@ -171,7 +171,7 @@ public: using ConfigItem::SetModified; }; -class SAL_DLLPUBLIC_RTTI SwMiscConfig : public utl::ConfigItem +class SAL_DLLPUBLIC_RTTI SwMiscConfig final : public utl::ConfigItem { friend class SwModuleOptions; diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index c403a75a136a..36ce909cb7cf 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -573,7 +573,7 @@ public: Some of the nodes are then replaced with SwPlaceholderNode, and at the end of the operation, removed again. FIXME find out if this is really necessary, and if we can avoid creation of the SwPlaceholderNodes in the first place. */ -class SwPlaceholderNode : private SwNode +class SwPlaceholderNode final : private SwNode { private: friend class SwNodes; diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index 30d82dddd1c6..3702ce2b71bd 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -46,7 +46,7 @@ class Size; const sal_Unicode cBulletChar = 0x2022; ///< Character for lists. -class SW_DLLPUBLIC SwNumFormat : public SvxNumberFormat, public SwClient +class SW_DLLPUBLIC SwNumFormat final : public SvxNumberFormat, public SwClient { std::unique_ptr<SwFormatVertOrient> m_pVertOrient; //For i120928,record the cp info of graphic within bullet @@ -56,7 +56,6 @@ class SW_DLLPUBLIC SwNumFormat : public SvxNumberFormat, public SwClient using SvxNumberFormat::operator ==; using SvxNumberFormat::operator !=; -protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) override; public: diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index d5cd3932a513..50e0b737cb12 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -131,7 +131,7 @@ public: SwPostItMgr& aMgr) = 0; }; -class SwAnnotationItem: public SwSidebarItem +class SwAnnotationItem final : public SwSidebarItem { public: SwAnnotationItem( diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx index 229f82329a94..1092f977fa47 100644 --- a/sw/inc/printdata.hxx +++ b/sw/inc/printdata.hxx @@ -169,7 +169,7 @@ public: virtual void doSetModified () {} }; -class SwPrintUIOptions : public vcl::PrinterOptionsHelper +class SwPrintUIOptions final : public vcl::PrinterOptionsHelper { VclPtr< OutputDevice > m_pLast; const SwPrintData & m_rDefaultPrintData; diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx index e03714902b63..88592dabea31 100644 --- a/sw/inc/prtopt.hxx +++ b/sw/inc/prtopt.hxx @@ -22,7 +22,7 @@ #include <unotools/configitem.hxx> #include "printdata.hxx" -class SwPrintOptions : public SwPrintData, public utl::ConfigItem +class SwPrintOptions final : public SwPrintData, public utl::ConfigItem { private: bool const bIsWeb; diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index 6bf47bdd3c20..b35353f60d89 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -50,7 +50,7 @@ public: virtual bool operator == ( const SwRedlineExtraData& ) const; }; -class SW_DLLPUBLIC SwRedlineExtraData_FormatColl : public SwRedlineExtraData +class SW_DLLPUBLIC SwRedlineExtraData_FormatColl final : public SwRedlineExtraData { OUString m_sFormatNm; std::unique_ptr<SfxItemSet> m_pSet; @@ -70,7 +70,7 @@ public: void SetFormatAll( bool bAll ) { m_bFormatAll = bAll; } }; -class SwRedlineExtraData_Format : public SwRedlineExtraData +class SwRedlineExtraData_Format final : public SwRedlineExtraData { std::vector<sal_uInt16> m_aWhichIds; @@ -317,7 +317,7 @@ public: { return m_aRedlineData; } }; -class SW_DLLPUBLIC SwRedlineHint : public SfxHint +class SW_DLLPUBLIC SwRedlineHint final : public SfxHint { }; diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx index 19851da69555..f59ea0d55b43 100644 --- a/sw/inc/reffld.hxx +++ b/sw/inc/reffld.hxx @@ -62,10 +62,10 @@ enum REFERENCEMARK /// Get reference. -class SAL_DLLPUBLIC_RTTI SwGetRefFieldType : public SwFieldType +class SAL_DLLPUBLIC_RTTI SwGetRefFieldType final : public SwFieldType { SwDoc* m_pDoc; -protected: + /// Overlay in order to update all ref-fields. virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; public: @@ -82,7 +82,7 @@ public: SwRootFrame const* pLayout = nullptr); }; -class SW_DLLPUBLIC SwGetRefField : public SwField +class SW_DLLPUBLIC SwGetRefField final : public SwField { private: OUString m_sSetRefName; diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 1fcbf5028474..54b3f8f86c01 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -248,7 +248,7 @@ public: }; // #i117863# -class SwSectionFrameMoveAndDeleteHint : public SfxHint +class SwSectionFrameMoveAndDeleteHint final : public SfxHint { public: SwSectionFrameMoveAndDeleteHint( const bool bSaveContent ) diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 025193a1c00c..b4004898ad77 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -278,7 +278,7 @@ private: virtual bool SetStrmStgPtr(); }; -class AsciiReader: public Reader +class AsciiReader final : public Reader { friend class SwReader; virtual ErrCode Read( SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) override; diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx index 6d4771f14986..d6a069f29a08 100644 --- a/sw/inc/swacorr.hxx +++ b/sw/inc/swacorr.hxx @@ -29,13 +29,12 @@ class SwXMLTextBlocks; namespace com { namespace sun { namespace star { namespace embed { class XStorage; } } } } -class SW_DLLPUBLIC SwAutoCorrect : public SvxAutoCorrect +class SW_DLLPUBLIC SwAutoCorrect final : public SvxAutoCorrect { using SvxAutoCorrect::PutText; std::unique_ptr<SwXMLTextBlocks> m_pTextBlocks; -protected: // Return replacement text (only for SWG-format, all others can be obtained from wordlist!). // rShort is stream-name - encrypted! virtual bool GetLongText( const OUString& rShort, OUString& rLong ) override; diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx index e53f8a558641..616ae10fd646 100644 --- a/sw/inc/swatrset.hxx +++ b/sw/inc/swatrset.hxx @@ -132,7 +132,7 @@ namespace vcl { typedef OutputDevice RenderContext; }; -class SAL_DLLPUBLIC_RTTI SwAttrPool : public SfxItemPool +class SAL_DLLPUBLIC_RTTI SwAttrPool final : public SfxItemPool { private: // helpers to add/remove DrawingLayer ItemPool, used in constructor @@ -149,7 +149,7 @@ private: public: SwAttrPool( SwDoc* pDoc ); -protected: +private: virtual ~SwAttrPool() override; public: @@ -158,7 +158,7 @@ public: }; -class SW_DLLPUBLIC SwAttrSet : public SfxItemSet +class SW_DLLPUBLIC SwAttrSet final : public SfxItemSet { // Pointer for Modify-System SwAttrSet *m_pOldSet, *m_pNewSet; diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx index 667e776ccd31..e2577735b9af 100644 --- a/sw/inc/swcli.hxx +++ b/sw/inc/swcli.hxx @@ -27,7 +27,7 @@ namespace svt class EmbeddedObjectRef; } -class SwOleClient : public SfxInPlaceClient +class SwOleClient final : public SfxInPlaceClient { bool m_IsInDoVerb; bool const m_IsOldCheckForOLEInCaption; diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx index a54d200ff33d..80b7593378d5 100644 --- a/sw/inc/swddetbl.hxx +++ b/sw/inc/swddetbl.hxx @@ -23,7 +23,7 @@ class SwDDEFieldType; -class SwDDETable : public SwTable +class SwDDETable final : public SwTable { sw::WriterMultiListener m_aDepends; SwDDEFieldType* m_pDDEType; @@ -40,7 +40,7 @@ public: SwDDEFieldType* GetDDEFieldType(); inline const SwDDEFieldType* GetDDEFieldType() const; -protected: +private: virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; virtual void SwClientNotify( const SwModify&, const SfxHint& ) override; }; diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx index c63a0770babb..558f834a9f9c 100644 --- a/sw/inc/swevent.hxx +++ b/sw/inc/swevent.hxx @@ -53,7 +53,7 @@ enum SwCallEventObjectType // Structure for the exchange between UI/CORE. -struct SwCallMouseEvent +struct SwCallMouseEvent final : public SwClient { SwCallEventObjectType eType; diff --git a/sw/inc/swfltopt.hxx b/sw/inc/swfltopt.hxx index 00115a087f4c..0e08345bf302 100644 --- a/sw/inc/swfltopt.hxx +++ b/sw/inc/swfltopt.hxx @@ -22,7 +22,7 @@ #include "swdllapi.h" #include <unotools/configitem.hxx> -class SW_DLLPUBLIC SwFilterOptions : public utl::ConfigItem +class SW_DLLPUBLIC SwFilterOptions final : public utl::ConfigItem { private: virtual void ImplCommit() override; diff --git a/sw/inc/txtannotationfld.hxx b/sw/inc/txtannotationfld.hxx index 501c280a1040..1cc4758f4606 100644 --- a/sw/inc/txtannotationfld.hxx +++ b/sw/inc/txtannotationfld.hxx @@ -24,7 +24,7 @@ namespace sw { namespace mark { class IMark; } } -class SwTextAnnotationField : public SwTextField +class SwTextAnnotationField final : public SwTextField { public: SwTextAnnotationField( diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx index 4b0372b65c9c..fcc25811d63d 100644 --- a/sw/inc/txtatr.hxx +++ b/sw/inc/txtatr.hxx @@ -51,7 +51,7 @@ public: }; -class SwTextMeta : public SwTextAttrNesting +class SwTextMeta final : public SwTextAttrNesting { private: SwTextMeta( SwFormatMeta & i_rAttr, diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx index 8dd16d7b84fc..8055b337b0cb 100644 --- a/sw/inc/txtfld.hxx +++ b/sw/inc/txtfld.hxx @@ -74,7 +74,7 @@ public: }; -class SwTextInputField +class SwTextInputField final : public SwTextAttrNesting , public SwTextField { diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 3e8e69631383..d98507dac3b5 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -267,13 +267,13 @@ public: std::vector<SwFrameFormat*> * GetFlysAnchoredAt() { return m_pFrameFormats.get(); } }; -class SwUndoInsDoc : public SwUndoInserts +class SwUndoInsDoc final : public SwUndoInserts { public: SwUndoInsDoc( const SwPaM& ); }; -class SwUndoCpyDoc : public SwUndoInserts +class SwUndoCpyDoc final : public SwUndoInserts { public: SwUndoCpyDoc( const SwPaM& ); @@ -318,7 +318,7 @@ public: }; -class SwUndoDelLayFormat : public SwUndoFlyBase +class SwUndoDelLayFormat final : public SwUndoFlyBase { bool m_bShowSelFrame; public: diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx index a7a5cc233527..4790ddc8e25b 100644 --- a/sw/inc/unochart.hxx +++ b/sw/inc/unochart.hxx @@ -99,7 +99,7 @@ typedef cppu::WeakImplHelper > SwChartDataProviderBaseClass; -class SwChartDataProvider : +class SwChartDataProvider final : public SwChartDataProviderBaseClass { @@ -190,7 +190,7 @@ typedef cppu::WeakImplHelper > SwChartDataSourceBaseClass; -class SwChartDataSource : +class SwChartDataSource final : public SwChartDataSourceBaseClass { css::uno::Sequence< @@ -227,7 +227,7 @@ typedef cppu::WeakImplHelper > SwChartDataSequenceBaseClass; -class SwChartDataSequence : +class SwChartDataSequence final : public SwChartDataSequenceBaseClass, public SvtListener { @@ -325,7 +325,7 @@ typedef cppu::WeakImplHelper > SwChartLabeledDataSequenceBaseClass; -class SwChartLabeledDataSequence : +class SwChartLabeledDataSequence final : public SwChartLabeledDataSequenceBaseClass { ::comphelper::OInterfaceContainerHelper2 aEvtListeners; diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx index 512f7dedb0fa..75fcdf3951ae 100644 --- a/sw/inc/unocoll.hxx +++ b/sw/inc/unocoll.hxx @@ -258,10 +258,9 @@ cppu::WeakImplHelper css::lang::XServiceInfo > SwCollectionBaseClass; -class SW_DLLPUBLIC SwXTextTables : public SwCollectionBaseClass, +class SW_DLLPUBLIC SwXTextTables final : public SwCollectionBaseClass, public SwUnoCollection { -protected: virtual ~SwXTextTables() override; public: SwXTextTables(SwDoc* pDoc); @@ -327,9 +326,8 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; }; -class SwXTextFrames : public SwXFrames +class SwXTextFrames final : public SwXFrames { -protected: virtual ~SwXTextFrames() override; public: SwXTextFrames(SwDoc* pDoc); @@ -341,9 +339,8 @@ public: }; -class SwXTextGraphicObjects : public SwXFrames +class SwXTextGraphicObjects final : public SwXFrames { -protected: virtual ~SwXTextGraphicObjects() override; public: SwXTextGraphicObjects(SwDoc* pDoc); @@ -355,9 +352,8 @@ public: }; -class SwXTextEmbeddedObjects : public SwXFrames +class SwXTextEmbeddedObjects final : public SwXFrames { -protected: virtual ~SwXTextEmbeddedObjects() override; public: SwXTextEmbeddedObjects(SwDoc* pDoc); @@ -369,10 +365,9 @@ public: }; -class SwXTextSections : public SwCollectionBaseClass, +class SwXTextSections final : public SwCollectionBaseClass, public SwUnoCollection { -protected: virtual ~SwXTextSections() override; public: SwXTextSections(SwDoc* pDoc); @@ -398,10 +393,9 @@ public: static css::uno::Reference< css::text::XTextSection> GetObject( SwSectionFormat& rFormat ); }; -class SwXBookmarks : public SwCollectionBaseClass, +class SwXBookmarks final : public SwCollectionBaseClass, public SwUnoCollection { - protected: virtual ~SwXBookmarks() override; public: SwXBookmarks(SwDoc* pDoc); @@ -426,13 +420,12 @@ class SwXBookmarks : public SwCollectionBaseClass, }; -class SwXNumberingRulesCollection : public cppu::WeakImplHelper +class SwXNumberingRulesCollection final : public cppu::WeakImplHelper < css::container::XIndexAccess >, public SwUnoCollection { -protected: virtual ~SwXNumberingRulesCollection() override; public: @@ -455,12 +448,11 @@ cppu::WeakImplHelper > SwSimpleIndexAccessBaseClass; -class SwXFootnotes : public SwSimpleIndexAccessBaseClass, +class SwXFootnotes final : public SwSimpleIndexAccessBaseClass, public SwUnoCollection { const bool m_bEndnote; -protected: virtual ~SwXFootnotes() override; public: SwXFootnotes(bool bEnd, SwDoc* pDoc); @@ -481,10 +473,9 @@ public: static css::uno::Reference< css::text::XFootnote> GetObject( SwDoc& rDoc, const SwFormatFootnote& rFormat ); }; -class SwXReferenceMarks : public SwCollectionBaseClass, +class SwXReferenceMarks final : public SwCollectionBaseClass, public SwUnoCollection { -protected: virtual ~SwXReferenceMarks() override; public: SwXReferenceMarks(SwDoc* pDoc); diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx index 9a10a891c032..72c8fa744dd0 100644 --- a/sw/inc/unocrsr.hxx +++ b/sw/inc/unocrsr.hxx @@ -75,7 +75,7 @@ public: { m_bSkipOverHiddenSections = bFlag; } }; -class SwUnoTableCursor : public virtual SwUnoCursor, public virtual SwTableCursor +class SwUnoTableCursor final : public virtual SwUnoCursor, public virtual SwTableCursor { // The selection has the same order as the table boxes, i.e. // if something is deleted from the one array at a certain position @@ -103,7 +103,7 @@ public: namespace sw { - class UnoCursorPointer : public SfxListener + class UnoCursorPointer final : public SfxListener { public: UnoCursorPointer() diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index deaa34fc1636..599a3308e252 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -41,7 +41,7 @@ class SdrView; class SwDoc; class SwXShape; -class SwFmDrawPage : public SvxFmDrawPage +class SwFmDrawPage final : public SvxFmDrawPage { SdrPageView* pPageView; std::vector<SwXShape*> m_vShapes; @@ -78,7 +78,7 @@ typedef cppu::WeakAggImplHelper4 css::drawing::XShapeGrouper > SwXDrawPageBaseClass; -class SwXDrawPage : public SwXDrawPageBaseClass +class SwXDrawPage final : public SwXDrawPageBaseClass { SwDoc* pDoc; css::uno::Reference< css::uno::XAggregation > xPageAgg; diff --git a/sw/inc/unofieldcoll.hxx b/sw/inc/unofieldcoll.hxx index ec068675ad2a..efe3f814ef4a 100644 --- a/sw/inc/unofieldcoll.hxx +++ b/sw/inc/unofieldcoll.hxx @@ -33,11 +33,10 @@ typedef ::cppu::WeakImplHelper , css::lang::XServiceInfo > SwXTextFieldMasters_Base; -class SwXTextFieldMasters +class SwXTextFieldMasters final : public SwXTextFieldMasters_Base , public SwUnoCollection { -protected: virtual ~SwXTextFieldMasters() override; public: @@ -71,7 +70,7 @@ typedef ::cppu::WeakImplHelper , css::util::XRefreshable > SwXTextFieldTypes_Base; -class SwXTextFieldTypes +class SwXTextFieldTypes final : public SwXTextFieldTypes_Base , public SwUnoCollection { @@ -79,7 +78,6 @@ private: class Impl; std::unique_ptr<Impl> m_pImpl; // currently does not need UnoImplPtr -protected: virtual ~SwXTextFieldTypes() override; public: diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index c7e432a075ba..3011c2422a40 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -307,7 +307,7 @@ public: virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents( ) override; }; -class SwXOLEListener : public cppu::WeakImplHelper<css::util::XModifyListener>, public SvtListener +class SwXOLEListener final : public cppu::WeakImplHelper<css::util::XModifyListener>, public SvtListener { SwFormat* m_pOLEFormat; css::uno::Reference<css::frame::XModel> m_xOLEModel; diff --git a/sw/inc/unoidxcoll.hxx b/sw/inc/unoidxcoll.hxx index 29310fe4ecb1..b1bbe17248dc 100644 --- a/sw/inc/unoidxcoll.hxx +++ b/sw/inc/unoidxcoll.hxx @@ -21,7 +21,7 @@ #include "unocoll.hxx" -class SwXDocumentIndexes +class SwXDocumentIndexes final : public SwCollectionBaseClass , public SwUnoCollection { diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx index c44c66c77e52..64a8defd83fc 100644 --- a/sw/inc/unoparagraph.hxx +++ b/sw/inc/unoparagraph.hxx @@ -60,7 +60,7 @@ typedef ::cppu::ImplInheritanceHelper , css::text::XTextRange > SwXParagraph_Base; -class SwXParagraph +class SwXParagraph final : public SwXParagraph_Base { diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx index f2893bf84ecb..e32f181fe329 100644 --- a/sw/inc/unoredline.hxx +++ b/sw/inc/unoredline.hxx @@ -31,7 +31,7 @@ class SwRangeRedline; * directly into a redline node. It got implemented to enable XML * import of redlines and should not be used directly via the API. */ -class SwXRedlineText : +class SwXRedlineText final : public SwXText, public cppu::OWeakObject, public css::container::XEnumerationAccess diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx index f28ec2344179..0ffc0ce2046b 100644 --- a/sw/inc/unoredlines.hxx +++ b/sw/inc/unoredlines.hxx @@ -41,10 +41,9 @@ cppu::WeakImplHelper css::lang::XServiceInfo > SwRedlinesBaseClass; -class SwXRedlines : public SwRedlinesBaseClass, +class SwXRedlines final : public SwRedlinesBaseClass, public SwUnoCollection { -protected: virtual ~SwXRedlines() override; public: SwXRedlines(SwDoc* pDoc); @@ -68,13 +67,13 @@ public: static css::beans::XPropertySet* GetObject( SwRangeRedline& rRedline, SwDoc& rDoc ); }; -class SwXRedlineEnumeration +class SwXRedlineEnumeration final : public SwSimpleEnumeration_Base , public SvtListener { SwDoc* pDoc; SwRedlineTable::size_type nCurrentIndex; -protected: + virtual ~SwXRedlineEnumeration() override; public: SwXRedlineEnumeration(SwDoc& rDoc); diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx index a86c35700a16..f8b9f4265d6d 100644 --- a/sw/inc/unosett.hxx +++ b/sw/inc/unosett.hxx @@ -41,7 +41,7 @@ class SwNumFormat; class SfxItemPropertySet; namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } } -class SwXFootnoteProperties : public cppu::WeakAggImplHelper2 +class SwXFootnoteProperties final : public cppu::WeakAggImplHelper2 < css::beans::XPropertySet, css::lang::XServiceInfo @@ -49,7 +49,7 @@ class SwXFootnoteProperties : public cppu::WeakAggImplHelper2 { SwDoc* m_pDoc; const SfxItemPropertySet* m_pPropertySet; -protected: + virtual ~SwXFootnoteProperties() override; public: SwXFootnoteProperties(SwDoc* pDoc); @@ -71,7 +71,7 @@ public: void Invalidate() {m_pDoc = nullptr;} }; -class SwXEndnoteProperties : public cppu::WeakAggImplHelper2 +class SwXEndnoteProperties final : public cppu::WeakAggImplHelper2 < css::beans::XPropertySet, css::lang::XServiceInfo @@ -79,7 +79,7 @@ class SwXEndnoteProperties : public cppu::WeakAggImplHelper2 { SwDoc* m_pDoc; const SfxItemPropertySet* m_pPropertySet; -protected: + virtual ~SwXEndnoteProperties() override; public: SwXEndnoteProperties(SwDoc* pDoc); @@ -101,7 +101,7 @@ public: void Invalidate() {m_pDoc = nullptr;} }; -class SwXLineNumberingProperties : public cppu::WeakAggImplHelper2 +class SwXLineNumberingProperties final : public cppu::WeakAggImplHelper2 < css::beans::XPropertySet, css::lang::XServiceInfo @@ -109,7 +109,7 @@ class SwXLineNumberingProperties : public cppu::WeakAggImplHelper2 { SwDoc* m_pDoc; const SfxItemPropertySet* m_pPropertySet; -protected: + virtual ~SwXLineNumberingProperties() override; public: SwXLineNumberingProperties(SwDoc* pDoc); @@ -222,9 +222,9 @@ public: }; -class SwXChapterNumbering : public SwXNumberingRules +class SwXChapterNumbering final : public SwXNumberingRules { -protected: + virtual ~SwXChapterNumbering() override; public: SwXChapterNumbering(SwDocShell& rDocSh); @@ -238,7 +238,7 @@ public: }; -class SwXTextColumns : public cppu::WeakAggImplHelper4 +class SwXTextColumns final : public cppu::WeakAggImplHelper4 < css::lang::XUnoTunnel, @@ -262,7 +262,7 @@ class SwXTextColumns : public cppu::WeakAggImplHelper4 bool m_bSepLineIsOn; sal_Int8 m_nSepLineStyle; -protected: + virtual ~SwXTextColumns() override; public: SwXTextColumns(); diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx index 2822f6439cfb..ac8623160fa0 100644 --- a/sw/inc/unosrch.hxx +++ b/sw/inc/unosrch.hxx @@ -34,7 +34,7 @@ namespace i18nutil { struct SearchOptions2; } -class SwXTextSearch : public cppu::WeakImplHelper +class SwXTextSearch final : public cppu::WeakImplHelper < css::util::XPropertyReplace, css::lang::XServiceInfo, @@ -63,7 +63,7 @@ class SwXTextSearch : public cppu::WeakImplHelper sal_Int16 m_nLevRemove; bool m_bIsValueSearch :1; -protected: + virtual ~SwXTextSearch() override; public: SwXTextSearch(); diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx index 67c7dd996424..058812c17923 100644 --- a/sw/inc/unostyle.hxx +++ b/sw/inc/unostyle.hxx @@ -44,7 +44,7 @@ class SwDocShell; class SwAutoStylesEnumImpl; class SfxItemSet; -class SwXStyleFamilies : public cppu::WeakImplHelper +class SwXStyleFamilies final : public cppu::WeakImplHelper < css::container::XIndexAccess, css::container::XNameAccess, @@ -56,7 +56,7 @@ class SwXStyleFamilies : public cppu::WeakImplHelper SwDocShell* m_pDocShell; std::map<SfxStyleFamily, css::uno::Reference<css::container::XNameContainer>> m_vFamilies; -protected: + virtual ~SwXStyleFamilies() override; public: SwXStyleFamilies(SwDocShell& rDocShell); @@ -102,7 +102,7 @@ namespace sw } // access to all automatic style families -class SwXAutoStyles : +class SwXAutoStyles final : public cppu::WeakImplHelper< css::style::XAutoStyles >, public SwUnoCollection { @@ -131,7 +131,7 @@ public: }; // access to a family of automatic styles (character or paragraph or ...) -class SwXAutoStyleFamily : public cppu::WeakImplHelper< css::style::XAutoStyleFamily >, public SvtListener +class SwXAutoStyleFamily final : public cppu::WeakImplHelper< css::style::XAutoStyleFamily >, public SvtListener { SwDocShell *m_pDocShell; IStyleAccess::SwAutoStyleFamily const m_eFamily; @@ -154,7 +154,7 @@ public: virtual void Notify( const SfxHint&) override; }; -class SwXAutoStylesEnumerator : public cppu::WeakImplHelper< css::container::XEnumeration >, public SvtListener +class SwXAutoStylesEnumerator final : public cppu::WeakImplHelper< css::container::XEnumeration >, public SvtListener { std::unique_ptr<SwAutoStylesEnumImpl> m_pImpl; public: @@ -169,7 +169,7 @@ public: }; // an automatic style -class SwXAutoStyle : public cppu::WeakImplHelper +class SwXAutoStyle final : public cppu::WeakImplHelper < css::beans::XPropertySet, css::beans::XPropertyState, @@ -229,7 +229,7 @@ public: typedef std::map<OUString, sal_Int32> CellStyleNameMap; /// A text table style is a UNO API wrapper for a SwTableAutoFormat -class SwXTextTableStyle : public cppu::WeakImplHelper +class SwXTextTableStyle final : public cppu::WeakImplHelper < css::style::XStyle, css::beans::XPropertySet, @@ -322,7 +322,7 @@ public: }; /// A text cell style is a UNO API wrapper for a SwBoxAutoFormat core class -class SwXTextCellStyle : public cppu::WeakImplHelper +class SwXTextCellStyle final : public cppu::WeakImplHelper < css::style::XStyle, css::beans::XPropertySet, diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index a18ff25f757d..641deecf0a7f 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -187,7 +187,7 @@ typedef cppu::WeakImplHelper< css::text::XTextTableCursor, css::lang::XServiceInfo, css::beans::XPropertySet> SwXTextTableCursor_Base; -class SW_DLLPUBLIC SwXTextTableCursor +class SW_DLLPUBLIC SwXTextTableCursor final : public SwXTextTableCursor_Base , public SvtListener , public OTextCursorHelper @@ -251,7 +251,7 @@ struct SwRangeDescriptor void Normalize(); }; -class SwXTextTable : public cppu::WeakImplHelper +class SwXTextTable final : public cppu::WeakImplHelper < css::text::XTextTable, css::lang::XServiceInfo, @@ -354,7 +354,7 @@ public: }; -class SwXCellRange : public cppu::WeakImplHelper +class SwXCellRange final : public cppu::WeakImplHelper < css::table::XCellRange, css::lang::XServiceInfo, @@ -464,7 +464,7 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; }; -class SwXTableColumns : public cppu::WeakImplHelper +class SwXTableColumns final : public cppu::WeakImplHelper < css::table::XTableColumns, css::lang::XServiceInfo @@ -474,7 +474,7 @@ private: class Impl; ::sw::UnoImplPtr<Impl> m_pImpl; SwFrameFormat* GetFrameFormat() const; -protected: + virtual ~SwXTableColumns() override; public: SwXTableColumns(SwFrameFormat& rFrameFormat); diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx index 439d434dade0..5b3c518e79b9 100644 --- a/sw/inc/unotextbodyhf.hxx +++ b/sw/inc/unotextbodyhf.hxx @@ -37,13 +37,11 @@ typedef ::cppu::WeakAggImplHelper2 , css::container::XEnumerationAccess > SwXBodyText_Base; -class SwXBodyText +class SwXBodyText final : public SwXBodyText_Base , public SwXText { -protected: - virtual ~SwXBodyText() override; public: diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx index 10b3c8d29423..25cdb7d102d7 100644 --- a/sw/inc/unotextcursor.hxx +++ b/sw/inc/unotextcursor.hxx @@ -63,7 +63,7 @@ typedef ::cppu::WeakImplHelper , css::text::XMarkingAccess > SwXTextCursor_Base; -class SwXTextCursor +class SwXTextCursor final : public SwXTextCursor_Base , public OTextCursorHelper { diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index 9506a7790852..41a69049fc5e 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -39,7 +39,7 @@ class SwDoc; class SwUnoCursor; class SwFrameFormat; -class SW_DLLPUBLIC SwUnoInternalPaM +class SW_DLLPUBLIC SwUnoInternalPaM final : public SwPaM { @@ -79,7 +79,7 @@ typedef ::cppu::WeakImplHelper , css::text::XRedline > SwXTextRange_Base; -class SW_DLLPUBLIC SwXTextRange +class SW_DLLPUBLIC SwXTextRange final : public SwXTextRange_Base { diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 564f5c14696c..4952c6fc9dd6 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -129,7 +129,7 @@ typedef cppu::WeakImplHelper > SwXTextDocumentBaseClass; -class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass, +class SW_DLLPUBLIC SwXTextDocument final : public SwXTextDocumentBaseClass, public SvxFmMSFactory, public SfxBaseModel, public vcl::ITiledRenderable, @@ -205,7 +205,6 @@ private: using SfxBaseModel::addEventListener; using SfxBaseModel::removeEventListener; -protected: /** abstract SdrModel provider */ virtual SdrModel& getSdrModelFromUnoModel() const override; @@ -464,7 +463,7 @@ public: SwDocShell* GetDocShell() {return pDocShell;} }; -class SwXLinkTargetSupplier : public cppu::WeakImplHelper +class SwXLinkTargetSupplier final : public cppu::WeakImplHelper < css::container::XNameAccess, css::lang::XServiceInfo @@ -500,7 +499,7 @@ public: void Invalidate() {pxDoc = nullptr;} }; -class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper +class SwXLinkNameAccessWrapper final : public cppu::WeakImplHelper < css::beans::XPropertySet, css::container::XNameAccess, @@ -549,7 +548,7 @@ public: }; -class SwXOutlineTarget : public cppu::WeakImplHelper +class SwXOutlineTarget final : public cppu::WeakImplHelper < css::beans::XPropertySet, css::lang::XServiceInfo diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx index 7723cf3a903c..d10dc73e9143 100644 --- a/sw/inc/usrfld.hxx +++ b/sw/inc/usrfld.hxx @@ -32,7 +32,7 @@ class SwDoc; * Tracks the value, but conversion between the float and string representation * always happens with the system locale. */ -class SW_DLLPUBLIC SwUserFieldType : public SwValueFieldType +class SW_DLLPUBLIC SwUserFieldType final : public SwValueFieldType { bool m_bValidValue : 1; bool m_bDeleted : 1; @@ -70,7 +70,7 @@ public: virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nMId ) override; void dumpAsXml(xmlTextWriterPtr pWriter) const override; -protected: +private: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) override; }; @@ -98,7 +98,7 @@ inline void SwUserFieldType::SetType(sal_uInt16 nSub) * Tracks the number format and the language, conversion between the float and * string representation is independent from the system locale. */ -class SW_DLLPUBLIC SwUserField : public SwValueField +class SW_DLLPUBLIC SwUserField final : public SwValueField { sal_uInt16 m_nSubType; diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index 16209bcd486d..118ecd439a06 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -168,7 +168,7 @@ public: const SwShellCursor* GetPrev() const { return dynamic_cast<SwShellCursor const *>(GetPrevInRing()); } }; -class SwShellTableCursor : public virtual SwShellCursor, public virtual SwTableCursor +class SwShellTableCursor final : public virtual SwShellCursor, public virtual SwTableCursor { /// Left edge of the selection start (top left cell). SwRect m_aStart; diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 5893bc2ce75c..38241c451a67 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -1381,7 +1381,7 @@ void SAL_CALL SwChartDataProvider::dispose( ) aDataSequences.clear(); // require listeners to release references to this object - lang::EventObject aEvtObj( dynamic_cast< chart2::data::XDataSequence * >(this) ); + lang::EventObject aEvtObj( dynamic_cast< chart2::data::XDataProvider * >(this) ); aEvtListeners.disposeAndClear( aEvtObj ); } } |