Revert "tdf#110987: type detection, binary Office formats > templates"
[LibreOffice.git] / sc / inc / spellcheckcontext.hxx
blob42ec80389af24ecc54a0e512220f7d713015162f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_SC_INC_SPELLCHECKCONTEXT_HXX
11 #define INCLUDED_SC_INC_SPELLCHECKCONTEXT_HXX
13 #include <editeng/misspellrange.hxx>
14 #include "types.hxx"
16 #include <unordered_map>
17 #include <vector>
19 namespace sc {
21 struct SpellCheckContext
23 struct CellPos
25 struct Hash
27 size_t operator() (const CellPos& rPos) const;
30 SCCOL mnCol;
31 SCROW mnRow;
33 CellPos();
34 CellPos(SCCOL nCol, SCROW nRow);
36 void setInvalid();
37 bool isValid() const;
38 void reset();
40 bool operator== (const CellPos& r) const;
43 typedef std::unordered_map<CellPos, std::vector<editeng::MisspellRanges>, CellPos::Hash> CellMapType;
45 CellPos maPos;
46 CellMapType maMisspellCells;
48 SpellCheckContext();
50 bool isMisspelled( SCCOL nCol, SCROW nRow ) const;
51 const std::vector<editeng::MisspellRanges>* getMisspellRanges( SCCOL nCol, SCROW nRow ) const;
52 void setMisspellRanges( SCCOL nCol, SCROW nRow, const std::vector<editeng::MisspellRanges>* pRanges );
54 void reset();
59 #endif
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */