[Libreoffice-commits] core.git: include/svtools svtools/inc svtools/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Oct 24 08:54:45 UTC 2017


 include/svtools/accessibleruler.hxx         |   35 +++++++++------------
 include/svtools/addresstemplate.hxx         |   45 +++++++++++++--------------
 include/svtools/calendar.hxx                |    5 ---
 include/svtools/ctrlbox.hxx                 |   46 +++++++++++++---------------
 include/svtools/filectrl.hxx                |    8 +---
 include/svtools/fmtfield.hxx                |   21 ++++++------
 include/svtools/hyperlabel.hxx              |    9 +----
 include/svtools/stringtransfer.hxx          |    9 ++---
 include/svtools/transfer.hxx                |    9 -----
 svtools/inc/roadmap.hxx                     |   20 +++++-------
 svtools/inc/vclxaccessibleheaderbaritem.hxx |    4 --
 svtools/source/inc/unoiface.hxx             |   30 +++++++-----------
 svtools/source/table/tablegeometry.hxx      |   16 ++++-----
 svtools/source/uno/svtxgridcontrol.hxx      |   21 +++++-------
 14 files changed, 118 insertions(+), 160 deletions(-)

New commits:
commit f49b6d89fd9a903ce01a30bf9971188737ceda14
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Oct 24 08:06:22 2017 +0200

    loplugin:finalclasses in svtools
    
    Change-Id: I596342a3d32e116ac5994b60a5bd8717d4f6a5dd
    Reviewed-on: https://gerrit.libreoffice.org/43733
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svtools/accessibleruler.hxx b/include/svtools/accessibleruler.hxx
index 709a133cb61b..5e47c7e076ef 100644
--- a/include/svtools/accessibleruler.hxx
+++ b/include/svtools/accessibleruler.hxx
@@ -59,15 +59,13 @@ typedef ::cppu::WeakAggComponentImplHelper5<
             css::lang::XServiceInfo >
             SvtRulerAccessible_Base;
 
-class SvtRulerAccessible : public ::cppu::BaseMutex, public SvtRulerAccessible_Base
+class SvtRulerAccessible final : public ::cppu::BaseMutex, public SvtRulerAccessible_Base
 {
 public:
     //=====  internal  ========================================================
     SvtRulerAccessible(
         const css::uno::Reference< css::accessibility::XAccessible>& rxParent, Ruler& rRepresentation, const ::rtl::OUString& rName );
-protected:
-    virtual ~SvtRulerAccessible() override;
-public:
+
     /// @throws css::uno::RuntimeException
     bool SAL_CALL
         isVisible();
@@ -160,7 +158,17 @@ public:
     virtual css::uno::Sequence<sal_Int8> SAL_CALL
         getImplementationId() override;
 
-protected:
+private:
+
+    virtual ~SvtRulerAccessible() override;
+
+    virtual void SAL_CALL disposing() override;
+
+    /// @returns true if it's disposed or in disposing
+    inline bool IsAlive() const;
+
+    /// @throws DisposedException if it's not alive
+    void ThrowExceptionIfNotAlive();
 
     /// @Return the object's current bounding box relative to the desktop.
     ///
@@ -172,18 +180,7 @@ protected:
     /// @throws css::uno::RuntimeException
     tools::Rectangle GetBoundingBox();
 
-
-    virtual void SAL_CALL disposing() override;
-
-    /// @returns true if it's disposed or in disposing
-    inline bool IsAlive() const;
-
-    /// @throws DisposedException if it's not alive
-    void ThrowExceptionIfNotAlive();
-
-private:
-    /** Name of this object.
-    */
+    /// Name of this object.
     ::rtl::OUString                     msName;
 
     /// Reference to the parent object.
@@ -193,10 +190,8 @@ private:
     /// pointer to internal representation
     VclPtr<Ruler>                       mpRepr;
 
-        /// client id in the AccessibleEventNotifier queue
+    /// client id in the AccessibleEventNotifier queue
     sal_uInt32 mnClientId;
-
-
 };
 
 inline bool SvtRulerAccessible::IsAlive() const
diff --git a/include/svtools/addresstemplate.hxx b/include/svtools/addresstemplate.hxx
index 541e55c89805..752f14f5f8ce 100644
--- a/include/svtools/addresstemplate.hxx
+++ b/include/svtools/addresstemplate.hxx
@@ -46,29 +46,8 @@ namespace svt
     // = AddressBookSourceDialog
 
     struct AddressBookSourceDialogData;
