more std declaration fixes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19104 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-07-17 17:46:54 +00:00
parent ada0bd00f0
commit 3e3955c4f3
25 changed files with 106 additions and 110 deletions

View File

@ -53,14 +53,15 @@
#include <limits> #include <limits>
#include <map> #include <map>
namespace lyx {
using std::string; using std::string;
using std::vector; using std::vector;
using std::endl; using std::endl;
using std::min; using std::min;
using std::for_each; using std::for_each;
namespace lyx {
namespace { namespace {
bool bool

View File

@ -26,11 +26,11 @@
#include <boost/assert.hpp> #include <boost/assert.hpp>
using std::endl;
namespace lyx { namespace lyx {
using std::endl;
CursorSlice::CursorSlice() CursorSlice::CursorSlice()
: inset_(0), idx_(0), pit_(0), pos_(0) : inset_(0), idx_(0), pit_(0), pos_(0)

View File

@ -25,19 +25,9 @@
#include <fstream> #include <fstream>
namespace lyx {
#ifndef CXX_GLOBAL_CSTD #ifndef CXX_GLOBAL_CSTD
using std::time; using std::time;
#endif #endif
using support::FileName;
using support::ltrim;
using support::onlyFilename;
using support::suffixIs;
using support::sum;
using std::endl; using std::endl;
using std::flush; using std::flush;
using std::getline; using std::getline;
@ -45,6 +35,15 @@ using std::string;
using std::ofstream; using std::ofstream;
using std::ifstream; using std::ifstream;
namespace lyx {
using support::FileName;
using support::ltrim;
using support::onlyFilename;
using support::suffixIs;
using support::sum;
inline inline
bool DepTable::dep_info::changed() const bool DepTable::dep_info::changed() const
{ {

View File

@ -26,11 +26,11 @@
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/current_function.hpp> #include <boost/current_function.hpp>
using std::endl;
namespace lyx { namespace lyx {
using std::endl;
// We could be able to get rid of this if only every BufferView were // We could be able to get rid of this if only every BufferView were
// associated to a buffer on construction. // associated to a buffer on construction.

View File

@ -25,19 +25,17 @@
#include <sstream> #include <sstream>
#ifndef CXX_GLOBAL_CSTD
using std::strtol;
#endif
using std::endl;
using std::string;
namespace lyx { namespace lyx {
using support::FileName; using support::FileName;
#ifndef CXX_GLOBAL_CSTD
using std::strtol;
#endif
using std::endl;
using std::string;
Encodings encodings; Encodings encodings;
namespace { namespace {

View File

@ -12,11 +12,11 @@
#include "ErrorList.h" #include "ErrorList.h"
using std::string;
namespace lyx { namespace lyx {
using std::string;
ErrorItem::ErrorItem(docstring const & error_, docstring const & description_, ErrorItem::ErrorItem(docstring const & error_, docstring const & description_,
int par_id_, pos_type pos_start_, pos_type pos_end_) int par_id_, pos_type pos_start_, pos_type pos_end_)
: error(error_), description(description_), par_id(par_id_), : error(error_), description(description_), par_id(par_id_),

View File

@ -36,6 +36,10 @@
#include <boost/filesystem/operations.hpp> #include <boost/filesystem/operations.hpp>
using std::find;
using std::string;
using std::vector;
namespace lyx { namespace lyx {
@ -51,10 +55,6 @@ using support::onlyPath;
using support::package; using support::package;
using support::prefixIs; using support::prefixIs;
using std::find;
using std::string;
using std::vector;
namespace Alert = frontend::Alert; namespace Alert = frontend::Alert;
namespace fs = boost::filesystem; namespace fs = boost::filesystem;

View File

@ -13,11 +13,11 @@
#include "FloatList.h" #include "FloatList.h"
#include "Floating.h" #include "Floating.h"
using std::string;
namespace lyx { namespace lyx {
using std::string;
// This class is now mostly finished, except one thing, it is a global // This class is now mostly finished, except one thing, it is a global
// object. This will not do. The user (and layout files) are free to // object. This will not do. The user (and layout files) are free to
// create floats and modify them to fit into a certain document. So it is // create floats and modify them to fit into a certain document. So it is

View File

@ -14,11 +14,11 @@
#include "Floating.h" #include "Floating.h"
using std::string;
namespace lyx { namespace lyx {
using std::string;
Floating::Floating() Floating::Floating()
{} {}

View File

@ -29,14 +29,6 @@
#include "support/lstrings.h" #include "support/lstrings.h"
namespace lyx {
using support::ascii_lowercase;
using support::bformat;
using support::rtrim;
using support::subst;
using std::endl; using std::endl;
using std::string; using std::string;
using std::ostream; using std::ostream;
@ -46,6 +38,14 @@ using std::pair;
using std::strlen; using std::strlen;
#endif #endif
namespace lyx {
using support::ascii_lowercase;
using support::bformat;
using support::rtrim;
using support::subst;
// //
// Names for the GUI // Names for the GUI
// //

View File

@ -28,6 +28,9 @@
#include <boost/filesystem/operations.hpp> #include <boost/filesystem/operations.hpp>
using std::string;
using std::distance;
namespace lyx { namespace lyx {
@ -44,9 +47,6 @@ using support::subst;
using support::Systemcall; using support::Systemcall;
using support::token; using support::token;
using std::string;
using std::distance;
namespace Alert = frontend::Alert; namespace Alert = frontend::Alert;
namespace fs = boost::filesystem; namespace fs = boost::filesystem;
namespace os = support::os; namespace os = support::os;

View File

@ -16,15 +16,15 @@
#include <sstream> #include <sstream>
#include <vector> #include <vector>
namespace lyx {
using std::getline; using std::getline;
using std::istringstream; using std::istringstream;
using std::vector; using std::vector;
using std::string; using std::string;
namespace lyx {
FuncRequest::FuncRequest(Origin o) FuncRequest::FuncRequest(Origin o)
: action(LFUN_NOACTION), origin(o), x(0), y(0), : action(LFUN_NOACTION), origin(o), x(0), y(0),
button_(mouse_button::none) button_(mouse_button::none)

View File

@ -15,14 +15,14 @@
#include <algorithm> #include <algorithm>
namespace lyx {
using std::vector; using std::vector;
using std::reverse; using std::reverse;
using std::fill; using std::fill;
namespace lyx {
int Graph::bfs_init(int s, bool clear_visited) int Graph::bfs_init(int s, bool clear_visited)
{ {
if (s < 0) if (s < 0)

View File

@ -34,11 +34,6 @@
# include <sys/time.h> # include <sys/time.h>
#endif #endif
namespace lyx {
using support::bformat;
using boost::shared_ptr; using boost::shared_ptr;
#ifndef CXX_GLOBAL_CSTD #ifndef CXX_GLOBAL_CSTD
@ -52,6 +47,10 @@ using std::max;
using std::string; using std::string;
namespace lyx {
using support::bformat;
namespace { namespace {
class LaunchIspell : public support::ForkedProcess { class LaunchIspell : public support::ForkedProcess {

View File

@ -27,6 +27,10 @@
#include "BufferView.h" #include "BufferView.h"
#include "buffer_funcs.h" #include "buffer_funcs.h"
using std::find;
using std::string;
using std::vector;
namespace lyx { namespace lyx {
@ -35,10 +39,6 @@ using support::changeExtension;
using support::FileName; using support::FileName;
using support::makeDisplayPath; using support::makeDisplayPath;
using std::find;
using std::string;
using std::vector;
bool Importer::Import(LyXView * lv, FileName const & filename, bool Importer::Import(LyXView * lv, FileName const & filename,
string const & format, ErrorList & errorList) string const & format, ErrorList & errorList)

View File

@ -20,13 +20,13 @@
#include "insets/InsetBranch.h" #include "insets/InsetBranch.h"
namespace lyx {
using std::endl; using std::endl;
using std::lower_bound; using std::lower_bound;
namespace lyx {
namespace { namespace {
typedef InsetList::InsetTable Table; typedef InsetList::InsetTable Table;

View File

@ -17,13 +17,12 @@
#include "debug.h" #include "debug.h"
#include "LyXRC.h" #include "LyXRC.h"
using std::endl;
namespace lyx { namespace lyx {
using std::endl;
Intl::Intl() Intl::Intl()
: keymap(Intl::PRIMARY), keymapon(lyxrc.use_kbmap), : keymap(Intl::PRIMARY), keymapon(lyxrc.use_kbmap),
prim_lang(lyxrc.primary_kbmap), sec_lang(lyxrc.secondary_kbmap) prim_lang(lyxrc.primary_kbmap), sec_lang(lyxrc.secondary_kbmap)

View File

@ -26,15 +26,15 @@
#include <sstream> #include <sstream>
using std::endl;
using std::string;
namespace lyx { namespace lyx {
using support::FileName; using support::FileName;
using support::i18nLibFileSearch; using support::i18nLibFileSearch;
using std::endl;
using std::string;
string const KeyMap::printKeySym(KeySymbol const & key, string const KeyMap::printKeySym(KeySymbol const & key,
key_modifier::state mod) key_modifier::state mod)

View File

@ -20,13 +20,13 @@
#include "frontends/KeySymbol.h" #include "frontends/KeySymbol.h"
namespace lyx {
using std::make_pair; using std::make_pair;
using std::string; using std::string;
namespace lyx {
FuncRequest const & FuncRequest const &
KeySequence::addkey(KeySymbolPtr key, KeySequence::addkey(KeySymbolPtr key,
key_modifier::state mod, key_modifier::state nmod) key_modifier::state mod, key_modifier::state nmod)

View File

@ -35,6 +35,20 @@
#include <fstream> #include <fstream>
using boost::regex;
using boost::smatch;
#ifndef CXX_GLOBAL_CSTD
using std::sscanf;
#endif
using std::endl;
using std::getline;
using std::string;
using std::ifstream;
using std::set;
using std::vector;
namespace lyx { namespace lyx {
@ -62,21 +76,6 @@ using support::trim;
namespace os = support::os; namespace os = support::os;
namespace fs = boost::filesystem; namespace fs = boost::filesystem;
using boost::regex;
using boost::smatch;
#ifndef CXX_GLOBAL_CSTD
using std::sscanf;
#endif
using std::endl;
using std::getline;
using std::string;
using std::ifstream;
using std::set;
using std::vector;
// TODO: in no particular order // TODO: in no particular order
// - get rid of the call to // - get rid of the call to
// BufferList::updateIncludedTeXfiles, this should either // BufferList::updateIncludedTeXfiles, this should either

View File

@ -31,13 +31,6 @@
#include "frontends/controllers/frontend_helpers.h" #include "frontends/controllers/frontend_helpers.h"
namespace lyx {
using support::isSGMLFilename;
using support::libFileSearch;
using support::makeRelPath;
using support::onlyPath;
using std::endl; using std::endl;
using std::find; using std::find;
using std::string; using std::string;
@ -46,6 +39,14 @@ using std::ostream;
using std::ostringstream; using std::ostringstream;
using std::set; using std::set;
namespace lyx {
using support::isSGMLFilename;
using support::libFileSearch;
using support::makeRelPath;
using support::onlyPath;
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
// //
// Strings // Strings

View File

@ -21,13 +21,13 @@
#include "support/FileName.h" #include "support/FileName.h"
namespace lyx {
using std::endl; using std::endl;
using std::string; using std::string;
namespace lyx {
Languages languages; Languages languages;
Language const * english_language; Language const * english_language;
Language const * default_language; Language const * default_language;

View File

@ -20,6 +20,10 @@
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
using std::setw;
using std::string;
using std::ostream;
namespace lyx { namespace lyx {
@ -27,10 +31,6 @@ using support::ascii_lowercase;
using support::bformat; using support::bformat;
using support::isStrInt; using support::isStrInt;
using std::setw;
using std::string;
using std::ostream;
namespace { namespace {
struct error_item { struct error_item {

View File

@ -68,6 +68,10 @@
#include <sstream> #include <sstream>
using std::auto_ptr;
using std::endl;
using std::string;
namespace lyx { namespace lyx {
@ -75,10 +79,6 @@ namespace Alert = frontend::Alert;
using support::compare_ascii_no_case; using support::compare_ascii_no_case;
using std::auto_ptr;
using std::endl;
using std::string;
Inset * createInset(BufferView * bv, FuncRequest const & cmd) Inset * createInset(BufferView * bv, FuncRequest const & cmd)
{ {

View File

@ -17,18 +17,18 @@
#include "support/environment.h" #include "support/environment.h"
#include "support/lstrings.h" #include "support/lstrings.h"
namespace lyx {
#ifdef HAVE_LOCALE_H #ifdef HAVE_LOCALE_H
# include <locale.h> # include <locale.h>
#endif #endif
using support::setEnv;
using std::string; using std::string;
namespace lyx {
using support::setEnv;
docstring const _(string const & str) docstring const _(string const & str)
{ {
return getGuiMessages().get(str); return getGuiMessages().get(str);