include/svtools/editbrowsebox.hxx       |   14 ++++++++------
 svtools/source/brwbox/editbrowsebox.cxx |   10 +++-------
 2 files changed, 11 insertions(+), 13 deletions(-)

New commits:
commit 2dfe1726d5262820c910d810b955ea73d3c7ae95
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Oct 6 09:19:20 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Oct 6 11:56:12 2021 +0200

    CellController always controls something derived from svt::ControlBase
    
    Change-Id: I051c2d0cf134502943bda5aa0bad9b04163c221f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123129
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/include/svtools/editbrowsebox.hxx 
b/include/svtools/editbrowsebox.hxx
index 199173a390cf..99a14fa980a9 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -68,20 +68,22 @@ namespace o3tl
 
 namespace svt
 {
+    class ControlBase;
+
     class SVT_DLLPUBLIC CellController : public SvRefBase
     {
         friend class EditBrowseBox;
         Link<LinkParamNone*, void> maModifyHdl;
 
-        VclPtr<Control>            pWindow;
+        VclPtr<ControlBase>        pWindow;
         bool                       bSuspended;     // <true> if the window is 
hidden and disabled
 
     public:
 
-        CellController(Control* pW);
+        CellController(ControlBase* pW);
         virtual ~CellController() override;
 
-        Control& GetWindow() const { return *const_cast< CellController* >( 
this )->pWindow; }
+        ControlBase& GetWindow() const { return 
*const_cast<CellController*>(this)->pWindow; }
 
         virtual void SaveValue() = 0;
         virtual bool IsValueChangedFromSaved() const = 0;
@@ -112,7 +114,7 @@ namespace svt
     public:
         virtual ~IEditImplementation() = 0;
 
-        virtual Control&            GetControl() = 0;
+        virtual ControlBase&        GetControl() = 0;
 
         virtual OUString            GetText( LineEnd aSeparator ) const = 0;
         virtual void                SetText( const OUString& _rStr ) = 0;
@@ -280,7 +282,7 @@ namespace svt
             m_rEdit.connect_changed(LINK(this, EntryImplementation, 
ModifyHdl));
         }
 
-        virtual Control& GetControl() override
+        virtual ControlBase& GetControl() override
         {
             return m_rEdit;
         }
@@ -431,7 +433,7 @@ namespace svt
             m_rEdit.connect_changed(LINK(this, MultiLineEditImplementation, 
ModifyHdl));
         }
 
-        virtual Control& GetControl() override
+        virtual ControlBase& GetControl() override
         {
             return m_rEdit;
         }
diff --git a/svtools/source/brwbox/editbrowsebox.cxx 
b/svtools/source/brwbox/editbrowsebox.cxx
index 90b970615eb7..c9267119ffda 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -1227,23 +1227,19 @@ namespace svt
         Controller()->resume();
     }
 
-
-    CellController::CellController(Control* pW)
-                   :pWindow( pW )
-                   ,bSuspended( true )
+    CellController::CellController(ControlBase* pW)
+        : pWindow(pW)
+        , bSuspended( true )
     {
 
         DBG_ASSERT(pWindow, "CellController::CellController: missing the 
window!");
         DBG_ASSERT(!pWindow->IsVisible(), "CellController::CellController: 
window should not be visible!");
     }
 
-
     CellController::~CellController()
     {
-
     }
 
-
     void CellController::suspend( )
     {
         DBG_ASSERT( bSuspended == !GetWindow().IsVisible(), 
"CellController::suspend: inconsistence!" );

Reply via email to