spellcheck_hunspell.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // This file is part of Desktop App Toolkit,
  2. // a set of libraries for developing nice desktop applications.
  3. //
  4. // For license and copyright information please follow this link:
  5. // https://github.com/desktop-app/legal/blob/master/LEGAL
  6. //
  7. #include "spellcheck/third_party/spellcheck_hunspell.h"
  8. #include "spellcheck/third_party/hunspell_controller.h"
  9. namespace Platform::Spellchecker {
  10. void Init() {
  11. }
  12. std::vector<QString> ActiveLanguages() {
  13. return ThirdParty::ActiveLanguages();
  14. }
  15. bool CheckSpelling(const QString &wordToCheck) {
  16. return ThirdParty::CheckSpelling(wordToCheck);
  17. }
  18. void FillSuggestionList(
  19. const QString &wrongWord,
  20. std::vector<QString> *variants) {
  21. ThirdParty::FillSuggestionList(wrongWord, variants);
  22. }
  23. void AddWord(const QString &word) {
  24. ThirdParty::AddWord(word);
  25. }
  26. void RemoveWord(const QString &word) {
  27. ThirdParty::RemoveWord(word);
  28. }
  29. void IgnoreWord(const QString &word) {
  30. ThirdParty::IgnoreWord(word);
  31. }
  32. bool IsWordInDictionary(const QString &wordToCheck) {
  33. return ThirdParty::IsWordInDictionary(wordToCheck);
  34. }
  35. void CheckSpellingText(
  36. const QString &text,
  37. MisspelledWords *misspelledWords) {
  38. ThirdParty::CheckSpellingText(text, misspelledWords);
  39. }
  40. bool IsSystemSpellchecker() {
  41. return false;
  42. }
  43. void UpdateLanguages(std::vector<int> languages) {
  44. ThirdParty::UpdateLanguages(languages);
  45. }
  46. } // namespace Platform::Spellchecker