summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga.extern@allotropia.de>2023-07-20 13:23:54 +0200
committerBalazs Varga <balazs.varga.extern@allotropia.de>2023-07-21 16:03:19 +0200
commitaba88061e5091e932418b5b03c7d189a28a8256d (patch)
treeb314048dbc5ab9f335c1f63b264f85f1afe6d1a2 /sw
parent645197d81fec7328b1ddef9d2996a2b068451b61 (diff)
tdf#156140 - A11y fix warnings when using default heading/title styles
No warnings when we use default paragraph styles. Change-Id: Idbbd542a33c23ff38f691098bf0ceba610efad84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154673 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/AccessibilityCheck.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx
index 7b63729550a1..4cde7b8a7777 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -666,17 +666,20 @@ public:
auto nParagraphLength = pTextNode->GetText().getLength();
if (nParagraphLength == 0)
return;
- if (aSwAttrSet.HasItem(RES_CHRATR_WEIGHT) || aSwAttrSet.HasItem(RES_CHRATR_CJK_WEIGHT)
- || aSwAttrSet.HasItem(RES_CHRATR_CTL_WEIGHT)
- || aSwAttrSet.HasItem(RES_CHRATR_POSTURE)
- || aSwAttrSet.HasItem(RES_CHRATR_CJK_POSTURE)
- || aSwAttrSet.HasItem(RES_CHRATR_CTL_POSTURE)
- || aSwAttrSet.HasItem(RES_CHRATR_SHADOWED) || aSwAttrSet.HasItem(RES_CHRATR_COLOR)
- || aSwAttrSet.HasItem(RES_CHRATR_EMPHASIS_MARK)
- || aSwAttrSet.HasItem(RES_CHRATR_UNDERLINE)
- || aSwAttrSet.HasItem(RES_CHRATR_OVERLINE)
- || aSwAttrSet.HasItem(RES_CHRATR_CROSSEDOUT)
- || aSwAttrSet.HasItem(RES_CHRATR_RELIEF) || aSwAttrSet.HasItem(RES_CHRATR_CONTOUR))
+ if (aSwAttrSet.GetItem(RES_CHRATR_WEIGHT, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_CJK_WEIGHT, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_CTL_WEIGHT, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_POSTURE, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_CJK_POSTURE, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_CTL_POSTURE, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_SHADOWED, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_COLOR, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_EMPHASIS_MARK, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_UNDERLINE, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_OVERLINE, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_CROSSEDOUT, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_RELIEF, false)
+ || aSwAttrSet.GetItem(RES_CHRATR_CONTOUR, false))
{
auto pIssue
= lclAddIssue(m_rIssueCollection, SwResId(STR_TEXT_FORMATTING_CONVEYS_MEANING),