Kaydet (Commit) 0fe5d61a authored tarafından Noel Grandin's avatar Noel Grandin

tdf#116981 Base when deleting table column

regression from
    commit	433fc221 (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/52844Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 40cb28a7
......@@ -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 ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment