diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-23 13:07:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-24 07:59:06 +0200 |
commit | ac45764b05385a51d469fda2e4bf9233904ca5a9 (patch) | |
tree | 94605a61e6933b3e8f1d0073b790645f04a51d5e /svx | |
parent | fe22bdc3b537afa8ebcb5cb057542b762c770722 (diff) |
loplugin:finalclasses in svx
Change-Id: I74296e2185902498cd569ecde83905f718a41e84
Reviewed-on: https://gerrit.libreoffice.org/43715
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
43 files changed, 230 insertions, 312 deletions
diff --git a/svx/inc/AccessibleTableShape.hxx b/svx/inc/AccessibleTableShape.hxx index 041457f3a6ba..7f119bcb27a8 100644 --- a/svx/inc/AccessibleTableShape.hxx +++ b/svx/inc/AccessibleTableShape.hxx @@ -47,9 +47,7 @@ namespace accessibility css::accessibility::XAccessibleTable, css::view::XSelectionChangeListener > AccessibleTableShape_Base; -/** @descr -*/ -class AccessibleTableShape : public AccessibleTableShape_Base, public css::accessibility::XAccessibleTableSelection +class AccessibleTableShape final : public AccessibleTableShape_Base, public css::accessibility::XAccessibleTableSelection { public: AccessibleTableShape( const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo ); @@ -130,7 +128,7 @@ public: // Get the currently active cell which is text editing AccessibleCell* GetActiveAccessibleCell(); -protected: +private: virtual OUString CreateAccessibleBaseName() override; sdr::table::SvxTableController* getTableController(); @@ -138,7 +136,6 @@ protected: /// @throws css::lang::IndexOutOfBoundsException void checkCellPosition( sal_Int32 nCol, sal_Int32 nRow ); -private: rtl::Reference< AccessibleTableShapeImpl > mxImpl; sal_Int32 GetIndexOfSelectedChild( sal_Int32 nSelectedChildIndex ) const; }; diff --git a/svx/inc/sdr/contact/objectcontactofpageview.hxx b/svx/inc/sdr/contact/objectcontactofpageview.hxx index 043fed599065..3f081299e926 100644 --- a/svx/inc/sdr/contact/objectcontactofpageview.hxx +++ b/svx/inc/sdr/contact/objectcontactofpageview.hxx @@ -30,9 +30,8 @@ namespace sdr { namespace contact { - class ObjectContactOfPageView : public ObjectContact, public Idle + class ObjectContactOfPageView final : public ObjectContact, public Idle { - protected: // the owner of this ObjectContactOfPageView. Set from constructor and not // to be changed in any way. SdrPageWindow& mrPageWindow; diff --git a/svx/inc/sdr/contact/viewcontactofgroup.hxx b/svx/inc/sdr/contact/viewcontactofgroup.hxx index 48c113dbaf20..2dafa4ae9a47 100644 --- a/svx/inc/sdr/contact/viewcontactofgroup.hxx +++ b/svx/inc/sdr/contact/viewcontactofgroup.hxx @@ -28,9 +28,14 @@ namespace sdr { namespace contact { - class ViewContactOfGroup : public ViewContactOfSdrObj + class ViewContactOfGroup final : public ViewContactOfSdrObj { - protected: + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfGroup(SdrObjGroup& rGroup); + virtual ~ViewContactOfGroup() override; + + private: // Create a Object-Specific ViewObjectContact, set ViewContact and // ObjectContact. Always needs to return something. Default is to create // a standard ViewObjectContact containing the given ObjectContact and *this @@ -42,12 +47,6 @@ namespace sdr return static_cast<const SdrObjGroup&>(GetSdrObject()); } - public: - // basic constructor, used from SdrObject. - explicit ViewContactOfGroup(SdrObjGroup& rGroup); - virtual ~ViewContactOfGroup() override; - - protected: // This method is responsible for creating the graphical visualisation data // ONLY based on model data virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; diff --git a/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx b/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx index fec21ed720d6..488fe4812ca4 100644 --- a/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx +++ b/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx @@ -32,9 +32,8 @@ namespace sdr { namespace contact { - class ViewContactOfMasterPageDescriptor : public ViewContact + class ViewContactOfMasterPageDescriptor final : public ViewContact { - protected: // the owner of this ViewContact. Set from constructor and not // to be changed in any way. sdr::MasterPageDescriptor& mrMasterPageDescriptor; diff --git a/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx index d48ba3b172bb..d5b42b7e5bdd 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx @@ -28,21 +28,20 @@ namespace sdr { namespace contact { - class ViewContactOfSdrCircObj : public ViewContactOfSdrRectObj + class ViewContactOfSdrCircObj final : public ViewContactOfSdrRectObj { - protected: + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrCircObj(SdrCircObj& rCircObj); + virtual ~ViewContactOfSdrCircObj() override; + + private: // internal access to SdrCircObj const SdrCircObj& GetCircObj() const { return static_cast<const SdrCircObj&>(GetSdrObject()); } - public: - // basic constructor, used from SdrObject. - explicit ViewContactOfSdrCircObj(SdrCircObj& rCircObj); - virtual ~ViewContactOfSdrCircObj() override; - - protected: // This method is responsible for creating the graphical visualisation data // ONLY based on model data virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; diff --git a/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx b/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx index 89b72ef1f3b6..a8ad594019ab 100644 --- a/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx @@ -28,21 +28,20 @@ namespace sdr { namespace contact { - class ViewContactOfSdrEdgeObj : public ViewContactOfTextObj + class ViewContactOfSdrEdgeObj final : public ViewContactOfTextObj { - protected: + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrEdgeObj(SdrEdgeObj& rEdgeObj); + virtual ~ViewContactOfSdrEdgeObj() override; + + private: // internal access to SdrEdgeObj const SdrEdgeObj& GetEdgeObj() const { return static_cast<const SdrEdgeObj&>(GetSdrObject()); } - public: - // basic constructor, used from SdrObject. - explicit ViewContactOfSdrEdgeObj(SdrEdgeObj& rEdgeObj); - virtual ~ViewContactOfSdrEdgeObj() override; - - protected: // This method is responsible for creating the graphical visualisation data // ONLY based on model data virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; diff --git a/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx index 2b5dd31c2eac..f0c351c45672 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx @@ -28,21 +28,20 @@ namespace sdr { namespace contact { - class ViewContactOfSdrMeasureObj : public ViewContactOfTextObj + class ViewContactOfSdrMeasureObj final : public ViewContactOfTextObj { - protected: + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrMeasureObj(SdrMeasureObj& rMeasureObj); + virtual ~ViewContactOfSdrMeasureObj() override; + + private: // internal access to SdrMeasureObj const SdrMeasureObj& GetMeasureObj() const { return static_cast<const SdrMeasureObj&>(GetSdrObject()); } - public: - // basic constructor, used from SdrObject. - explicit ViewContactOfSdrMeasureObj(SdrMeasureObj& rMeasureObj); - virtual ~ViewContactOfSdrMeasureObj() override; - - protected: // This method is responsible for creating the graphical visualisation data // ONLY based on model data virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; diff --git a/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx b/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx index 35d9db98b340..acaf4c1b8fce 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx @@ -28,9 +28,14 @@ namespace sdr { namespace contact { - class ViewContactOfSdrObjCustomShape : public ViewContactOfTextObj + class ViewContactOfSdrObjCustomShape final : public ViewContactOfTextObj { - protected: + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrObjCustomShape(SdrObjCustomShape& rCustomShape); + virtual ~ViewContactOfSdrObjCustomShape() override; + + private: // internal access to SdrObjCustomShape const SdrObjCustomShape& GetCustomShapeObj() const { @@ -40,12 +45,6 @@ namespace sdr // #i101684# internal tooling basegfx::B2DRange getCorrectedTextBoundRect() const; - public: - // basic constructor, used from SdrObject. - explicit ViewContactOfSdrObjCustomShape(SdrObjCustomShape& rCustomShape); - virtual ~ViewContactOfSdrObjCustomShape() override; - - protected: // This method is responsible for creating the graphical visualisation data // ONLY based on model data virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; diff --git a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx index 2342b78aae84..0021148bc56c 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx @@ -129,9 +129,8 @@ public: virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const override; }; -class ViewContactOfGrid : public ViewContactOfPageSubObject +class ViewContactOfGrid final : public ViewContactOfPageSubObject { -protected: bool mbFront : 1; virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; @@ -144,9 +143,8 @@ public: bool getFront() const { return mbFront; } }; -class ViewContactOfHelplines : public ViewContactOfPageSubObject +class ViewContactOfHelplines final : public ViewContactOfPageSubObject { -protected: bool mbFront : 1; virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; diff --git a/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx index bda545795f76..bbb7d264704f 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx @@ -28,21 +28,20 @@ namespace sdr { namespace contact { - class ViewContactOfSdrPathObj : public ViewContactOfTextObj + class ViewContactOfSdrPathObj final : public ViewContactOfTextObj { - protected: + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrPathObj(SdrPathObj& rTextObj); + virtual ~ViewContactOfSdrPathObj() override; + + private: // internal access to SdrPathObj const SdrPathObj& GetPathObj() const { return static_cast<const SdrPathObj&>(GetSdrObject()); } - public: - // basic constructor, used from SdrObject. - explicit ViewContactOfSdrPathObj(SdrPathObj& rTextObj); - virtual ~ViewContactOfSdrPathObj() override; - - protected: // This method is responsible for creating the graphical visualisation data // ONLY based on model data virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; diff --git a/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx index 957b2665b2a7..9a50c59fa7d1 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx @@ -31,9 +31,8 @@ namespace sdr { namespace contact { - class ViewObjectContactOfE3d : public ViewObjectContactOfSdrObj + class ViewObjectContactOfE3d final : public ViewObjectContactOfSdrObj { - protected: // Primitive3D sequence of the ViewContact. This contains all necessary information // for the graphical visualisation and needs to be supported by all VCs which // can be visualized. diff --git a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx index 4ea4ed8e82c3..40c57cb0eacd 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx @@ -33,9 +33,8 @@ namespace sdr { namespace contact { - class ViewObjectContactOfGraphic : public ViewObjectContactOfSdrObj + class ViewObjectContactOfGraphic final : public ViewObjectContactOfSdrObj { - private: // allow async loading event helper to call tooling methods friend class sdr::event::AsynchGraphicLoadingEvent; @@ -50,7 +49,6 @@ namespace sdr void doAsynchGraphicLoading(); void forgetAsynchGraphicLoadingEvent(sdr::event::AsynchGraphicLoadingEvent const * pEvent); - protected: const SdrGrafObj& getSdrGrafObj() const; SdrGrafObj& getSdrGrafObj(); diff --git a/svx/inc/sdr/overlay/overlayhandle.hxx b/svx/inc/sdr/overlay/overlayhandle.hxx index 3f76836f8577..ec7f89b47785 100644 --- a/svx/inc/sdr/overlay/overlayhandle.hxx +++ b/svx/inc/sdr/overlay/overlayhandle.hxx @@ -17,9 +17,8 @@ namespace sdr { namespace overlay { -class SVX_DLLPUBLIC OverlayHandle : public OverlayObjectWithBasePosition +class SVX_DLLPUBLIC OverlayHandle final : public OverlayObjectWithBasePosition { -protected: basegfx::B2DSize maSize; Color maStrokeColor; diff --git a/svx/inc/sdr/overlay/overlayhelpline.hxx b/svx/inc/sdr/overlay/overlayhelpline.hxx index 47783121f142..84077f10367d 100644 --- a/svx/inc/sdr/overlay/overlayhelpline.hxx +++ b/svx/inc/sdr/overlay/overlayhelpline.hxx @@ -28,9 +28,8 @@ namespace sdr { namespace overlay { - class OverlayHelplineStriped : public OverlayObjectWithBasePosition + class OverlayHelplineStriped final : public OverlayObjectWithBasePosition { - protected: // remember HelpLineKind SdrHelpLineKind meKind; diff --git a/svx/inc/sdr/overlay/overlayline.hxx b/svx/inc/sdr/overlay/overlayline.hxx index ba5acb35504d..33ec22c0e25d 100644 --- a/svx/inc/sdr/overlay/overlayline.hxx +++ b/svx/inc/sdr/overlay/overlayline.hxx @@ -27,9 +27,8 @@ namespace sdr { namespace overlay { - class OverlayLineStriped : public OverlayObjectWithBasePosition + class OverlayLineStriped final : public OverlayObjectWithBasePosition { - protected: // second position in pixel basegfx::B2DPoint maSecondPosition; diff --git a/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx index 0ca7953f0810..0810927a965e 100644 --- a/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx +++ b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx @@ -30,9 +30,8 @@ namespace sdr { namespace overlay { - class OverlayManagerBuffered : public OverlayManager + class OverlayManagerBuffered final : public OverlayManager { - protected: // The VirtualDevice for draw window content buffering, this // is the view content without overlay ScopedVclPtr<VirtualDevice> mpBufferDevice; diff --git a/svx/inc/sdr/overlay/overlayrollingrectangle.hxx b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx index d00598f30a02..7a18f1cb4b8f 100644 --- a/svx/inc/sdr/overlay/overlayrollingrectangle.hxx +++ b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx @@ -27,9 +27,8 @@ namespace sdr { namespace overlay { - class OverlayRollingRectangleStriped : public OverlayObjectWithBasePosition + class OverlayRollingRectangleStriped final : public OverlayObjectWithBasePosition { - protected: // second position in pixel basegfx::B2DPoint maSecondPosition; diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx index c97671e2ffbe..a9cea4f085a9 100644 --- a/svx/inc/svdibrow.hxx +++ b/svx/inc/svdibrow.hxx @@ -30,7 +30,7 @@ class SfxItemSet; class ImpItemListRow; class BrowserMouseEvent; -class SdrItemBrowserControl: public BrowseBox +class SdrItemBrowserControl final : public BrowseBox { friend class ImpItemEdit; std::vector<std::unique_ptr<ImpItemListRow>> aList; @@ -46,7 +46,6 @@ friend class ImpItemEdit; bool bDontHideIneffectiveItems; bool bDontSortItems; -private: void ImpCtor(); void ImpSetEntry(const ImpItemListRow& rEntry, std::size_t nEntryNum); void ImpSaveWhich(); @@ -54,7 +53,6 @@ private: std::size_t GetCurrentPos() const; bool BeginChangeEntry(std::size_t nPos); -protected: virtual long GetRowCount() const override; virtual bool SeekRow(long nRow) override; virtual void PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const override; @@ -64,6 +62,7 @@ protected: void SetDirty(); // is called for example in mode switches virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override; + public: SdrItemBrowserControl(vcl::Window* pParent); virtual ~SdrItemBrowserControl() override; diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx index 896bf00ae4fc..5998486e7cf9 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.hxx +++ b/svx/source/accessibility/ChildrenManagerImpl.hxx @@ -71,7 +71,7 @@ typedef ::std::vector<ChildDescriptor> ChildDescriptorListType; @see ChildrenManager */ -class ChildrenManagerImpl +class ChildrenManagerImpl final : public MutexOwner, public cppu::WeakComponentImplHelper< css::document::XEventListener, @@ -281,7 +281,8 @@ public: (css::beans::XPropertySet* pSet) override; virtual css::uno::Reference<css::accessibility::XAccessible> GetAccessibleCaption (const css::uno::Reference<css::drawing::XShape>& xShape) override; -protected: + +private: /** This list holds the descriptors of all currently visible shapes and associated accessible object. @@ -335,8 +336,6 @@ protected: void impl_dispose(); -private: - ChildrenManagerImpl (const ChildrenManagerImpl&) = delete; ChildrenManagerImpl& operator= (const ChildrenManagerImpl&) = delete; diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx index 8d774e3edf92..011d92ccc639 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.hxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx @@ -29,7 +29,7 @@ class SdrObject; -class EnhancedCustomShape3d +class EnhancedCustomShape3d final { class Transformation2D { @@ -59,11 +59,10 @@ class EnhancedCustomShape3d friend class Transformation2D; - protected: - static tools::Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const tools::Rectangle& rSnapRect, const tools::Rectangle& rBoundRect, const double* pMap ); + static tools::Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const tools::Rectangle& rSnapRect, const tools::Rectangle& rBoundRect, const double* pMap ); - public: - static SdrObject* Create3DObject( const SdrObject* pShape2d, const SdrObject* pCustomShape ); +public: + static SdrObject* Create3DObject( const SdrObject* pShape2d, const SdrObject* pCustomShape ); }; #endif diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx index 27e62a763ddb..f97fd4b60ffa 100644 --- a/svx/source/dialog/imapwnd.hxx +++ b/svx/source/dialog/imapwnd.hxx @@ -69,7 +69,7 @@ public: void ReplaceObject( const IMapObjectPtr& pNewIMapObject ) { mpObj = pNewIMapObject; } }; -class IMapWindow : public GraphCtrl, public DropTargetHelper +class IMapWindow final : public GraphCtrl, public DropTargetHelper { NotifyInfo aInfo; ImageMap aIMap; @@ -82,8 +82,6 @@ class IMapWindow : public GraphCtrl, public DropTargetHelper DECL_LINK( MenuSelectHdl, Menu*, bool ); -protected: - // GraphCtrl virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual Size GetOptimalSize() const override; diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index 531e92edc472..858a9559c17a 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -43,10 +43,8 @@ public: }; -class GalleryThemeListBox : public ListBox +class GalleryThemeListBox final : public ListBox { -protected: - void InitSettings(); virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; diff --git a/svx/source/inc/AccessibleFrameSelector.hxx b/svx/source/inc/AccessibleFrameSelector.hxx index 42c870b04a06..e7482b9e1c87 100644 --- a/svx/source/inc/AccessibleFrameSelector.hxx +++ b/svx/source/inc/AccessibleFrameSelector.hxx @@ -44,7 +44,7 @@ class FrameSelector; namespace a11y { -class AccFrameSelector : +class AccFrameSelector final : public ::cppu::WeakImplHelper< css::accessibility::XAccessible, css::accessibility::XAccessibleContext, @@ -97,10 +97,9 @@ public: void NotifyFocusListeners(bool bGetFocus); void NotifyAccessibleEvent( const sal_Int16 _nEventId, const css::uno::Any& _rOldValue, const css::uno::Any& _rNewValue ); -protected: +private: DECL_LINK( WindowEventListener, VclWindowEvent&, void ); -private: /// @throws css::uno::RuntimeException void IsValid(); void RemoveFrameSelEventListener(); diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx index 1deeeee4c3bf..8e18fb30f47a 100644 --- a/svx/source/inc/GraphCtlAccessibleContext.hxx +++ b/svx/source/inc/GraphCtlAccessibleContext.hxx @@ -76,7 +76,7 @@ typedef ::cppu::WeakAggComponentImplHelper7< css::lang::XServiceName > SvxGraphCtrlAccessibleContext_Base; -class SvxGraphCtrlAccessibleContext: +class SvxGraphCtrlAccessibleContext final : private cppu::BaseMutex, public SvxGraphCtrlAccessibleContext_Base, public SfxListener, public ::accessibility::IAccessibleViewForwarder { @@ -90,9 +90,6 @@ public: void Notify( SfxBroadcaster& aBC, const SfxHint& aHint ) override; -protected: - virtual ~SvxGraphCtrlAccessibleContext() override; -public: // XAccessible /// Return the XAccessibleContext. virtual css::uno::Reference< css::accessibility::XAccessibleContext> SAL_CALL @@ -122,8 +119,6 @@ public: virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet() override; virtual css::uno::Reference< css::accessibility::XAccessibleStateSet> SAL_CALL getAccessibleStateSet() override; virtual css::lang::Locale SAL_CALL getLocale() override; -// virtual void SAL_CALL addPropertyChangeListener( const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw (css::uno::RuntimeException) {} -// virtual void SAL_CALL removePropertyChangeListener( const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw (css::uno::RuntimeException) {} // XAccessibleEventBroadcaster virtual void SAL_CALL addAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener>& xListener) override; @@ -154,18 +149,15 @@ public: virtual Point LogicToPixel (const Point& rPoint) const override; virtual Size LogicToPixel (const Size& rSize) const override; -protected: - /// @throws css::lang::IndexOutOfBoundsException - void checkChildIndexOnSelection( long nIndexOfChild ); - -public: - /** This method is used by the graph control to tell the accessibility object about a new model and view. */ void setModelAndView (SdrModel* pModel, SdrView* pView); -protected: +private: + virtual ~SvxGraphCtrlAccessibleContext() override; + /// @throws css::lang::IndexOutOfBoundsException + void checkChildIndexOnSelection( long nIndexOfChild ); /** Return the object's current bounding box relative to the desktop, i.e in absolute pixel coordinates. @@ -185,7 +177,6 @@ protected: virtual void SAL_CALL disposing() final override; -private: /// @throws css::uno::RuntimeException /// @throws css::lang::IndexOutOfBoundsException SdrObject* getSdrObject( sal_Int32 nIndex ); diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index f018c1f25ef6..c5b71cdab159 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -148,7 +148,7 @@ public: }; -class FmFilterModel : public FmParentData +class FmFilterModel final : public FmParentData ,public SfxBroadcaster ,public ::svxform::OSQLParserClient { @@ -180,7 +180,7 @@ public: static void AppendFilterItems( FmFormItem& _rItem ); void EnsureEmptyFilterRows( FmParentData& _rItem ); -protected: +private: void Insert(const ::std::vector<FmFilterData*>::iterator& rPos, FmFilterData* pFilterItem); void Remove( const ::std::vector<FmFilterData*>::iterator& rPos ); FmFormItem* Find(const ::std::vector<FmFilterData*>& rItems, const css::uno::Reference< css::form::runtime::XFormController > & xController) const; @@ -227,7 +227,7 @@ protected: }; -class FmFilterNavigator : public SvTreeListBox, public SfxListener +class FmFilterNavigator final : public SvTreeListBox, public SfxListener { enum DROP_ACTION{ DA_SCROLLUP, DA_SCROLLDOWN, DA_EXPANDNODE }; @@ -252,7 +252,7 @@ public: ); const FmFilterModel* GetFilterModel() const {return m_pModel;} -protected: +private: virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void Command( const CommandEvent& rEvt ) override; @@ -274,7 +274,6 @@ protected: DECL_LINK(OnRemove, void*, void); DECL_LINK(OnDropActionTimer, Timer*, void); -private: /** returns the first form item and the selected FilterItems in the vector @param _rItemList Is filled inside. <OUT/> diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx index c78294a6dbdc..34315d9c7a49 100644 --- a/svx/source/inc/fmPropBrw.hxx +++ b/svx/source/inc/fmPropBrw.hxx @@ -40,7 +40,7 @@ public: class SfxBindings; class FmFormShell; -class FmPropBrw : public SfxFloatingWindow, public SfxControllerItem +class FmPropBrw final : public SfxFloatingWindow, public SfxControllerItem { bool m_bInitialStateChange; OUString m_sLastActivePage; @@ -61,7 +61,6 @@ class FmPropBrw : public SfxFloatingWindow, public SfxControllerItem css::uno::Reference< css::awt::XWindow > m_xFrameContainerWindow; -protected: virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) override; virtual void FillInfo( SfxChildWinInfo& rInfo ) const override; virtual bool Close() override; @@ -86,10 +85,9 @@ public: using SfxFloatingWindow::StateChanged; -protected: +private: virtual void Resize() override; -private: /** creates the PropertyBrowser (aka ObjectInspector) and plugs it into our frame This method ensures that a new component is created every time the XModel which diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index 5012bd3f4900..57e5655424fe 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -277,7 +277,7 @@ namespace svxform class NavigatorTreeModel; - class OFormComponentObserver + class OFormComponentObserver final :public ::cppu::WeakImplHelper < css::beans::XPropertyChangeListener , css::container::XContainerListener > @@ -306,7 +306,7 @@ namespace svxform bool IsLocked() const { return m_nLocks != 0; } bool CanUndo() const { return m_bCanUndo; } void ReleaseModel() { m_pNavModel = nullptr; } - protected: + private: void Insert(const css::uno::Reference< css::uno::XInterface >& xIface, sal_Int32 nIndex); void Remove( const css::uno::Reference< css::uno::XInterface >& _rxElement ); }; diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx index 1237019f01b1..26a17f84fba6 100644 --- a/svx/source/inc/fmpgeimp.hxx +++ b/svx/source/inc/fmpgeimp.hxx @@ -45,7 +45,7 @@ class SdrObject; // and when they have been removed -class FmFormPageImpl +class FmFormPageImpl final { css::uno::Reference< css::form::XForm > xCurrentForm; css::uno::Reference< css::form::XForms > m_xForms; @@ -89,7 +89,7 @@ public: void SetFormsCreationHdl( const Link<FmFormPageImpl&,void>& _rFormsCreationHdl ) { m_aFormsCreationHdl = _rFormsCreationHdl; } -protected: +private: /** finds a form with a given data source signature @param rForm the form to start the search with. This form, including all possible sub forms, @@ -138,7 +138,6 @@ private: css::uno::Reference< css::container::XMap > impl_createControlShapeMap_nothrow(); -private: FmFormPageImpl( const FmFormPageImpl& ) = delete; FmFormPageImpl& operator=( const FmFormPageImpl& ) = delete; }; diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index 0b07b6f063b2..5c02d45e8992 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -151,7 +151,7 @@ struct SdrViewEvent; class FmFormShell; class FmFormView; class FmFormObj; -class SVX_DLLPUBLIC FmXFormShell : public FmXFormShell_BASE +class SVX_DLLPUBLIC FmXFormShell final : public FmXFormShell_BASE ,public FmXFormShell_CFGBASE ,public svx::IControllerFeatureInvalidation { @@ -256,10 +256,9 @@ public: SAL_DLLPRIVATE void didPrepareClose_Lock(bool bDid) { m_bPreparedClose = bDid; } -public: SAL_DLLPRIVATE FmXFormShell(FmFormShell& _rShell, SfxViewFrame* _pViewFrame); -protected: +private: SAL_DLLPRIVATE virtual ~FmXFormShell() override; // EventListener @@ -313,7 +312,7 @@ public: SAL_DLLPRIVATE bool GetY2KState_Lock(sal_uInt16 & n); SAL_DLLPRIVATE void SetY2KState_Lock(sal_uInt16 n); -protected: +private: // form handling /// load or unload the forms on a page SAL_DLLPRIVATE void loadForms_Lock( FmFormPage* _pPage, const LoadFormsFlags _nBehaviour ); @@ -522,7 +521,7 @@ public: SAL_DLLPRIVATE static OString SlotToIdent(sal_uInt16 nSlot); -protected: +private: DECL_DLLPRIVATE_LINK( OnLoadForms_Lock, void*, void ); }; diff --git a/svx/source/inc/fmundo.hxx b/svx/source/inc/fmundo.hxx index c92c5dfbb387..3763cf113525 100644 --- a/svx/source/inc/fmundo.hxx +++ b/svx/source/inc/fmundo.hxx @@ -62,18 +62,8 @@ public: }; -class FmUndoContainerAction: public SdrUndoAction +class FmUndoContainerAction final : public SdrUndoAction { - css::uno::Reference< css::container::XIndexContainer > - m_xContainer; // container which the action applies to - css::uno::Reference< css::uno::XInterface > - m_xElement; // object not owned by the action - css::uno::Reference< css::uno::XInterface > - m_xOwnElement; // object owned by the action - sal_Int32 m_nIndex; // index of the object within it's container - css::uno::Sequence< css::script::ScriptEventDescriptor > - m_aEvents; // events of the object - public: enum Action { @@ -81,10 +71,6 @@ public: Removed = 2 }; -private: - Action m_eAction; - -public: FmUndoContainerAction(FmFormModel& rMod, Action _eAction, const css::uno::Reference< css::container::XIndexContainer >& xCont, @@ -97,9 +83,20 @@ public: static void DisposeElement( const css::uno::Reference< css::uno::XInterface >& xElem ); -protected: +private: void implReInsert( ); void implReRemove( ); + + css::uno::Reference< css::container::XIndexContainer > + m_xContainer; // container which the action applies to + css::uno::Reference< css::uno::XInterface > + m_xElement; // object not owned by the action + css::uno::Reference< css::uno::XInterface > + m_xOwnElement; // object owned by the action + sal_Int32 m_nIndex; // index of the object within it's container + css::uno::Sequence< css::script::ScriptEventDescriptor > + m_aEvents; // events of the object + Action m_eAction; }; class FmUndoModelReplaceAction : public SdrUndoAction @@ -120,23 +117,13 @@ public: }; -class FmXUndoEnvironment +class FmXUndoEnvironment final : public ::cppu::WeakImplHelper< css::beans::XPropertyChangeListener , css::container::XContainerListener , css::util::XModifyListener > , public SfxListener - // public ::cppu::OWeakObject { - FmFormModel& rModel; - - void* m_pPropertySetCache; - ::svxform::PFormScriptingEnvironment m_pScriptingEnv; - oslInterlockedCount m_Locks; - ::osl::Mutex m_aMutex; - bool bReadOnly; - bool m_bDisposed; - public: FmXUndoEnvironment(FmFormModel& _rModel); virtual ~FmXUndoEnvironment() override; @@ -161,7 +148,15 @@ public: void SetReadOnly( bool bRead, const Accessor& ) { bReadOnly = bRead; } bool IsReadOnly() const {return bReadOnly;} -protected: + // Methods for assigning controls to forms, + // used by the page and the undo environment + void Inserted(SdrObject* pObj); + void Removed(SdrObject* pObj); + + static void Inserted(FmFormObj* pObj); + static void Removed(FmFormObj* pObj); + +private: // XEventListener virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override; @@ -181,7 +176,6 @@ protected: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; -private: void AddElement(const css::uno::Reference< css::uno::XInterface>& Element); void RemoveElement(const css::uno::Reference< css::uno::XInterface>& Element); void TogglePropertyListening(const css::uno::Reference< css::uno::XInterface>& Element); @@ -190,15 +184,15 @@ private: void switchListening( const css::uno::Reference< css::container::XIndexContainer >& _rxContainer, bool _bStartListening ); void switchListening( const css::uno::Reference< css::uno::XInterface >& _rxObject, bool _bStartListening ); - css::uno::Reference< css::script::XScriptListener > m_vbaListener; -public: - // Methods for assigning controls to forms, - // used by the page and the undo environment - void Inserted(SdrObject* pObj); - void Removed(SdrObject* pObj); - static void Inserted(FmFormObj* pObj); - static void Removed(FmFormObj* pObj); + FmFormModel& rModel; + void* m_pPropertySetCache; + ::svxform::PFormScriptingEnvironment m_pScriptingEnv; + oslInterlockedCount m_Locks; + ::osl::Mutex m_aMutex; + bool bReadOnly; + bool m_bDisposed; + css::uno::Reference< css::script::XScriptListener > m_vbaListener; }; diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx index b47db7c0e57c..7f4c8ce594bc 100644 --- a/svx/source/inc/fmvwimp.hxx +++ b/svx/source/inc/fmvwimp.hxx @@ -87,7 +87,7 @@ typedef ::cppu::WeakImplHelper < css::container::XIndexAccess , css::form::runtime::XFormControllerContext > FormViewPageWindowAdapter_Base; -class FormViewPageWindowAdapter : public FormViewPageWindowAdapter_Base +class FormViewPageWindowAdapter final : public FormViewPageWindowAdapter_Base { friend class FmXFormView; @@ -97,9 +97,6 @@ class FormViewPageWindowAdapter : public FormViewPageWindowAdapter_Base FmXFormView* m_pViewImpl; VclPtr<vcl::Window> m_pWindow; -protected: - virtual ~FormViewPageWindowAdapter() override; - public: FormViewPageWindowAdapter( const css::uno::Reference<css::uno::XComponentContext>& _rContext, const SdrPageWindow&, FmXFormView* pView); @@ -118,7 +115,9 @@ public: const ::std::vector< css::uno::Reference< css::form::runtime::XFormController > >& GetList() {return m_aControllerList;} -protected: +private: + virtual ~FormViewPageWindowAdapter() override; + css::uno::Reference< css::form::runtime::XFormController > getController( const css::uno::Reference< css::form::XForm >& xForm ) const; void setController( const css::uno::Reference< css::form::XForm >& xForm, diff --git a/svx/source/inc/formcontroller.hxx b/svx/source/inc/formcontroller.hxx index 3de25a068d94..7722cccbd8d4 100644 --- a/svx/source/inc/formcontroller.hxx +++ b/svx/source/inc/formcontroller.hxx @@ -124,7 +124,7 @@ namespace svxform > FormController_BASE; class ColumnInfoCache; - class FormController :public ::cppu::BaseMutex + class FormController final : public ::cppu::BaseMutex ,public FormController_BASE ,public ::cppu::OPropertySetHelper ,public DispatchInterceptor @@ -207,7 +207,7 @@ namespace svxform public: FormController( const css::uno::Reference< css::uno::XComponentContext > & _rxORB ); - protected: + private: virtual ~FormController() override; // XInterface @@ -411,7 +411,6 @@ namespace svxform css::uno::Sequence< css::beans::Property >& /* [out] */ _rAggregateProps ) const override; - protected: // DispatchInterceptor virtual css::uno::Reference< css::frame::XDispatch> interceptedQueryDispatch( diff --git a/svx/source/inc/formcontrolling.hxx b/svx/source/inc/formcontrolling.hxx index f733e5a31ffa..f2379758c0af 100644 --- a/svx/source/inc/formcontrolling.hxx +++ b/svx/source/inc/formcontrolling.hxx @@ -69,9 +69,8 @@ namespace svx class FormControllerHelper; /** easier access to an FormControllerHelper instance */ - class ControllerFeatures + class ControllerFeatures final { - protected: IControllerFeatureInvalidation* m_pInvalidationCallback; // necessary as long as m_pImpl is not yet constructed rtl::Reference<FormControllerHelper> m_pImpl; diff --git a/svx/source/inc/formdispatchinterceptor.hxx b/svx/source/inc/formdispatchinterceptor.hxx index f6ecd37a1aff..3935a5ac9849 100644 --- a/svx/source/inc/formdispatchinterceptor.hxx +++ b/svx/source/inc/formdispatchinterceptor.hxx @@ -52,29 +52,11 @@ namespace svxform , css::lang::XEventListener > DispatchInterceptionMultiplexer_BASE; - class DispatchInterceptionMultiplexer : public DispatchInterceptionMultiplexer_BASE + class DispatchInterceptionMultiplexer final : public DispatchInterceptionMultiplexer_BASE { - ::osl::Mutex m_aFallback; - ::osl::Mutex* m_pMutex; - - // the component which's dispatches we're intercepting - css::uno::WeakReference< css::frame::XDispatchProviderInterception > - m_xIntercepted; - bool m_bListening; - - // the real interceptor - DispatchInterceptor* m_pMaster; - - // chaining - css::uno::Reference< css::frame::XDispatchProvider> m_xSlaveDispatcher; - css::uno::Reference< css::frame::XDispatchProvider> m_xMasterDispatcher; - - virtual ~DispatchInterceptionMultiplexer() override; - public: css::uno::Reference< css::frame::XDispatchProviderInterception> getIntercepted() const { return m_xIntercepted; } - public: DispatchInterceptionMultiplexer( const css::uno::Reference< css::frame::XDispatchProviderInterception>& _rToIntercept, DispatchInterceptor* _pMaster @@ -96,8 +78,25 @@ namespace svxform // OComponentHelper virtual void SAL_CALL disposing() override; - protected: + private: + virtual ~DispatchInterceptionMultiplexer() override; + void ImplDetach(); + + ::osl::Mutex m_aFallback; + ::osl::Mutex* m_pMutex; + + // the component which's dispatches we're intercepting + css::uno::WeakReference< css::frame::XDispatchProviderInterception > + m_xIntercepted; + bool m_bListening; + + // the real interceptor + DispatchInterceptor* m_pMaster; + + // chaining + css::uno::Reference< css::frame::XDispatchProvider> m_xSlaveDispatcher; + css::uno::Reference< css::frame::XDispatchProvider> m_xMasterDispatcher; }; diff --git a/svx/source/inc/formfeaturedispatcher.hxx b/svx/source/inc/formfeaturedispatcher.hxx index 00bd404bd86e..b0d683ab6827 100644 --- a/svx/source/inc/formfeaturedispatcher.hxx +++ b/svx/source/inc/formfeaturedispatcher.hxx @@ -34,18 +34,8 @@ namespace svx typedef ::cppu::WeakImplHelper < css::frame::XDispatch > OSingleFeatureDispatcher_Base; - class OSingleFeatureDispatcher : public OSingleFeatureDispatcher_Base + class OSingleFeatureDispatcher final : public OSingleFeatureDispatcher_Base { - private: - ::osl::Mutex& m_rMutex; - ::comphelper::OInterfaceContainerHelper2 m_aStatusListeners; - css::uno::Reference< css::form::runtime::XFormOperations > - m_xFormOperations; - const css::util::URL m_aFeatureURL; - css::uno::Any m_aLastKnownState; - const sal_Int16 m_nFormFeature; - bool m_bLastKnownEnabled; - public: /** constructs the dispatcher @@ -73,13 +63,12 @@ namespace svx */ void updateAllListeners(); - protected: + private: // XDispatch virtual void SAL_CALL dispatch( const css::util::URL& _rURL, const css::uno::Sequence< css::beans::PropertyValue >& _rArguments ) override; virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& _rxControl, const css::util::URL& _rURL ) override; virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& _rxControl, const css::util::URL& _rURL ) override; - protected: /** notifies our current state to one or all listeners @param _rxListener @@ -95,8 +84,6 @@ namespace svx ::osl::ClearableMutexGuard& _rFreeForNotification ); - private: - /** retrieves the current status of our feature, in a format which can be used for UNO notifications @@ -104,6 +91,16 @@ namespace svx our mutex is locked */ void getUnoState( css::frame::FeatureStateEvent& /* [out] */ _rState ) const; + + ::osl::Mutex& m_rMutex; + ::comphelper::OInterfaceContainerHelper2 m_aStatusListeners; + css::uno::Reference< css::form::runtime::XFormOperations > + m_xFormOperations; + const css::util::URL m_aFeatureURL; + css::uno::Any m_aLastKnownState; + const sal_Int16 m_nFormFeature; + bool m_bLastKnownEnabled; + }; diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index 2a9d33ea0903..3852c8b8fc65 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -407,29 +407,26 @@ protected: }; -class DbFormattedField : public DbLimitedLengthField +class DbFormattedField final : public DbLimitedLengthField { -protected: - css::uno::Reference< css::util::XNumberFormatsSupplier > m_xSupplier; - - public: DbFormattedField(DbGridColumn& _rColumn); virtual ~DbFormattedField() override; - virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override; virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; virtual ::svt::CellControllerRef CreateController() const override; -protected: +private: // DbCellControl virtual bool commitControl( ) override; virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override; // OPropertyChangeListener virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override; + + css::uno::Reference< css::util::XNumberFormatsSupplier > m_xSupplier; }; @@ -654,17 +651,10 @@ protected: }; -class DbFilterField +class DbFilterField final :public DbCellControl ,public ::svxform::OSQLParserClient { - css::uno::Sequence< OUString > m_aValueList; - OUString m_aText; - Link<DbFilterField&,void> m_aCommitLink; - sal_Int16 m_nControlClass; - bool m_bFilterList : 1; - bool m_bFilterListFilled : 1; - public: DbFilterField(const css::uno::Reference< css::uno::XComponentContext >& rxContext, DbGridColumn& _rColumn); virtual ~DbFilterField() override; @@ -681,16 +671,21 @@ public: void SetCommitHdl( const Link<DbFilterField&,void>& rLink ) { m_aCommitLink = rLink; } -protected: - +private: // DbCellControl virtual bool commitControl( ) override; virtual void updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override; -protected: void SetList(const css::uno::Any& rItems, bool bComboBox); void CreateControl(vcl::Window* pParent, const css::uno::Reference< css::beans::XPropertySet >& xModel); DECL_LINK( OnClick, VclPtr<CheckBox>, void ); + + css::uno::Sequence< OUString > m_aValueList; + OUString m_aText; + Link<DbFilterField&,void> m_aCommitLink; + sal_Int16 m_nControlClass; + bool m_bFilterList : 1; + bool m_bFilterListFilled : 1; }; @@ -857,19 +852,9 @@ public: typedef ::cppu::ImplHelper2 < css::awt::XTextComponent , css::form::XChangeBroadcaster > FmXEditCell_Base; -class FmXEditCell : public FmXTextCell, +class FmXEditCell final : public FmXTextCell, public FmXEditCell_Base { -private: - OUString m_sValueOnEnter; - -protected: - ::comphelper::OInterfaceContainerHelper2 m_aTextListeners; - ::comphelper::OInterfaceContainerHelper2 m_aChangeListeners; - ::svt::IEditImplementation* m_pEditImplementation; - bool m_bOwnEditImplementation; - - virtual ~FmXEditCell() override; public: FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl ); @@ -901,14 +886,21 @@ public: virtual void SAL_CALL addChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override; virtual void SAL_CALL removeChangeListener( const css::uno::Reference< css::form::XChangeListener >& aListener ) override; -protected: +private: + virtual ~FmXEditCell() override; + virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override; virtual void onFocusGained( const css::awt::FocusEvent& _rEvent ) override; virtual void onFocusLost( const css::awt::FocusEvent& _rEvent ) override; -private: void onTextChanged(); + + OUString m_sValueOnEnter; + ::comphelper::OInterfaceContainerHelper2 m_aTextListeners; + ::comphelper::OInterfaceContainerHelper2 m_aChangeListeners; + ::svt::IEditImplementation* m_pEditImplementation; + bool m_bOwnEditImplementation; }; @@ -960,16 +952,9 @@ protected: typedef ::cppu::ImplHelper1 < css::awt::XListBox > FmXListBoxCell_Base; -class FmXListBoxCell :public FmXTextCell +class FmXListBoxCell final :public FmXTextCell ,public FmXListBoxCell_Base { - ::comphelper::OInterfaceContainerHelper2 m_aItemListeners, - m_aActionListeners; - VclPtr<ListBox> m_pBox; - -protected: - virtual ~FmXListBoxCell() override; - public: FmXListBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl ); @@ -1005,10 +990,15 @@ public: virtual void SAL_CALL SAL_CALL setDropDownLineCount(sal_Int16 nLines) override; virtual void SAL_CALL SAL_CALL makeVisible(sal_Int16 nEntry) override; -protected: +private: virtual void onWindowEvent( const VclEventId _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) override; + virtual ~FmXListBoxCell() override; DECL_LINK( OnDoubleClick, ListBox&, void ); + + ::comphelper::OInterfaceContainerHelper2 m_aItemListeners, + m_aActionListeners; + VclPtr<ListBox> m_pBox; }; @@ -1058,12 +1048,9 @@ protected: typedef ::cppu::ImplHelper2 < css::awt::XTextComponent , css::lang::XUnoTunnel > FmXFilterCell_Base; -class FmXFilterCell :public FmXGridCell +class FmXFilterCell final : public FmXGridCell ,public FmXFilterCell_Base { - ::comphelper::OInterfaceContainerHelper2 m_aTextListeners; -protected: - virtual ~FmXFilterCell() override; public: FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl = nullptr); @@ -1100,8 +1087,11 @@ public: virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override; virtual sal_Int16 SAL_CALL getMaxTextLen() override; -protected: +private: DECL_LINK( OnCommit, DbFilterField&, void ); + virtual ~FmXFilterCell() override; + + ::comphelper::OInterfaceContainerHelper2 m_aTextListeners; }; #endif // INCLUDED_SVX_SOURCE_INC_GRIDCELL_HXX diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx index 96c2fe581914..01e5ccb6849b 100644 --- a/svx/source/inc/svxrectctaccessiblecontext.hxx +++ b/svx/source/inc/svxrectctaccessiblecontext.hxx @@ -70,16 +70,14 @@ typedef ::cppu::WeakAggComponentImplHelper6< css::lang::XServiceInfo > SvxRectCtlAccessibleContext_Base; -class SvxRectCtlAccessibleContext : public ::cppu::BaseMutex, public SvxRectCtlAccessibleContext_Base +class SvxRectCtlAccessibleContext final : public ::cppu::BaseMutex, public SvxRectCtlAccessibleContext_Base { public: // internal SvxRectCtlAccessibleContext( const css::uno::Reference< css::accessibility::XAccessible>& rxParent, SvxRectCtl& rRepresentation ); -protected: - virtual ~SvxRectCtlAccessibleContext() override; -public: + // XAccessible virtual css::uno::Reference< css::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext() override; @@ -191,8 +189,20 @@ public: virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override; + /** Selects a new child by point. + + <p>If the child was not selected before, the state of the child will + be updated. If the point is not invalid, the index will internally set to NOCHILDSELECTED</p> + + @param eButton + Button which belongs to the child which should be selected. + */ + void selectChild( RectPoint ePoint ); + void FireChildFocus( RectPoint eButton ); + +private: + virtual ~SvxRectCtlAccessibleContext() override; -protected: // internals /// @throws css::lang::IndexOutOfBoundsException void checkChildIndex( long nIndexOfChild ); @@ -207,20 +217,6 @@ protected: */ void selectChild( long nIndexOfChild ); -public: - /** Selects a new child by point. - - <p>If the child was not selected before, the state of the child will - be updated. If the point is not invalid, the index will internally set to NOCHILDSELECTED</p> - - @param eButton - Button which belongs to the child which should be selected. - */ - void selectChild( RectPoint ePoint ); - void FireChildFocus( RectPoint eButton ); - -protected: - /// @Return the object's current bounding box relative to the desktop. /// /// @throws css::uno::RuntimeException @@ -239,7 +235,6 @@ protected: /// @throws css::lang::DisposedException if it's not alive void ThrowExceptionIfNotAlive(); -private: /** Description of this object. This is not a constant because it can be set from the outside. */ diff --git a/svx/source/inc/tbxform.hxx b/svx/source/inc/tbxform.hxx index c2dbd43fa912..b53bf5e136c7 100644 --- a/svx/source/inc/tbxform.hxx +++ b/svx/source/inc/tbxform.hxx @@ -26,18 +26,19 @@ #include <vcl/button.hxx> -class SvxFmAbsRecWin : public NumericField +class SvxFmAbsRecWin final : public NumericField { - SfxToolBoxControl* m_pController; - // for invalidating our content when losing the focus public: SvxFmAbsRecWin( vcl::Window* _pParent, SfxToolBoxControl* _pController ); virtual void KeyInput( const KeyEvent& rKeyEvt ) override; virtual void LoseFocus() override; -protected: +private: void FirePosition( bool _bForce ); + + SfxToolBoxControl* m_pController; + // for invalidating our content when losing the focus }; diff --git a/svx/source/inc/xfm_addcondition.hxx b/svx/source/inc/xfm_addcondition.hxx index 753768681b1e..bb50d3871d3d 100644 --- a/svx/source/inc/xfm_addcondition.hxx +++ b/svx/source/inc/xfm_addcondition.hxx @@ -30,25 +30,15 @@ namespace svxform { typedef ::svt::OGenericUnoDialog OAddConditionDialogBase; - class OAddConditionDialog + class OAddConditionDialog final :public OAddConditionDialogBase ,public ::comphelper::OPropertyArrayUsageHelper< OAddConditionDialog > { - private: - // <properties> - css::uno::Reference< css::beans::XPropertySet > - m_xBinding; - OUString m_sFacetName; - OUString m_sConditionValue; - css::uno::Reference< css::xforms::XModel > - m_xWorkModel; - // </properties> - public: static css::uno::Reference< css::uno::XInterface > SAL_CALL Create( const css::uno::Reference< css::lang::XMultiServiceFactory >& ); - protected: + private: OAddConditionDialog( const css::uno::Reference< css::uno::XComponentContext >& _rxORB ); // XTypeProvider @@ -65,10 +55,16 @@ namespace svxform // OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override; - protected: // OGenericUnoDialog overridables virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) override; virtual void executedDialog(sal_Int16 _nExecutionResult) override; + + css::uno::Reference< css::beans::XPropertySet > + m_xBinding; + OUString m_sFacetName; + OUString m_sConditionValue; + css::uno::Reference< css::xforms::XModel > + m_xWorkModel; }; diff --git a/svx/source/sidebar/line/LineWidthValueSet.hxx b/svx/source/sidebar/line/LineWidthValueSet.hxx index c3a1e06e787b..0738627d8bfa 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.hxx +++ b/svx/source/sidebar/line/LineWidthValueSet.hxx @@ -24,8 +24,7 @@ namespace svx { namespace sidebar { -class LineWidthValueSet - : public ValueSet +class LineWidthValueSet final : public ValueSet { public: explicit LineWidthValueSet(vcl::Window* pParent); @@ -42,7 +41,7 @@ public: virtual void Resize() override; virtual Size GetOptimalSize() const override; -protected: +private: VclPtr<VirtualDevice> pVDev; sal_uInt16 nSelItem; OUString* strUnit; diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index 2c6fa3ee025d..a3bd9b16ef40 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -43,9 +43,8 @@ class SvdProgressInfo; // Helper Class ImpSdrGDIMetaFileImport -class ImpSdrGDIMetaFileImport +class ImpSdrGDIMetaFileImport final { -protected: ::std::vector< SdrObject* > maTmpList; ScopedVclPtr<VirtualDevice> mpVD; tools::Rectangle maScaleRect; @@ -82,7 +81,6 @@ protected: // clipregion basegfx::B2DPolyPolygon maClip; -protected: // check for clip and evtl. fill maClip void checkClip(); bool isClip() const; @@ -153,7 +151,6 @@ protected: void DoLoopActions(GDIMetaFile const & rMtf, SvdProgressInfo* pProgrInfo, sal_uInt32* pActionsToReport); -private: // Copy assignment is forbidden and not implemented. ImpSdrGDIMetaFileImport (const ImpSdrGDIMetaFileImport &) = delete; ImpSdrGDIMetaFileImport & operator= (const ImpSdrGDIMetaFileImport &) = delete; diff --git a/svx/source/table/cellcursor.hxx b/svx/source/table/cellcursor.hxx index 6b2a9d5b6d5b..c5286623a2bf 100644 --- a/svx/source/table/cellcursor.hxx +++ b/svx/source/table/cellcursor.hxx @@ -32,7 +32,7 @@ struct CellPos; typedef ::cppu::ImplInheritanceHelper< CellRange, css::table::XCellCursor, css::table::XMergeableCellRange > CellCursorBase; -class CellCursor : public CellCursorBase +class CellCursor final : public CellCursorBase { public: CellCursor( const TableModelRef& xTableModel, sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ); @@ -55,7 +55,7 @@ public: virtual void SAL_CALL split( ::sal_Int32 Columns, ::sal_Int32 Rows ) override; virtual sal_Bool SAL_CALL isMergeable( ) override; -protected: +private: bool GetMergedSelection( CellPos& rStart, CellPos& rEnd ); void split_column( sal_Int32 nCol, sal_Int32 nColumns, std::vector< sal_Int32 >& rLeftOvers ); diff --git a/svx/source/unogallery/unogalitem.hxx b/svx/source/unogallery/unogalitem.hxx index bd1f66958767..7bafe95a6375 100644 --- a/svx/source/unogallery/unogalitem.hxx +++ b/svx/source/unogallery/unogalitem.hxx @@ -34,7 +34,7 @@ namespace unogallery { class GalleryTheme; } namespace unogallery { -class GalleryItem : public ::cppu::OWeakAggObject, +class GalleryItem final : public ::cppu::OWeakAggObject, public css::lang::XServiceInfo, public css::lang::XTypeProvider, public css::gallery::XGalleryItem, @@ -49,7 +49,7 @@ public: bool isValid() const; -protected: +private: // XInterface virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override; @@ -73,20 +73,16 @@ protected: virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const css::uno::Any* pValues ) override; virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, css::uno::Any* pValue ) override; -protected: - static rtl::Reference<::comphelper::PropertySetInfo> createPropertySetInfo(); -private: - - ::unogallery::GalleryTheme* mpTheme; - const ::GalleryObject* mpGalleryObject; - const ::GalleryObject* implGetObject() const { return mpGalleryObject;} void implSetInvalid(); GalleryItem( const GalleryItem& ) = delete; GalleryItem& operator=( const GalleryItem& ) = delete; + + ::unogallery::GalleryTheme* mpTheme; + const ::GalleryObject* mpGalleryObject; }; |