From b55a179d51dc7d7715e14fb7cfb033b2f76051cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Wed, 7 Nov 2007 20:14:30 +0000 Subject: [PATCH] more de-boostification git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21493 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyX.cpp | 24 +++++++++++++++++------- src/LyX.h | 11 ++++++----- src/insets/MailInset.cpp | 5 +++-- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/LyX.cpp b/src/LyX.cpp index 829202e54c..5ebe36d109 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -63,6 +63,7 @@ #include "support/Systemcall.h" #include +#include #include #include @@ -107,10 +108,9 @@ namespace os = support::os; -/// are we using the GUI at all? -/** -* We default to true and this is changed to false when the export feature is used. -*/ +// Are we using the GUI at all? We default to true and this is changed +// to false when the export feature is used. + bool use_gui = true; bool quitting; // flag, that we are quitting the program @@ -206,6 +206,7 @@ frontend::Application * theApp() LyX::~LyX() { + delete pimpl_; } @@ -227,7 +228,7 @@ LyX::LyX() : first_start(false) { singleton_ = this; - pimpl_.reset(new Singletons); + pimpl_ = new Singletons; } @@ -1339,6 +1340,7 @@ int parse_help(string const &, string const &) return 0; } + int parse_version(string const &, string const &) { lyxerr << "LyX " << lyx_version @@ -1350,6 +1352,7 @@ int parse_version(string const &, string const &) return 0; } + int parse_sysdir(string const & arg, string const &) { if (arg.empty()) { @@ -1361,6 +1364,7 @@ int parse_sysdir(string const & arg, string const &) return 1; } + int parse_userdir(string const & arg, string const &) { if (arg.empty()) { @@ -1372,6 +1376,7 @@ int parse_userdir(string const & arg, string const &) return 1; } + int parse_execute(string const & arg, string const &) { if (arg.empty()) { @@ -1383,6 +1388,7 @@ int parse_execute(string const & arg, string const &) return 1; } + int parse_export(string const & type, string const &) { if (type.empty()) { @@ -1395,6 +1401,7 @@ int parse_export(string const & type, string const &) return 1; } + int parse_import(string const & type, string const & file) { if (type.empty()) { @@ -1411,6 +1418,7 @@ int parse_import(string const & type, string const & file) return 2; } + int parse_geometry(string const & arg1, string const &) { geometryArg = arg1; @@ -1454,8 +1462,10 @@ void LyX::easyParse(int & argc, char * argv[]) if (it == cmdmap.end()) continue; - string const arg((i + 1 < argc) ? to_utf8(from_local8bit(argv[i + 1])) : string()); - string const arg2((i + 2 < argc) ? to_utf8(from_local8bit(argv[i + 2])) : string()); + string const arg = + (i + 1 < argc) ? to_utf8(from_local8bit(argv[i + 1])) : string(); + string const arg2 = + (i + 2 < argc) ? to_utf8(from_local8bit(argv[i + 2])) : string(); int const remove = 1 + it->second(arg, arg2); diff --git a/src/LyX.h b/src/LyX.h index 76f9d59fe3..055c3583ac 100644 --- a/src/LyX.h +++ b/src/LyX.h @@ -14,9 +14,6 @@ #ifndef LYX_H #define LYX_H -#include -#include - #include namespace lyx { @@ -48,7 +45,7 @@ class LyXView; } /// initial startup -class LyX : boost::noncopyable { +class LyX { public: LyX(); @@ -118,6 +115,10 @@ public: void addFileToLoad(support::FileName const &); private: + /// noncopyable + LyX(LyX const &); + void operator=(LyX const &); + /// Do some cleanup in preparation of an exit. void prepareExit(); @@ -176,7 +177,7 @@ private: /// Use the Pimpl idiom to hide the internals. struct Singletons; - boost::scoped_ptr pimpl_; + Singletons * pimpl_; friend Movers & theMovers(); friend Mover const & getMover(std::string const & fmt); diff --git a/src/insets/MailInset.cpp b/src/insets/MailInset.cpp index d5a7a5bf1a..3babfeaa1e 100644 --- a/src/insets/MailInset.cpp +++ b/src/insets/MailInset.cpp @@ -16,6 +16,8 @@ #include "debug.h" #include "LyX.h" +#include + namespace lyx { @@ -25,8 +27,7 @@ using std::string; void MailInset::showDialog(BufferView * bv) const { BOOST_ASSERT(bv); - bv->showInsetDialog(name(), inset2string(bv->buffer()), - &inset()); + bv->showInsetDialog(name(), inset2string(bv->buffer()), &inset()); } -- 2.39.2