diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-10-24 09:46:43 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-11-15 07:30:15 +0100 |
commit | fad326833699293e5f4e3254881cb56889a220c0 (patch) | |
tree | 23994ef9ea56d8eb88028a461ec6124706aae3fc /sw/inc | |
parent | 057eca05f23d9d15465e591bd0da671735d62d50 (diff) |
sw: Run a11y check for all content nodes
Change-Id: Icc3ff1be31a01b22242c48dec6d830e645ecb310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141784
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/OnlineAccessibilityCheck.hxx | 6 | ||||
-rw-r--r-- | sw/inc/ndtxt.hxx | 13 | ||||
-rw-r--r-- | sw/inc/node.hxx | 21 |
3 files changed, 24 insertions, 16 deletions
diff --git a/sw/inc/OnlineAccessibilityCheck.hxx b/sw/inc/OnlineAccessibilityCheck.hxx index f27f867ce96b..48a639b9d656 100644 --- a/sw/inc/OnlineAccessibilityCheck.hxx +++ b/sw/inc/OnlineAccessibilityCheck.hxx @@ -26,11 +26,11 @@ class OnlineAccessibilityCheck : public SvtListener private: SwDoc& m_rDocument; sw::AccessibilityCheck m_aAccessibilityCheck; - SwTextNode* m_pCurrentTextNode; - SwNodeOffset m_aCurrentNodeIndex; + SwContentNode* m_pPreviousNode; + SwNodeOffset m_nPreviousNodeIndex; sal_Int32 m_nAccessibilityIssues; - void runCheck(SwTextNode* pTextNode); + void runCheck(SwContentNode* pNode); public: OnlineAccessibilityCheck(SwDoc& rDocument); diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 63b019cf8178..f28f2faf1e02 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -37,7 +37,6 @@ #include <memory> #include <vector> #include <functional> -#include <sfx2/AccessibilityIssue.hxx> class SfxHint; class SwNumRule; @@ -102,12 +101,6 @@ struct ParagraphIdleData bool bAutoComplDirty = true; ///< auto complete list dirty }; -struct AccessibilityCheckStatus -{ - std::unique_ptr<sfx::AccessibilityIssueCollection> pCollection; - bool bDirty = true; -}; - } // end namespace sw /// SwTextNode is a paragraph in the document model. @@ -135,7 +128,6 @@ class SW_DLLPUBLIC SwTextNode final OUString m_Text; mutable sw::ParagraphIdleData m_aParagraphIdleData; - mutable sw::AccessibilityCheckStatus m_aAccessibilityCheckStatus; /** Some of the chars this para are hidden. Paragraph has to be reformatted on changing the view to print preview. */ @@ -242,11 +234,6 @@ public: /// End: Data collected during idle time - sw::AccessibilityCheckStatus& getAccessibilityCheckStatus() - { - return m_aAccessibilityCheckStatus; - } - public: using SwContentNode::GetAttr; /// for hanging TextFormatCollections somewhere else (Outline-Numbering!) diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 75096dd2aa28..38fdf2417be7 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -30,6 +30,8 @@ #include "fmtcol.hxx" #include "nodeoffset.hxx" +#include <sfx2/AccessibilityIssue.hxx> + #include <memory> #include <vector> @@ -366,6 +368,18 @@ class SwEndNode final : public SwNode SwEndNode & operator= ( const SwEndNode & rNode ) = delete; }; +// Accessibiity check + +namespace sw +{ +struct AccessibilityCheckStatus +{ + std::unique_ptr<sfx::AccessibilityIssueCollection> pCollection; + bool bDirty = true; +}; + +} + // SwContentNode class SW_DLLPUBLIC SwContentNode: public sw::BroadcastingModify, public SwNode, public SwContentIndexReg @@ -375,6 +389,8 @@ class SW_DLLPUBLIC SwContentNode: public sw::BroadcastingModify, public SwNode, SwFormatColl* m_pCondColl; mutable bool mbSetModifyAtAttr; + mutable sw::AccessibilityCheckStatus m_aAccessibilityCheckStatus; + protected: /// only used by SwContentNodeTmp in SwTextNode::Update SwContentNode(); @@ -499,6 +515,11 @@ public: void UpdateAttr(const SwUpdateAttr&); + sw::AccessibilityCheckStatus& getAccessibilityCheckStatus() + { + return m_aAccessibilityCheckStatus; + } + private: SwContentNode( const SwContentNode & rNode ) = delete; SwContentNode & operator= ( const SwContentNode & rNode ) = delete; |