summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga.extern@allotropia.de>2023-08-10 08:46:59 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-08-10 11:08:27 +0200
commit8112e3dae2550acc43e064a69759ddbf7993142b (patch)
treef17df8d89e002034807d5891f17dd6dac5bbbe75
parent750f60174ea0dacf1cf007cd67eb70acd83fe649 (diff)
tdf#156619 - A11Y - fix not clickable warning about content control
in header/footer. Goto content controls in header and footer. Change-Id: I1e7eda0e9ab73a94d3f4963630901ff6701b521f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155535 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
-rw-r--r--sw/source/core/access/AccessibilityCheck.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx
index 9f157d3d8f1e..86684ab4d879 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -1282,20 +1282,15 @@ private:
/// Checking content controls in header or footer
class ContentControlCheck : public NodeCheck
{
-private:
- // Boolean indicating if content controls in header or footer warning is already triggered.
- bool m_bPrevPassed;
-
public:
ContentControlCheck(sfx::AccessibilityIssueCollection& rIssueCollection)
: NodeCheck(rIssueCollection)
- , m_bPrevPassed(true)
{
}
void check(SwNode* pCurrent) override
{
- if (!m_bPrevPassed)
+ if (!pCurrent->IsContentNode())
return;
const SwTextNode* pTextNode = pCurrent->GetTextNode();
@@ -1311,9 +1306,12 @@ public:
const SwTextAttr* pHt = pHts->Get(i);
if (pHt->Which() == RES_TXTATR_CONTENTCONTROL)
{
- m_bPrevPassed = false;
- lclAddIssue(m_rIssueCollection,
- SwResId(STR_CONTENT_CONTROL_IN_HEADER_OR_FOOTER));
+ auto pIssue
+ = lclAddIssue(m_rIssueCollection,
+ SwResId(STR_CONTENT_CONTROL_IN_HEADER_OR_FOOTER));
+ pIssue->setIssueObject(IssueObject::TEXT);
+ pIssue->setDoc(pCurrent->GetDoc());
+ pIssue->setNode(pCurrent);
break;
}
}