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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 6 12:53:36 UTC 2020


 include/svtools/brwbox.hxx              |    2 
 include/svtools/editbrowsebox.hxx       |    9 -
 svtools/source/brwbox/ebbcontrols.cxx   |    6 
 svtools/source/brwbox/editbrowsebox.cxx |  202 ++++++++++++++++----------------
 svx/source/fmcomp/gridcell.cxx          |   33 ++---
 svx/source/inc/gridcell.hxx             |   30 ++--
 6 files changed, 143 insertions(+), 139 deletions(-)

New commits:
commit 291f1776a661cd5d809fbe385efd1e1c8432ddd1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jul 5 19:45:58 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jul 6 14:52:56 2020 +0200

    split off key processing
    
    so we can explicitly call it rather than let implicit PreNotify
    process it
    
    Change-Id: I5f27b8c34a0be7239303307a2d5e93e5de4f4c2a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98172
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx
index df19ecf02a1b..67a3e8fdbb7a 100644
--- a/include/svtools/brwbox.hxx
+++ b/include/svtools/brwbox.hxx
@@ -587,7 +587,7 @@ public:
     // miscellaneous
     bool            ReserveControlArea(sal_uInt16 nWidth = USHRT_MAX);
     tools::Rectangle       GetControlArea() const;
-    bool            ProcessKey( const KeyEvent& rEvt );
+    virtual bool    ProcessKey(const KeyEvent& rEvt);
     void            Dispatch( sal_uInt16 nId );
     void            SetMode( BrowserMode nMode );
     BrowserMode     GetMode( ) const { return m_nCurrentMode; }
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index c86d1745155b..1e24ced1d8ed 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -810,6 +810,8 @@ namespace svt
         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;
 
+        virtual bool ProcessKey(const KeyEvent& rEvt) override;
+
         css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState);
     protected:
         // creates the accessible which wraps the active cell
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 1f79a3686474..4328e22d5ee8 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -541,118 +541,124 @@ namespace svt
         BrowseBox::Dispatch( _nId );
     }
 
