1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #ifndef INCLUDED_SC_INC_SPELLCHECKCONTEXT_HXX
11 #define INCLUDED_SC_INC_SPELLCHECKCONTEXT_HXX
13 #include <i18nlangtag/lang.h>
14 #include <editeng/misspellrange.hxx>
21 class ScTabEditEngine
;
26 * Class shared between grid windows to cache
29 class SpellCheckContext
31 class SpellCheckCache
;
32 struct SpellCheckStatus
;
33 struct SpellCheckResult
;
35 std::unique_ptr
<SpellCheckCache
> mpCache
;
36 std::unique_ptr
<SpellCheckResult
> mpResult
;
38 std::unique_ptr
<ScTabEditEngine
> mpEngine
;
39 std::unique_ptr
<SpellCheckStatus
> mpStatus
;
41 LanguageType meLanguage
;
44 SpellCheckContext(ScDocument
* pDocument
, SCTAB nTab
);
48 bool isMisspelled(SCCOL nCol
, SCROW nRow
) const;
49 const std::vector
<editeng::MisspellRanges
>* getMisspellRanges(SCCOL nCol
, SCROW nRow
) const;
50 void setMisspellRanges(SCCOL nCol
, SCROW nRow
,
51 const std::vector
<editeng::MisspellRanges
>* pRanges
);
54 void resetForContentChange();
55 void setTabNo(SCTAB nTab
);
58 void ensureResults(SCCOL nCol
, SCROW nRow
);
59 void resetCache(bool bContentChangeOnly
= false);
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */