summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-17 09:44:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-06-17 16:44:29 +0100
commitf054ba24056dba34576bc43a86abb0b828917585 (patch)
tree67db4abd872d1ec2ca299694dc5a188320b4bee5
parent8020863d409eb441cf48c55450a7cd48fed05108 (diff)
Related: tdf#100421 crash in a11y on load of source odt
stldebug assert because end is before start and we can'g get to start from end in a std::set (cherry picked from commit e41a694c8b4fd1503b31f3a9da326e9f7ddd1b79) Change-Id: I0471220d3940e08b564f88841703a539aaf369d6
-rw-r--r--sw/source/core/access/acctable.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index c626b097ecc1..0831419f7a29 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -556,16 +556,18 @@ void SwAccessibleTableData_Impl::GetRowColumnAndExtent(
Int32Set_Impl::const_iterator aEnd(
maRows.upper_bound( rBox.Bottom() - maTabFramePos.Y() ) );
rRow =
- static_cast< sal_Int32 >( ::std::distance( maRows.begin(), aStt ) );
- rRowExtent =
- static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) );
+ static_cast< sal_Int32 >( std::distance( maRows.begin(), aStt ) );
+ sal_Int32 nRowEnd =
+ static_cast< sal_Int32 >( std::distance( maRows.begin(), aEnd ) );
+ rRowExtent = nRowEnd - rRow;
aStt = maColumns.lower_bound( rBox.Left() - maTabFramePos.X() );
aEnd = maColumns.upper_bound( rBox.Right() - maTabFramePos.X() );
rColumn =
- static_cast< sal_Int32 >( ::std::distance( maColumns.begin(), aStt ) );
- rColumnExtent =
- static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) );
+ static_cast< sal_Int32 >( std::distance( maColumns.begin(), aStt ) );
+ sal_Int32 nColumnEnd =
+ static_cast< sal_Int32 >( std::distance( maColumns.begin(), aEnd ) );
+ rColumnExtent = nColumnEnd - rColumn;
}
class SwAccSingleTableSelHander_Impl : public SwAccTableSelHander_Impl