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/.
13 #include <sal/types.h>
14 #include <rtl/ustring.hxx>
16 #include <editeng/editengdllapi.h>
23 static const int LATIN_ARRAY_SIZE
= 26;
25 sal_Unicode mCharacter
;
27 std::vector
<TrieNode
*> mChildren
;
28 TrieNode
* mLatinArray
[LATIN_ARRAY_SIZE
];
31 TrieNode(sal_Unicode aCharacter
= '\0');
35 TrieNode
* findChild(sal_Unicode aCharacter
);
36 TrieNode
* traversePath(OUString sPath
);
37 void addNewChild(TrieNode
* pChild
);
38 void collectSuggestions(OUString sPath
, std::vector
<OUString
>& rSuggestionList
);
41 class EDITENG_DLLPUBLIC Trie
50 void insert(OUString sInputString
) const;
51 void findSuggestions(OUString sWordPart
, std::vector
<OUString
>& rSuggesstionList
) const;
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */