From: Abdelrazak Younes Date: Mon, 26 Feb 2007 12:46:44 +0000 (+0000) Subject: Fix support lib dependency problem. X-Git-Tag: 1.6.10~10668 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=85f66bcd908477d5b55e36fde6a85359cae84ba6;p=features.git Fix support lib dependency problem. * docstring.C: Implement utf8ToUcs4() locally. * all other files: remove utf8ToUcs4(). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17361 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/client/client.C b/src/client/client.C index b4dc9ab435..553c0ca6a2 100644 --- a/src/client/client.C +++ b/src/client/client.C @@ -70,13 +70,6 @@ using std::cin; using std::endl; -IconvProcessor & utf8ToUcs4() -{ - static IconvProcessor iconv(ucs4_codeset, "UTF-8"); - return iconv; -} - - namespace support { string itoa(unsigned int i) diff --git a/src/lyx_main.C b/src/lyx_main.C index d9291ae68c..b881f3d78f 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -58,7 +58,6 @@ #include "support/package.h" #include "support/path.h" #include "support/systemcall.h" -#include "support/unicode.h" #include #include @@ -150,7 +149,7 @@ void reconfigureUserLyXDir() /// The main application class private implementation. struct LyX::Singletons { - Singletons(): iconv(ucs4_codeset, "UTF-8") + Singletons() { // Set the default User Interface language as soon as possible. // The language used will be derived from the environment @@ -172,9 +171,6 @@ struct LyX::Singletons /// lyx session, containing lastfiles, lastfilepos, and lastopened boost::scoped_ptr session_; - /// - IconvProcessor iconv; - /// Files to load at start. vector files_to_load_; @@ -331,12 +327,6 @@ Converters & LyX::systemConverters() } -IconvProcessor & LyX::iconvProcessor() -{ - return pimpl_->iconv; -} - - kb_keymap const & LyX::topLevelKeymap() const { BOOST_ASSERT(pimpl_->toplevel_keymap_.get()); @@ -1533,12 +1523,6 @@ Movers & theSystemMovers() } -IconvProcessor & utf8ToUcs4() -{ - return LyX::ref().iconvProcessor(); -} - - Messages & getMessages(std::string const & language) { return LyX::ref().getMessages(language); diff --git a/src/lyx_main.h b/src/lyx_main.h index 6c53bc6a01..71d8e8370a 100644 --- a/src/lyx_main.h +++ b/src/lyx_main.h @@ -25,7 +25,6 @@ class Buffer; class BufferList; class Converters; class ErrorItem; -class IconvProcessor; class InsetBase; class LyXFunc; class LyXServer; @@ -93,8 +92,6 @@ public: void setGuiLanguage(std::string const & language); /// - IconvProcessor & iconvProcessor(); - LyXView * newLyXView(); /** redraw \c inset in all the BufferViews in which it is currently diff --git a/src/support/docstring.C b/src/support/docstring.C index a50f3a2b94..89abf21299 100644 --- a/src/support/docstring.C +++ b/src/support/docstring.C @@ -58,6 +58,14 @@ std::string const to_ascii(docstring const & ucs4) } +IconvProcessor & utf8ToUcs4() +{ + static IconvProcessor iconv(ucs4_codeset, "UTF-8"); + return iconv; +} + + + void utf8_to_ucs4(std::string const & utf8, docstring & ucs4) { size_t n = utf8.size(); diff --git a/src/support/unicode.h b/src/support/unicode.h index 16c4e00a03..5137e8e663 100644 --- a/src/support/unicode.h +++ b/src/support/unicode.h @@ -56,10 +56,6 @@ private: boost::scoped_ptr pimpl_; }; -/// This is implemented in lyx_main.C for the LyX program -/// and in client.C for the LyX client program. -extern IconvProcessor & utf8ToUcs4(); - // A single codepoint conversion for utf8_to_ucs4 does not make // sense, so that function is left out. diff --git a/src/tex2lyx/tex2lyx.C b/src/tex2lyx/tex2lyx.C index 0f0c45fc90..77992733d0 100644 --- a/src/tex2lyx/tex2lyx.C +++ b/src/tex2lyx/tex2lyx.C @@ -69,13 +69,6 @@ using support::isFileReadable; namespace fs = boost::filesystem; -IconvProcessor & utf8ToUcs4() -{ - static IconvProcessor iconv(ucs4_codeset, "UTF-8"); - return iconv; -} - - // Hacks to allow the thing to link in the lyxlayout stuff LyXErr lyxerr(std::cerr.rdbuf());