summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-16 12:17:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-09-16 14:42:17 +0200
commit0f37cc57228e4f0fc6355776e77bbc959d3b3e86 (patch)
treec5051a88165d21b166b3a5bb68cdd603cf79e7e8 /sc
parentc7ca124efd08097a1005ea56773d4def87efebcb (diff)
tdf#127561 avoid shapes with currently invalid positions
where getAccessibleCellAt would throw and just ignore the shape, seems to be a temporary problem and the correct position becomes known later. Change-Id: I736be9675a03e0a1cb98ceb29caf2d7869c84535 Reviewed-on: https://gerrit.libreoffice.org/78981 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 489ee8a69434..76e7f21f25ca 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1136,9 +1136,15 @@ uno::Reference<XAccessibleRelationSet> ScChildrenShapes::GetRelationSet(const Sc
uno::Reference<XAccessible> xAccessible = mpAccessibleDocument->GetAccessibleSpreadsheet(); // should be the current table
if (pData->xRelationCell && xAccessible.is())
{
- uno::Reference<XAccessibleTable> xAccTable (xAccessible->getAccessibleContext(), uno::UNO_QUERY);
- if (xAccTable.is())
- xAccessible = xAccTable->getAccessibleCellAt(pData->xRelationCell->Row(), pData->xRelationCell->Col());
+ sal_Int32 nRow = pData->xRelationCell->Row();
+ sal_Int32 nColumn = pData->xRelationCell->Col();
+ bool bPositionUnset = nRow == -1 && nColumn == -1;
+ if (!bPositionUnset)
+ {
+ uno::Reference<XAccessibleTable> xAccTable(xAccessible->getAccessibleContext(), uno::UNO_QUERY);
+ if (xAccTable.is())
+ xAccessible = xAccTable->getAccessibleCellAt(nRow, nColumn);
+ }
}
AccessibleRelation aRelation;
aRelation.TargetSet.realloc(1);