[Libreoffice-commits] core.git: dbaccess/source
Noel Grandin
noel.grandin at collabora.co.uk
Sat Apr 14 07:12:46 UTC 2018
dbaccess/source/ui/tabledesign/TableUndo.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 0fe5d61ad2c9e21f393bdad4b706e398728a70d8
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Apr 13 17:14:59 2018 +0200
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 at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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 ));
More information about the Libreoffice-commits
mailing list