more de-boostification

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21493 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-11-07 20:14:30 +00:00
parent cf7b238479
commit b55a179d51
3 changed files with 26 additions and 14 deletions

View 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);

View File

@ -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);

View 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());
}