diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-05 21:08:04 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-08-10 11:56:07 +0200 |
commit | 1bef764ac84d113a0bcb237a0634579ee8dccec0 (patch) | |
tree | 6b1807d252d5f050645c7b39f983fb335176f398 | |
parent | bfcb7d1ef8185739de3fae4940bf46b3fe0e754b (diff) |
tdf#135098 update SwTableCursor m_SelectedBoxes before merge
so it does not contain the soon to-be-deleted SwTableBox so if the rPam is
queried via a11y it doesn't claim the deleted cell still exists.
tdf#122844 may be the same issue
Change-Id: I1ac3752676162ba5a29c0916039b2b467e2ac41a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100213
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 4d5469e8fdac..5dcbdf86575f 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2285,6 +2285,15 @@ TableMergeErr SwDoc::MergeTable( SwPaM& rPam ) while( &rPam != ( pTmp = pTmp->GetNext() )) for( int i = 0; i < 2; ++i ) pTmp->GetBound( static_cast<bool>(i) ) = *rPam.GetPoint(); + + if (SwTableCursor* pTableCursor = dynamic_cast<SwTableCursor*>(&rPam)) + { + // tdf#135098 update selection so rPam's m_SelectedBoxes is updated + // to not contain the soon to-be-deleted SwTableBox so if the rPam + // is queried via a11y it doesn't claim the deleted cell still + // exists + pTableCursor->NewTableSelection(); + } } // Merge them |