sw/source/core/access/AccessibilityCheck.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 1deec5e76bcd653ae48267f12c700753c5e0b6b5 Author: Balazs Varga <balazs.varga.ext...@allotropia.de> AuthorDate: Tue Aug 1 20:32:09 2023 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Aug 7 11:47:47 2023 +0200 tdf#156550 - a11y - fix sidebar complains about TOC hyperlinks Just comparing strings of url text and url link target. Change-Id: Iaf6196512214195a947429cd2d5e00cf9be46b89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155202 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> (cherry picked from commit 041e8806f2640e69634aee6a0a681e2f07b387eb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155243 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 4419e8d33b9d..2d44e8689b58 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -331,7 +331,9 @@ private: if (!sHyperlink.isEmpty()) { OUString sText = xTextRange->getString(); - if (INetURLObject(sText) == INetURLObject(sHyperlink)) + INetURLObject aHyperlink(sHyperlink); + if (aHyperlink.GetProtocol() != INetProtocol::NotValid + && INetURLObject(sText) == aHyperlink) { OUString sIssueText = SwResId(STR_HYPERLINK_TEXT_IS_LINK).replaceFirst("%LINK%", sHyperlink);