]> git.lyx.org Git - features.git/commitdiff
more de-boostification
authorAndré Pönitz <poenitz@gmx.net>
Wed, 7 Nov 2007 20:14:30 +0000 (20:14 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 7 Nov 2007 20:14:30 +0000 (20:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21493 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyX.cpp
src/LyX.h
src/insets/MailInset.cpp

index 829202e54c656e8d3a7d0e12125f0dd529d3026b..5ebe36d109d07dc7bec9fc93561ee17ae423cfe2 100644 (file)
@@ -63,6 +63,7 @@
 #include "support/Systemcall.h"
 
 #include <boost/bind.hpp>
+#include <boost/scoped_ptr.hpp>
 
 #include <algorithm>
 #include <iostream>
@@ -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);
 
index 76f9d59fe3e1399e5c970c021004a92d733e05d9..055c3583ac07f2de9a1d690923c1af05bc2236c6 100644 (file)
--- a/src/LyX.h
+++ b/src/LyX.h
@@ -14,9 +14,6 @@
 #ifndef LYX_H
 #define LYX_H
 
-#include <boost/scoped_ptr.hpp>
-#include <boost/noncopyable.hpp>
-
 #include <string>
 
 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<Singletons> pimpl_;
+       Singletons * pimpl_;
 
        friend Movers & theMovers();
        friend Mover const & getMover(std::string  const & fmt);
index d5a7a5bf1a26488f02068e4ac32e75d2bc3c1682..3babfeaa1e096ab1f1bd795b8b0e52cafde69f86 100644 (file)
@@ -16,6 +16,8 @@
 #include "debug.h"
 #include "LyX.h"
 
+#include <boost/assert.hpp>
+
 
 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());
 }