[Libreoffice-commits] core.git: chart2/source dbaccess/source include/svtools include/svx include/vcl reportdesign/source sc/inc sc/source starmath/inc svtools/inc svtools/source svx/source sw/inc sw/source vcl/source

Noel (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 30 07:57:53 UTC 2020


 chart2/source/controller/dialogs/DataBrowser.cxx      |   37 ++----
 chart2/source/controller/dialogs/DataBrowser.hxx      |   12 -
 dbaccess/source/ui/browser/sbagrid.cxx                |   18 +-
 dbaccess/source/ui/control/ColumnControlWindow.cxx    |    2 
 dbaccess/source/ui/control/RelationControl.cxx        |   20 +--
 dbaccess/source/ui/control/TableGrantCtrl.cxx         |   10 -
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx         |   12 -
 dbaccess/source/ui/inc/ColumnControlWindow.hxx        |    2 
 dbaccess/source/ui/inc/FieldDescControl.hxx           |    2 
 dbaccess/source/ui/inc/TableDesignControl.hxx         |   18 +-
 dbaccess/source/ui/inc/TableGrantCtrl.hxx             |    8 -
 dbaccess/source/ui/inc/WTypeSelect.hxx                |    2 
 dbaccess/source/ui/inc/indexfieldscontrol.hxx         |   12 -
 dbaccess/source/ui/inc/sbagrid.hxx                    |    4 
 dbaccess/source/ui/misc/WTypeSelect.cxx               |    2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |   52 ++++----
 dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx |   18 +-
 dbaccess/source/ui/tabledesign/TEditControl.cxx       |   50 ++++----
 dbaccess/source/ui/tabledesign/TEditControl.hxx       |   38 +++---
 dbaccess/source/ui/tabledesign/TableDesignControl.cxx |    8 -
 dbaccess/source/ui/tabledesign/TableFieldControl.cxx  |    2 
 dbaccess/source/ui/tabledesign/TableFieldControl.hxx  |    2 
 dbaccess/source/ui/tabledesign/TableUndo.cxx          |    8 -
 dbaccess/source/ui/tabledesign/TableUndo.hxx          |   14 +-
 include/svtools/brwbox.hxx                            |   84 ++++++-------
 include/svtools/editbrowsebox.hxx                     |   26 ++--
 include/svx/gridctrl.hxx                              |   34 ++---
 include/vcl/accessibletable.hxx                       |    4 
 include/vcl/accessibletableprovider.hxx               |   10 -
 include/vcl/toolkit/svtabbx.hxx                       |   12 -
 reportdesign/source/ui/dlg/GroupsSorting.cxx          |   26 ++--
 sc/inc/cellsuno.hxx                                   |    2 
 sc/inc/dbdocutl.hxx                                   |    2 
 sc/inc/dpgroup.hxx                                    |   46 +++----
 sc/inc/dpobject.hxx                                   |    2 
 sc/inc/dpoutput.hxx                                   |   12 -
 sc/inc/dpresfilter.hxx                                |    4 
 sc/inc/dpsdbtab.hxx                                   |    8 -
 sc/inc/dpshttab.hxx                                   |   10 -
 sc/inc/dptabdat.hxx                                   |   50 ++++----
 sc/inc/dptabres.hxx                                   |   10 -
 sc/inc/dptabsrc.hxx                                   |  106 ++++++++---------
 sc/inc/markdata.hxx                                   |    4 
 sc/inc/markmulti.hxx                                  |    4 
 sc/source/core/data/dbdocutl.cxx                      |    2 
 sc/source/core/data/dpgroup.cxx                       |   44 +++----
 sc/source/core/data/dpobject.cxx                      |    6 
 sc/source/core/data/dpoutput.cxx                      |   14 +-
 sc/source/core/data/dpsdbtab.cxx                      |    8 -
 sc/source/core/data/dpshttab.cxx                      |   10 -
 sc/source/core/data/dptabdat.cxx                      |   35 ++---
 sc/source/core/data/dptabres.cxx                      |   44 +++----
 sc/source/core/data/dptabsrc.cxx                      |  111 ++++++++----------
 sc/source/core/data/markdata.cxx                      |    4 
 sc/source/core/data/markmulti.cxx                     |    4 
 sc/source/core/tool/addincol.cxx                      |   38 +++---
 sc/source/core/tool/rangeseq.cxx                      |   32 ++---
 sc/source/ui/Accessibility/AccessiblePreviewTable.cxx |    6 
 sc/source/ui/docshell/dbdocimp.cxx                    |    2 
 sc/source/ui/docshell/docfunc.cxx                     |    4 
 sc/source/ui/docshell/docsh8.cxx                      |    6 
 sc/source/ui/inc/asciiopt.hxx                         |    6 
 sc/source/ui/unoobj/cellsuno.cxx                      |   30 ++--
 sc/source/ui/unoobj/funcuno.cxx                       |   36 ++---
 sc/source/ui/view/tabview.cxx                         |    4 
 starmath/inc/dialog.hxx                               |    2 
 svtools/inc/table/tablecontrol.hxx                    |    4 
 svtools/source/brwbox/brwbox1.cxx                     |   69 +++++------
 svtools/source/brwbox/brwbox2.cxx                     |   20 +--
 svtools/source/brwbox/brwbox3.cxx                     |   12 -
 svtools/source/brwbox/datwin.cxx                      |   10 -
 svtools/source/brwbox/editbrowsebox.cxx               |   24 +--
 svtools/source/brwbox/editbrowsebox2.cxx              |    4 
 svtools/source/table/tablecontrol.cxx                 |    4 
 svx/source/fmcomp/gridctrl.cxx                        |   32 ++---
 sw/inc/swtable.hxx                                    |    6 
 sw/source/core/access/acctable.cxx                    |    6 
 sw/source/core/doc/tblrwcl.cxx                        |    2 
 sw/source/core/docnode/ndtbl.cxx                      |    2 
 sw/source/core/table/swnewtable.cxx                   |   38 +++---
 sw/source/core/table/swtable.cxx                      |    8 -
 sw/source/core/undo/untbl.cxx                         |    2 
 sw/source/filter/html/htmltab.cxx                     |    2 
 sw/source/filter/writer/wrtswtbl.cxx                  |    2 
 sw/source/filter/ww8/WW8TableInfo.cxx                 |    2 
 sw/source/filter/ww8/ww8par2.cxx                      |    2 
 sw/source/filter/xml/xmltble.cxx                      |    2 
 sw/source/filter/xml/xmltbli.cxx                      |    2 
 sw/source/ui/index/cnttab.cxx                         |   18 +-
 sw/source/uibase/dbui/dbmgr.cxx                       |    2 
 sw/source/uibase/inc/mmconfigitem.hxx                 |    2 
 vcl/source/treelist/svtabbx.cxx                       |   12 -
 92 files changed, 769 insertions(+), 777 deletions(-)

New commits:
commit f2be3d31cde821f5c1128deae7f2b95361ac1db9
Author:     Noel <noelgrandin at gmail.com>
AuthorDate: Wed Oct 21 07:49:00 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Oct 30 08:57:07 2020 +0100

    convert some tools::Long->sal_Int32
    
    in places where it is obvious we only need a sal_Int32, because
    we are dealing with rows and columns, and not even calc needs
    more than 32 bits for that.
    
    Change-Id: I114417e639c224d45bfd9fc6838122ab195eefa3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104584
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 9efa33d2d726..eabbdd42ace0 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -70,11 +70,6 @@ const BrowserMode BrowserStdFlags = BrowserMode::COLUMNSELECTION |
                                     BrowserMode::AUTO_HSCROLL | BrowserMode::AUTO_VSCROLL |
                                     BrowserMode::HIDESELECT;
 
-sal_Int32 lcl_getRowInData( tools::Long nRow )
-{
-    return static_cast< sal_Int32 >( nRow );
-}
-
 sal_Int32 lcl_getColumnInData( sal_uInt16 nCol )
 {
     return static_cast< sal_Int32 >( nCol ) - 1;
@@ -607,7 +602,7 @@ void DataBrowser::RenewTable()
     if (!m_apDataBrowserModel)
         return;
 
-    tools::Long   nOldRow     = GetCurRow();
+    sal_Int32  nOldRow     = GetCurRow();
     sal_uInt16 nOldColId   = GetCurColumnId();
 
     bool bLastUpdateMode = GetUpdateMode();
@@ -684,13 +679,13 @@ OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const
     return OUString();
 }
 
-OUString DataBrowser::GetCellText( tools::Long nRow, sal_uInt16 nColumnId ) const
+OUString DataBrowser::GetCellText( sal_Int32 nRow, sal_uInt16 nColumnId ) const
 {
     OUString aResult;
 
     if( nColumnId == 0 )
     {
-        aResult = OUString::number(static_cast< sal_Int32 >( nRow ) + 1);
+        aResult = OUString::number(nRow + 1);
     }
     else if( nRow >= 0 && m_apDataBrowserModel)
     {
@@ -744,7 +739,7 @@ OUString DataBrowser::GetCellText( tools::Long nRow, sal_uInt16 nColumnId ) cons
     return aResult;
 }
 
-double DataBrowser::GetCellNumber( tools::Long nRow, sal_uInt16 nColumnId ) const
+double DataBrowser::GetCellNumber( sal_Int32 nRow, sal_uInt16 nColumnId ) const
 {
     double fResult;
     ::rtl::math::setNan( & fResult );
@@ -913,7 +908,7 @@ void DataBrowser::RemoveColumn()
 
 void DataBrowser::InsertRow()
 {
-     sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
+     sal_Int32 nRowIdx = GetCurRow();
 
      if( nRowIdx >= 0 && m_apDataBrowserModel)
     {
@@ -928,7 +923,7 @@ void DataBrowser::InsertRow()
 
 void DataBrowser::RemoveRow()
 {
-     sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
+     sal_Int32 nRowIdx = GetCurRow();
 
      if( nRowIdx >= 0 && m_apDataBrowserModel)
     {
@@ -986,7 +981,7 @@ void DataBrowser::MoveRightColumn()
 
 void DataBrowser::MoveUpRow()
 {
-    sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
+    sal_Int32 nRowIdx = GetCurRow();
 
     if( !(nRowIdx > 0 && m_apDataBrowserModel))
         return;
@@ -1007,7 +1002,7 @@ void DataBrowser::MoveUpRow()
 
 void DataBrowser::MoveDownRow()
 {
-    sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
+    sal_Int32 nRowIdx = GetCurRow();
 
     if( !(nRowIdx >= 0 && m_apDataBrowserModel))
         return;
@@ -1063,7 +1058,7 @@ void DataBrowser::PaintCell(
         rDev.SetClipRegion();
 }
 
-bool DataBrowser::SeekRow( tools::Long nRow )
+bool DataBrowser::SeekRow( sal_Int32 nRow )
 {
     if( ! EditBrowseBox::SeekRow( nRow ))
         return false;
@@ -1078,14 +1073,14 @@ bool DataBrowser::SeekRow( tools::Long nRow )
 
 bool DataBrowser::IsTabAllowed( bool bForward ) const
 {
-    tools::Long nRow = GetCurRow();
-    tools::Long nCol = GetCurColumnId();
+    sal_Int32 nRow = GetCurRow();
+    sal_Int32 nCol = GetCurColumnId();
 
     // column 0 is header-column
-    tools::Long nBadCol = bForward
+    sal_Int32 nBadCol = bForward
         ? GetColumnCount() - 1
         : 1;
-    tools::Long nBadRow = bForward
+    sal_Int32 nBadRow = bForward
         ? GetRowCount() - 1
         : 0;
 
@@ -1099,7 +1094,7 @@ bool DataBrowser::IsTabAllowed( bool bForward ) const
              nCol != nBadCol );
 }
 
-::svt::CellController* DataBrowser::GetController( tools::Long /*nRow*/, sal_uInt16 nCol )
+::svt::CellController* DataBrowser::GetController( sal_Int32 /*nRow*/, sal_uInt16 nCol )
 {
     if( m_bIsReadOnly )
         return nullptr;
@@ -1116,7 +1111,7 @@ bool DataBrowser::IsTabAllowed( bool bForward ) const
 }
 
 void DataBrowser::InitController(
-    ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol )
+    ::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol )
 {
     if( rController == m_rTextEditController )
     {
@@ -1176,7 +1171,7 @@ bool DataBrowser::SaveModified()
 
     bool bChangeValid = true;
 
-    const sal_Int32 nRow = lcl_getRowInData( GetCurRow());
+    const sal_Int32 nRow = GetCurRow();
     const sal_Int32 nCol = lcl_getColumnInData( GetCurColumnId());
 
     OSL_ENSURE( nRow >= 0 || nCol >= 0, "This cell should not be modified!" );
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx
index e94ff26983ae..e0699a60d1b4 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -55,10 +55,10 @@ class DataBrowser : public ::svt::EditBrowseBox
 protected:
     // EditBrowseBox overridables
     virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override;
-    virtual bool SeekRow( tools::Long nRow ) override;
+    virtual bool SeekRow( sal_Int32 nRow ) override;
     virtual bool IsTabAllowed( bool bForward ) const override;
-    virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override;
-    virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override;
+    virtual ::svt::CellController* GetController( sal_Int32 nRow, sal_uInt16 nCol ) override;
+    virtual void InitController( ::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol ) override;
     virtual bool SaveModified() override;
     virtual void CursorMoved() override;
     // called whenever the control of the current cell has been modified
@@ -82,12 +82,12 @@ public:
         @return
             the text out of the cell
     */
-    virtual OUString  GetCellText(tools::Long nRow, sal_uInt16 nColId) const override;
+    virtual OUString  GetCellText(sal_Int32 nRow, sal_uInt16 nColId) const override;
 
     /** returns the number in the given cell. If a cell is empty or contains a
         string, the result will be Nan
     */
-    double GetCellNumber( tools::Long nRow, sal_uInt16 nColumnId ) const;
+    double GetCellNumber( sal_Int32 nRow, sal_uInt16 nColumnId ) const;
 
     bool isDateTimeString( const OUString& aInputString, double& fOutDateTimeValue );
 
@@ -154,7 +154,7 @@ private:
     std::shared_ptr< NumberFormatterWrapper >  m_spNumberFormatterWrapper;
 
     /// the row that is currently painted
-    tools::Long                m_nSeekRow;
+    sal_Int32           m_nSeekRow;
     bool                m_bIsReadOnly;
     bool                m_bDataValid;
 
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 5e986fbb38e6..2f4fe58aa76f 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -658,7 +658,7 @@ VclPtr<BrowserHeader> SbaGridControl::imp_CreateHeaderBar(BrowseBox* pParent)
     return VclPtr<SbaGridHeader>::Create(pParent);
 }
 
-CellController* SbaGridControl::GetController(tools::Long nRow, sal_uInt16 nCol)
+CellController* SbaGridControl::GetController(sal_Int32 nRow, sal_uInt16 nCol)
 {
     if ( m_bActivatingForDrop )
         return nullptr;
@@ -850,7 +850,7 @@ void SbaGridControl::Select()
         m_pMasterListener->SelectionChanged();
 }
 
-void SbaGridControl::ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bSetCellFocus /*= sal_True*/ )
+void SbaGridControl::ActivateCell(sal_Int32 nRow, sal_uInt16 nCol, bool bSetCellFocus /*= sal_True*/ )
 {
     FmGridControl::ActivateCell(nRow, nCol, bSetCellFocus);
     if (m_pMasterListener)
@@ -937,7 +937,7 @@ bool SbaGridControl::IsReadOnlyDB() const
 
 void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt)
 {
-    tools::Long nRow = GetRowAtYPosPixel(rMEvt.GetPosPixel().Y());
+    sal_Int32 nRow = GetRowAtYPosPixel(rMEvt.GetPosPixel().Y());
     sal_uInt16 nColPos = GetColumnAtXPosPixel(rMEvt.GetPosPixel().X());
     sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : nColPos-1;
         // 'the handle column' and 'no valid column' will both result in a view position of -1 !
@@ -963,7 +963,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
         // (Yes, this is controller (not view) functionality. But collecting and evaluating all the
         // information necessary via UNO would be quite difficult (if not impossible) so
         // my laziness says 'do it here'...)
-        tools::Long nRow = GetRowAtYPosPixel(_rPosPixel.Y());
+        sal_Int32 nRow = GetRowAtYPosPixel(_rPosPixel.Y());
         sal_uInt16 nColPos = GetColumnAtXPosPixel(_rPosPixel.X());
         sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : nColPos-1;
             // 'the handle column' and 'no valid column' will both result in a view position of -1 !
@@ -972,7 +972,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
         // the current row doesn't really exist: the user's appending a new one and already has entered some data,
         // so the row contains data which has no counter part within the data source
 
-        tools::Long nCorrectRowCount = GetRowCount();
+        sal_Int32 nCorrectRowCount = GetRowCount();
         if (GetOptions() & DbGridControlOptions::Insert)
             --nCorrectRowCount; // there is an empty row for inserting records
         if (bCurrentRowVirtual)
@@ -1182,10 +1182,10 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
             // without an empty row we're not in update mode
             break;
 
-        const tools::Long        nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
+        const sal_Int32   nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
         const sal_uInt16  nCol = GetColumnId(GetColumnAtXPosPixel(rEvt.maPosPixel.X()));
 
-        tools::Long nCorrectRowCount = GetRowCount();
+        sal_Int32 nCorrectRowCount = GetRowCount();
         if (GetOptions() & DbGridControlOptions::Insert)
             --nCorrectRowCount; // there is an empty row for inserting records
         if (IsCurrentAppending())
@@ -1275,10 +1275,10 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt )
 
     if ( IsDropFormatSupported( SotClipboardFormatId::STRING ) )
     {
-        tools::Long    nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
+        sal_Int32   nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
         sal_uInt16  nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X());
 
-        tools::Long nCorrectRowCount = GetRowCount();
+        sal_Int32 nCorrectRowCount = GetRowCount();
         if (GetOptions() & DbGridControlOptions::Insert)
             --nCorrectRowCount; // there is an empty row for inserting records
         if (IsCurrentAppending())
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index 3665b295d9a3..7a419a6cfb8c 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -89,7 +89,7 @@ void OColumnControlWindow::DeactivateAggregate( EControlType eType )
     }
 }
 
-void OColumnControlWindow::CellModified(tools::Long /*nRow*/, sal_uInt16 /*nColId*/ )
+void OColumnControlWindow::CellModified(sal_Int32 /*nRow*/, sal_uInt16 /*nColId*/ )
 {
     saveCurrentFieldDescData();
 }
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 1eae87b0ea65..fc8bca178725 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -108,12 +108,12 @@ namespace dbaui
 
         void Init(const TTableConnectionData::value_type& _pConnData);
         using ORelationControl_Base::Init;
-        virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override;
-        virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override;
+        virtual void InitController( ::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol ) override;
+        virtual ::svt::CellController* GetController( sal_Int32 nRow, sal_uInt16 nCol ) override;
         virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override;
-        virtual bool SeekRow( tools::Long nRow ) override;
+        virtual bool SeekRow( sal_Int32 nRow ) override;
         virtual bool SaveModified() override;
-        virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColId ) const override;
+        virtual OUString GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const override;
 
         virtual void CellModified() override;
 
@@ -204,7 +204,7 @@ namespace dbaui
 
     bool ORelationControl::IsTabAllowed(bool bForward) const
     {
-        tools::Long nRow = GetCurRow();
+        sal_Int32 nRow = GetCurRow();
         sal_uInt16 nCol = GetCurColumnId();
 
         bool bRet = !(      ( bForward && (nCol == DEST_COLUMN)     && (nRow == GetRowCount() - 1))
@@ -215,7 +215,7 @@ namespace dbaui
 
     bool ORelationControl::SaveModified()
     {
-        tools::Long nRow = GetCurRow();
+        sal_Int32 nRow = GetCurRow();
         if ( nRow != BROWSER_ENDOFSELECTION )
         {
             weld::ComboBox& rListBox = m_pListCell->get_widget();
@@ -263,7 +263,7 @@ namespace dbaui
         return nId;
     }
 
-    OUString ORelationControl::GetCellText( tools::Long nRow, sal_uInt16 nColId ) const
+    OUString ORelationControl::GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const
     {
         OUString sText;
         if ( m_pConnData->GetConnLineDataList().size() > o3tl::make_unsigned(nRow) )
@@ -282,7 +282,7 @@ namespace dbaui
         return sText;
     }
 
-    void ORelationControl::InitController( CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColumnId )
+    void ORelationControl::InitController( CellControllerRef& /*rController*/, sal_Int32 nRow, sal_uInt16 nColumnId )
     {
 
         OString sHelpId( HID_RELATIONDIALOG_LEFTFIELDCELL );
@@ -319,12 +319,12 @@ namespace dbaui
         rList.set_help_id(sHelpId);
     }
 
-    CellController* ORelationControl::GetController( tools::Long /*nRow*/, sal_uInt16 /*nColumnId*/ )
+    CellController* ORelationControl::GetController( sal_Int32 /*nRow*/, sal_uInt16 /*nColumnId*/ )
     {
         return new ListBoxCellController( m_pListCell.get() );
     }
 
-    bool ORelationControl::SeekRow( tools::Long nRow )
+    bool ORelationControl::SeekRow( sal_Int32 nRow )
     {
         m_nDataPos = nRow;
         return true;
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index 1225a7f74c1a..49719e814113 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -181,7 +181,7 @@ IMPL_LINK_NOARG(OTableGrantControl, AsynchDeactivate, void*, void)
 
 bool OTableGrantControl::IsTabAllowed(bool bForward) const
 {
-    tools::Long nRow = GetCurRow();
+    sal_Int32 nRow = GetCurRow();
     sal_uInt16 nCol = GetCurColumnId();
 
     if (bForward && (nCol == 2) && (nRow == GetRowCount() - 1))
@@ -257,7 +257,7 @@ bool OTableGrantControl::SaveModified()
     return bErg;
 }
 
-OUString OTableGrantControl::GetCellText( tools::Long nRow, sal_uInt16 nColId ) const
+OUString OTableGrantControl::GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const
 {
     if(COL_TABLE_NAME == nColId)
         return m_aTableNames[nRow];
@@ -270,7 +270,7 @@ OUString OTableGrantControl::GetCellText( tools::Long nRow, sal_uInt16 nColId )
     return OUString::number(isAllowed(nColId,nPriv) ? 1 :0);
 }
 
-void OTableGrantControl::InitController( CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColumnId )
+void OTableGrantControl::InitController( CellControllerRef& /*rController*/, sal_Int32 nRow, sal_uInt16 nColumnId )
 {
     OUString sTablename = m_aTableNames[nRow];
     // special case for tablename
@@ -357,7 +357,7 @@ void OTableGrantControl::setGrantUser(const Reference< XAuthorizable>& _xGrantUs
     m_xGrantUser = _xGrantUser;
 }
 
-CellController* OTableGrantControl::GetController( tools::Long nRow, sal_uInt16 nColumnId )
+CellController* OTableGrantControl::GetController( sal_Int32 nRow, sal_uInt16 nColumnId )
 {
 
     CellController* pController = nullptr;
@@ -384,7 +384,7 @@ CellController* OTableGrantControl::GetController( tools::Long nRow, sal_uInt16
     return pController;
 }
 
-bool OTableGrantControl::SeekRow( tools::Long nRow )
+bool OTableGrantControl::SeekRow( sal_Int32 nRow )
 {
     m_nDataPos = nRow;
 
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 2f378460c924..88cf056dbfc7 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -89,7 +89,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
         ::svt::EditBrowseBox::dispose();
     }
 
-    bool IndexFieldsControl::SeekRow(tools::Long nRow)
+    bool IndexFieldsControl::SeekRow(sal_Int32 nRow)
     {
         if (!EditBrowseBox::SeekRow(nRow))
             return false;
@@ -165,7 +165,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
         _rFields.resize(aDest - _rFields.begin());
     }
 
-    sal_uInt32 IndexFieldsControl::GetTotalCellWidth(tools::Long _nRow, sal_uInt16 _nColId)
+    sal_uInt32 IndexFieldsControl::GetTotalCellWidth(sal_Int32 _nRow, sal_uInt16 _nColId)
     {
         if (COLUMN_ID_ORDER == _nColId)
         {
@@ -233,7 +233,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
             rNameListBox.append_text(*pFields);
     }
 
-    CellController* IndexFieldsControl::GetController(tools::Long _nRow, sal_uInt16 _nColumnId)
+    CellController* IndexFieldsControl::GetController(sal_Int32 _nRow, sal_uInt16 _nColumnId)
     {
         if (!IsEnabled())
             return nullptr;
@@ -263,7 +263,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
         return pReturn;
     }
 
-    bool IndexFieldsControl::implGetFieldDesc(tools::Long _nRow, IndexFields::const_iterator& _rPos)
+    bool IndexFieldsControl::implGetFieldDesc(sal_Int32 _nRow, IndexFields::const_iterator& _rPos)
     {
         _rPos = m_aFields.end();
         if ((_nRow < 0) || (_nRow >= static_cast<sal_Int32>(m_aFields.size())))
@@ -343,7 +343,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
         return true;
     }
 
-    void IndexFieldsControl::InitController(CellControllerRef& /*_rController*/, tools::Long _nRow, sal_uInt16 _nColumnId)
+    void IndexFieldsControl::InitController(CellControllerRef& /*_rController*/, sal_Int32 _nRow, sal_uInt16 _nColumnId)
     {
         IndexFields::const_iterator aFieldDescription;
         bool bNewField = !implGetFieldDesc(_nRow, aFieldDescription);
@@ -407,7 +407,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
 
         SaveModified();
     }
-    OUString IndexFieldsControl::GetCellText(tools::Long _nRow,sal_uInt16 nColId) const
+    OUString IndexFieldsControl::GetCellText(sal_Int32 _nRow,sal_uInt16 nColId) const
     {
         IndexFields::const_iterator aRow = m_aFields.end();
         if ( _nRow >= 0 )
diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
index 0f0c38d9b6d2..e68b99067e8c 100644
--- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx
+++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
@@ -50,7 +50,7 @@ namespace dbaui
         virtual TOTypeInfoSP        getTypeInfo(sal_Int32 _nPos) override;
         virtual bool                isAutoIncrementValueEnabled() const override;
         virtual OUString            getAutoIncrementValue() const override;
-        virtual void                CellModified(tools::Long nRow, sal_uInt16 nColId ) override;
+        virtual void                CellModified(sal_Int32 nRow, sal_uInt16 nColId ) override;
 
     public:
         OColumnControlWindow(weld::Container* pParent,
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
index cf8bec1c7eb2..c467d4ca5402 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -136,7 +136,7 @@ namespace dbaui
 
         virtual css::lang::Locale               GetLocale() const = 0;
 
-        virtual void                            CellModified(tools::Long nRow, sal_uInt16 nColId ) = 0;
+        virtual void                            CellModified(sal_Int32 nRow, sal_uInt16 nColId ) = 0;
         virtual void                            SetModified(bool bModified);    // base implementation is empty
 
         virtual TOTypeInfoSP                    getTypeInfo(sal_Int32 _nPos)        = 0;
diff --git a/dbaccess/source/ui/inc/TableDesignControl.hxx b/dbaccess/source/ui/inc/TableDesignControl.hxx
index 7cfcfdc23dac..89debc9e1125 100644
--- a/dbaccess/source/ui/inc/TableDesignControl.hxx
+++ b/dbaccess/source/ui/inc/TableDesignControl.hxx
@@ -41,10 +41,10 @@ namespace dbaui
     public:
         OTableRowView(vcl::Window* pParent);
 
-        virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
-        virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData ) = 0;
-        virtual css::uno::Any          GetCellData( tools::Long nRow, sal_uInt16 nColId ) = 0;
-        virtual void SetControlText( tools::Long nRow, sal_uInt16 nColId, const OUString& rText ) = 0;
+        virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
+        virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData ) = 0;
+        virtual css::uno::Any          GetCellData( sal_Int32 nRow, sal_uInt16 nColId ) = 0;
+        virtual void SetControlText( sal_Int32 nRow, sal_uInt16 nColId, const OUString& rText ) = 0;
 
         virtual OTableDesignView* GetView() const = 0;
 
@@ -56,18 +56,18 @@ namespace dbaui
         virtual void paste() override;
 
     protected:
-        void Paste( tools::Long nRow );
+        void Paste( sal_Int32 nRow );
 
         virtual void CopyRows()                             = 0;
         virtual void DeleteRows()                           = 0;
-        virtual void InsertRows( tools::Long nRow )                = 0;
-        virtual void InsertNewRows( tools::Long nRow )             = 0;
+        virtual void InsertRows( sal_Int32 nRow )                = 0;
+        virtual void InsertNewRows( sal_Int32 nRow )             = 0;
 
         virtual bool IsPrimaryKeyAllowed()              = 0;
-        virtual bool IsInsertNewAllowed( tools::Long nRow )    = 0;
+        virtual bool IsInsertNewAllowed( sal_Int32 nRow )    = 0;
         virtual bool IsDeleteAllowed()                  = 0;
 
-        virtual RowStatus GetRowStatus(tools::Long nRow) const override;
+        virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
         virtual void KeyInput(const KeyEvent& rEvt) override;
         virtual void Command( const CommandEvent& rEvt ) override;
 
diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
index d83a3c0615eb..74a9fd8b5875 100644
--- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx
+++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
@@ -81,12 +81,12 @@ protected:
     virtual bool PreNotify(NotifyEvent& rNEvt ) override;
 
     virtual bool IsTabAllowed(bool bForward) const override;
-    virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override;
-    virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override;
+    virtual void InitController( ::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol ) override;
+    virtual ::svt::CellController* GetController( sal_Int32 nRow, sal_uInt16 nCol ) override;
     virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override;
-    virtual bool SeekRow( tools::Long nRow ) override;
+    virtual bool SeekRow( sal_Int32 nRow ) override;
     virtual bool SaveModified() override;
-    virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColId ) const override;
+    virtual OUString GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const override;
 
     virtual void CellModified() override;
 
diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx
index 7abc582c76b0..8a953302a978 100644
--- a/dbaccess/source/ui/inc/WTypeSelect.hxx
+++ b/dbaccess/source/ui/inc/WTypeSelect.hxx
@@ -35,7 +35,7 @@ namespace dbaui
         virtual void        ActivateAggregate( EControlType eType ) override;
         virtual void        DeactivateAggregate( EControlType eType ) override;
 
-        virtual void        CellModified(tools::Long nRow, sal_uInt16 nColId ) override;
+        virtual void        CellModified(sal_Int32 nRow, sal_uInt16 nColId ) override;
 
         virtual css::lang::Locale  GetLocale() const override;
         virtual css::uno::Reference< css::util::XNumberFormatter > GetFormatter() const override;
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index 886332935786..a973d4c1b495 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -64,20 +64,20 @@ namespace dbaui
         void                SaveValue() { m_aSavedValue = m_aFields; }
 
         void SetModifyHdl(const Link<IndexFieldsControl&,void>& _rHdl) { m_aModifyHdl = _rHdl; }
-        virtual OUString GetCellText(tools::Long _nRow,sal_uInt16 nColId) const override;
+        virtual OUString GetCellText(sal_Int32 _nRow,sal_uInt16 nColId) const override;
 
     private:
         // EditBrowseBox overridables
         virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, sal_uInt16 _nColumnId ) const override;
-        virtual bool SeekRow(tools::Long nRow) override;
-        virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
+        virtual bool SeekRow(sal_Int32 nRow) override;
+        virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override;
         virtual bool IsTabAllowed(bool bForward) const override;
 
-        ::svt::CellController*  GetController(tools::Long _nRow, sal_uInt16 _nColumnId) override;
-        void                InitController(::svt::CellControllerRef&, tools::Long _nRow, sal_uInt16 _nColumnId) override;
+        ::svt::CellController*  GetController(sal_Int32 _nRow, sal_uInt16 _nColumnId) override;
+        void                InitController(::svt::CellControllerRef&, sal_Int32 _nRow, sal_uInt16 _nColumnId) override;
 
         OUString GetRowCellText(const IndexFields::const_iterator& _rRow,sal_uInt16 nColId) const;
-        bool implGetFieldDesc(tools::Long _nRow, IndexFields::const_iterator& _rPos);
+        bool implGetFieldDesc(sal_Int32 _nRow, IndexFields::const_iterator& _rPos);
 
         bool isNewField() const { return GetCurRow() >= static_cast<sal_Int32>(m_aFields.size()); }
 
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 874e3c5f9c75..9f9e6fc5fc4b 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -213,7 +213,7 @@ namespace dbaui
 
         void SetMasterListener(SbaGridListener* pListener)  { m_pMasterListener = pListener; }
 
-        virtual void ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bSetCellFocus = true) override;
+        virtual void ActivateCell(sal_Int32 nRow, sal_uInt16 nCol, bool bSetCellFocus = true) override;
         virtual void DeactivateCell(bool bUpdate = true) override;
         using FmGridControl::ActivateCell;
 
@@ -249,7 +249,7 @@ namespace dbaui
 
         // EditBrowseBox overridables
         virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) override;
-        virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
+        virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
 
         // DbGridControl overridables
         virtual void PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) override;
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 44bb78b36924..245e6281ed87 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -77,7 +77,7 @@ void OWizTypeSelectControl::DeactivateAggregate( EControlType eType )
     }
 }
 
-void OWizTypeSelectControl::CellModified(tools::Long nRow, sal_uInt16 nColId )
+void OWizTypeSelectControl::CellModified(sal_Int32 nRow, sal_uInt16 nColId )
 {
     OSL_ENSURE(nRow == -1,"nRow must be -1!");
 
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index ccb389c2dd06..22e17c01ec36 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -429,7 +429,7 @@ void OSelectionBrowseBox::SetReadOnly(bool bRO)
     }
 }
 
-CellController* OSelectionBrowseBox::GetController(tools::Long nRow, sal_uInt16 nColId)
+CellController* OSelectionBrowseBox::GetController(sal_Int32 nRow, sal_uInt16 nColId)
 {
     if ( nColId > getFields().size() )
         return nullptr;
@@ -442,7 +442,7 @@ CellController* OSelectionBrowseBox::GetController(tools::Long nRow, sal_uInt16
     if (static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly())
         return nullptr;
 
-    tools::Long nCellIndex = GetRealRow(nRow);
+    sal_Int32 nCellIndex = GetRealRow(nRow);
     switch (nCellIndex)
     {
         case BROW_FIELD_ROW:
@@ -460,7 +460,7 @@ CellController* OSelectionBrowseBox::GetController(tools::Long nRow, sal_uInt16
     }
 }
 
-void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColId)
+void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, sal_Int32 nRow, sal_uInt16 nColId)
 {
     OSL_ENSURE(nColId != BROWSER_INVALIDID,"An Invalid Id was set!");
     if ( nColId == BROWSER_INVALIDID )
@@ -470,7 +470,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, too
         return;
     OTableFieldDescRef pEntry = getFields()[nPos-1];
     OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::InitController : invalid FieldDescription !");
-    tools::Long nCellIndex = GetRealRow(nRow);
+    sal_Int32 nCellIndex = GetRealRow(nRow);
 
     switch (nCellIndex)
     {
@@ -905,7 +905,7 @@ bool OSelectionBrowseBox::SaveModified()
     {
         // for the Undo-action
         OUString strOldCellContents,sNewValue;
-        tools::Long nRow = GetRealRow(GetCurRow());
+        sal_Int32 nRow = GetRealRow(GetCurRow());
         bool bAppendRow = false;
         switch (nRow)
         {
@@ -1211,7 +1211,7 @@ bool OSelectionBrowseBox::SaveModified()
     return pEntry != nullptr && !bError;
 }
 
-bool OSelectionBrowseBox::SeekRow(tools::Long nRow)
+bool OSelectionBrowseBox::SeekRow(sal_Int32 nRow)
 {
     m_nSeekRow = nRow;
     return nRow < m_nVisibleCount;
@@ -1229,7 +1229,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const tools::Rectangle&
     if (!pEntry.is())
         return;
 
-    tools::Long nRow = GetRealRow(m_nSeekRow);
+    sal_Int32 nRow = GetRealRow(m_nSeekRow);
     if (nRow == BROW_VIS_ROW)
         PaintTristate(rRect, pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE);
     else
@@ -1260,7 +1260,7 @@ void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId)
     // ColId is synonymous to Position, and the condition should be valid
 
     sal_uInt16 nCurCol = GetCurColumnId();
-    tools::Long nCurrentRow = GetCurRow();
+    sal_Int32 nCurrentRow = GetCurRow();
 
     DeactivateCell();
 
@@ -1483,7 +1483,7 @@ void OSelectionBrowseBox::InsertColumn(const OTableFieldDescRef& pEntry, sal_uIn
      // -1 means at the end. Count means at the end, others denotes a correct position
 
     sal_uInt16 nCurCol = GetCurColumnId();
-    tools::Long nCurrentRow = GetCurRow();
+    sal_Int32 nCurrentRow = GetCurRow();
 
     DeactivateCell();
 
@@ -1857,7 +1857,7 @@ bool OSelectionBrowseBox::Save()
 
 void OSelectionBrowseBox::CellModified()
 {
-    tools::Long nRow = GetRealRow(GetCurRow());
+    sal_Int32 nRow = GetRealRow(GetCurRow());
     switch (nRow)
     {
         case BROW_VIS_ROW:
@@ -1928,7 +1928,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
             }
 
             sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel( aMenuPos.X() ));
-            tools::Long   nRow = GetRowAtYPosPixel( aMenuPos.Y() );
+            sal_Int32   nRow = GetRowAtYPosPixel( aMenuPos.Y() );
 
             if (nRow < 0 && nColId > HANDLE_ID )
             {
@@ -2034,10 +2034,10 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, bool _bVis)
         ActivateCell();
 }
 
-tools::Long OSelectionBrowseBox::GetBrowseRow(tools::Long nRowId) const
+sal_Int32 OSelectionBrowseBox::GetBrowseRow(sal_Int32 nRowId) const
 {
-    sal_uInt16 nCount(0);
-    for(tools::Long i = 0 ; i < nRowId ; ++i)
+    sal_Int32 nCount(0);
+    for(sal_Int32 i = 0 ; i < nRowId ; ++i)
     {
         if ( m_bVisibleRow[i] )
             ++nCount;
@@ -2045,10 +2045,10 @@ tools::Long OSelectionBrowseBox::GetBrowseRow(tools::Long nRowId) const
     return nCount;
 }
 
-tools::Long OSelectionBrowseBox::GetRealRow(tools::Long nRowId) const
+sal_Int32 OSelectionBrowseBox::GetRealRow(sal_Int32 nRowId) const
 {
-    tools::Long nErg=0,i;
-    const tools::Long nCount = m_bVisibleRow.size();
+    sal_Int32 nErg=0,i;
+    const sal_Int32 nCount = m_bVisibleRow.size();
     for(i=0;i < nCount; ++i)
     {
         if(m_bVisibleRow[i] && nErg++ == nRowId)
@@ -2086,7 +2086,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const
     return nErg;
 }
 
-void OSelectionBrowseBox::SetNoneVisibleRow(tools::Long nRows)
+void OSelectionBrowseBox::SetNoneVisibleRow(sal_Int32 nRows)
 {
     // only the first 11 rows are interesting
     sal_Int32 const nSize = SAL_N_ELEMENTS(nVisibleRowMask);
@@ -2094,7 +2094,7 @@ void OSelectionBrowseBox::SetNoneVisibleRow(tools::Long nRows)
         m_bVisibleRow[i] = !(nRows & nVisibleRowMask[i]);
 }
 
-OUString OSelectionBrowseBox::GetCellText(tools::Long nRow, sal_uInt16 nColId) const
+OUString OSelectionBrowseBox::GetCellText(sal_Int32 nRow, sal_uInt16 nColId) const
 {
 
     sal_uInt16 nPos = GetColumnPos(nColId);
@@ -2333,7 +2333,7 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
     }
 }
 
-sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(tools::Long nRowId, sal_uInt16 nColId)
+sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(sal_Int32 nRowId, sal_uInt16 nColId)
 {
     sal_uInt16 nPos = GetColumnPos(nColId);
     OSL_ENSURE((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
@@ -2341,7 +2341,7 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(tools::Long nRowId, sal_uInt16
     OTableFieldDescRef pEntry = getFields()[nPos-1];
     OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
 
-    tools::Long nRow = GetRealRow(nRowId);
+    sal_Int32 nRow = GetRealRow(nRowId);
     OUString strText(GetCellText(nRow, nColId));
     return GetDataWindow().LogicToPixel(Size(GetDataWindow().GetTextWidth(strText),0)).Width();
 }
@@ -2349,7 +2349,7 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(tools::Long nRowId, sal_uInt16
 bool OSelectionBrowseBox::isCutAllowed() const
 {
     bool bCutAllowed = false;
-    tools::Long nRow = GetRealRow(GetCurRow());
+    sal_Int32 nRow = GetRealRow(GetCurRow());
     switch (nRow)
     {
         case BROW_VIS_ROW:
@@ -2377,7 +2377,7 @@ bool OSelectionBrowseBox::isCutAllowed() const
 
 void OSelectionBrowseBox::cut()
 {
-    tools::Long nRow = GetRealRow(GetCurRow());
+    sal_Int32 nRow = GetRealRow(GetCurRow());
     switch (nRow)
     {
         case BROW_FIELD_ROW:
@@ -2400,7 +2400,7 @@ void OSelectionBrowseBox::cut()
 
 void OSelectionBrowseBox::paste()
 {
-    tools::Long nRow = GetRealRow(GetCurRow());
+    sal_Int32 nRow = GetRealRow(GetCurRow());
     switch (nRow)
     {
         case BROW_FIELD_ROW:
@@ -2423,7 +2423,7 @@ void OSelectionBrowseBox::paste()
 bool OSelectionBrowseBox::isPasteAllowed() const
 {
     bool bPasteAllowed = true;
-    tools::Long nRow = GetRealRow(GetCurRow());
+    sal_Int32 nRow = GetRealRow(GetCurRow());
     switch (nRow)
     {
         case BROW_VIS_ROW:
@@ -2443,7 +2443,7 @@ bool OSelectionBrowseBox::isCopyAllowed() const
 
 void OSelectionBrowseBox::copy()
 {
-    tools::Long nRow = GetRealRow(GetCurRow());
+    sal_Int32 nRow = GetRealRow(GetCurRow());
     switch (nRow)
     {
         case BROW_FIELD_ROW:
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 7fe01622fcbd..8c2ea555a98e 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -52,7 +52,7 @@ namespace dbaui
         std::vector<bool>                 m_bVisibleRow;              // at pos we find the RowId
         Timer                               m_timerInvalidate;
 
-        tools::Long                                m_nSeekRow;
+        sal_Int32                           m_nSeekRow;
         BrowserMode                         m_nMode;                    // remember the BrowseModes
         VclPtr< ::svt::EditControl>                 m_pTextCell;
         VclPtr< ::svt::CheckBoxControl>             m_pVisibleCell;
@@ -111,7 +111,7 @@ namespace dbaui
         void                        SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const OUString& strNewText);
                                         // cell content (formatted as string) set/return
         sal_Int32                   GetNoneVisibleRows() const;
-        void                        SetNoneVisibleRow(tools::Long nRows);
+        void                        SetNoneVisibleRow(sal_Int32 nRows);
         bool                        IsRowVisible(sal_uInt16 _nWhich) const;
         void                        SetRowVisible(sal_uInt16 _nWhich, bool _bVis);
 
@@ -150,7 +150,7 @@ namespace dbaui
             @return
                 the text out of the cell
         */
-        virtual OUString            GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const override;
+        virtual OUString            GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const override;
 
         /** returns the description of the row.
             @param  _nRow
@@ -178,7 +178,7 @@ namespace dbaui
         virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
 
     private:
-        virtual bool                SeekRow( tools::Long nRow ) override;
+        virtual bool                SeekRow( sal_Int32 nRow ) override;
 
         virtual void                PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const override;
         virtual void                PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect,
@@ -191,14 +191,14 @@ namespace dbaui
         virtual void                KeyInput( const KeyEvent& rEvt ) override;
         virtual void                Command(const CommandEvent& rEvt) override;
 
-        virtual ::svt::CellController*  GetController(tools::Long nRow, sal_uInt16 nCol) override;
-        virtual void                InitController(::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol) override;
+        virtual ::svt::CellController*  GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
+        virtual void                InitController(::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol) override;
         virtual void                CellModified() override;
         virtual bool                SaveModified() override;
         virtual void                Init() override;
         virtual void                ColumnResized( sal_uInt16 nColId ) override;
 
-        virtual sal_uInt32          GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
+        virtual sal_uInt32          GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override;
 
         // if you want to have an own header ...
         virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) override;
@@ -216,8 +216,8 @@ namespace dbaui
 
         void            RemoveField( sal_uInt16 nId );
         tools::Rectangle       GetInvalidRect( sal_uInt16 nColId );
-        tools::Long            GetRealRow(tools::Long nRow) const;
-        tools::Long            GetBrowseRow(tools::Long nRowId) const;
+        sal_Int32       GetRealRow(sal_Int32 nRow) const;
+        sal_Int32       GetBrowseRow(sal_Int32 nRowId) const;
         bool            GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt);
         void            appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow, bool& _bListAction);
         void            appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow);
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index bb05ec132f0c..f585918cdfe6 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -167,7 +167,7 @@ void OTableEditorCtrl::SetReadOnly( bool bRead )
     bReadOnly = bRead;
 
     // Disable active cells
-    tools::Long nRow(GetCurRow());
+    sal_Int32 nRow(GetCurRow());
     sal_uInt16 nCol(GetCurColumnId());
     DeactivateCell();
 
@@ -278,7 +278,7 @@ void OTableEditorCtrl::dispose()
     OTableRowView::dispose();
 }
 
-bool OTableEditorCtrl::SetDataPtr( tools::Long nRow )
+bool OTableEditorCtrl::SetDataPtr( sal_Int32 nRow )
 {
     if(nRow == -1)
         return false;
@@ -290,7 +290,7 @@ bool OTableEditorCtrl::SetDataPtr( tools::Long nRow )
     return pActRow != nullptr;
 }
 
-bool OTableEditorCtrl::SeekRow(tools::Long _nRow)
+bool OTableEditorCtrl::SeekRow(sal_Int32 _nRow)
 {
     // Call the Base class to remember which row must be repainted
     EditBrowseBox::SeekRow(_nRow);
@@ -310,7 +310,7 @@ void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRe
     rDev.Pop();
 }
 
-CellController* OTableEditorCtrl::GetController(tools::Long nRow, sal_uInt16 nColumnId)
+CellController* OTableEditorCtrl::GetController(sal_Int32 nRow, sal_uInt16 nColumnId)
 {
     // If EditorCtrl is ReadOnly, editing is forbidden
     Reference<XPropertySet> xTable = GetView()->getController().getTable();
@@ -348,7 +348,7 @@ CellController* OTableEditorCtrl::GetController(tools::Long nRow, sal_uInt16 nCo
     }
 }
 
-void OTableEditorCtrl::InitController(CellControllerRef&, tools::Long nRow, sal_uInt16 nColumnId)
+void OTableEditorCtrl::InitController(CellControllerRef&, sal_Int32 nRow, sal_uInt16 nColumnId)
 {
     SeekRow( nRow == -1 ? GetCurRow() : nRow);
     OFieldDescription* pActFieldDescr = pActRow->GetActFieldDescr();
@@ -405,7 +405,7 @@ void OTableEditorCtrl::InitController(CellControllerRef&, tools::Long nRow, sal_
     }
 }
 
-EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(tools::Long nRow) const
+EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(sal_Int32 nRow) const
 {
     const_cast<OTableEditorCtrl*>(this)->SetDataPtr( nRow );
     if( !pActRow )
@@ -436,7 +436,7 @@ void OTableEditorCtrl::SaveCurRow()
     pDescrWin->SaveData( pActRow->GetActFieldDescr() );
 }
 
-void OTableEditorCtrl::DisplayData(tools::Long nRow)
+void OTableEditorCtrl::DisplayData(sal_Int32 nRow)
 {
     // go to the correct cell
     SetDataPtr(nRow);
@@ -496,7 +496,7 @@ sal_Int32 OTableEditorCtrl::HasFieldName( const OUString& rFieldName )
     return nCount;
 }
 
-void OTableEditorCtrl::SaveData(tools::Long nRow, sal_uInt16 nColId)
+void OTableEditorCtrl::SaveData(sal_Int32 nRow, sal_uInt16 nColId)
 {
     // Store the cell content
     SetDataPtr( nRow == -1 ? GetCurRow() : nRow);
@@ -602,7 +602,7 @@ bool OTableEditorCtrl::SaveModified()
     return true;
 }
 
-bool OTableEditorCtrl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol)
+bool OTableEditorCtrl::CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol)
 {
 
     if (!EditBrowseBox::CursorMoving(nNewRow, nNewCol))
@@ -633,7 +633,7 @@ IMPL_LINK_NOARG( OTableEditorCtrl, InvalidateFieldType, void*, void )
     Invalidate( GetFieldRectPixel(nOldDataPos, FIELD_TYPE) );
 }
 
-void OTableEditorCtrl::CellModified( tools::Long nRow, sal_uInt16 nColId )
+void OTableEditorCtrl::CellModified( sal_Int32 nRow, sal_uInt16 nColId )
 {
 
     // If the description is null, use the default
@@ -766,7 +766,7 @@ OUString OTableEditorCtrl::GenerateName( const OUString& rName )
     return aFieldName;
 }
 
-void OTableEditorCtrl::InsertRows( tools::Long nRow )
+void OTableEditorCtrl::InsertRows( sal_Int32 nRow )
 {
 
     std::vector<  std::shared_ptr<OTableRow> > vInsertedUndoRedoRows; // need for undo/redo handling
@@ -780,7 +780,7 @@ void OTableEditorCtrl::InsertRows( tools::Long nRow )
         {
             aStreamRef->Seek(STREAM_SEEK_TO_BEGIN);
             aStreamRef->ResetError();
-            tools::Long nInsertRow = nRow;
+            sal_Int32 nInsertRow = nRow;
             std::shared_ptr<OTableRow>  pRow;
             sal_Int32 nSize = 0;
             (*aStreamRef).ReadInt32( nSize );
@@ -846,11 +846,11 @@ void OTableEditorCtrl::DeleteRows()
     InvalidateFeatures();
 }
 
-void OTableEditorCtrl::InsertNewRows( tools::Long nRow )
+void OTableEditorCtrl::InsertNewRows( sal_Int32 nRow )
 {
     OSL_ENSURE(GetView()->getController().isAddAllowed(),"Call of InsertNewRows not valid here. Please check isAppendAllowed!");
     // Create Undo-Action
-    tools::Long nInsertRows = GetSelectRowCount();
+    sal_Int32 nInsertRows = GetSelectRowCount();
     if( !nInsertRows )
         nInsertRows = 1;
     GetUndoManager().AddUndoAction( std::make_unique<OTableEditorInsNewUndoAct>(this, nRow, nInsertRows) );
@@ -863,7 +863,7 @@ void OTableEditorCtrl::InsertNewRows( tools::Long nRow )
     InvalidateFeatures();
 }
 
-void OTableEditorCtrl::SetControlText( tools::Long nRow, sal_uInt16 nColId, const OUString& rText )
+void OTableEditorCtrl::SetControlText( sal_Int32 nRow, sal_uInt16 nColId, const OUString& rText )
 {
     // Set the Browser Controls
     if( nColId < FIELD_FIRST_VIRTUAL_COLUMN )
@@ -884,7 +884,7 @@ void OTableEditorCtrl::SetControlText( tools::Long nRow, sal_uInt16 nColId, cons
     }
 }
 
-void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo )
+void OTableEditorCtrl::SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo )
 {
     // Relocate the current pointer
     if( nRow == -1 )
@@ -905,7 +905,7 @@ void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const T
     SetControlText(nRow,nColId,_pTypeInfo ? _pTypeInfo->aUIName : OUString());
 }
 
-void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData )
+void OTableEditorCtrl::SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData )
 {
     // Relocate the current pointer
     if( nRow == -1 )
@@ -985,7 +985,7 @@ void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const c
     SetControlText(nRow,nColId,sValue);
 }
 
-Any OTableEditorCtrl::GetCellData( tools::Long nRow, sal_uInt16 nColId )
+Any OTableEditorCtrl::GetCellData( sal_Int32 nRow, sal_uInt16 nColId )
 {
     OFieldDescription* pFieldDescr = GetFieldDescr( nRow );
     if( !pFieldDescr )
@@ -1054,19 +1054,19 @@ Any OTableEditorCtrl::GetCellData( tools::Long nRow, sal_uInt16 nColId )
     return makeAny(sValue);
 }
 
-OUString OTableEditorCtrl::GetCellText( tools::Long nRow, sal_uInt16 nColId ) const
+OUString OTableEditorCtrl::GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const
 {
     OUString sCellText;
     const_cast< OTableEditorCtrl* >( this )->GetCellData( nRow, nColId ) >>= sCellText;
     return sCellText;
 }
 
-sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId)
+sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId)
 {
     return GetTextWidth(GetCellText(nRow, nColId)) + 2 * GetTextWidth("0");
 }
 
-OFieldDescription* OTableEditorCtrl::GetFieldDescr( tools::Long nRow )
+OFieldDescription* OTableEditorCtrl::GetFieldDescr( sal_Int32 nRow )
 {
     std::vector< std::shared_ptr<OTableRow> >::size_type nListCount(
         m_pRowList->size());
@@ -1279,7 +1279,7 @@ bool OTableEditorCtrl::IsDeleteAllowed()
     return GetSelectRowCount() != 0 && GetView()->getController().isDropAllowed();
 }
 
-bool OTableEditorCtrl::IsInsertNewAllowed( tools::Long nRow )
+bool OTableEditorCtrl::IsInsertNewAllowed( sal_Int32 nRow )
 {
 
     bool bInsertNewAllowed = GetView()->getController().isAddAllowed();
@@ -1375,7 +1375,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
             if( !IsReadOnly() )
             {
                 sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel(aMenuPos.X()));
-                tools::Long   nRow = GetRowAtYPosPixel(aMenuPos.Y());
+                sal_Int32  nRow = GetRowAtYPosPixel(aMenuPos.Y());
 
                 if ( HANDLE_ID != nColId )
                 {
@@ -1591,7 +1591,7 @@ bool OTableEditorCtrl::IsPrimaryKey()
 void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
 {
     // if there is no assigned field name
-    tools::Long nRow(GetCurRow());
+    sal_Int32 nRow(GetCurRow());
     OFieldDescription* pActFieldDescr = GetFieldDescr( nRow );
     if( pActFieldDescr )
         // Store the old description
@@ -1648,7 +1648,7 @@ void OTableEditorCtrl::DeactivateCell(bool bUpdate)
 {
     OTableRowView::DeactivateCell(bUpdate);
     // now we have to deactivate the field description
-    tools::Long nRow(GetCurRow());
+    sal_Int32 nRow(GetCurRow());
     if (pDescrWin)
         pDescrWin->SetReadOnly(bReadOnly || !SetDataPtr(nRow) || GetActRow()->IsReadOnly());
 }
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index 8c2608e24e2f..74e3594cf0b2 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -85,29 +85,29 @@ namespace dbaui
 
     protected:
         virtual void Command( const CommandEvent& rEvt ) override;
-        virtual bool SeekRow(tools::Long nRow) override;
+        virtual bool SeekRow(sal_Int32 nRow) override;
         virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect,
                                sal_uInt16 nColumnId ) const override;
 
         virtual void CursorMoved() override;
-        virtual RowStatus GetRowStatus(tools::Long nRow) const override;
+        virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
 
-        virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
-        virtual void InitController(::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol) override;
+        virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
+        virtual void InitController(::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol) override;
 
         virtual void CellModified() override;
         virtual bool SaveModified() override; // is called before changing a cell (false prevents change)
 
-        virtual OUString GetCellText(tools::Long nRow, sal_uInt16 nColId) const override;
-        virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
+        virtual OUString GetCellText(sal_Int32 nRow, sal_uInt16 nColId) const override;
+        virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override;
 
         virtual void CopyRows() override;
-        virtual void InsertRows( tools::Long nRow ) override;
+        virtual void InsertRows( sal_Int32 nRow ) override;
         virtual void DeleteRows() override;
-        virtual void InsertNewRows( tools::Long nRow ) override;
+        virtual void InsertNewRows( sal_Int32 nRow ) override;
 
         virtual bool IsPrimaryKeyAllowed() override;
-        virtual bool IsInsertNewAllowed( tools::Long nRow ) override;
+        virtual bool IsInsertNewAllowed( sal_Int32 nRow ) override;
         virtual bool IsDeleteAllowed() override;
 
         void ClearModified();
@@ -119,7 +119,7 @@ namespace dbaui
         explicit OTableEditorCtrl(vcl::Window* pParentWin, OTableDesignView* pView);
         virtual ~OTableEditorCtrl() override;
         virtual void dispose() override;
-        virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override;
+        virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol) override;
         SfxUndoManager& GetUndoManager() const;
 
         void SetDescrWin( OTableFieldDescWin* pWin )
@@ -132,19 +132,19 @@ namespace dbaui
         void SwitchType( const TOTypeInfoSP& _pType );
 
         /// force displaying of the given row
-        void DisplayData( tools::Long nRow );
+        void DisplayData( sal_Int32 nRow );
 
-        virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) override;
-        virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const css::uno::Any& _rSaveData ) override;
-        virtual css::uno::Any  GetCellData( tools::Long nRow, sal_uInt16 nColId ) override;
-        virtual void SetControlText( tools::Long nRow, sal_uInt16 nColId, const OUString& rText ) override;
+        virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) override;
+        virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const css::uno::Any& _rSaveData ) override;
+        virtual css::uno::Any  GetCellData( sal_Int32 nRow, sal_uInt16 nColId ) override;
+        virtual void SetControlText( sal_Int32 nRow, sal_uInt16 nColId, const OUString& rText ) override;
 
         virtual OTableDesignView* GetView() const override;
 
         std::vector< std::shared_ptr<OTableRow> >* GetRowList(){ return m_pRowList; }
 
         const std::shared_ptr<OTableRow>& GetActRow() const { return pActRow; }
-        void CellModified( tools::Long nRow, sal_uInt16 nColId );
+        void CellModified( sal_Int32 nRow, sal_uInt16 nColId );
         void SetReadOnly( bool bRead );
 
         virtual void Init() override;
@@ -154,7 +154,7 @@ namespace dbaui
         bool IsCopyAllowed();
         bool IsPasteAllowed() const;
         bool IsReadOnly() const { return bReadOnly;}
-        OFieldDescription* GetFieldDescr( tools::Long nRow );
+        OFieldDescription* GetFieldDescr( sal_Int32 nRow );
 
         // Window overrides
         virtual bool PreNotify( NotifyEvent& rNEvt ) override;
@@ -178,9 +178,9 @@ namespace dbaui
         void InitCellController();
         sal_Int32 HasFieldName( const OUString& rFieldName );
         OUString GenerateName( const OUString& rName );
-        bool SetDataPtr( tools::Long nRow );
+        bool SetDataPtr( sal_Int32 nRow );
 
-        void SaveData(tools::Long nRow, sal_uInt16 nColumnId);
+        void SaveData(sal_Int32 nRow, sal_uInt16 nColumnId);
         /** AdjustFieldDescription set the needed values for the description
             @param  _pFieldDesc     the field description where to set the values
             @param  _rMultiSel      contains the positions which changed for undo/redo
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
index fd91b310a8af..9b3b21e577b1 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -105,13 +105,13 @@ void OTableRowView::Command(const CommandEvent& rEvt)
             }
 
             sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()));
-            tools::Long   nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
+            sal_Int32  nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
 
             if ( nColId == HANDLE_ID )
             {
                 VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/querycolmenu.ui", "");
                 VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
-                tools::Long nSelectRowCount = GetSelectRowCount();
+                sal_Int32 nSelectRowCount = GetSelectRowCount();
                 aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), nSelectRowCount != 0);
                 aContextMenu->EnableItem(aContextMenu->GetItemId("copy"), nSelectRowCount  != 0);
                 aContextMenu->EnableItem(aContextMenu->GetItemId("paste"), false);
@@ -166,12 +166,12 @@ void OTableRowView::paste()
     OSL_FAIL("OTableRowView::Paste : (pseudo-) abstract method called !");
 }
 
-void OTableRowView::Paste( tools::Long nRow )
+void OTableRowView::Paste( sal_Int32 nRow )
 {
     InsertRows( nRow );
 }
 
-EditBrowseBox::RowStatus OTableRowView::GetRowStatus(tools::Long nRow) const
+EditBrowseBox::RowStatus OTableRowView::GetRowStatus(sal_Int32 nRow) const
 {
     if (nRow >= 0 && m_nDataPos == nRow)
         return CURRENT;
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
index 01e25d75d05a..aa04b914aa4b 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
@@ -49,7 +49,7 @@ OTableFieldControl::~OTableFieldControl()
     dispose();
 }
 
-void OTableFieldControl::CellModified(tools::Long nRow, sal_uInt16 nColId )
+void OTableFieldControl::CellModified(sal_Int32 nRow, sal_uInt16 nColId )
 {
     GetCtrl()->CellModified(nRow,nColId);
 }
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
index 4dd53a24dd7d..4a232f86c3d8 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
@@ -39,7 +39,7 @@ namespace dbaui
         virtual void        ActivateAggregate( EControlType eType ) override;
         virtual void        DeactivateAggregate( EControlType eType ) override;
         // are to be implemented by the derived classes
-        virtual void        CellModified(tools::Long nRow, sal_uInt16 nColId ) override;
+        virtual void        CellModified(sal_Int32 nRow, sal_uInt16 nColId ) override;
         virtual bool        IsReadOnly() override;
         virtual void        SetModified(bool bModified) override;
         virtual css::uno::Reference< css::util::XNumberFormatter >    GetFormatter() const override;
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 0edd32436918..3a2ea9783879 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -65,7 +65,7 @@ void OTableDesignUndoAct::Redo()
     }
 }
 
-OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, tools::Long nRowID, sal_uInt16 nColumn ) :
+OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn ) :
      OTableDesignUndoAct( pOwner ,STR_TABED_UNDO_CELLMODIFIED)
     ,m_nCol( nColumn )
     ,m_nRow( nRowID )
@@ -116,7 +116,7 @@ OTableEditorUndoAct::~OTableEditorUndoAct()
 {
 }
 
-OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, tools::Long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType )
+OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType )
     :OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED)
     ,m_nCol( nColumn )
     ,m_nRow( nRowID )
@@ -240,7 +240,7 @@ void OTableEditorInsUndoAct::Undo()
 void OTableEditorInsUndoAct::Redo()
 {
     // insert lines again
-    tools::Long nInsertRow = m_nInsPos;
+    sal_Int32 nInsertRow = m_nInsPos;
     std::shared_ptr<OTableRow>  pRow;
     std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList();
     for (auto const& insertedRow : m_vInsertedRows)
@@ -256,7 +256,7 @@ void OTableEditorInsUndoAct::Redo()
     OTableEditorUndoAct::Redo();
 }
 
-OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, tools::Long nInsertPosition, tools::Long nInsertedRows ) :
+OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nInsertPosition, sal_Int32 nInsertedRows ) :
      OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_NEWROWINSERTED)
     ,m_nInsPos( nInsertPosition )
     ,m_nInsRows( nInsertedRows )
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx
index f7f8d0f56d57..6a0eeae16529 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.hxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx
@@ -57,28 +57,28 @@ namespace dbaui
     class OTableDesignCellUndoAct final : public OTableDesignUndoAct
     {
         sal_uInt16     m_nCol;
-        tools::Long           m_nRow;
+        sal_Int32      m_nRow;
         css::uno::Any  m_sOldText;
         css::uno::Any  m_sNewText;
 
         virtual void    Undo() override;
         virtual void    Redo() override;
     public:
-        OTableDesignCellUndoAct( OTableRowView* pOwner, tools::Long nRowID, sal_uInt16 nColumn );
+        OTableDesignCellUndoAct( OTableRowView* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn );
         virtual ~OTableDesignCellUndoAct() override;
     };
 
     class OTableEditorTypeSelUndoAct final : public OTableEditorUndoAct
     {
         sal_uInt16          m_nCol;
-        tools::Long            m_nRow;
+        sal_Int32       m_nRow;
         TOTypeInfoSP    m_pOldType;
         TOTypeInfoSP    m_pNewType;
 
         virtual void    Undo() override;
         virtual void    Redo() override;
     public:
-        OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, tools::Long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType );
+        OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType );
         virtual ~OTableEditorTypeSelUndoAct() override;
     };
 
@@ -109,13 +109,13 @@ namespace dbaui
 
     class OTableEditorInsNewUndoAct final : public OTableEditorUndoAct
     {
-        tools::Long m_nInsPos;
-        tools::Long m_nInsRows;
+        sal_Int32 m_nInsPos;
+        sal_Int32 m_nInsRows;
 
         virtual void    Undo() override;
         virtual void    Redo() override;
     public:
-        OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, tools::Long nInsertPosition, tools::Long nInsertedRows );
+        OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nInsertPosition, sal_Int32 nInsertedRows );
         virtual ~OTableEditorInsNewUndoAct() override;
     };
 
diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx
index b5c64abed6aa..3bca5dcc4765 100644
--- a/include/svtools/brwbox.hxx
+++ b/include/svtools/brwbox.hxx
@@ -54,7 +54,7 @@ namespace vcl {
 }
 
 #define BROWSER_INVALIDID           SAL_MAX_UINT16
-#define BROWSER_ENDOFSELECTION      (static_cast<tools::Long>(SFX_ENDOFSELECTION))
+constexpr sal_Int32 BROWSER_ENDOFSELECTION = SFX_ENDOFSELECTION;
 
 enum class BrowserMode
 {
@@ -119,19 +119,19 @@ namespace o3tl
 class BrowseEvent
 {
     VclPtr<vcl::Window>     pWin;
-    tools::Long                    nRow;
+    sal_Int32               nRow;
     tools::Rectangle        aRect;
     sal_uInt16              nCol;
     sal_uInt16              nColId;
 
 public:
                         BrowseEvent( vcl::Window* pWindow,
-                                     tools::Long nAbsRow,
+                                     sal_Int32 nAbsRow,
                                      sal_uInt16 nColumn, sal_uInt16 nColumnId,
                                      const tools::Rectangle& rRect );
 
     vcl::Window*        GetWindow() const { return pWin; }
-    tools::Long                GetRow() const { return nRow; }
+    sal_Int32           GetRow() const { return nRow; }
     sal_uInt16          GetColumn() const { return nCol; }
     sal_uInt16          GetColumnId() const { return nColId; }
     const tools::Rectangle&    GetRect() const { return aRect; }
@@ -225,7 +225,7 @@ class BrowserMouseEvent: public MouseEvent, public BrowseEvent
 public:
     BrowserMouseEvent( BrowserDataWin* pWin, const MouseEvent& rEvt );
     BrowserMouseEvent( vcl::Window* pWin, const MouseEvent& rEvt,
-                       tools::Long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
+                       sal_Int32 nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
                        const tools::Rectangle& rRect );
 };
 
@@ -287,9 +287,9 @@ private:
     bool            bHLines;        // draw lines between rows
     bool            bVLines;        // draw lines between columns
     bool            bBootstrapped;  // child windows resized etc.
-    tools::Long            nTopRow;        // no. of first visible row (0...)
-    tools::Long            nCurRow;        // no. of row with cursor
-    tools::Long            nRowCount;      // total number of rows in model
+    sal_Int32       nTopRow;        // no. of first visible row (0...)
+    sal_Int32       nCurRow;        // no. of row with cursor
+    sal_Int32       nRowCount;      // total number of rows in model
     sal_uInt16      nFirstCol;      // no. of first visible scrollable column
     sal_uInt16      nCurColId;      // column id of cursor
 
@@ -317,17 +317,17 @@ private:
     union
     {
         MultiSelection* pSel;       // selected rows for multi-selection
-        tools::Long            nSel;       // selected row for single-selection
+        sal_Int32       nSel;       // selected row for single-selection
     }               uRow;
     std::unique_ptr<MultiSelection> pColSel; // selected column-ids
 
     // fdo#83943, detect if making the cursor position visible is impossible to achieve
     struct CursorMoveAttempt
     {
-        tools::Long m_nCol;
-        tools::Long m_nRow;
+        sal_Int32 m_nCol;
+        sal_Int32 m_nRow;
         bool m_bScrolledToReachCell;
-        CursorMoveAttempt(tools::Long nCol, tools::Long nRow, bool bScrolledToReachCell)
+        CursorMoveAttempt(sal_Int32 nCol, sal_Int32 nRow, bool bScrolledToReachCell)
             : m_nCol(nCol)
             , m_nRow(nRow)
             , m_bScrolledToReachCell(bScrolledToReachCell)
@@ -359,7 +359,7 @@ private:
     SVT_DLLPRIVATE void            AutoSizeLastColumn();
 
     SVT_DLLPRIVATE tools::Long            ImpGetDataRowHeight() const;
-    SVT_DLLPRIVATE tools::Rectangle       ImplFieldRectPixel( tools::Long nRow, sal_uInt16 nColId ) const;
+    SVT_DLLPRIVATE tools::Rectangle       ImplFieldRectPixel( sal_Int32 nRow, sal_uInt16 nColId ) const;
     SVT_DLLPRIVATE sal_uInt16      FrozenColCount() const;
 
     SVT_DLLPRIVATE void            ColumnInserted( sal_uInt16 nPos );
@@ -371,7 +371,7 @@ private:
 
     SVT_DLLPRIVATE tools::Long GetBarHeight() const;
 
-    bool            GoToRow(tools::Long nRow, bool bRowColMove, bool bDoNotModifySelection = false );
+    bool            GoToRow(sal_Int32 nRow, bool bRowColMove, bool bDoNotModifySelection = false );
 
     bool            GoToColumnId( sal_uInt16 nColId, bool bMakeVisible, bool bRowColMove = false);
     void            SelectColumnPos( sal_uInt16 nCol, bool _bSelect, bool bMakeVisible);
@@ -395,7 +395,7 @@ protected:
     // (with the help of RowInserted and RowRemoved), so overriding of
     // the method is needless
 public:
-    virtual tools::Long    GetRowCount() const override;
+    virtual sal_Int32  GetRowCount() const override;
 
 protected:
     // for display in VScrollBar set it e.g. on  "?"
@@ -408,7 +408,7 @@ protected:
         @param nRow
             nRow starts at 0
     */
-    virtual bool    SeekRow( tools::Long nRow ) = 0;
+    virtual bool    SeekRow( sal_Int32 nRow ) = 0;
     void            DrawCursor();
     void            PaintData(vcl::Window const & rWin, vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
     virtual void    PaintField(vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const = 0;
@@ -426,11 +426,11 @@ protected:
     //   numbering of the visible scope has changed
     // - Scrolling (and thereof resulting in another first visible row)
     // - Resize the window
-    virtual void    VisibleRowsChanged( tools::Long nNewTopRow, sal_uInt16 nNumRows);
+    virtual void    VisibleRowsChanged( sal_Int32 nNewTopRow, sal_uInt16 nNumRows);
 
     // number of visible rows in the window (incl. "truncated" rows)
     sal_uInt16      GetVisibleRows() const;
-    tools::Long            GetTopRow() const { return nTopRow; }
+    sal_Int32       GetTopRow() const { return nTopRow; }
     sal_uInt16      GetFirstVisibleColNumber() const { return nFirstCol; }
 
     // Focus-Rect enable / disable
@@ -488,7 +488,7 @@ public:
     virtual void    EndScroll();
     virtual void    Select();
     virtual void    DoubleClick( const BrowserMouseEvent& rEvt );
-    virtual bool    IsCursorMoveAllowed( tools::Long nNewRow, sal_uInt16 nNewColId ) const;
+    virtual bool    IsCursorMoveAllowed( sal_Int32 nNewRow, sal_uInt16 nNewColId ) const;
     virtual void    CursorMoved();
     virtual void    ColumnMoved( sal_uInt16 nColId );
     virtual void    ColumnResized( sal_uInt16 nColId );
@@ -533,56 +533,56 @@ public:
     bool            IsFrozen( sal_uInt16 nColumnId ) const;
 
     // movement of visible area
-    tools::Long            ScrollColumns( tools::Long nColumns );
-    tools::Long            ScrollRows( tools::Long nRows );
-    void            MakeFieldVisible( tools::Long nRow, sal_uInt16 nColId );
+    sal_Int32       ScrollColumns( sal_Int32 nColumns );
+    sal_Int32       ScrollRows( sal_Int32 nRows );
+    void            MakeFieldVisible( sal_Int32 nRow, sal_uInt16 nColId );
 
     // access and movement of cursor
-    tools::Long            GetCurRow() const { return nCurRow; }
+    sal_Int32       GetCurRow() const { return nCurRow; }
     sal_uInt16      GetCurColumnId() const { return nCurColId; }
-    bool            GoToRow( tools::Long nRow );
+    bool            GoToRow( sal_Int32 nRow );
     bool            GoToColumnId( sal_uInt16 nColId );
-    bool            GoToRowColumnId( tools::Long nRow, sal_uInt16 nColId );
+    bool            GoToRowColumnId( sal_Int32 nRow, sal_uInt16 nColId );
 
     // selections
     virtual void    SetNoSelection() override;
     virtual void    SelectAll() override;
-    virtual void    SelectRow( tools::Long nRow, bool _bSelect = true, bool bExpand = true ) override;
+    virtual void    SelectRow( sal_Int32 nRow, bool _bSelect = true, bool bExpand = true ) override;
     void            SelectColumnPos( sal_uInt16 nCol, bool _bSelect = true )
                         { SelectColumnPos( nCol, _bSelect, true); }
     void            SelectColumnId( sal_uInt16 nColId )
                         { SelectColumnPos( GetColumnPos(nColId), true, true); }
-    tools::Long            GetSelectRowCount() const;
+    sal_Int32       GetSelectRowCount() const;
     sal_uInt16          GetSelectColumnCount() const;
-    virtual bool    IsRowSelected( tools::Long nRow ) const override;
+    virtual bool    IsRowSelected( sal_Int32 nRow ) const override;
     bool            IsColumnSelected( sal_uInt16 nColumnId ) const;
-    tools::Long            FirstSelectedRow();
-    tools::Long            LastSelectedRow();
-    tools::Long            NextSelectedRow();
+    sal_Int32       FirstSelectedRow();
+    sal_Int32       LastSelectedRow();
+    sal_Int32       NextSelectedRow();
     const MultiSelection* GetColumnSelection() const { return pColSel.get(); }
     const MultiSelection* GetSelection() const
                     { return bMultiSelection ? uRow.pSel : nullptr; }
 
-    tools::Long            FirstSelectedColumn( ) const;
+    sal_Int32       FirstSelectedColumn( ) const;
 
     bool            IsResizing() const { return bResizing; }
 
     // access to positions of fields, column and rows
     BrowserDataWin&        GetDataWindow() const;
-    tools::Rectangle       GetRowRectPixel( tools::Long nRow ) const;
-    tools::Rectangle       GetFieldRectPixel( tools::Long nRow, sal_uInt16 nColId,
+    tools::Rectangle       GetRowRectPixel( sal_Int32 nRow ) const;
+    tools::Rectangle       GetFieldRectPixel( sal_Int32 nRow, sal_uInt16 nColId,
                                        bool bRelToBrowser = true) const;
-    bool            IsFieldVisible( tools::Long nRow, sal_uInt16 nColId,
+    bool            IsFieldVisible( sal_Int32 nRow, sal_uInt16 nColId,
                                     bool bComplete = false ) const;
-    tools::Long            GetRowAtYPosPixel( tools::Long nY,
+    sal_Int32       GetRowAtYPosPixel( tools::Long nY,
                                         bool bRelToBrowser = true  ) const;
     sal_uInt16      GetColumnAtXPosPixel( tools::Long nX ) const;
 
     // invalidations
     void            Clear();
-    void            RowRemoved( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
-    void            RowModified( tools::Long nRow, sal_uInt16 nColId = BROWSER_INVALIDID );
-    void            RowInserted( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true, bool bKeepSelection = false );
+    void            RowRemoved( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
+    void            RowModified( sal_Int32 nRow, sal_uInt16 nColId = BROWSER_INVALIDID );
+    void            RowInserted( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true, bool bKeepSelection = false );
 
     // miscellaneous
     bool            ReserveControlArea(sal_uInt16 nWidth = USHRT_MAX);
@@ -624,7 +624,7 @@ public:
         @return
             the text out of the cell
     */
-    virtual OUString  GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const;
+    virtual OUString  GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const;
 
     /** @return
             the current column count
@@ -818,13 +818,13 @@ public:
     virtual bool                    HasRowHeader() const override;
     virtual bool                    GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn ) override;
     virtual void                    SelectColumn( sal_uInt16 _nColumn, bool _bSelect = true ) override;
-    virtual bool                    IsColumnSelected( tools::Long _nColumn ) const override;
+    virtual bool                    IsColumnSelected( sal_Int32 _nColumn ) const override;
     virtual sal_Int32               GetSelectedRowCount() const override;
     virtual sal_Int32               GetSelectedColumnCount() const override;
     virtual void                    GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& _rRows ) const override;
     virtual void                    GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const override;
     virtual bool                    IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const override;
-    virtual OUString                GetAccessibleCellText(tools::Long _nRow, sal_uInt16 _nColPos) const override;
+    virtual OUString                GetAccessibleCellText(sal_Int32 _nRow, sal_uInt16 _nColPos) const override;
     virtual bool                    GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector ) override;
     virtual tools::Rectangle        GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const override;
     virtual void                    GrabFocus() override;
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 1ba2817a4ed9..9d3f9cea3ee1 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -837,8 +837,8 @@ namespace svt
             // In ActivateCell, we grab the focus asynchronously, but if between requesting activation
             // and the asynchronous event the focus has changed, we won't grab it for ourself.
 
-        tools::Long    nPaintRow;  // row being painted
-        tools::Long    nEditRow;
+        sal_Int32   nPaintRow;  // row being painted
+        sal_Int32   nEditRow;
         sal_uInt16  nEditCol;
 
         bool            bHasFocus : 1;
@@ -867,7 +867,7 @@ namespace svt
         virtual void ColumnResized(sal_uInt16 nColId) override;
         virtual void Resize() override;
         virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY);
-        virtual bool SeekRow(tools::Long nRow) override;
+        virtual bool SeekRow(sal_Int32 nRow) override;
 
         virtual void GetFocus() override;
         virtual void LoseFocus() override;
@@ -886,14 +886,14 @@ namespace svt
         virtual void EndScroll() override;
 
         // should be used instead of GetFieldRectPixel, 'cause this method here takes into account the borders
-        tools::Rectangle GetCellRect(tools::Long nRow, sal_uInt16 nColId, bool bRelToBrowser = true) const;
-        virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId);
+        tools::Rectangle GetCellRect(sal_Int32 nRow, sal_uInt16 nColId, bool bRelToBrowser = true) const;
+        virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId);
         sal_uInt32 GetAutoColumnWidth(sal_uInt16 nColId);
 
         virtual void PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const;
         virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const = 0;
 
-        virtual RowStatus GetRowStatus(tools::Long nRow) const;
+        virtual RowStatus GetRowStatus(sal_Int32 nRow) const;
 
         virtual void    RowHeightChanged() override;
 
@@ -903,7 +903,7 @@ namespace svt
 
         // when changing a row:
         // CursorMoving:    cursor is being moved, but GetCurRow() still provides the old row
-        virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol);
+        virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol);
 
         // cursor has been moved
         virtual void CursorMoved() override;
@@ -915,8 +915,8 @@ namespace svt
 
         virtual bool IsModified() const {return aController.is() && aController->IsValueChangedFromSaved();}
 
-        virtual CellController* GetController(tools::Long nRow, sal_uInt16 nCol);
-        virtual void InitController(CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol);
+        virtual CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol);
+        virtual void InitController(CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol);
         static void ResizeController(CellControllerRef const & rController, const tools::Rectangle&);
         virtual void DoubleClick(const BrowserMouseEvent&) override;
 
@@ -934,7 +934,7 @@ namespace svt
         // result in traveling to the next or to th previous cell
         virtual bool IsTabAllowed(bool bForward) const;
 
-        virtual bool IsCursorMoveAllowed(tools::Long nNewRow, sal_uInt16 nNewColId) const override;
+        virtual bool IsCursorMoveAllowed(sal_Int32 nNewRow, sal_uInt16 nNewColId) const override;
 
         void    PaintTristate(const tools::Rectangle& rRect, const TriState& eState, bool _bEnabled=true) const;
 
@@ -947,7 +947,7 @@ namespace svt
         virtual void dispose() override;
 
         bool IsEditing() const {return aController.is();}
-        void InvalidateStatusCell(tools::Long nRow) {RowModified(nRow, 0);}
+        void InvalidateStatusCell(sal_Int32 nRow) {RowModified(nRow, 0);}
         void InvalidateHandleColumn();
 
         // late construction
@@ -959,7 +959,7 @@ namespace svt
         EditBrowseBoxFlags  GetBrowserFlags() const { return m_nBrowserFlags; }
         void                SetBrowserFlags(EditBrowseBoxFlags nFlags);
 
-        virtual void ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bSetCellFocus = true);
+        virtual void ActivateCell(sal_Int32 nRow, sal_uInt16 nCol, bool bSetCellFocus = true);
         virtual void DeactivateCell(bool bUpdate = true);
         // Children ---------------------------------------------------------------
 
@@ -982,7 +982,7 @@ namespace svt
 
         virtual bool ProcessKey(const KeyEvent& rEvt) override;
 
-        css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCheckBoxCell(tools::Long _nRow, sal_uInt16 _nColumnPos,const TriState& eState);
+        css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCheckBoxCell(sal_Int32 _nRow, sal_uInt16 _nColumnPos,const TriState& eState);
         bool ControlHasFocus() const;
     protected:
         // creates the accessible which wraps the active cell
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index f2fa49b7759c..1fb6c19951b6 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -295,7 +295,7 @@ private:
                                             // (with respect to the data source capabilities)
                                             // defaults to (insert | update | delete)
     sal_uInt16          m_nLastColId;
-    tools::Long                m_nLastRowId;
+    sal_Int32           m_nLastRowId;
 
     bool                m_bDesignMode : 1;      // default = sal_False
     bool                m_bRecordCountFinal : 1;
@@ -312,14 +312,14 @@ protected:
     bool                m_bUpdating : 1;            // are any updates being executed right now?
 
 protected:
-    virtual bool SeekRow(tools::Long nRow) override;
-    virtual void VisibleRowsChanged( tools::Long nNewTopRow, sal_uInt16 nNumRows) override;
+    virtual bool SeekRow(sal_Int32 nRow) override;
+    virtual void VisibleRowsChanged( sal_Int32 nNewTopRow, sal_uInt16 nNumRows) override;
     virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const override;
-    virtual RowStatus GetRowStatus(tools::Long nRow) const override;
-    virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override;
+    virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
+    virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol) override;
     virtual void CursorMoved() override;
     virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) override;
-    virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
+    virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override;
     virtual void Command(const CommandEvent& rEvt) override;
     virtual bool PreNotify(NotifyEvent& rEvt) override;
     virtual void KeyInput(const KeyEvent& rEvt) override;
@@ -327,7 +327,7 @@ protected:
     virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
     virtual void Select() override;
 
-    virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
+    virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
 
     virtual void CellModified() override;
     virtual bool SaveModified() override;
@@ -374,7 +374,7 @@ protected:
     // DragSourceHelper overridables
     virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
 
-    void    executeRowContextMenu( tools::Long _nRow, const Point& _rPreferredPos );
+    void    executeRowContextMenu( sal_Int32 _nRow, const Point& _rPreferredPos );
 
 public:
     DbGridControl(
@@ -397,7 +397,7 @@ public:
         @return
             the text out of the cell
     */
-    virtual OUString  GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const override;
+    virtual OUString  GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const override;
 
     void RemoveRows(bool bNewCursor);
 
@@ -437,7 +437,7 @@ public:
 
     void SetFilterMode(bool bMode);
     bool IsFilterMode() const {return m_bFilterMode;}
-    bool IsFilterRow(tools::Long nRow) const {return m_bFilterMode && nRow == 0;}
+    bool IsFilterRow(sal_Int32 nRow) const {return m_bFilterMode && nRow == 0;}
 
     void EnableNavigationBar(bool bEnable);
     bool HasNavigationBar() const {return m_bNavigationBar;}
@@ -472,9 +472,9 @@ public:
     // is the current line being updated
     bool IsUpdating() const {return m_bUpdating;}
 
-    void RowRemoved( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
-    void RowInserted( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
-    void RowModified( tools::Long nRow );
+    void RowRemoved( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
+    void RowInserted( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
+    void RowModified( sal_Int32 nRow );
 
     void resetCurrentRow();
 
@@ -560,12 +560,12 @@ public:
     CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
 
 protected:
-    void RecalcRows(tools::Long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
-    bool SeekCursor(tools::Long nRow, bool bAbsolute = false);
+    void RecalcRows(sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
+    bool SeekCursor(sal_Int32 nRow, bool bAbsolute = false);
     void RemoveColumns();       // cleaning of own structures
     void AdjustRows();
     sal_Int32 AlignSeekCursor();
-    bool SetCurrent(tools::Long nNewRow);
+    bool SetCurrent(sal_Int32 nNewRow);
 
     OUString GetCurrentRowCellText(DbGridColumn const * pCol,const DbGridRowRef& _rRow) const;
     virtual void DeleteSelectedRows();
@@ -575,7 +575,7 @@ protected:
     bool IsCurrentAppending() const;
 
     // empty row for insertion
-    bool IsInsertionRow(tools::Long nRow) const;
+    bool IsInsertionRow(sal_Int32 nRow) const;
 
     void  SetSeekPos(sal_Int32 nPos) {m_nSeekPos = nPos;}
     sal_Int32 GetCurrentPos() const {return m_nCurrentPos;}
diff --git a/include/vcl/accessibletable.hxx b/include/vcl/accessibletable.hxx
index b98080273dae..3e3cd2fcb206 100644
--- a/include/vcl/accessibletable.hxx
+++ b/include/vcl/accessibletable.hxx
@@ -81,8 +81,8 @@ public:
     virtual vcl::Window* GetWindowInstance()= 0;
     virtual sal_Int32 GetAccessibleControlCount() const = 0;
     virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint )= 0;
-    virtual tools::Long GetRowCount() const= 0;
-    virtual tools::Long GetColumnCount() const= 0;
+    virtual sal_Int32 GetRowCount() const= 0;
+    virtual sal_Int32 GetColumnCount() const= 0;
     virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )= 0;
     virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar ) = 0;
     virtual tools::Rectangle calcHeaderCellRect( bool _bColHeader, sal_Int32 _nPos ) = 0;
diff --git a/include/vcl/accessibletableprovider.hxx b/include/vcl/accessibletableprovider.hxx
index 637abf236134..253f850da5f8 100644
--- a/include/vcl/accessibletableprovider.hxx
+++ b/include/vcl/accessibletableprovider.hxx
@@ -51,7 +51,7 @@ class IAccessibleTableProvider
 {
 public:
     /** @return  The count of the rows. */
-    virtual tools::Long                    GetRowCount() const = 0;
+    virtual sal_Int32               GetRowCount() const = 0;
     /** @return  The count of the columns. */
     virtual sal_uInt16              GetColumnCount() const = 0;
 
@@ -73,19 +73,19 @@ public:
 
     virtual void                    SetNoSelection() = 0;
     virtual void                    SelectAll() = 0;
-    virtual void                    SelectRow( tools::Long _nRow, bool _bSelect = true, bool bExpand = true ) = 0;
+    virtual void                    SelectRow( sal_Int32 _nRow, bool _bSelect = true, bool bExpand = true ) = 0;
     virtual void                    SelectColumn( sal_uInt16 _nColumnPos, bool _bSelect = true ) = 0;
     virtual sal_Int32               GetSelectedRowCount() const = 0;
     virtual sal_Int32               GetSelectedColumnCount() const = 0;
     /** @return  <TRUE/>, if the row is selected. */
-    virtual bool                    IsRowSelected( tools::Long _nRow ) const = 0;
-    virtual bool                    IsColumnSelected( tools::Long _nColumnPos ) const = 0;
+    virtual bool                    IsRowSelected( sal_Int32 _nRow ) const = 0;
+    virtual bool                    IsColumnSelected( sal_Int32 _nColumnPos ) const = 0;
     virtual void                    GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& _rRows ) const = 0;
     virtual void                    GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const = 0;
 
     /** @return  <TRUE/>, if the cell is visible. */
     virtual bool                    IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0;
-    virtual OUString                GetAccessibleCellText( tools::Long _nRow, sal_uInt16 _nColumnPos ) const = 0;
+    virtual OUString                GetAccessibleCellText( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0;
 
     virtual tools::Rectangle               calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) = 0;
     virtual tools::Rectangle               calcTableRect( bool _bOnScreen = true ) = 0;
diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx
index c1545c3a7c60..f6e6137c7501 100644
--- a/include/vcl/toolkit/svtabbx.hxx
+++ b/include/vcl/toolkit/svtabbx.hxx
@@ -133,10 +133,10 @@ public:
 
     // Accessible -------------------------------------------------------------
 
-    bool            IsCellCheckBox( tools::Long _nRow, sal_uInt16 _nColumn, TriState& _rState );
+    bool            IsCellCheckBox( sal_Int32 _nRow, sal_uInt16 _nColumn, TriState& _rState );
 
     /** @return  The count of the rows. */
-    virtual tools::Long                    GetRowCount() const override;
+    virtual sal_Int32               GetRowCount() const override;
     /** @return  The count of the columns. */
     virtual sal_uInt16              GetColumnCount() const override;
 
@@ -160,19 +160,19 @@ public:
     virtual void                    SetNoSelection() override;
     using SvTabListBox::SelectAll;
     virtual void                    SelectAll() override;
-    virtual void                    SelectRow( tools::Long _nRow, bool _bSelect = true, bool bExpand = true ) override;
+    virtual void                    SelectRow( sal_Int32 _nRow, bool _bSelect = true, bool bExpand = true ) override;
     virtual void                    SelectColumn( sal_uInt16 _nColumn, bool _bSelect = true ) override;
     virtual sal_Int32               GetSelectedRowCount() const override;
     virtual sal_Int32               GetSelectedColumnCount() const override;
     /** @return  <TRUE/>, if the row is selected. */
-    virtual bool                    IsRowSelected( tools::Long _nRow ) const override;
-    virtual bool                    IsColumnSelected( tools::Long _nColumn ) const override;
+    virtual bool                    IsRowSelected( sal_Int32 _nRow ) const override;
+    virtual bool                    IsColumnSelected( sal_Int32 _nColumn ) const override;
     virtual void                    GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& _rRows ) const override;
     virtual void                    GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const override;
 
     /** @return  <TRUE/>, if the cell is visible. */
     virtual bool                    IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const override;
-    virtual OUString                GetAccessibleCellText( tools::Long _nRow, sal_uInt16 _nColumnPos ) const override;
+    virtual OUString                GetAccessibleCellText( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const override;
 
     virtual tools::Rectangle               calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) override;
     virtual tools::Rectangle               calcTableRect( bool _bOnScreen = true ) override;
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 25b8cdd68b7d..2aca2085fad5 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -133,18 +133,18 @@ public:
     */
     void moveGroups(const uno::Sequence<uno::Any>& _aGroups,sal_Int32 _nRow,bool _bSelect = true);
 
-    virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override;
+    virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol) override;
     using ::svt::EditBrowseBox::GetRowCount;
 protected:
     virtual bool IsTabAllowed(bool bForward) const override;
 
-    virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override;
-    virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override;
+    virtual void InitController( ::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol ) override;
+    virtual ::svt::CellController* GetController( sal_Int32 nRow, sal_uInt16 nCol ) override;
     virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override;
-    virtual bool SeekRow( tools::Long nRow ) override;
+    virtual bool SeekRow( sal_Int32 nRow ) override;
     virtual bool SaveModified() override;
-    virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColId ) const override;
-    virtual RowStatus GetRowStatus(tools::Long nRow) const override;
+    virtual OUString GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const override;
+    virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
 
     virtual void KeyInput(const KeyEvent& rEvt) override;
     virtual void Command( const CommandEvent& rEvt ) override;
@@ -483,7 +483,7 @@ bool OFieldExpressionControl::SaveModified()
     return true;
 }
 
-OUString OFieldExpressionControl::GetCellText( tools::Long nRow, sal_uInt16 /*nColId*/ ) const
+OUString OFieldExpressionControl::GetCellText( sal_Int32 nRow, sal_uInt16 /*nColId*/ ) const
 {
     OUString sText;
     if ( nRow != BROWSER_ENDOFSELECTION && m_aGroupPositions[nRow] != NO_GROUP )
@@ -507,13 +507,13 @@ OUString OFieldExpressionControl::GetCellText( tools::Long nRow, sal_uInt16 /*nC
     return sText;
 }
 
-void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColumnId )
+void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, sal_Int32 nRow, sal_uInt16 nColumnId )
 {
     weld::ComboBox& rComboBox = m_pComboCell->get_widget();
     rComboBox.set_entry_text(GetCellText(nRow, nColumnId));
 }
 
-bool OFieldExpressionControl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol)
+bool OFieldExpressionControl::CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol)
 {
 
     if (!EditBrowseBox::CursorMoving(nNewRow, nNewCol))
@@ -528,14 +528,14 @@ bool OFieldExpressionControl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewC
     return true;
 }
 
-CellController* OFieldExpressionControl::GetController( tools::Long /*nRow*/, sal_uInt16 /*nColumnId*/ )
+CellController* OFieldExpressionControl::GetController( sal_Int32 /*nRow*/, sal_uInt16 /*nColumnId*/ )
 {
     ComboBoxCellController* pCellController = new ComboBoxCellController( m_pComboCell );
     pCellController->GetComboBox().set_entry_editable(m_pParent->m_pController->isEditable());
     return pCellController;
 }
 
-bool OFieldExpressionControl::SeekRow( tools::Long _nRow )
+bool OFieldExpressionControl::SeekRow( sal_Int32 _nRow )
 {
     // the basis class needs the call, because that's how the class knows which line will be painted
     EditBrowseBox::SeekRow(_nRow);
@@ -560,7 +560,7 @@ void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const tools::Rectan
         rDev.SetClipRegion();
 }
 
-EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(tools::Long nRow) const
+EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(sal_Int32 nRow) const
 {
     if (nRow >= 0 && nRow == m_nDataPos)
         return EditBrowseBox::CURRENT;
@@ -844,7 +844,7 @@ OGroupsSortingDialog::~OGroupsSortingDialog()
 void OGroupsSortingDialog::UpdateData( )
 {
     m_xFieldExpression->Invalidate();
-    tools::Long nCurRow = m_xFieldExpression->GetCurRow();
+    sal_Int32 nCurRow = m_xFieldExpression->GetCurRow();
     m_xFieldExpression->DeactivateCell();
     m_xFieldExpression->ActivateCell(nCurRow, m_xFieldExpression->GetCurColumnId());
     DisplayData(nCurRow);
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 267c68899972..ee6b59eec1ab 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -198,7 +198,7 @@ private:
 
 private:
     void            PaintGridRanges_Impl();
-    ScRangeListRef  GetLimitedChartRanges_Impl( tools::Long nDataColumns, tools::Long nDataRows ) const;
+    ScRangeListRef  GetLimitedChartRanges_Impl( sal_Int32 nDataColumns, sal_Int32 nDataRows ) const;
     void            ForceChartListener_Impl();
     std::unique_ptr<ScMemChart> CreateMemChart_Impl() const;
 
diff --git a/sc/inc/dbdocutl.hxx b/sc/inc/dbdocutl.hxx
index a5600cc282a8..f4779bdffae7 100644
--- a/sc/inc/dbdocutl.hxx
+++ b/sc/inc/dbdocutl.hxx
@@ -43,7 +43,7 @@ public:
     };
     static void PutData( ScDocument& rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
                         const css::uno::Reference< css::sdbc::XRow>& xRow,
-                        tools::Long nRowPos,
+                        sal_Int32 nRowPos,
                         tools::Long nType, bool bCurrency, StrData* pStrData = nullptr );
 };
 
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index 720e07a3c8da..eaf560437b8d 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -115,15 +115,15 @@ public:
 class ScDPGroupTableData final : public ScDPTableData
 {
     std::shared_ptr<ScDPTableData> pSourceData;
-    tools::Long                    nSourceCount;

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list