-    bool EditBrowseBox::PreNotify(NotifyEvent& rEvt)
-    {
-        if (rEvt.GetType() == MouseNotifyEvent::KEYINPUT)
-        {
-            if  (   (IsEditing() && Controller()->GetWindow().HasChildPathFocus())
-                ||  rEvt.GetWindow() == &GetDataWindow()
-                ||  (!IsEditing() && HasChildPathFocus())
-                )
+    bool EditBrowseBox::ProcessKey(const KeyEvent& rKeyEvent)
+    {
+        sal_uInt16 nCode  = rKeyEvent.GetKeyCode().GetCode();
+        bool       bShift = rKeyEvent.GetKeyCode().IsShift();
+        bool       bCtrl  = rKeyEvent.GetKeyCode().IsMod1();
+        bool       bAlt =   rKeyEvent.GetKeyCode().IsMod2();
+        bool       bLocalSelect = false;
+        bool       bNonEditOnly = false;
+        sal_uInt16 nId = BROWSER_NONE;
+
+        if (!bAlt && !bCtrl && !bShift )
+            switch ( nCode )
             {
-                const KeyEvent* pKeyEvent = rEvt.GetKeyEvent();
-                sal_uInt16 nCode  = pKeyEvent->GetKeyCode().GetCode();
-                bool       bShift = pKeyEvent->GetKeyCode().IsShift();
-                bool       bCtrl  = pKeyEvent->GetKeyCode().IsMod1();
-                bool       bAlt =   pKeyEvent->GetKeyCode().IsMod2();
-                bool       bLocalSelect = false;
-                bool       bNonEditOnly = false;
-                sal_uInt16 nId = BROWSER_NONE;
-
-                if (!bAlt && !bCtrl && !bShift )
-                    switch ( nCode )
-                    {
-                        case KEY_DOWN:          nId = BROWSER_CURSORDOWN; break;
-                        case KEY_UP:            nId = BROWSER_CURSORUP; break;
-                        case KEY_PAGEDOWN:      nId = BROWSER_CURSORPAGEDOWN; break;
-                        case KEY_PAGEUP:        nId = BROWSER_CURSORPAGEUP; break;
-                        case KEY_HOME:          nId = BROWSER_CURSORHOME; break;
-                        case KEY_END:           nId = BROWSER_CURSOREND; break;
-
-                        case KEY_TAB:
-                            // ask if traveling to the next cell is allowed
-                            if (IsTabAllowed(true))
-                                nId = BROWSER_CURSORRIGHT;
-                            break;
-
-                        case KEY_RETURN:
-                            // save the cell content (if necessary)
-                            if (IsEditing() && aController->IsValueChangedFromSaved() && !SaveModified())
-                            {
-                                // maybe we're not visible ...
-                                EnableAndShow();
-                                aController->GetWindow().GrabFocus();
-                                return true;
-                            }
-                            // ask if traveling to the next cell is allowed
-                            if (IsTabAllowed(true))
-                                nId = BROWSER_CURSORRIGHT;
-
-                            break;
-                        case KEY_RIGHT:         nId = BROWSER_CURSORRIGHT; break;
-                        case KEY_LEFT:          nId = BROWSER_CURSORLEFT; break;
-                        case KEY_SPACE:         nId = BROWSER_SELECT; bNonEditOnly = bLocalSelect = true; break;
-                    }
+                case KEY_DOWN:          nId = BROWSER_CURSORDOWN; break;
+                case KEY_UP:            nId = BROWSER_CURSORUP; break;
+                case KEY_PAGEDOWN:      nId = BROWSER_CURSORPAGEDOWN; break;
+                case KEY_PAGEUP:        nId = BROWSER_CURSORPAGEUP; break;
+                case KEY_HOME:          nId = BROWSER_CURSORHOME; break;
+                case KEY_END:           nId = BROWSER_CURSOREND; break;
+
+                case KEY_TAB:
+                    // ask if traveling to the next cell is allowed
+                    if (IsTabAllowed(true))
+                        nId = BROWSER_CURSORRIGHT;
+                    break;
 
-                if ( !bAlt && !bCtrl && bShift )
-                    switch ( nCode )
+                case KEY_RETURN:
+                    // save the cell content (if necessary)
+                    if (IsEditing() && aController->IsValueChangedFromSaved() && !SaveModified())
                     {
-                        case KEY_DOWN:          nId = BROWSER_SELECTDOWN; bLocalSelect = true; break;
-                        case KEY_UP:            nId = BROWSER_SELECTUP; bLocalSelect = true; break;
-                        case KEY_HOME:          nId = BROWSER_SELECTHOME; bLocalSelect = true; break;
-                        case KEY_END:           nId = BROWSER_SELECTEND; bLocalSelect = true; break;
-                        case KEY_TAB:
-                            if (IsTabAllowed(false))
-                                nId = BROWSER_CURSORLEFT;
-                            break;
+                        // maybe we're not visible ...
+                        EnableAndShow();
+                        aController->GetWindow().GrabFocus();
+                        return true;
                     }
+                    // ask if traveling to the next cell is allowed
+                    if (IsTabAllowed(true))
+                        nId = BROWSER_CURSORRIGHT;
 
-                if ( !bAlt && bCtrl && bShift )
-                    switch ( nCode )
-                    {
-                        case KEY_SPACE:         nId = BROWSER_SELECTCOLUMN; bLocalSelect = true; break;
-                    }
+                    break;
+                case KEY_RIGHT:         nId = BROWSER_CURSORRIGHT; break;
+                case KEY_LEFT:          nId = BROWSER_CURSORLEFT; break;
+                case KEY_SPACE:         nId = BROWSER_SELECT; bNonEditOnly = bLocalSelect = true; break;
+            }
 
+        if ( !bAlt && !bCtrl && bShift )
+            switch ( nCode )
+            {
+                case KEY_DOWN:          nId = BROWSER_SELECTDOWN; bLocalSelect = true; break;
+                case KEY_UP:            nId = BROWSER_SELECTUP; bLocalSelect = true; break;
+                case KEY_HOME:          nId = BROWSER_SELECTHOME; bLocalSelect = true; break;
+                case KEY_END:           nId = BROWSER_SELECTEND; bLocalSelect = true; break;
+                case KEY_TAB:
+                    if (IsTabAllowed(false))
+                        nId = BROWSER_CURSORLEFT;
+                    break;
+            }
 
-                if ( !bAlt && bCtrl && !bShift )
-                    switch ( nCode )
-                    {
-                        case KEY_DOWN:          nId = BROWSER_SCROLLUP; break;
-                        case KEY_UP:            nId = BROWSER_SCROLLDOWN; break;
-                        case KEY_PAGEDOWN:      nId = BROWSER_CURSORENDOFFILE; break;
-                        case KEY_PAGEUP:        nId = BROWSER_CURSORTOPOFFILE; break;
-                        case KEY_HOME:          nId = BROWSER_CURSORTOPOFSCREEN; break;
-                        case KEY_END:           nId = BROWSER_CURSORENDOFSCREEN; break;
-                        case KEY_SPACE:         nId = BROWSER_ENHANCESELECTION; bLocalSelect = true; break;
-                    }
+        if ( !bAlt && bCtrl && bShift )
+            switch ( nCode )
+            {
+                case KEY_SPACE:         nId = BROWSER_SELECTCOLUMN; bLocalSelect = true; break;
+            }
+
+
+        if ( !bAlt && bCtrl && !bShift )
+            switch ( nCode )
+            {
+                case KEY_DOWN:          nId = BROWSER_SCROLLUP; break;
+                case KEY_UP:            nId = BROWSER_SCROLLDOWN; break;
+                case KEY_PAGEDOWN:      nId = BROWSER_CURSORENDOFFILE; break;
+                case KEY_PAGEUP:        nId = BROWSER_CURSORTOPOFFILE; break;
+                case KEY_HOME:          nId = BROWSER_CURSORTOPOFSCREEN; break;
+                case KEY_END:           nId = BROWSER_CURSORENDOFSCREEN; break;
+                case KEY_SPACE:         nId = BROWSER_ENHANCESELECTION; bLocalSelect = true; break;
+            }
 
 
-                if  (   ( nId != BROWSER_NONE )
-                    &&  (   !IsEditing()
-                        ||  (   !bNonEditOnly
-                            &&  aController->MoveAllowed( *pKeyEvent )
-                            )
-                        )
+        if  (   ( nId != BROWSER_NONE )
+            &&  (   !IsEditing()
+                ||  (   !bNonEditOnly
+                    &&  aController->MoveAllowed(rKeyEvent)
                     )
+                )
+            )
+        {
+            if (nId == BROWSER_SELECT || BROWSER_SELECTCOLUMN == nId )
+            {
+                // save the cell content (if necessary)
+                if (IsEditing() && aController->IsValueChangedFromSaved() && !SaveModified())
                 {
-                    if (nId == BROWSER_SELECT || BROWSER_SELECTCOLUMN == nId )
-                    {
-                        // save the cell content (if necessary)
-                        if (IsEditing() && aController->IsValueChangedFromSaved() && !SaveModified())
-                        {
-                            // maybe we're not visible ...
-                            EnableAndShow();
-                            aController->GetWindow().GrabFocus();
-                            return true;
-                        }
-                    }
+                    // maybe we're not visible ...
+                    EnableAndShow();
+                    aController->GetWindow().GrabFocus();
+                    return true;
+                }
+            }
 
-                    Dispatch(nId);
+            Dispatch(nId);
 
-                    if (bLocalSelect && (GetSelectRowCount() || GetSelection() != nullptr))
-                        DeactivateCell();
+            if (bLocalSelect && (GetSelectRowCount() || GetSelection() != nullptr))
+                DeactivateCell();
+            return true;
+        }
+        return false;
+    }
+
+    bool EditBrowseBox::PreNotify(NotifyEvent& rEvt)
+    {
+        if (rEvt.GetType() == MouseNotifyEvent::KEYINPUT)
+        {
+            if  (   (IsEditing() && Controller()->GetWindow().HasChildPathFocus())
+                ||  rEvt.GetWindow() == &GetDataWindow()
+                ||  (!IsEditing() && HasChildPathFocus())
+                )
+            {
+                if (ProcessKey(*rEvt.GetKeyEvent()))
                     return true;
-                }
             }
         }
         return BrowseBox::PreNotify(rEvt);
commit 024bdf31b17814c1c96d7376ac77564a9361be65
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jul 5 19:59:43 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jul 6 14:52:35 2020 +0200

    clarify that the parent is always a BrowserDataWin
    
    Change-Id: I64aac74902c631e41fd54d7e198276885e2c4378
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98171
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index fb357d08b1b1..c86d1745155b 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -35,6 +35,7 @@
 #include <vcl/weldutils.hxx>
 #include <o3tl/typed_flags_set.hxx>
 
+class BrowserDataWin;
 class Button;
 class CheckBox;
 class SpinField;
@@ -188,7 +189,7 @@ namespace svt
     class SVT_DLLPUBLIC EditControlBase : public InterimItemWindow
     {
     public:
-        EditControlBase(vcl::Window* pParent);
+        EditControlBase(BrowserDataWin* pParent);
 
         virtual void dispose() override;
 
@@ -215,7 +216,7 @@ namespace svt
     class SVT_DLLPUBLIC EditControl final : public EditControlBase
     {
     public:
-        EditControl(vcl::Window* pParent);
+        EditControl(BrowserDataWin* pParent);
 
         virtual void dispose() override;
 
@@ -569,7 +570,7 @@ namespace svt
     class SVT_DLLPUBLIC FormattedControl : public EditControlBase
     {
     public:
-        FormattedControl(vcl::Window* pParent);
+        FormattedControl(BrowserDataWin* pParent);
 
         virtual void dispose() override;
 
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 46375ff36390..4c42fa9f1cf5 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -345,7 +345,7 @@ namespace svt
         m_aModifyHdl.Call(nullptr);
     }
 
-    EditControlBase::EditControlBase(vcl::Window* pParent)
+    EditControlBase::EditControlBase(BrowserDataWin* pParent)
         : InterimItemWindow(pParent, "svt/ui/thineditcontrol.ui", "EditControl") // *thin*editcontrol has no frame/border
     {
     }
@@ -368,7 +368,7 @@ namespace svt
         InterimItemWindow::dispose();
     }
 
-    EditControl::EditControl(vcl::Window* pParent)
+    EditControl::EditControl(BrowserDataWin* pParent)
         : EditControlBase(pParent)
         , m_xWidget(m_xBuilder->weld_entry("entry"))
     {
@@ -381,7 +381,7 @@ namespace svt
         EditControlBase::dispose();
     }
 
-    FormattedControl::FormattedControl(vcl::Window* pParent)
+    FormattedControl::FormattedControl(BrowserDataWin* pParent)
         : EditControlBase(pParent)
         , m_xEntry(m_xBuilder->weld_entry("entry"))
         , m_xEntryFormatter(new weld::EntryFormatter(*m_xEntry))
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 098ae2e3356b..5a5fc1ed314a 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -825,7 +825,6 @@ void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxMode
     }
 }
 
-
 void DbCellControl::implAdjustEnabled( const Reference< XPropertySet >& _rxModel )
 {
     DBG_ASSERT( m_pWindow, "DbCellControl::implAdjustEnabled: not to be called without window!" );
@@ -838,8 +837,7 @@ void DbCellControl::implAdjustEnabled( const Reference< XPropertySet >& _rxModel
     }
 }
 
-
-void DbCellControl::Init( vcl::Window& rParent, const Reference< XRowSet >& _rxCursor )
+void DbCellControl::Init(BrowserDataWin& rParent, const Reference< XRowSet >& _rxCursor)
 {
     ImplInitWindow( rParent, InitWindowFacet::All );
 
@@ -1060,7 +1058,7 @@ DbTextField::~DbTextField( )
     m_pEdit.reset();
 }
 
-void DbTextField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor)
+void DbTextField::Init(BrowserDataWin& rParent, const Reference< XRowSet >& xCursor)
 {
     sal_Int16 nAlignment = m_rColumn.SetAlignmentFromModel(-1);
 
@@ -1243,7 +1241,7 @@ DbFormattedField::~DbFormattedField()
 {
 }
 
-void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor)
+void DbFormattedField::Init( BrowserDataWin& rParent, const Reference< XRowSet >& xCursor)
 {
     sal_Int16 nAlignment = m_rColumn.SetAlignmentFromModel(-1);
 
@@ -1634,7 +1632,7 @@ namespace
 }
 
 
-void DbCheckBox::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor )
+void DbCheckBox::Init(BrowserDataWin& rParent, const Reference< XRowSet >& xCursor)
 {
     setTransparent( true );
 
@@ -1767,8 +1765,7 @@ void DbPatternField::implAdjustGenericFieldSetting( const Reference< XPropertySe
     static_cast< PatternField* >( m_pPainter.get() )->SetStrictFormat( bStrict );
 }
 
-
-void DbPatternField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor)
+void DbPatternField::Init(BrowserDataWin& rParent, const Reference< XRowSet >& xCursor)
 {
     m_rColumn.SetAlignmentFromModel(-1);
 
@@ -1781,13 +1778,11 @@ void DbPatternField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCu
     DbCellControl::Init( rParent, xCursor );
 }
 
