summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorofftkp <parisoplop@gmail.com>2022-12-05 15:21:54 +0200
committerTomaž Vajngerl <quikee@gmail.com>2022-12-21 13:33:33 +0000
commitbe405c3f1843a381e951fcc63e4cc9d76002e73d (patch)
treec776344b5f52f3cdbe2b5a8036861d8522bad760
parenta97e2d2702d9a6f37775ccee2c08c4f3b2479c4b (diff)
tdf#152378 a11y: Don't trigger check for empty highlighted text
Do not trigger accessibility check test for empty highlighted text Also added an empty line in the test document to check that it's no longer detected after this patch Change-Id: I173a61fc25c0ea4cf81642a7ea37a762b3b583f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143673 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--sw/qa/core/accessibilitycheck/data/HighlightTest.odtbin8599 -> 8551 bytes
-rw-r--r--sw/source/core/access/AccessibilityCheck.cxx2
2 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/core/accessibilitycheck/data/HighlightTest.odt b/sw/qa/core/accessibilitycheck/data/HighlightTest.odt
index da4821681502..a8f13e142ce1 100644
--- a/sw/qa/core/accessibilitycheck/data/HighlightTest.odt
+++ b/sw/qa/core/accessibilitycheck/data/HighlightTest.odt
Binary files differ
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx
index ac558a44c69e..7a51b8edabc1 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -464,7 +464,7 @@ private:
// If not character background color, try paragraph background color
if (aBackgroundColor == COL_AUTO)
aBackgroundColor = nParaBackColor;
- else
+ else if (!xTextRange->getString().isEmpty())
{
auto pIssue
= lclAddIssue(m_rIssueCollection, SwResId(STR_TEXT_FORMATTING_CONVEYS_MEANING),