diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-16 08:59:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-16 09:10:16 +0000 |
commit | 7cca2c7fb328e64f1779993b60809eff6974b970 (patch) | |
tree | 1e9463b671572a0ea0d04f443033b9eaf8933bcc /sw | |
parent | 3c73942c8c4b97ee9ede65890e1b1db3cac753c5 (diff) |
new loplugin finalprotected
look for final classes, and make sure they don't have protected members
Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4
Reviewed-on: https://gerrit.libreoffice.org/30895
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/calbck.hxx | 2 | ||||
-rw-r--r-- | sw/inc/unotbl.hxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/inc/uinums.hxx | 3 |
3 files changed, 3 insertions, 8 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 71a86bb3935b..7ab28b11370c 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -217,7 +217,7 @@ public: /** get Client information */ virtual bool GetInfo( SfxPoolItem& rInfo) const override { return m_pToTell == nullptr || m_pToTell->GetInfo( rInfo ); } -protected: +private: virtual void Modify( const SfxPoolItem* pOldValue, const SfxPoolItem *pNewValue ) override { if( pNewValue && pNewValue->Which() == RES_OBJECTDYING ) diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index a244cb3128e1..f8aa668b897d 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -75,7 +75,6 @@ class SwXCell final : public SwXCellBaseClass, size_t nFndPos; static size_t const NOTFOUND = SAL_MAX_SIZE; -protected: virtual const SwStartNode *GetStartNode() const override; virtual css::uno::Reference< css::text::XTextCursor > @@ -164,7 +163,6 @@ class SwXTextTableRow final : public cppu::WeakImplHelper SwFrameFormat* GetFrameFormat() { return static_cast<SwFrameFormat*>(GetRegisteredIn()); } const SwFrameFormat* GetFrameFormat() const { return const_cast<SwXTextTableRow*>(this)->GetFrameFormat(); } -protected: virtual ~SwXTextTableRow() override; //SwClient virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; @@ -505,17 +503,15 @@ class SwXTableRows final : public cppu::WeakImplHelper css::lang::XServiceInfo > { -private: class Impl; ::sw::UnoImplPtr<Impl> m_pImpl; SwFrameFormat* GetFrameFormat(); const SwFrameFormat* GetFrameFormat() const { return const_cast<SwXTableRows*>(this)->GetFrameFormat(); } -protected: virtual ~SwXTableRows() override; + public: SwXTableRows(SwFrameFormat& rFrameFormat); - //XIndexAccess virtual sal_Int32 SAL_CALL getCount() throw( css::uno::RuntimeException, std::exception ) override; virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; diff --git a/sw/source/uibase/inc/uinums.hxx b/sw/source/uibase/inc/uinums.hxx index 5d11b36817e9..08bdb2da43b8 100644 --- a/sw/source/uibase/inc/uinums.hxx +++ b/sw/source/uibase/inc/uinums.hxx @@ -82,7 +82,7 @@ class SW_DLLPUBLIC SwChapterNumRules final { public: enum { nMaxRules = MAX_NUM_RULES }; // currently 9 defined forms -protected: +private: SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ]; void Init(); @@ -96,7 +96,6 @@ public: void CreateEmptyNumRule(sal_uInt16 nIdx); // for import void ApplyNumRules( const SwNumRulesWithName &rCopy, sal_uInt16 nIdx); - }; inline const SwNumRulesWithName *SwChapterNumRules::GetRules(sal_uInt16 nIdx) const |