-
 CellControllerRef DbPatternField::CreateController() const
 {
     return new SpinCellController( static_cast< PatternField* >( m_pWindow.get() ) );
 }
 
-
 OUString DbPatternField::impl_formatText( const OUString& _rText )
 {
     m_pPainter->SetText( _rText );
@@ -1851,7 +1846,7 @@ DbSpinField::DbSpinField( DbGridColumn& _rColumn, sal_Int16 _nStandardAlign )
 {
 }
 
-void DbSpinField::Init( vcl::Window& _rParent, const Reference< XRowSet >& _rxCursor )
+void DbSpinField::Init(BrowserDataWin& _rParent, const Reference< XRowSet >& _rxCursor)
 {
     m_rColumn.SetAlignmentFromModel( m_nStandardAlign );
 
@@ -1944,7 +1939,7 @@ void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySe
     rPaintFormatter.SetFormat( sFormatString, aAppLanguage );
 }
 
-VclPtr<Control> DbNumericField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/  )
+VclPtr<Control> DbNumericField::createField(BrowserDataWin* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/)
 {
     WinBits _nFieldStyle = bSpinButton ? (WB_REPEAT | WB_SPIN) : 0;
     return VclPtr<DoubleNumericField>::Create( _pParent, _nFieldStyle );
@@ -2072,7 +2067,7 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS
     static_cast< LongCurrencyField* >( m_pPainter.get() )->SetStrictFormat( bStrict );
 }
 
