summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2013-03-25 22:12:52 (GMT)
committerTobias Markmann <tm@ayena.de>2013-03-26 22:31:39 (GMT)
commit20ead0a84fdd8c9e870e98ee6a2712bfa263d7fb (patch)
tree537b08f35ba08de612856d8376e171766212b98a /SwifTools/SpellCheckerFactory.cpp
parent99063cc6e9168bf88d6c245d1f8bac02bd898c3d (diff)
downloadswift-20ead0a84fdd8c9e870e98ee6a2712bfa263d7fb.zip
swift-20ead0a84fdd8c9e870e98ee6a2712bfa263d7fb.tar.bz2
Adding basic support for native spell checking on Mac OS X.
Change-Id: Id29313a06f052ecbaef54be0c185cd7f1df375a2 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'SwifTools/SpellCheckerFactory.cpp')
-rw-r--r--SwifTools/SpellCheckerFactory.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/SwifTools/SpellCheckerFactory.cpp b/SwifTools/SpellCheckerFactory.cpp
index 6061d78..d068d90 100644
--- a/SwifTools/SpellCheckerFactory.cpp
+++ b/SwifTools/SpellCheckerFactory.cpp
@@ -9,9 +9,12 @@
#include <SwifTools/SpellChecker.h>
#include <SwifTools/HunspellChecker.h>
#include <SwifTools/SpellCheckerFactory.h>
+#include <Swiften/Base/Platform.h>
#ifdef HAVE_HUNSPELL
#include <hunspell/hunspell.hxx>
+#elif defined(SWIFTEN_PLATFORM_MACOSX)
+#include <SwifTools/MacOSXChecker.h>
#endif
namespace Swift {
@@ -27,6 +30,8 @@ SpellChecker* SpellCheckerFactory::createSpellChecker(const std::string& dictFil
return new HunspellChecker(affixFile.c_str(), dictFile.c_str());
}
// If dictionaries don't exist disable the checker
+#elif defined(SWIFTEN_PLATFORM_MACOSX)
+ return new MacOSXChecker();
#endif
return NULL;
}