-    class SVT_DLLPUBLIC AddressBookSourceDialog : public ModalDialog
+    class SVT_DLLPUBLIC AddressBookSourceDialog final : public ModalDialog
     {
-    private:
-        // Controls
-        VclPtr<ComboBox>       m_pDatasource;
-        VclPtr<PushButton>     m_pAdministrateDatasources;
-        VclPtr<ComboBox>       m_pTable;
-        VclPtr<ScrollBar>      m_pFieldScroller;
-
-        // string to display for "no selection"
-        const OUString         m_sNoFieldSelection;
-
-        /// the DatabaseContext for selecting data sources
-        css::uno::Reference< css::sdb::XDatabaseContext >
-                               m_xDatabaseContext;
-        // the ORB for creating objects
-        css::uno::Reference< css::uno::XComponentContext >
-                               m_xORB;
-        css::uno::Reference< css::container::XNameAccess >
-                               m_xCurrentDatasourceTables;
-
-        std::unique_ptr<AddressBookSourceDialogData> m_pImpl;
-
     public:
         AddressBookSourceDialog( vcl::Window* _pParent,
             const css::uno::Reference< css::uno::XComponentContext >& _rxORB );
@@ -107,7 +86,7 @@ namespace svt
         void        getFieldMapping(
             css::uno::Sequence< css::util::AliasProgrammaticPair >& _rMapping) const;
 
-    protected:
+    private:
         void    implConstruct();
 
         // Window overridables
@@ -134,6 +113,26 @@ namespace svt
         DECL_LINK(OnComboSelect, ComboBox&, void);
         DECL_LINK(OnOkClicked, Button*, void);
         DECL_LINK(OnDelayedInitialize, void*, void);
+
+        // Controls
+        VclPtr<ComboBox>       m_pDatasource;
+        VclPtr<PushButton>     m_pAdministrateDatasources;
+        VclPtr<ComboBox>       m_pTable;
+        VclPtr<ScrollBar>      m_pFieldScroller;
+
+        // string to display for "no selection"
+        const OUString         m_sNoFieldSelection;
+
+        /// the DatabaseContext for selecting data sources
+        css::uno::Reference< css::sdb::XDatabaseContext >
+                               m_xDatabaseContext;
+        // the ORB for creating objects
+        css::uno::Reference< css::uno::XComponentContext >
+                               m_xORB;
+        css::uno::Reference< css::container::XNameAccess >
+                               m_xCurrentDatasourceTables;
+
+        std::unique_ptr<AddressBookSourceDialogData> m_pImpl;
     };
 
 
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 1fe247539f6c..b140ca01a64f 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -122,9 +122,8 @@ calls or by ending a selection.
 typedef std::set<sal_Int32> IntDateSet;
 
 
-class SVT_DLLPUBLIC Calendar : public Control
+class SVT_DLLPUBLIC Calendar final : public Control
 {
-private:
     IntDateSet*     mpSelectTable;
     IntDateSet*     mpOldSelectTable;
     OUString        maDayTexts[31];
@@ -205,8 +204,6 @@ private:
     SVT_DLLPRIVATE void         ImplEndTracking( bool bCancel );
     SVT_DLLPRIVATE DayOfWeek    ImplGetWeekStart() const;
 
-protected:
-
     DECL_LINK( ScrollHdl, Timer *, void );
 
 public:
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 7b7b68cc92d6..39faf85747ee 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -192,29 +192,8 @@ inline Color sameDistColor( Color /*rMain*/, Color rDefault )
     return rDefault;
 }
 
