sw/source/core/access/AccessibilityCheck.cxx | 10 ++++++---- sw/source/core/docnode/nodes.cxx | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-)
New commits: commit 6980f69c559861aba7279d5b90ae09f0347fa4d4 Author: Balazs Varga <balazs.varga.ext...@allotropia.de> AuthorDate: Fri Aug 4 20:54:29 2023 +0200 Commit: Balazs Varga <balazs.varga.ext...@allotropia.de> CommitDate: Thu Aug 10 10:57:01 2023 +0200 tdf#156553 tdf#156554 A11Y: fix issue update after image deletion Reset accessibility check issues when deleting graphic/ole nodes. Change-Id: I5f0698f6cf9e97045be22482de64518ab22d5946 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155355 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de> (cherry picked from commit 0d2fc6c053cad80c685755d030c6b57202f78d50) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155482 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index a24bdb82ad79..a7907c8992cd 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -100,9 +100,12 @@ class NoTextNodeAltTextCheck : public NodeCheck if (!pNoTextNode->GetTitle().isEmpty() || !pNoTextNode->GetDescription().isEmpty()) return; - OUString sName = pNoTextNode->GetFlyFormat()->GetName(); + const SwFrameFormat* pFrameFormat = pNoTextNode->GetFlyFormat(); + if (!pFrameFormat) + return; - OUString sIssueText = SwResId(STR_NO_ALT).replaceAll("%OBJECT_NAME%", sName); + OUString sIssueText + = SwResId(STR_NO_ALT).replaceAll("%OBJECT_NAME%", pFrameFormat->GetName()); if (pNoTextNode->IsOLENode()) { @@ -110,11 +113,10 @@ class NoTextNodeAltTextCheck : public NodeCheck sfx::AccessibilityIssueID::NO_ALT_OLE); pIssue->setDoc(pNoTextNode->GetDoc()); pIssue->setIssueObject(IssueObject::OLE); - pIssue->setObjectID(pNoTextNode->GetFlyFormat()->GetName()); + pIssue->setObjectID(pFrameFormat->GetName()); } else if (pNoTextNode->IsGrfNode()) { - const SwFrameFormat* pFrameFormat = pNoTextNode->GetFlyFormat(); const SfxBoolItem* pIsDecorItem = pFrameFormat->GetItemIfSet(RES_DECORATIVE); if (!(pIsDecorItem && pIsDecorItem->GetValue())) { diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index c045aa57023d..e5d20e4691ff 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -812,6 +812,9 @@ bool SwNodes::MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, pCurrentNode->m_pStartOfSection = aSttNdStack[ nLevel ]; nInsPos++; --aRg.aEnd; + + // reset Accessibility issue state + pCurrentNode->resetAndQueueAccessibilityCheck(); } break;