summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2024-03-18 15:19:42 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2024-03-28 10:43:17 +0100
commitc6075e716200e9c6bae1b10be2cf10013958e83a (patch)
tree78b4849ca5dbc012f34e39bf4c404503e932016d /sw/source
parent110eb4f6f8ed43faf7d2a4e74bfdcb93934f6439 (diff)
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 <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/AccessibilityCheck.cxx5
1 files changed, 5 insertions, 0 deletions
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;