-class SVT_DLLPUBLIC LineListBox : public ListBox
+class SVT_DLLPUBLIC LineListBox final : public ListBox
 {
-    ImpLineList*    pLineList;
-    long            m_nWidth;
-    OUString        m_sNone;
-
-    ScopedVclPtr<VirtualDevice>   aVirDev;
-    Size            aTxtSize;
-    Color           aColor;
-    Color           maPaintCol;
-    FieldUnit       eSourceUnit;
-
-    SVT_DLLPRIVATE void         ImpGetLine( long nLine1, long nLine2, long nDistance,
-                                    Color nColor1, Color nColor2, Color nColorDist,
-                                    SvxBorderLineStyle nStyle, Bitmap& rBmp );
-    using Window::ImplInit;
-    SVT_DLLPRIVATE void         ImplInit();
-    void            UpdatePaintLineColor();       // returns sal_True if maPaintCol has changed
-    virtual void    DataChanged( const DataChangedEvent& rDCEvt ) override;
-
-    void            UpdateEntries( long nOldWidth );
-    sal_Int32       GetStylePos( sal_Int32  nListPos, long nWidth );
-
 public:
     typedef Color (*ColorFunc)(Color);
     typedef Color (*ColorDistFunc)(Color, Color);
@@ -248,16 +227,35 @@ public:
     void            SetColor( const Color& rColor );
     const Color&    GetColor() const { return aColor; }
 
-protected:
+private:
+
+    SVT_DLLPRIVATE void         ImpGetLine( long nLine1, long nLine2, long nDistance,
+                                    Color nColor1, Color nColor2, Color nColorDist,
+                                    SvxBorderLineStyle nStyle, Bitmap& rBmp );
+    using Window::ImplInit;
+    SVT_DLLPRIVATE void         ImplInit();
+    void            UpdatePaintLineColor();       // returns sal_True if maPaintCol has changed
+    virtual void    DataChanged( const DataChangedEvent& rDCEvt ) override;
+
+    void            UpdateEntries( long nOldWidth );
+    sal_Int32       GetStylePos( sal_Int32  nListPos, long nWidth );
 
     inline const Color&    GetPaintColor() const;
     Color   GetColorLine1( sal_Int32  nPos );
     Color   GetColorLine2( sal_Int32  nPos );
     Color   GetColorDist( sal_Int32  nPos );
 
-private:
                     LineListBox( const LineListBox& ) = delete;
     LineListBox&    operator =( const LineListBox& ) = delete;
+
+    ImpLineList*    pLineList;
+    long            m_nWidth;
+    OUString        m_sNone;
+    ScopedVclPtr<VirtualDevice>   aVirDev;
+    Size            aTxtSize;
+    Color           aColor;
+    Color           maPaintCol;
+    FieldUnit       eSourceUnit;
 };
 
 inline void LineListBox::SetColor( const Color& rColor )
diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx
index 22acd8ebbb44..c00d3fccfa81 100644
--- a/include/svtools/filectrl.hxx
+++ b/include/svtools/filectrl.hxx
@@ -38,17 +38,13 @@ namespace o3tl
 }
 
 
-class SVT_DLLPUBLIC FileControl : public vcl::Window
+class SVT_DLLPUBLIC FileControl final : public vcl::Window
 {
-private:
     VclPtr<Edit>       maEdit;
     VclPtr<PushButton> maButton;
-
-    OUString        maButtonText;
-
+    OUString           maButtonText;
     FileControlMode_Internal    mnInternalFlags;
 
-protected:
     SVT_DLLPRIVATE void     Resize() override;
     SVT_DLLPRIVATE void     GetFocus() override;
     SVT_DLLPRIVATE void     StateChanged( StateChangedType nType ) override;
diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx
index 99e3998e2451..e8d794fd76f6 100644
--- a/include/svtools/fmtfield.hxx
+++ b/include/svtools/fmtfield.hxx
@@ -252,11 +252,8 @@ protected:
 };
 
 
-class SVT_DLLPUBLIC DoubleNumericField : public FormattedField
+class SVT_DLLPUBLIC DoubleNumericField final : public FormattedField
 {
-protected:
-    validation::NumberValidator*    m_pNumberValidator;
-
 public:
     DoubleNumericField(vcl::Window* pParent, WinBits nStyle)
         :FormattedField(pParent, nStyle)
@@ -268,20 +265,18 @@ public:
     virtual ~DoubleNumericField() override;
     virtual void dispose() override;
 
-protected:
+private:
     virtual bool CheckText(const OUString& sText) const override;
 
     virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat) override;
     void ResetConformanceTester();
+
+    validation::NumberValidator*    m_pNumberValidator;
 };
 
 
-class DoubleCurrencyField : public FormattedField
+class DoubleCurrencyField final : public FormattedField
 {
-    OUString   m_sCurrencySymbol;
-    bool       m_bPrependCurrSym;
-    bool       m_bChangingFormat;
-
 public:
     DoubleCurrencyField(vcl::Window* pParent, WinBits nStyle);
 
@@ -291,10 +286,14 @@ public:
     bool        getPrependCurrSym() const { return m_bPrependCurrSym; }
     void        setPrependCurrSym(bool _bPrepend);
 
-protected:
+private:
     virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat) override;
 
     void UpdateCurrencyFormat();
