summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/SpellCheckerFactory.cpp')
-rw-r--r--SwifTools/SpellCheckerFactory.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/SwifTools/SpellCheckerFactory.cpp b/SwifTools/SpellCheckerFactory.cpp
index 9ec1151..9ac33cd 100644
--- a/SwifTools/SpellCheckerFactory.cpp
+++ b/SwifTools/SpellCheckerFactory.cpp
@@ -10,8 +10,6 @@
#ifdef HAVE_HUNSPELL
#include <hunspell/hunspell.hxx>
-#else
-#define HAVE_NO_SPELL_CHECK
#endif
namespace Swift {
@@ -19,14 +17,12 @@ namespace Swift {
SpellCheckerFactory::SpellCheckerFactory() {
}
-SpellChecker* SpellCheckerFactory::createSpellChecker() {
+SpellChecker* SpellCheckerFactory::createSpellChecker(const char* affixPath, const char* dictPath) {
#ifdef HAVE_HUNSPELL
- //TODO(vladv): Do something smart about finding available dictionaries,
- // maybe a UI button to select language from available dictionaries?
- const char* dictPath = "/usr/share/hunspell/en_US.dic";
- const char* affixPath = "/usr/share/hunspell/en_US.aff";
+ std::cout << affixPath << std::endl << dictPath << std::endl;
return new HunspellChecker(affixPath, dictPath);
#endif
+ return NULL;
}
}