-VclPtr<Control> DbCurrencyField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/  )
+VclPtr<Control> DbCurrencyField::createField(BrowserDataWin* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/  )
 {
     WinBits _nFieldStyle = bSpinButton ? (WB_REPEAT | WB_SPIN) : 0;
     return VclPtr<LongCurrencyField>::Create( _pParent, _nFieldStyle );
@@ -2177,7 +2172,7 @@ DbDateField::DbDateField( DbGridColumn& _rColumn )
     doPropertyListening( FM_PROP_DATE_SHOW_CENTURY );
 }
 
-VclPtr<Control> DbDateField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& _rxModel  )
+VclPtr<Control> DbDateField::createField(BrowserDataWin* _pParent, bool bSpinButton, const Reference< XPropertySet >& _rxModel  )
 {
     WinBits _nFieldStyle = bSpinButton ? (WB_REPEAT | WB_SPIN) : 0;
     // check if there is a DropDown property set to TRUE
@@ -2304,7 +2299,7 @@ DbTimeField::DbTimeField( DbGridColumn& _rColumn )
     doPropertyListening( FM_PROP_STRICTFORMAT );
 }
 
-VclPtr<Control> DbTimeField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/ )
+VclPtr<Control> DbTimeField::createField(BrowserDataWin* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/ )
 {
     WinBits _nFieldStyle = bSpinButton ? (WB_REPEAT | WB_SPIN) : 0;
     return VclPtr<TimeField>::Create( _pParent, _nFieldStyle );
@@ -2445,7 +2440,7 @@ void DbComboBox::implAdjustGenericFieldSetting(const Reference<XPropertySet>&)
     // we no longer pay attention to FM_PROP_LINECOUNT
 }
 
