summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-13 17:14:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-14 09:12:21 +0200
commit0fe5d61ad2c9e21f393bdad4b706e398728a70d8 (patch)
tree38b0fabc568b5521d6a5b8e93dd1d613af9aa03a /dbaccess
parent40cb28a7d564653e90cb1377e98c0c6f7a0eff6b (diff)
tdf#116981 Base when deleting table column
regression from commit 433fc2214c980abd82fa6240f45e634a53a3c61c (patch) sal_uIntPtr->sal_Int32 in MultiSelection Previously, MultiSelection stored it's values internally as sal_uIntPtr, but returned them as long in FirstSelected(), NextSelected(), and SFX_ENDOFSELECTION was defined to be ULONG_MAX. On 64-bit Linux, sal_uIntPtr is typedefed to sal_uInt64, and ULONG_MAX is 2^64, which means that previously, the SFX_ENDOFSELECTION value was being converted from 2^64 to -2^63 when it was returned, which was why this loop worked. Change-Id: Ia13836622dc1a0cb3b339c5587b71232f4197157 Reviewed-on: https://gerrit.libreoffice.org/52844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index c39f0f264a42..bba5dae8f376 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -161,11 +161,11 @@ OTableEditorDelUndoAct::OTableEditorDelUndoAct( OTableEditorCtrl* pOwner) :
{
// fill DeletedRowList
std::vector< std::shared_ptr<OTableRow> >* pOriginalRows = pOwner->GetRowList();
- long nIndex = pOwner->FirstSelectedRow();
+ sal_Int32 nIndex = pOwner->FirstSelectedRow();
std::shared_ptr<OTableRow> pOriginalRow;
std::shared_ptr<OTableRow> pNewRow;
- while( nIndex >= 0 )
+ while( nIndex != SFX_ENDOFSELECTION )
{
pOriginalRow = (*pOriginalRows)[nIndex];
pNewRow.reset(new OTableRow( *pOriginalRow, nIndex ));