X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FISpell.cpp;h=bd772685c7b9fc8dbc70ae94099d41e93eab70d4;hb=ea6aed5b8bf38366aaa1eb15ce1b9f13de76987f;hp=d89814ac02b8bd437ba302fcc4d580bff2ae4308;hpb=f630be890494c849981e4fb52ea4740506e92bed;p=lyx.git diff --git a/src/ISpell.cpp b/src/ISpell.cpp index d89814ac02..bd772685c7 100644 --- a/src/ISpell.cpp +++ b/src/ISpell.cpp @@ -15,14 +15,14 @@ #include "ISpell.h" #include "BufferParams.h" -#include "debug.h" #include "Encoding.h" -#include "gettext.h" #include "Language.h" #include "LyXRC.h" #include "WordLangTuple.h" -#include "support/forkedcall.h" +#include "support/debug.h" +#include "support/gettext.h" +#include "support/ForkedCalls.h" #include "support/lstrings.h" #include "support/unicode.h" @@ -34,28 +34,17 @@ # include #endif - -namespace lyx { - -using support::bformat; - using boost::shared_ptr; -#ifndef CXX_GLOBAL_CSTD -using std::strcpy; -using std::strlen; -using std::strpbrk; -#endif - -using std::endl; -using std::max; -using std::string; +using namespace std; +using namespace lyx::support; +namespace lyx { namespace { -class LaunchIspell : public support::ForkedProcess { - typedef support::ForkedProcess ForkedProcess; +class LaunchIspell : public ForkedProcess +{ public: /// LaunchIspell(BufferParams const & p, string const & l, @@ -195,7 +184,7 @@ int LaunchIspell::generateChild() string const to_iconv_encoding(docstring const & s, string const & encoding) { if (lyxrc.isp_use_input_encoding) { - std::vector const encoded = + vector const encoded = ucs4_to_eightbit(s.data(), s.length(), encoding); return string(encoded.begin(), encoded.end()); } @@ -207,7 +196,7 @@ string const to_iconv_encoding(docstring const & s, string const & encoding) docstring const from_iconv_encoding(string const & s, string const & encoding) { if (lyxrc.isp_use_input_encoding) { - std::vector const ucs4 = + vector const ucs4 = eightbit_to_ucs4(s.data(), s.length(), encoding); return docstring(ucs4.begin(), ucs4.end()); } @@ -221,7 +210,7 @@ docstring const from_iconv_encoding(string const & s, string const & encoding) ISpell::ISpell(BufferParams const & params, string const & lang) : in(0), out(0), inerr(0), str(0) { - LYXERR(Debug::GUI) << "Created ispell" << endl; + //LYXERR(Debug::GUI, "Created ispell"); encoding = params.encoding().iconvName(); @@ -315,7 +304,7 @@ ISpell::ISpell(BufferParams const & params, string const & lang) ISpell::~ISpell() { - LYXERR(Debug::GUI) << "Killing ispell" << endl; + //LYXERR(Debug::GUI, "Killing ispell"); if (in) fclose(in);