+
+    OUString   m_sCurrencySymbol;
+    bool       m_bPrependCurrSym;
+    bool       m_bChangingFormat;
 };
 
 #endif // INCLUDED_SVTOOLS_FMTFIELD_HXX
diff --git a/include/svtools/hyperlabel.hxx b/include/svtools/hyperlabel.hxx
index b63107683767..605d65dc4443 100644
--- a/include/svtools/hyperlabel.hxx
+++ b/include/svtools/hyperlabel.hxx
@@ -32,9 +32,8 @@ namespace svt
 {
     class HyperLabelImpl;
 
-    class HyperLabel : public FixedText
+    class HyperLabel final : public FixedText
     {
-    protected:
         std::unique_ptr<HyperLabelImpl>     m_pImpl;
         Link<HyperLabel*,void>  maClickHdl;
 
@@ -46,9 +45,10 @@ namespace svt
         void                DeactivateHyperMode(vcl::Font aFont, const Color aColor);
         void                ActivateHyperMode(vcl::Font aFont, const Color aColor);
 
-    protected:
         void                implInit();
 
+        using FixedText::CalcMinimumSize;
+
     public:
         HyperLabel( vcl::Window* _pParent, WinBits _nWinStyle );
         virtual ~HyperLabel( ) override;
@@ -70,9 +70,6 @@ namespace svt
         void                SetClickHdl( const Link<HyperLabel*,void>& rLink ) { maClickHdl = rLink; }
 
         Size                CalcMinimumSize( long nMaxWidth ) const;
-
-    private:
-        using FixedText::CalcMinimumSize;
     };
 }
 
diff --git a/include/svtools/stringtransfer.hxx b/include/svtools/stringtransfer.hxx
index 44c1c70780d8..fcecc9724ff1 100644
--- a/include/svtools/stringtransfer.hxx
+++ b/include/svtools/stringtransfer.hxx
@@ -30,18 +30,17 @@ namespace svt
 
     //= OStringTransferable
 
-    class SVT_DLLPUBLIC OStringTransferable : public TransferableHelper
+    class SVT_DLLPUBLIC OStringTransferable final : public TransferableHelper
     {
-    protected:
-        OUString     m_sContent;
-
     public:
         OStringTransferable(const OUString& _rContent);
 
-    protected:
+    private:
         // TransferableHelper overridables
         virtual void AddSupportedFormats() override;
         virtual bool GetData( const css::datatransfer::DataFlavor& _rFlavor, const OUString& rDestDoc ) override;
+
+        OUString     m_sContent;
     };
 
 
diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx
index f499a2a1fce4..61d76c174636 100644
--- a/include/svtools/transfer.hxx
+++ b/include/svtools/transfer.hxx
@@ -261,19 +261,16 @@ public:
 
 struct TransferableDataHelper_Impl;
 
-class SVT_DLLPUBLIC TransferableDataHelper
+class SVT_DLLPUBLIC TransferableDataHelper final
 {
     friend class DropTargetHelper;
 
-private:
-
     css::uno::Reference< css::datatransfer::XTransferable >           mxTransfer;
     css::uno::Reference< css::datatransfer::clipboard::XClipboard >   mxClipboard;
     DataFlavorExVector                                                maFormats;
     std::unique_ptr<TransferableObjectDescriptor>                     mxObjDesc;
     std::unique_ptr<TransferableDataHelper_Impl>                      mxImpl;
 
-protected:
     void                        InitFormats();
 
 public:
@@ -308,8 +305,6 @@ public:
 
     void                        Rebind( const css::uno::Reference< css::datatransfer::XTransferable >& _rxNewData );
 
-public:
-
     css::uno::Any GetAny( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const;
     css::uno::Any GetAny( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) const;
 
@@ -357,8 +352,6 @@ public:
     css::uno::Reference<css::io::XInputStream> GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc );
     css::uno::Reference<css::io::XInputStream> GetInputStream( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc );
 
-public:
-
     static TransferableDataHelper   CreateFromSystemClipboard( vcl::Window * pWindow );
     static TransferableDataHelper   CreateFromSelection( vcl::Window * pWindow );
     static bool                     IsEqual( const css::datatransfer::DataFlavor& rInternalFlavor,
diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx
index 193ceac94060..bfaf39befc25 100644
--- a/svtools/inc/roadmap.hxx
+++ b/svtools/inc/roadmap.hxx
@@ -41,14 +41,8 @@ public:
 class RoadmapImpl;
 class RoadmapItem;
 
-class SVT_DLLPUBLIC ORoadmap : public Control, public RoadmapTypes
+class SVT_DLLPUBLIC ORoadmap final : public Control, public RoadmapTypes
 {
-protected:
-    std::unique_ptr<RoadmapImpl>    m_pImpl;
-    // Window overridables
-    void            Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) override;
-    void            implInit(vcl::RenderContext& rRenderContext);
-
 public:
     ORoadmap( vcl::Window* _pParent, WinBits _nWinStyle );
     virtual ~ORoadmap( ) override;
@@ -83,14 +77,12 @@ public:
     virtual void    GetFocus() override;
     virtual void    ApplySettings( vcl::RenderContext& rRenderContext ) override;
 
-protected:
+private:
     bool            PreNotify( NotifyEvent& rNEvt ) override;
 
-protected:
     /// called when an item has been selected by any means
-    void    Select();
+    void            Select();
 
-private:
     DECL_LINK(ImplClickHdl, HyperLabel*, void);
 
     RoadmapItem*         GetByIndex( ItemIndex _nItemIndex );
@@ -107,6 +99,12 @@ private:
     RoadmapItem*         GetByPointer(vcl::Window const * pWindow);
     RoadmapItem*         InsertHyperLabel( ItemIndex Index, const OUString& _aStr, ItemId RMID, bool _bEnabled, bool _bIncomplete  );
     void                 UpdatefollowingHyperLabels( ItemIndex Index );
+
+    // Window overridables
+    void            Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) override;
+    void            implInit(vcl::RenderContext& rRenderContext);
+
+    std::unique_ptr<RoadmapImpl>    m_pImpl;
 };
 
 }   // namespace svt
