diff options
-rw-r--r-- | sw/source/core/access/AccessibilityCheck.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index 250f1b45f901..302d26c9c06f 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -114,12 +114,17 @@ class NoTextNodeAltTextCheck : public NodeCheck } else if (pNoTextNode->IsGrfNode()) { - auto pIssue = lclAddIssue(m_rIssueCollection, sIssueText, - sfx::AccessibilityIssueID::NO_ALT_GRAPHIC); - pIssue->setDoc(pNoTextNode->GetDoc()); - pIssue->setIssueObject(IssueObject::GRAPHIC); - pIssue->setObjectID(pNoTextNode->GetFlyFormat()->GetName()); - pIssue->setNode(pNoTextNode); + const SwFrameFormat* pFrameFormat = pNoTextNode->GetFlyFormat(); + const SfxBoolItem* pIsDecorItem = pFrameFormat->GetItemIfSet(RES_DECORATIVE); + if (!(pIsDecorItem && pIsDecorItem->GetValue())) + { + auto pIssue = lclAddIssue(m_rIssueCollection, sIssueText, + sfx::AccessibilityIssueID::NO_ALT_GRAPHIC); + pIssue->setDoc(pNoTextNode->GetDoc()); + pIssue->setIssueObject(IssueObject::GRAPHIC); + pIssue->setObjectID(pNoTextNode->GetFlyFormat()->GetName()); + pIssue->setNode(pNoTextNode); + } } } |