LibreOffice Module sw (master)
1
sw
inc
GrammarContact.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
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
20
#pragma once
21
22
#include <
SwGrammarMarkUp.hxx
>
23
#include <
svl/listener.hxx
>
24
#include <
vcl/timer.hxx
>
25
26
struct
SwPosition
;
27
class
SwTextNode
;
28
29
namespace
sw
30
{
42
class
GrammarContact
final :
public
SvtListener
43
{
44
Timer
m_aTimer
;
45
std::unique_ptr<SwGrammarMarkUp>
m_pProxyList
;
46
bool
m_isFinished
;
47
SwTextNode
*
m_pTextNode
;
48
DECL_LINK
(TimerRepaint,
Timer
*,
void
);
49
50
public
:
51
GrammarContact
();
52
~GrammarContact
() {
m_aTimer
.
Stop
(); }
53
60
void
updateCursorPosition
(
const
SwPosition
& rNewPos);
61
67
SwGrammarMarkUp
*
getGrammarCheck
(
SwTextNode
& rTextNode,
bool
bCreate);
68
75
void
finishGrammarCheck
(
SwTextNode
& rTextNode);
76
77
void
CheckBroadcaster
();
78
};
79
80
/* Helper functions */
81
85
GrammarContact*
getGrammarContactFor
(
const
SwTextNode
&);
86
90
void
finishGrammarCheckFor
(
SwTextNode
&);
91
92
}
// end sw
93
94
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwGrammarMarkUp.hxx
SvtListener
SwGrammarMarkUp
Definition:
SwGrammarMarkUp.hxx:37
SwTextNode
SwTextNode is a paragraph in the document model.
Definition:
ndtxt.hxx:112
Task::Stop
void Stop()
Timer
sw::GrammarContact
This class is responsible for the delayed display of grammar checks when a paragraph is edited It's a...
Definition:
GrammarContact.hxx:43
sw::GrammarContact::~GrammarContact
~GrammarContact()
Definition:
GrammarContact.hxx:52
sw::GrammarContact::m_pTextNode
SwTextNode * m_pTextNode
Definition:
GrammarContact.hxx:47
sw::GrammarContact::m_pProxyList
std::unique_ptr< SwGrammarMarkUp > m_pProxyList
Definition:
GrammarContact.hxx:45
sw::GrammarContact::m_aTimer
Timer m_aTimer
Definition:
GrammarContact.hxx:44
sw::GrammarContact::getGrammarCheck
SwGrammarMarkUp * getGrammarCheck(SwTextNode &rTextNode, bool bCreate)
getGrammarCheck checks if the given text node is blocked by the current cursor if not,...
Definition:
GrammarContact.cxx:87
sw::GrammarContact::DECL_LINK
DECL_LINK(TimerRepaint, Timer *, void)
sw::GrammarContact::updateCursorPosition
void updateCursorPosition(const SwPosition &rNewPos)
Update cursor position reacts to a change of the current input cursor As long as the cursor in inside...
Definition:
GrammarContact.cxx:61
sw::GrammarContact::GrammarContact
GrammarContact()
Definition:
GrammarContact.cxx:29
sw::GrammarContact::m_isFinished
bool m_isFinished
Definition:
GrammarContact.hxx:46
sw::GrammarContact::finishGrammarCheck
void finishGrammarCheck(SwTextNode &rTextNode)
finishGrammarCheck() has to be called if a grammar checking has been completed for a text node.
Definition:
GrammarContact.cxx:127
sw::GrammarContact::CheckBroadcaster
void CheckBroadcaster()
Definition:
GrammarContact.cxx:38
listener.hxx
sw
Dialog to specify the properties of date form field.
Definition:
AccessibilityCheck.cxx:48
sw::getGrammarContactFor
sw::GrammarContact * getGrammarContactFor(const SwTextNode &rTextNode)
getGrammarContact() delivers the grammar contact of the document (for a given textnode)
Definition:
GrammarContact.cxx:147
sw::finishGrammarCheckFor
void finishGrammarCheckFor(SwTextNode &rTextNode)
finishGrammarCheck() calls the same function of the grammar contact of the document (for a given text...
Definition:
GrammarContact.cxx:155
SwPosition
Marks a position in the document model.
Definition:
pam.hxx:38
timer.hxx
Generated on Sun Jul 30 2023 04:28:00 for LibreOffice Module sw (master) by
1.9.3