diff --git a/svtools/inc/vclxaccessibleheaderbaritem.hxx b/svtools/inc/vclxaccessibleheaderbaritem.hxx
index 03701de59c8e..3e6ef4823dab 100644
--- a/svtools/inc/vclxaccessibleheaderbaritem.hxx
+++ b/svtools/inc/vclxaccessibleheaderbaritem.hxx
@@ -47,15 +47,13 @@ typedef ::cppu::ImplHelper2<
     css::accessibility::XAccessible,
     css::lang::XServiceInfo > VCLXAccessibleHeaderBarItem_BASE;
 
-class VCLXAccessibleHeaderBarItem : public comphelper::OAccessibleExtendedComponentHelper,
+class VCLXAccessibleHeaderBarItem final : public comphelper::OAccessibleExtendedComponentHelper,
                                     public VCLXAccessibleHeaderBarItem_BASE
 {
 private:
     VclPtr<HeaderBar>        m_pHeadBar;
     sal_Int32                m_nIndexInParent;
 
-protected:
-
     void            FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
 
     // OCommonAccessibleComponent
diff --git a/svtools/source/inc/unoiface.hxx b/svtools/source/inc/unoiface.hxx
index ed22a03a884d..7e9a110ff9c9 100644
--- a/svtools/source/inc/unoiface.hxx
+++ b/svtools/source/inc/unoiface.hxx
@@ -112,9 +112,8 @@ public:
 
 //  class VCLXFileControl
 
-class VCLXFileControl : public css::awt::XTextComponent, public css::awt::XTextLayoutConstrains, public VCLXWindow
+class VCLXFileControl final : public css::awt::XTextComponent, public css::awt::XTextLayoutConstrains, public VCLXWindow
 {
-protected:
     DECL_LINK(ModifyHdl, Edit&, void);
     void ModifyHdl();
     TextListenerMultiplexer maTextListeners;
@@ -233,20 +232,8 @@ typedef ::cppu::ImplInheritanceHelper  <   VCLXGraphicControl
                                         ,   css::beans::XPropertyChangeListener
                                         ,   css::awt::XItemEventBroadcaster
                                         >   SVTXRoadmap_Base;
-class SVTXRoadmap : public SVTXRoadmap_Base
-
-
+class SVTXRoadmap final : public SVTXRoadmap_Base
 {
-private:
-    ItemListenerMultiplexer     maItemListeners;
-
-    static RMItemData GetRMItemData( const css::container::ContainerEvent& _rEvent );
-
-protected:
-    virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
-
-    virtual ~SVTXRoadmap() override;
-
 public:
     SVTXRoadmap();
 
@@ -269,13 +256,21 @@ public:
     // XPropertyChangeListener
     virtual void SAL_CALL propertyChange( const css::beans::PropertyChangeEvent& evt ) override;
 
-protected:
+private:
 
     // VCLXGraphicControl overridables
     virtual void    ImplSetNewImage() override;
 
     static void     ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
     virtual void    GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+
+    static RMItemData GetRMItemData( const css::container::ContainerEvent& _rEvent );
+
+    virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
+
+    virtual ~SVTXRoadmap() override;
+
+    ItemListenerMultiplexer     maItemListeners;
 };
 
 
@@ -364,7 +359,7 @@ public:
 
 //  class VCLXProgressBar
 
-class VCLXProgressBar : public css::awt::XProgressBar,
+class VCLXProgressBar final : public css::awt::XProgressBar,
                         public VCLXWindow
 {
 private:
@@ -372,7 +367,6 @@ private:
     sal_Int32   m_nValueMin;
     sal_Int32   m_nValueMax;
 
-protected:
     void            ImplUpdateValue();
 
 public:
diff --git a/svtools/source/table/tablegeometry.hxx b/svtools/source/table/tablegeometry.hxx
index f4ac0ca0e6a6..8ba81c03d644 100644
--- a/svtools/source/table/tablegeometry.hxx
+++ b/svtools/source/table/tablegeometry.hxx
@@ -64,12 +64,8 @@ namespace svt { namespace table
 
     //= TableRowGeometry
 
-    class TableRowGeometry : public TableGeometry
+    class TableRowGeometry final : public TableGeometry
     {
-    protected:
-        RowPos  m_nRowPos;
-        bool    m_bAllowVirtualRows;
-
     public:
         TableRowGeometry(
             TableControl_Impl const & _rControl,
@@ -87,16 +83,16 @@ namespace svt { namespace table
     private:
         void    impl_initRect();
         bool    impl_isValidRow( RowPos const i_row ) const;
+
+        RowPos  m_nRowPos;
+        bool    m_bAllowVirtualRows;
     };
 
 
     //= TableColumnGeometry
 
-    class TableColumnGeometry : public TableGeometry
+    class TableColumnGeometry final : public TableGeometry
     {
-    protected:
-        ColPos  m_nColPos;
-
     public:
         TableColumnGeometry(
             TableControl_Impl const & _rControl,
@@ -112,6 +108,8 @@ namespace svt { namespace table
     private:
         void    impl_initRect();
         bool    impl_isValidColumn( ColPos const i_column ) const;
+
+        ColPos  m_nColPos;
     };
 
 
diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx
index a8e074d1074d..471d3753add3 100644
--- a/svtools/source/uno/svtxgridcontrol.hxx
+++ b/svtools/source/uno/svtxgridcontrol.hxx
@@ -48,17 +48,8 @@ typedef ::cppu::ImplInheritanceHelper  <   VCLXWindow
                                         ,   css::awt::grid::XGridDataListener
                                         ,   css::container::XContainerListener
                                         >   SVTXGridControl_Base;
-class SVTXGridControl : public SVTXGridControl_Base
+class SVTXGridControl final : public SVTXGridControl_Base
 {
-private:
-    std::shared_ptr< ::svt::table::UnoControlTableModel >   m_xTableModel;
-    bool                                                        m_bTableModelInitCompleted;
-    SelectionListenerMultiplexer                                m_aSelectionListeners;
-
-protected:
-    virtual void    ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
-    void            ImplCallItemListeners();
-
 public:
     SVTXGridControl();
     virtual ~SVTXGridControl() override;
@@ -104,16 +95,22 @@ public:
     // XWindow
     void SAL_CALL setEnable( sal_Bool bEnable ) override;
 
-protected:
+private:
     // VCLXWindow
     virtual void    SetWindow( const VclPtr< vcl::Window > &pWindow ) override;
 
-private:
     void    impl_updateColumnsFromModel_nothrow();
     void    impl_checkTableModelInit();
 
     void    impl_checkColumnIndex_throw( ::svt::table::TableControl const & i_table, sal_Int32 const i_columnIndex ) const;
     void    impl_checkRowIndex_throw( ::svt::table::TableControl const & i_table, sal_Int32 const i_rowIndex ) const;
+
+    virtual void    ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
+    void            ImplCallItemListeners();
+
+    std::shared_ptr< ::svt::table::UnoControlTableModel >   m_xTableModel;
+    bool                                                    m_bTableModelInitCompleted;
+    SelectionListenerMultiplexer                            m_aSelectionListeners;
 };
 #endif // INCLUDED_SVTOOLS_SOURCE_UNO_SVTXGRIDCONTROL_HXX
 


More information about the Libreoffice-commits mailing list