-void DbComboBox::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor )
+void DbComboBox::Init(BrowserDataWin& rParent, const Reference< XRowSet >& xCursor)
 {
     m_rColumn.SetAlignmentFromModel(css::awt::TextAlign::LEFT);
 
@@ -2559,7 +2554,7 @@ void DbListBox::SetList(const Any& rItems)
     }
 }
 
-void DbListBox::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor)
+void DbListBox::Init(BrowserDataWin& rParent, const Reference< XRowSet >& xCursor)
 {
     m_rColumn.SetAlignment(css::awt::TextAlign::LEFT);
 
@@ -2712,7 +2707,7 @@ void DbFilterField::SetList(const Any& rItems, bool bComboBox)
     }
 }
 
-void DbFilterField::CreateControl(vcl::Window* pParent, const Reference< css::beans::XPropertySet >& xModel)
+void DbFilterField::CreateControl(BrowserDataWin* pParent, const Reference< css::beans::XPropertySet >& xModel)
 {
     switch (m_nControlClass)
     {
@@ -2763,7 +2758,7 @@ void DbFilterField::CreateControl(vcl::Window* pParent, const Reference< css::be
 }
 
 
-void DbFilterField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor )
+void DbFilterField::Init(BrowserDataWin& rParent, const Reference< XRowSet >& xCursor)
 {
     Reference< css::beans::XPropertySet >  xModel(m_rColumn.getModel());
     m_rColumn.SetAlignment(css::awt::TextAlign::LEFT);
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index f63f2466b720..64fc8a9c0e11 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -277,7 +277,7 @@ public:
     void SetTextLineColor(const Color& _rColor);
 
     // initializing before a control is displayed
-    virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor );
+    virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor );
     virtual ::svt::CellControllerRef CreateController() const = 0;
 
     // writing the value into the model
