From fbb9a98a78a349aef7b69d29a7534fd35ff1aa53 Mon Sep 17 00:00:00 2001
From: Noel Grandin
Date: Wed, 15 Sep 2021 14:27:43 +0200
Subject: loplugin:finalclasses in sd
Change-Id: I6070a392319bdc4e04db3a36a6876c194c8a6495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122147
Tested-by: Jenkins
Reviewed-by: Noel Grandin
---
sd/inc/Outliner.hxx | 2 +-
sd/source/ui/inc/ViewShellHint.hxx | 2 +-
sd/source/ui/inc/tools/IconCache.hxx | 2 +-
sd/source/ui/inc/tools/SlotStateListener.hxx | 5 ++---
sd/source/ui/inc/unomodel.hxx | 7 +++----
sd/source/ui/inc/unopage.hxx | 7 +++----
sd/source/ui/inc/view/viewoverlaymanager.hxx | 2 +-
sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx | 5 ++---
sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx | 2 +-
sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx | 2 +-
sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx | 2 +-
sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx | 2 +-
12 files changed, 18 insertions(+), 22 deletions(-)
(limited to 'sd')
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 7be1b3488d28..772040f7a610 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -118,7 +118,7 @@ struct SearchSelection
queried. This is only sufficient for searching the outline view.
*/
-class SdOutliner : public SdrOutliner
+class SdOutliner final : public SdrOutliner
{
public:
friend class ::sd::outliner::OutlinerContainer;
diff --git a/sd/source/ui/inc/ViewShellHint.hxx b/sd/source/ui/inc/ViewShellHint.hxx
index 8bde7c2f4473..05a0c8328666 100644
--- a/sd/source/ui/inc/ViewShellHint.hxx
+++ b/sd/source/ui/inc/ViewShellHint.hxx
@@ -26,7 +26,7 @@ namespace sd
/** Local derivation of the SfxHint class that defines some hint ids that
are used by the ViewShell class and its descendants.
*/
-class ViewShellHint : public SfxHint
+class ViewShellHint final : public SfxHint
{
public:
enum HintId
diff --git a/sd/source/ui/inc/tools/IconCache.hxx b/sd/source/ui/inc/tools/IconCache.hxx
index 2bacbe27fce5..fef994764f88 100644
--- a/sd/source/ui/inc/tools/IconCache.hxx
+++ b/sd/source/ui/inc/tools/IconCache.hxx
@@ -34,7 +34,7 @@ namespace sd
This cache acts like a singleton with a lifetime equal to that of the sd
module.
*/
-class IconCache : public SdGlobalResource
+class IconCache final : public SdGlobalResource
{
public:
/** The lifetime of the returned reference is limited to that of the sd
diff --git a/sd/source/ui/inc/tools/SlotStateListener.hxx b/sd/source/ui/inc/tools/SlotStateListener.hxx
index 9df4ceec19f3..85c123929fce 100644
--- a/sd/source/ui/inc/tools/SlotStateListener.hxx
+++ b/sd/source/ui/inc/tools/SlotStateListener.hxx
@@ -39,7 +39,7 @@ typedef cppu::WeakComponentImplHelper<
to be informed when the support for vertical writing changes but it can
be used to relay state changes of other slots as well.
*/
-class SlotStateListener
+class SlotStateListener final
: protected MutexOwner,
public SlotStateListenerInterfaceBase
{
@@ -98,14 +98,13 @@ public:
virtual void SAL_CALL
disposing(const css::lang::EventObject& rEvent) override;
-protected:
+private:
/** This method is called by the WeakComponentImplHelper base class in
reaction to a XComponent::dispose() call. It releases all currently
active listeners.
*/
virtual void SAL_CALL disposing() override;
-private:
Link maCallback;
/** Remember the URLs that describe slots whose state changes we are
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 8cfa5a81d06a..86b1f7a854e0 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -61,7 +61,7 @@ class DrawViewShell;
extern OUString getPageApiName( SdPage const * pPage );
extern OUString getPageApiNameFromUiName( const OUString& rUIName );
-class SD_DLLPUBLIC SdXImpressDocument : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other
+class SD_DLLPUBLIC SdXImpressDocument final : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other
public SvxFmMSFactory,
public css::drawing::XDrawPageDuplicator,
public css::drawing::XLayerSupplier,
@@ -121,7 +121,6 @@ private:
sd::DrawViewShell* GetViewShell();
-protected:
/** abstract SdrModel provider */
virtual SdrModel& getSdrModelFromUnoModel() const override;
@@ -292,7 +291,7 @@ public:
* *
***********************************************************************/
-class SdDrawPagesAccess : public ::cppu::WeakImplHelper< css::drawing::XDrawPages, css::container::XNameAccess, css::lang::XServiceInfo, css::lang::XComponent >
+class SdDrawPagesAccess final : public ::cppu::WeakImplHelper< css::drawing::XDrawPages, css::container::XNameAccess, css::lang::XServiceInfo, css::lang::XComponent >
{
private:
SdXImpressDocument* mpModel;
@@ -333,7 +332,7 @@ public:
* *
***********************************************************************/
-class SdMasterPagesAccess : public ::cppu::WeakImplHelper< css::drawing::XDrawPages, css::lang::XServiceInfo, css::lang::XComponent >
+class SdMasterPagesAccess final : public ::cppu::WeakImplHelper< css::drawing::XDrawPages, css::lang::XServiceInfo, css::lang::XComponent >
{
private:
SdXImpressDocument* mpModel;
diff --git a/sd/source/ui/inc/unopage.hxx b/sd/source/ui/inc/unopage.hxx
index bfebde089100..a95cbc80d868 100644
--- a/sd/source/ui/inc/unopage.hxx
+++ b/sd/source/ui/inc/unopage.hxx
@@ -156,14 +156,13 @@ public:
* *
***********************************************************************/
-class SdDrawPage : public css::drawing::XMasterPageTarget,
+class SdDrawPage final : public css::drawing::XMasterPageTarget,
public css::presentation::XPresentationPage,
public SdGenericDrawPage
{
private:
css::uno::Sequence< css::uno::Type > maTypeSequence;
-protected:
virtual void setBackground( const css::uno::Any& rValue ) override;
virtual void getBackground( css::uno::Any& rValue ) override;
public:
@@ -218,12 +217,12 @@ public:
* *
***********************************************************************/
-class SdMasterPage : public css::presentation::XPresentationPage,
+class SdMasterPage final : public css::presentation::XPresentationPage,
public SdGenericDrawPage
{
private:
css::uno::Sequence< css::uno::Type > maTypeSequence;
-protected:
+
virtual void setBackground( const css::uno::Any& rValue ) override;
virtual void getBackground( css::uno::Any& rValue ) override;
diff --git a/sd/source/ui/inc/view/viewoverlaymanager.hxx b/sd/source/ui/inc/view/viewoverlaymanager.hxx
index 3336fb7a0634..3a5c98deb3bd 100644
--- a/sd/source/ui/inc/view/viewoverlaymanager.hxx
+++ b/sd/source/ui/inc/view/viewoverlaymanager.hxx
@@ -43,7 +43,7 @@ namespace sd
{
typedef std::vector> ViewTagVector;
-class ViewOverlayManager : public SfxListener
+class ViewOverlayManager final : public SfxListener
{
public:
ViewOverlayManager(ViewShellBase& rViewShellBase);
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
index e4562fa6fc37..9f5bb82be9d0 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
@@ -49,7 +49,7 @@ namespace sd::slidesorter::controller {
class SlideSorterController;
-class SAL_DLLPUBLIC_RTTI Clipboard
+class SAL_DLLPUBLIC_RTTI Clipboard final
: public ViewClipboard
{
public:
@@ -94,10 +94,9 @@ public:
void Abort();
-protected:
+private:
virtual sal_uInt16 DetermineInsertPosition () override;
-private:
SlideSorter& mrSlideSorter;
SlideSorterController& mrController;
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
index b66e0fa8e12e..5830588cb83a 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
@@ -33,7 +33,7 @@ namespace sd::slidesorter::controller {
/** Represent previews and other information so that they can be
attached to an existing transferable.
*/
-class TransferableData
+class TransferableData final
: public SdTransferable::UserData,
public SfxListener
{
diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx
index 561618891bfe..6901a9ff16c9 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx
@@ -36,7 +36,7 @@ class SlideSorterModel;
The PageEnumerationProvider has methods for creating different types
of page enumerations.
*/
-class PageEnumeration : public Enumeration
+class PageEnumeration final : public Enumeration
{
public:
/** Create a new page enumeration that enumerates a subset of the pages
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index b93ee2238e3a..0f3493ab3681 100644
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -40,7 +40,7 @@ class LayeredDevice;
class PageObjectPainter;
class ToolTip;
-class SlideSorterView
+class SlideSorterView final
: public sd::View
{
public:
diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
index 2ecb54338e10..b499ddfe12aa 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
@@ -39,7 +39,7 @@ class FramePainter;
/** The insertion indicator is painted as a vertical or horizontal bar
in the space between slides.
*/
-class InsertionIndicatorOverlay
+class InsertionIndicatorOverlay final
: public ILayerPainter,
public std::enable_shared_from_this
{
--
cgit