X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyX.cpp;h=8c9fdbcb02b8433ded8909e5329bb3139bf11997;hb=b436a03b3468dd15b27ee1c35e09d79b49192996;hp=6d8a98a952b0a254c8b8ef2833c8e328c475cba8;hpb=869b84aef9dbec9c90ba4483db0b28a3fb92b947;p=lyx.git diff --git a/src/LyX.cpp b/src/LyX.cpp index 6d8a98a952..8c9fdbcb02 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -138,11 +138,10 @@ void reconfigureUserLyXDir() } // namespace anon /// The main application class private implementation. -struct LyX::Impl -{ - Impl() : latexfonts_(0), spell_checker_(0), apple_spell_checker_(0), aspell_checker_(0), enchant_checker_(0), hunspell_checker_(0) - { - } +struct LyX::Impl { + Impl() + : latexfonts_(0), spell_checker_(0), apple_spell_checker_(0), aspell_checker_(0), enchant_checker_(0), hunspell_checker_(0) + {} ~Impl() { @@ -205,6 +204,7 @@ struct LyX::Impl SpellChecker * hunspell_checker_; }; + /// frontend::Application * theApp() { @@ -871,7 +871,7 @@ void emergencyCleanup() static bool needsUpdate(string const & file) { // We cannot initialize configure_script directly because the package - // is not initialized yet when static objects are constructed. + // is not initialized yet when static objects are constructed. static FileName configure_script; static bool firstrun = true; if (firstrun) { @@ -997,8 +997,8 @@ typedef boost::function cmd_helpe int parse_dbg(string const & arg, string const &, string &) { if (arg.empty()) { - lyxerr << to_utf8(_("List of supported debug flags:")) << endl; - Debug::showTags(lyxerr); + cout << to_utf8(_("List of supported debug flags:")) << endl; + Debug::showTags(cout); exit(0); } lyxerr << to_utf8(bformat(_("Setting debug level to %1$s"), from_utf8(arg))) << endl; @@ -1011,7 +1011,7 @@ int parse_dbg(string const & arg, string const &, string &) int parse_help(string const &, string const &, string &) { - lyxerr << + cout << to_utf8(_("Usage: lyx [ command line switches ] [ name.lyx ... ]\n" "Command line switches (case sensitive):\n" "\t-help summarize LyX usage\n" @@ -1024,8 +1024,8 @@ int parse_help(string const &, string const &, string &) "\t-x [--execute] command\n" " where command is a lyx command.\n" "\t-e [--export] fmt\n" - " where fmt is the export format of choice.\n" - " Look on Tools->Preferences->File formats->Format\n" + " where fmt is the export format of choice. Look in\n" + " Tools->Preferences->File Handling->File Formats->Short Name\n" " to get an idea which parameters should be passed.\n" " Note that the order of -e and -x switches matters.\n" "\t-E [--export-to] fmt filename\n" @@ -1054,11 +1054,11 @@ int parse_help(string const &, string const &, string &) int parse_version(string const &, string const &, string &) { - lyxerr << "LyX " << lyx_version + cout << "LyX " << lyx_version << " (" << lyx_release_date << ")" << endl; - lyxerr << "Built on " << __DATE__ << ", " << __TIME__ << endl; + cout << "Built on " << __DATE__ << ", " << __TIME__ << endl; - lyxerr << lyx_version_info << endl; + cout << lyx_version_info << endl; exit(0); return 0; } @@ -1424,7 +1424,7 @@ void setSpellChecker() if (lyxrc.spellchecker == "native") { #if defined(USE_MACOSX_PACKAGING) if (!singleton_->pimpl_->apple_spell_checker_) - singleton_->pimpl_->apple_spell_checker_ = new AppleSpellChecker(); + singleton_->pimpl_->apple_spell_checker_ = new AppleSpellChecker; singleton_->pimpl_->spell_checker_ = singleton_->pimpl_->apple_spell_checker_; #else singleton_->pimpl_->spell_checker_ = 0; @@ -1432,7 +1432,7 @@ void setSpellChecker() } else if (lyxrc.spellchecker == "aspell") { #if defined(USE_ASPELL) if (!singleton_->pimpl_->aspell_checker_) - singleton_->pimpl_->aspell_checker_ = new AspellChecker(); + singleton_->pimpl_->aspell_checker_ = new AspellChecker; singleton_->pimpl_->spell_checker_ = singleton_->pimpl_->aspell_checker_; #else singleton_->pimpl_->spell_checker_ = 0; @@ -1440,7 +1440,7 @@ void setSpellChecker() } else if (lyxrc.spellchecker == "enchant") { #if defined(USE_ENCHANT) if (!singleton_->pimpl_->enchant_checker_) - singleton_->pimpl_->enchant_checker_ = new EnchantChecker(); + singleton_->pimpl_->enchant_checker_ = new EnchantChecker; singleton_->pimpl_->spell_checker_ = singleton_->pimpl_->enchant_checker_; #else singleton_->pimpl_->spell_checker_ = 0; @@ -1448,7 +1448,7 @@ void setSpellChecker() } else if (lyxrc.spellchecker == "hunspell") { #if defined(USE_HUNSPELL) if (!singleton_->pimpl_->hunspell_checker_) - singleton_->pimpl_->hunspell_checker_ = new HunspellChecker(); + singleton_->pimpl_->hunspell_checker_ = new HunspellChecker; singleton_->pimpl_->spell_checker_ = singleton_->pimpl_->hunspell_checker_; #else singleton_->pimpl_->spell_checker_ = 0;