@@ -392,7 +392,7 @@ public:
     ::svt::IEditImplementation* GetEditImplementation() { return m_pEdit.get(); }
     bool                    IsSimpleEdit() const { return m_bIsSimpleEdit; }
 
-    virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
+    virtual void Init( BrowserDataWin& 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;
@@ -415,7 +415,7 @@ public:
     DbFormattedField(DbGridColumn& _rColumn);
     virtual ~DbFormattedField() override;
 
-    virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
+    virtual void Init( BrowserDataWin& 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;
@@ -437,7 +437,7 @@ class DbCheckBox : public DbCellControl
 public:
     DbCheckBox(DbGridColumn& _rColumn);
 
-    virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
+    virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) 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;
     virtual void PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect,
@@ -458,7 +458,7 @@ class DbComboBox : public DbCellControl
 public:
     DbComboBox(DbGridColumn& _rColumn);
 
-    virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
+    virtual void Init( BrowserDataWin& 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;
@@ -485,7 +485,7 @@ class DbListBox     :public DbCellControl
 public:
     DbListBox(DbGridColumn& _rColumn);
 
-    virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
+    virtual void Init( BrowserDataWin& 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;
@@ -508,7 +508,7 @@ class DbPatternField : public DbCellControl
 {
 public:
     DbPatternField( DbGridColumn& _rColumn, const css::uno::Reference<css::uno::XComponentContext>& _rContext );
-    virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
+    virtual void Init( BrowserDataWin& 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;
@@ -541,12 +541,12 @@ protected:
     DbSpinField( DbGridColumn& _rColumn, sal_Int16 _nStandardAlign = css::awt::TextAlign::RIGHT );
 
 public:
-    virtual void                        Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& _rxCursor ) override;
+    virtual void                        Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& _rxCursor ) override;
     virtual ::svt::CellControllerRef    CreateController() const override;
 
 protected:
     virtual VclPtr<Control> createField(
-                            vcl::Window* _pParent,
+                            BrowserDataWin* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel
                         ) = 0;
@@ -567,7 +567,7 @@ protected:
 
     // DbSpinField
     virtual VclPtr<Control> createField(
-                            vcl::Window* _pParent,
+                            BrowserDataWin* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel
                         ) override;
@@ -591,7 +591,7 @@ protected:
 
     // DbSpinField
     virtual VclPtr<Control> createField(
-                            vcl::Window* _pParent,
+                            BrowserDataWin* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel
                         ) override;
@@ -619,7 +619,7 @@ protected:
 
     // DbSpinField
     virtual VclPtr<Control> createField(
-                            vcl::Window* _pParent,
+                            BrowserDataWin* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel
                         ) override;
@@ -643,7 +643,7 @@ protected:
 
     // DbSpinField
     virtual VclPtr<Control> createField(
-                            vcl::Window* _pParent,
+                            BrowserDataWin* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel
                         ) override;
@@ -661,7 +661,7 @@ public:
     DbFilterField(const css::uno::Reference< css::uno::XComponentContext >& rxContext, DbGridColumn& _rColumn);
     virtual ~DbFilterField() override;
 
-    virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
+    virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
     virtual ::svt::CellControllerRef CreateController() const override;
     virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override;
     virtual void Update() override;
@@ -679,7 +679,7 @@ private:
     virtual void        updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
 
     void SetList(const css::uno::Any& rItems, bool bComboBox);
-    void CreateControl(vcl::Window* pParent, const css::uno::Reference< css::beans::XPropertySet >& xModel);
+    void CreateControl(BrowserDataWin* pParent, const css::uno::Reference< css::beans::XPropertySet >& xModel);
     DECL_LINK( OnClick, VclPtr<CheckBox>, void );
 
     css::uno::Sequence< OUString >  m_aValueList;


More information about the Libreoffice-commits mailing list