summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-21 07:49:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-30 08:57:07 +0100
commitf2be3d31cde821f5c1128deae7f2b95361ac1db9 (patch)
treeaac9582c61cf53e61da4b566c4d10b60af0475ad /dbaccess
parent46ecd31445bda45e10d58e937ff468a1a8f17da2 (diff)
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@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx18
-rw-r--r--dbaccess/source/ui/control/ColumnControlWindow.cxx2
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx20
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.cxx10
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx12
-rw-r--r--dbaccess/source/ui/inc/ColumnControlWindow.hxx2
-rw-r--r--dbaccess/source/ui/inc/FieldDescControl.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableDesignControl.hxx18
-rw-r--r--dbaccess/source/ui/inc/TableGrantCtrl.hxx8
-rw-r--r--dbaccess/source/ui/inc/WTypeSelect.hxx2
-rw-r--r--dbaccess/source/ui/inc/indexfieldscontrol.hxx12
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hxx4
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx52
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx18
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx50
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx38
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignControl.cxx8
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldControl.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldControl.hxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx8
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.hxx14
22 files changed, 152 insertions, 152 deletions
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;
};