diff options
author | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-07-25 09:21:42 +0200 |
---|---|---|
committer | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-07-25 11:06:51 +0200 |
commit | fa61fb2b49327de8583505bdadf58067773409bd (patch) | |
tree | 5a33fe864befd152023506295123f5ff4794e3aa | |
parent | ee4bd745be5dee15b68ca483f7f7771957ae3b3e (diff) |
tdf#156170 - A11Y - Fix "Avoid endnotes." issue is not hyperlinked
to jump to corresponding anchory.
Change-Id: Id01f66b8d75d85b4618ca30873bf3dc4951b74d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154882
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
-rw-r--r-- | sw/source/core/access/AccessibilityCheck.cxx | 17 | ||||
-rw-r--r-- | sw/source/core/access/AccessibilityIssue.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/AccessibilityIssue.hxx | 2 |
3 files changed, 8 insertions, 13 deletions
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index 9a990b0fa981..ac0f442a5041 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -1358,17 +1358,12 @@ public: for (SwTextFootnote* pTextFootnote : pDoc->GetFootnoteIdxs()) { SwFormatFootnote const& rFootnote = pTextFootnote->GetFootnote(); - if (rFootnote.IsEndNote()) - { - lclAddIssue(m_rIssueCollection, SwResId(STR_AVOID_ENDNOTES)); - } - else - { - auto pIssue = lclAddIssue(m_rIssueCollection, SwResId(STR_AVOID_FOOTNOTES)); - pIssue->setDoc(*pDoc); - pIssue->setIssueObject(IssueObject::FOOTNOTE); - pIssue->setTextFootnote(pTextFootnote); - } + auto pIssue = lclAddIssue(m_rIssueCollection, rFootnote.IsEndNote() + ? SwResId(STR_AVOID_ENDNOTES) + : SwResId(STR_AVOID_FOOTNOTES)); + pIssue->setDoc(*pDoc); + pIssue->setIssueObject(IssueObject::FOOTENDNOTE); + pIssue->setTextFootnote(pTextFootnote); } } }; diff --git a/sw/source/core/access/AccessibilityIssue.cxx b/sw/source/core/access/AccessibilityIssue.cxx index a9ddc2b75b62..adc52b0dfea2 100644 --- a/sw/source/core/access/AccessibilityIssue.cxx +++ b/sw/source/core/access/AccessibilityIssue.cxx @@ -120,7 +120,7 @@ void AccessibilityIssue::gotoIssue() const pWrtShell->ShowCursor(); } break; - case IssueObject::FOOTNOTE: + case IssueObject::FOOTENDNOTE: { SwWrtShell* pWrtShell = m_pDoc->GetDocShell()->GetWrtShell(); if (m_pTextFootnote) diff --git a/sw/source/core/inc/AccessibilityIssue.hxx b/sw/source/core/inc/AccessibilityIssue.hxx index 608a41ee2e1f..b7f42165853c 100644 --- a/sw/source/core/inc/AccessibilityIssue.hxx +++ b/sw/source/core/inc/AccessibilityIssue.hxx @@ -27,7 +27,7 @@ enum class IssueObject TABLE, TEXT, DOCUMENT_TITLE, - FOOTNOTE, + FOOTENDNOTE, TEXTFRAME, }; |