From c6075e716200e9c6bae1b10be2cf10013958e83a Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Mon, 18 Mar 2024 15:19:42 +0100 Subject: tdf#159918 a11y check: Don't warn about tabs in ToC Change-Id: Ifde41deb66c8dcb72842e18e539609ff351be832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164972 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- sw/source/core/access/AccessibilityCheck.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index d43a6919adf2..a1fed7c1ffd1 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -907,6 +907,11 @@ public: } case '\t': { + // Don't warn about tabs in ToC + auto pSection = SwDoc::GetCurrSection(SwPosition(*pTextNode, 0)); + if (pSection && pSection->GetTOXBase()) + continue; + if (bPreviousWasChar) { ++nTabCount; -- cgit