summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools')
-rw-r--r--SwifTools/SpellCheckerFactory.cpp10
-rw-r--r--SwifTools/SpellCheckerFactory.h2
2 files changed, 4 insertions, 8 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;
}
}
diff --git a/SwifTools/SpellCheckerFactory.h b/SwifTools/SpellCheckerFactory.h
index 23f89b8..85aa8b6 100644
--- a/SwifTools/SpellCheckerFactory.h
+++ b/SwifTools/SpellCheckerFactory.h
@@ -13,6 +13,6 @@ namespace Swift {
class SpellCheckerFactory {
public:
SpellCheckerFactory();
- SpellChecker* createSpellChecker();
+ SpellChecker* createSpellChecker(const char* affixPath, const char* dictPath);
};
}