LibreOffice Module sw (master)
1
sw
inc
OnlineAccessibilityCheck.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*
9
*/
10
11
#pragma once
12
13
#include "
ndindex.hxx
"
14
#include "
ndtxt.hxx
"
15
#include <
svl/listener.hxx
>
16
#include <
vcl/timer.hxx
>
17
#include <AccessibilityCheck.hxx>
18
#include <map>
19
20
struct
SwPosition
;
21
class
SwTextNode
;
22
23
namespace
sw
24
{
27
class
WeakNodeContainer
final :
public
SvtListener
28
{
29
private
:
30
SwNode
*
m_pNode
;
31
32
public
:
33
WeakNodeContainer
(
SwNode
* pNode);
34
~WeakNodeContainer
();
35
37
bool
isAlive
();
38
41
SwNode
*
getNode
();
42
};
43
44
class
OnlineAccessibilityCheck
45
{
46
private
:
47
std::map<SwNode*, std::unique_ptr<WeakNodeContainer>>
m_aNodes
;
48
49
SwDoc
&
m_rDocument
;
50
sw::AccessibilityCheck
m_aAccessibilityCheck
;
51
std::unique_ptr<WeakNodeContainer>
m_pPreviousNode
;
52
SwNodeOffset
m_nPreviousNodeIndex
;
53
sal_Int32
m_nAccessibilityIssues
;
54
bool
m_bInitialCheck
;
55
bool
m_bOnlineCheckStatus
;
56
std::unique_ptr<sfx::AccessibilityIssueCollection>
m_pDocumentAccessibilityIssues
;
57
58
void
runAccessibilityCheck
(
SwNode
* pNode);
59
void
updateStatusbar
();
60
void
updateNodeStatus
(
SwNode
* pContentNode);
61
void
initialCheck
();
62
void
lookForPreviousNodeAndUpdate
(
SwPosition
const
& rNewPos);
63
void
clearAccessibilityIssuesFromAllNodes
();
64
void
runDocumentLevelAccessibilityCheck
();
65
66
public
:
67
OnlineAccessibilityCheck
(
SwDoc
& rDocument);
68
void
update
(
SwPosition
const
& rNewPos);
69
void
resetAndQueue
(
SwNode
* pNode);
70
void
resetAndQueueDocumentLevel
();
71
void
updateCheckerActivity
();
72
sal_Int32
getNumberOfAccessibilityIssues
() {
return
m_nAccessibilityIssues
; }
73
sal_Int32
getNumberOfDocumentLevelAccessibilityIssues
()
74
{
75
return
m_pDocumentAccessibilityIssues
?
m_pDocumentAccessibilityIssues
->getIssues().size()
76
: sal_Int32(0);
77
}
78
};
79
80
}
// end sw
81
82
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvtListener
SwDoc
Definition:
doc.hxx:197
SwNode
Base class of the Writer document model elements.
Definition:
node.hxx:98
SwTextNode
SwTextNode is a paragraph in the document model.
Definition:
ndtxt.hxx:112
sw::AccessibilityCheck
Definition:
AccessibilityCheck.hxx:34
sw::OnlineAccessibilityCheck
Definition:
OnlineAccessibilityCheck.hxx:45
sw::OnlineAccessibilityCheck::m_nAccessibilityIssues
sal_Int32 m_nAccessibilityIssues
Definition:
OnlineAccessibilityCheck.hxx:53
sw::OnlineAccessibilityCheck::initialCheck
void initialCheck()
Definition:
OnlineAccessibilityCheck.cxx:155
sw::OnlineAccessibilityCheck::runDocumentLevelAccessibilityCheck
void runDocumentLevelAccessibilityCheck()
Definition:
OnlineAccessibilityCheck.cxx:146
sw::OnlineAccessibilityCheck::update
void update(SwPosition const &rNewPos)
Definition:
OnlineAccessibilityCheck.cxx:206
sw::OnlineAccessibilityCheck::getNumberOfDocumentLevelAccessibilityIssues
sal_Int32 getNumberOfDocumentLevelAccessibilityIssues()
Definition:
OnlineAccessibilityCheck.hxx:73
sw::OnlineAccessibilityCheck::resetAndQueueDocumentLevel
void resetAndQueueDocumentLevel()
Definition:
OnlineAccessibilityCheck.cxx:311
sw::OnlineAccessibilityCheck::resetAndQueue
void resetAndQueue(SwNode *pNode)
Definition:
OnlineAccessibilityCheck.cxx:294
sw::OnlineAccessibilityCheck::updateCheckerActivity
void updateCheckerActivity()
Definition:
OnlineAccessibilityCheck.cxx:178
sw::OnlineAccessibilityCheck::clearAccessibilityIssuesFromAllNodes
void clearAccessibilityIssuesFromAllNodes()
Definition:
OnlineAccessibilityCheck.cxx:278
sw::OnlineAccessibilityCheck::getNumberOfAccessibilityIssues
sal_Int32 getNumberOfAccessibilityIssues()
Definition:
OnlineAccessibilityCheck.hxx:72
sw::OnlineAccessibilityCheck::OnlineAccessibilityCheck
OnlineAccessibilityCheck(SwDoc &rDocument)
Definition:
OnlineAccessibilityCheck.cxx:69
sw::OnlineAccessibilityCheck::m_pDocumentAccessibilityIssues
std::unique_ptr< sfx::AccessibilityIssueCollection > m_pDocumentAccessibilityIssues
Definition:
OnlineAccessibilityCheck.hxx:56
sw::OnlineAccessibilityCheck::m_bOnlineCheckStatus
bool m_bOnlineCheckStatus
Definition:
OnlineAccessibilityCheck.hxx:55
sw::OnlineAccessibilityCheck::m_aNodes
std::map< SwNode *, std::unique_ptr< WeakNodeContainer > > m_aNodes
Definition:
OnlineAccessibilityCheck.hxx:47
sw::OnlineAccessibilityCheck::m_aAccessibilityCheck
sw::AccessibilityCheck m_aAccessibilityCheck
Definition:
OnlineAccessibilityCheck.hxx:50
sw::OnlineAccessibilityCheck::updateStatusbar
void updateStatusbar()
Definition:
OnlineAccessibilityCheck.cxx:118
sw::OnlineAccessibilityCheck::updateNodeStatus
void updateNodeStatus(SwNode *pContentNode)
Definition:
OnlineAccessibilityCheck.cxx:82
sw::OnlineAccessibilityCheck::m_nPreviousNodeIndex
SwNodeOffset m_nPreviousNodeIndex
Definition:
OnlineAccessibilityCheck.hxx:52
sw::OnlineAccessibilityCheck::lookForPreviousNodeAndUpdate
void lookForPreviousNodeAndUpdate(SwPosition const &rNewPos)
Definition:
OnlineAccessibilityCheck.cxx:218
sw::OnlineAccessibilityCheck::m_pPreviousNode
std::unique_ptr< WeakNodeContainer > m_pPreviousNode
Definition:
OnlineAccessibilityCheck.hxx:51
sw::OnlineAccessibilityCheck::m_rDocument
SwDoc & m_rDocument
Definition:
OnlineAccessibilityCheck.hxx:49
sw::OnlineAccessibilityCheck::runAccessibilityCheck
void runAccessibilityCheck(SwNode *pNode)
Definition:
OnlineAccessibilityCheck.cxx:127
sw::OnlineAccessibilityCheck::m_bInitialCheck
bool m_bInitialCheck
Definition:
OnlineAccessibilityCheck.hxx:54
sw::WeakNodeContainer
Contains the node and tracks if the node gets deleted.
Definition:
OnlineAccessibilityCheck.hxx:28
sw::WeakNodeContainer::WeakNodeContainer
WeakNodeContainer(SwNode *pNode)
Definition:
OnlineAccessibilityCheck.cxx:33
sw::WeakNodeContainer::~WeakNodeContainer
~WeakNodeContainer()
Definition:
OnlineAccessibilityCheck.cxx:51
sw::WeakNodeContainer::m_pNode
SwNode * m_pNode
Definition:
OnlineAccessibilityCheck.hxx:30
sw::WeakNodeContainer::isAlive
bool isAlive()
Is the node still alive or it was deleted?
Definition:
OnlineAccessibilityCheck.cxx:53
sw::WeakNodeContainer::getNode
SwNode * getNode()
Returns the pointer of the node or nullptr if the node got deleted.
Definition:
OnlineAccessibilityCheck.cxx:62
listener.hxx
sw
Dialog to specify the properties of date form field.
Definition:
AccessibilityCheck.cxx:48
ndindex.hxx
ndtxt.hxx
SwPosition
Marks a position in the document model.
Definition:
pam.hxx:38
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset >
timer.hxx
Generated on Sun Jul 30 2023 04:28:02 for LibreOffice Module sw (master) by
1.9.3