X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Faspell.C;h=f9caa75233a690270ba6c0259b50f89d9f8a69e1;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=84fb21036994a8b56b3f955f0f790abbcd2ec97d;hpb=1b264d6f7dd66d3824c2dd4649cf5b0cd2e3fe48;p=lyx.git diff --git a/src/aspell.C b/src/aspell.C index 84fb210369..f9caa75233 100644 --- a/src/aspell.C +++ b/src/aspell.C @@ -11,8 +11,6 @@ #include -#ifdef USE_ASPELL - #include "debug.h" #include @@ -24,6 +22,7 @@ using std::string; +namespace lyx { ASpell::ASpell(BufferParams const &, string const & lang) : els(0), spell_error_object(0) @@ -134,15 +133,16 @@ string const ASpell::nextMiss() } -string const ASpell::error() +docstring const ASpell::error() { char const * err = 0; - + if (spell_error_object && aspell_error_number(spell_error_object) != 0) { err = aspell_error_message(spell_error_object); } - return (err ? err : ""); + return (err ? from_utf8(err) : docstring()); } -#endif // USE_ASPELL + +} // namespace lyx