From 57a24ea9124812ddc5108ff1ad304ff61acc826a Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 9 Sep 2003 22:13:45 +0000 Subject: [PATCH] Replace 'using namespace abc;' with 'using abc::xyz;' git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7725 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.C | 11 ++++-- src/BufferView_pimpl.C | 24 ++++++++++-- src/Chktex.C | 13 +++++-- src/CutAndPaste.C | 8 ++-- src/DepTable.C | 7 +++- src/LColor.C | 4 +- src/LaTeX.C | 19 ++++++++- src/LaTeXFeatures.C | 4 +- src/LyXAction.C | 8 +++- src/MenuBackend.C | 12 ++++-- src/ParagraphParameters.C | 2 +- src/ToolbarBackend.C | 5 ++- src/aspell.C | 3 -- src/author.C | 6 ++- src/buffer.C | 39 +++++++++++++++++-- src/buffer_funcs.C | 12 ++++-- src/bufferlist.C | 8 +++- src/bufferparams.C | 4 +- src/bufferview_funcs.C | 2 +- src/chset.C | 7 +++- src/converter.C | 28 ++++++++++--- src/counters.C | 5 ++- src/debug.C | 9 ++++- src/exporter.C | 6 ++- src/factory.C | 2 +- src/format.C | 10 ++++- src/frontends/LyXView.C | 4 +- src/frontends/controllers/ControlAboutlyx.C | 5 ++- src/frontends/controllers/ControlBibtex.C | 2 +- src/frontends/controllers/ControlChanges.C | 3 +- src/frontends/controllers/ControlCharacter.C | 3 +- .../controllers/ControlCommandBuffer.C | 6 +-- src/frontends/controllers/ControlDocument.C | 5 ++- src/frontends/controllers/ControlExternal.C | 2 - src/frontends/controllers/ControlForks.C | 2 +- src/frontends/controllers/ControlGraphics.C | 8 +++- src/frontends/controllers/ControlInclude.C | 4 +- src/frontends/controllers/ControlMath.C | 5 ++- src/frontends/controllers/ControlPrefs.C | 4 +- src/frontends/controllers/ControlPrint.C | 10 ++++- src/frontends/controllers/ControlRef.C | 3 +- src/frontends/controllers/ControlSendto.C | 7 +++- src/frontends/controllers/ControlShowFile.C | 3 +- .../controllers/ControlSpellchecker.C | 2 +- src/frontends/controllers/ControlVCLog.C | 2 +- src/frontends/controllers/biblio.C | 13 ++++++- src/frontends/controllers/helper_funcs.C | 6 ++- src/frontends/controllers/tex_helpers.C | 12 +++++- src/frontends/qt2/FileDialog_private.C | 3 +- src/frontends/qt2/QAbout.C | 2 +- src/frontends/qt2/QBibtex.C | 8 +++- src/frontends/qt2/QBibtexDialog.C | 3 +- src/frontends/qt2/QCharacter.C | 16 +++++++- src/frontends/qt2/QCitation.C | 4 +- src/frontends/qt2/QCommandBuffer.C | 4 +- src/frontends/qt2/QDocumentDialog.C | 4 +- src/frontends/qt2/QExternal.C | 4 +- src/frontends/qt2/QGraphics.C | 7 +++- src/frontends/qt2/QLImage.C | 2 +- src/frontends/qt2/QLPopupMenu.C | 5 ++- src/frontends/qt2/QMinipage.C | 4 +- src/frontends/qt2/QParagraph.C | 6 ++- src/frontends/qt2/QPrefs.C | 4 +- src/frontends/qt2/QTexinfo.C | 3 +- src/frontends/qt2/QVCLog.C | 3 +- src/frontends/qt2/QWrap.C | 4 +- src/frontends/qt2/QtView.C | 2 +- src/frontends/qt2/floatplacement.C | 4 +- src/frontends/qt2/lyx_gui.C | 3 +- src/frontends/qt2/qfont_loader.C | 5 ++- src/frontends/screen.C | 2 +- src/frontends/xforms/ColorHandler.C | 2 +- src/frontends/xforms/FileDialog.C | 2 +- src/frontends/xforms/FontInfo.C | 3 +- src/frontends/xforms/FormBase.C | 3 +- src/frontends/xforms/FormBibitem.C | 2 +- src/frontends/xforms/FormBibtex.C | 9 ++++- src/frontends/xforms/FormCharacter.C | 19 +++++++-- src/frontends/xforms/FormCitation.C | 4 +- src/frontends/xforms/FormDialogView.C | 3 +- src/frontends/xforms/FormDocument.C | 6 ++- src/frontends/xforms/FormExternal.C | 3 +- src/frontends/xforms/FormFiledialog.C | 16 +++++++- src/frontends/xforms/FormFloat.C | 2 +- src/frontends/xforms/FormForks.C | 3 +- src/frontends/xforms/FormGraphics.C | 8 +++- src/frontends/xforms/FormInclude.C | 2 +- src/frontends/xforms/FormMinipage.C | 4 +- src/frontends/xforms/FormParagraph.C | 4 +- src/frontends/xforms/FormPreferences.C | 9 ++++- src/frontends/xforms/FormPrint.C | 3 +- src/frontends/xforms/FormRef.C | 2 +- src/frontends/xforms/FormSendto.C | 2 +- src/frontends/xforms/FormTabular.C | 5 ++- src/frontends/xforms/FormTexinfo.C | 2 +- src/frontends/xforms/FormText.C | 2 +- src/frontends/xforms/FormThesaurus.C | 4 +- src/frontends/xforms/FormToc.C | 2 +- src/frontends/xforms/FormWrap.C | 5 ++- src/frontends/xforms/Tooltips.C | 2 +- src/frontends/xforms/XFormsMenubar.C | 4 +- src/frontends/xforms/XFormsView.C | 2 +- src/frontends/xforms/XPainter.C | 2 +- src/frontends/xforms/checkedwidgets.C | 2 +- src/frontends/xforms/lyx_gui.C | 4 +- src/frontends/xforms/xfont_loader.C | 4 +- src/frontends/xforms/xfont_metrics.C | 2 +- src/frontends/xforms/xformsImage.C | 4 +- src/frontends/xforms/xforms_helpers.C | 7 +++- src/importer.C | 5 ++- src/insets/insetbibitem.C | 4 +- src/insets/insetbibtex.C | 16 +++++++- src/insets/insetcaption.C | 3 +- src/insets/insetcite.C | 7 +++- src/insets/insetcollapsable.C | 3 +- src/insets/insetert.C | 5 ++- src/insets/insetfloat.C | 3 +- src/insets/insetfloatlist.C | 3 +- src/insets/insetgraphics.C | 17 +++++++- src/insets/insetgraphicsParams.C | 5 ++- src/insets/insetinclude.C | 13 ++++++- src/insets/insetlabel.C | 2 +- src/insets/insetlatexaccent.C | 4 +- src/insets/insetquotes.C | 3 +- src/insets/insetref.C | 2 +- src/insets/insettabular.C | 6 ++- src/insets/insettext.C | 15 ++++--- src/insets/inseturl.C | 2 +- src/insets/renderers.C | 3 +- src/insets/updatableinset.C | 3 +- src/ispell.C | 2 - src/lastfiles.C | 2 +- src/lyx_cb.C | 23 ++++++++++- src/lyx_main.C | 22 ++++++++++- src/lyxfind.C | 15 ++++--- src/lyxfont.C | 27 ++++++++----- src/lyxfunc.C | 32 ++++++++++++++- src/lyxlayout.C | 4 +- src/lyxlex.C | 19 +++++++-- src/lyxlex_pimpl.C | 10 +++-- src/lyxrc.C | 18 ++++++--- src/lyxserver.C | 7 +++- src/lyxtextclass.C | 7 +++- src/lyxtextclasslist.C | 6 +-- src/lyxvc.C | 7 +++- src/main.C | 3 +- src/mathed/formulabase.C | 5 ++- src/mathed/formulamacro.C | 2 +- src/mathed/math_autocorrect.C | 2 +- src/mathed/math_extern.C | 6 ++- src/mathed/math_factory.C | 3 +- src/mathed/math_hullinset.C | 2 +- src/messages.C | 3 +- src/paragraph.C | 9 +++-- src/paragraph_funcs.C | 9 +++-- src/tabular.C | 7 +++- src/tex2lyx/lyxfont.C | 2 +- src/text.C | 14 ++++--- src/text2.C | 6 +-- src/text3.C | 10 +++-- src/trans.C | 6 ++- src/trans_mgr.C | 4 +- src/vc-backend.C | 11 +++++- src/vspace.C | 7 +++- 164 files changed, 795 insertions(+), 276 deletions(-) diff --git a/src/BufferView.C b/src/BufferView.C index 0517a129fa..040b23eafa 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -15,6 +15,7 @@ #include #include "BufferView.h" + #include "buffer.h" #include "bufferlist.h" #include "BufferView_pimpl.h" @@ -42,15 +43,17 @@ #include "support/filetools.h" #include "support/lyxalgo.h" // lyx_count - -extern BufferList bufferlist; - -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::MakeAbsPath; using std::find; + using std::vector; +extern BufferList bufferlist; + + BufferView::BufferView(LyXView * owner, int xpos, int ypos, int width, int height) : pimpl_(new Pimpl(this, owner, xpos, ypos, width, height)) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index a75a3a1793..4be3119c95 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -66,14 +66,32 @@ #include +using bv_funcs::bold; +using bv_funcs::code; +using bv_funcs::currentState; +using bv_funcs::emph; +using bv_funcs::fontSize; +using bv_funcs::lang; +using bv_funcs::noun; +using bv_funcs::roman; +using bv_funcs::sans; +using bv_funcs::styleReset; +using bv_funcs::underline; + +using lyx::pos_type; + +using lyx::support::AddPath; +using lyx::support::bformat; +using lyx::support::FileSearch; +using lyx::support::IsDirWriteable; +using lyx::support::MakeDisplayPath; +using lyx::support::strToUnsignedInt; +using lyx::support::system_lyxdir; using std::endl; using std::make_pair; using std::min; -using lyx::pos_type; -using namespace lyx::support; -using namespace bv_funcs; extern BufferList bufferlist; diff --git a/src/Chktex.C b/src/Chktex.C index 94ac719c73..7956209a6e 100644 --- a/src/Chktex.C +++ b/src/Chktex.C @@ -11,21 +11,26 @@ #include #include "Chktex.h" -#include "LaTeX.h" // TeXErrors #include "gettext.h" +#include "LaTeX.h" // TeXErrors + +#include "support/BoostFormat.h" #include "support/filetools.h" #include "support/lstrings.h" #include "support/lyxlib.h" #include "support/systemcall.h" -#include "support/BoostFormat.h" - #include -using namespace lyx::support; +using lyx::support::atoi; +using lyx::support::ChangeExtension; +using lyx::support::OnlyFilename; +using lyx::support::split; +using lyx::support::Systemcall; using std::getline; + using std::ifstream; diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index 41a4d82bf3..e8457aca4f 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -29,16 +29,16 @@ #include "support/lstrings.h" +using lyx::pos_type; +using lyx::textclass_type; + +using lyx::support::bformat; using std::for_each; using std::make_pair; using std::pair; using std::vector; -using namespace lyx::support; -using lyx::pos_type; -using lyx::textclass_type; - typedef limited_stack > CutStack; diff --git a/src/DepTable.C b/src/DepTable.C index 7326cd6455..865c6250b3 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -13,6 +13,7 @@ #include #include "DepTable.h" + #include "debug.h" #include "support/lyxlib.h" @@ -28,7 +29,11 @@ using std::time; #endif -using namespace lyx::support; +using lyx::support::ltrim; +using lyx::support::MakeAbsPath; +using lyx::support::OnlyFilename; +using lyx::support::suffixIs; +using lyx::support::sum; using std::endl; using std::flush; diff --git a/src/LColor.C b/src/LColor.C index a1eca58983..48a829eedf 100644 --- a/src/LColor.C +++ b/src/LColor.C @@ -17,13 +17,13 @@ #include #include "debug.h" -#include "LColor.h" #include "gettext.h" +#include "LColor.h" #include "support/lstrings.h" #include -using namespace lyx::support; +using lyx::support::compare_ascii_no_case; using std::endl; diff --git a/src/LaTeX.C b/src/LaTeX.C index a0aa2b52f9..0de75eb786 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -31,7 +31,22 @@ #include -using namespace lyx::support; +using lyx::support::AbsolutePath; +using lyx::support::bformat; +using lyx::support::ChangeExtension; +using lyx::support::contains; +using lyx::support::FileInfo; +using lyx::support::findtexfile; +using lyx::support::getcwd; +using lyx::support::OnlyFilename; +using lyx::support::os; +using lyx::support::prefixIs; +using lyx::support::QuoteName; +using lyx::support::rtrim; +using lyx::support::split; +using lyx::support::suffixIs; +using lyx::support::Systemcall; +using lyx::support::unlink; #ifndef CXX_GLOBAL_CSTD using std::sscanf; @@ -39,6 +54,7 @@ using std::sscanf; using std::endl; using std::getline; + using std::ifstream; using std::set; using std::vector; @@ -51,6 +67,7 @@ using boost::smatch; using boost::cmatch; #endif + // TODO: in no particular order // - get rid of the extern BufferList and the call to // BufferList::updateIncludedTeXfiles, this should either diff --git a/src/LaTeXFeatures.C b/src/LaTeXFeatures.C index fc67f23e63..4ddaee94e1 100644 --- a/src/LaTeXFeatures.C +++ b/src/LaTeXFeatures.C @@ -29,7 +29,9 @@ #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::support::IsSGMLFilename; +using lyx::support::MakeRelPath; +using lyx::support::OnlyPath; using std::endl; using std::find; diff --git a/src/LyXAction.C b/src/LyXAction.C index d5ff9ffd3b..42979e0c2f 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -17,12 +17,16 @@ #include "debug.h" #include "funcrequest.h" + #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::split; +using lyx::support::trim; + +using std::endl; using std::ostream; -using std::endl; + /* NAMING RULES FOR USER-COMMANDS diff --git a/src/MenuBackend.C b/src/MenuBackend.C index b1379b29ca..028d0ce0dd 100644 --- a/src/MenuBackend.C +++ b/src/MenuBackend.C @@ -46,10 +46,10 @@ #include -extern BufferList bufferlist; -extern boost::scoped_ptr toplevel_keymap; - -using namespace lyx::support; +using lyx::support::compare_ascii_no_case; +using lyx::support::contains; +using lyx::support::MakeDisplayPath; +using lyx::support::token; using std::endl; using std::find_if; @@ -58,6 +58,10 @@ using std::sort; using std::vector; + +extern BufferList bufferlist; +extern boost::scoped_ptr toplevel_keymap; + // This is the global menu definition MenuBackend menubackend; diff --git a/src/ParagraphParameters.C b/src/ParagraphParameters.C index f2f1468e0b..0b2b1dabc5 100644 --- a/src/ParagraphParameters.C +++ b/src/ParagraphParameters.C @@ -32,7 +32,7 @@ #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::support::rtrim; using std::istringstream; using std::ostream; diff --git a/src/ToolbarBackend.C b/src/ToolbarBackend.C index 82a08673df..4ef1df0eed 100644 --- a/src/ToolbarBackend.C +++ b/src/ToolbarBackend.C @@ -23,7 +23,10 @@ #include "frontends/controllers/ControlMath.h" -using namespace lyx::support; +using lyx::support::compare_ascii_no_case; +using lyx::support::getVectorFromString; +using lyx::support::LibFileSearch; +using lyx::support::subst; using std::endl; using std::make_pair; diff --git a/src/aspell.C b/src/aspell.C index 4dc3ccef0d..b1d78bb953 100644 --- a/src/aspell.C +++ b/src/aspell.C @@ -21,9 +21,6 @@ #include "WordLangTuple.h" -using namespace lyx::support; - - ASpell::ASpell(BufferParams const &, string const & lang) : els(0), spell_error_object(0) { diff --git a/src/author.C b/src/author.C index 093c2d5c03..fed15aef27 100644 --- a/src/author.C +++ b/src/author.C @@ -12,13 +12,15 @@ #include "author.h" -#include "support/std_istream.h" #include "support/lstrings.h" #include +#include "support/std_istream.h" + +using lyx::support::token; +using lyx::support::trim; -using namespace lyx::support; bool operator==(Author const & l, Author const & r) { diff --git a/src/buffer.C b/src/buffer.C index bd00debb58..ff74ea1acf 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -70,7 +70,42 @@ #ifdef HAVE_LOCALE #endif -using namespace lyx::support; +using lyx::pos_type; + +using lyx::support::AddName; +using lyx::support::ascii_lowercase; +using lyx::support::atoi; +using lyx::support::bformat; +using lyx::support::ChangeExtension; +using lyx::support::cmd_ret; +using lyx::support::compare_ascii_no_case; +using lyx::support::compare_no_case; +using lyx::support::contains; +using lyx::support::CreateBufferTmpDir; +using lyx::support::destroyDir; +using lyx::support::FileInfo; +using lyx::support::FileInfo; +using lyx::support::getExtFromContents; +using lyx::support::IsDirWriteable; +using lyx::support::IsFileWriteable; +using lyx::support::LibFileSearch; +using lyx::support::ltrim; +using lyx::support::MakeAbsPath; +using lyx::support::MakeDisplayPath; +using lyx::support::MakeLatexName; +using lyx::support::OnlyFilename; +using lyx::support::OnlyPath; +using lyx::support::os; +using lyx::support::Path; +using lyx::support::QuoteName; +using lyx::support::removeAutosaveFile; +using lyx::support::rename; +using lyx::support::RunCommand; +using lyx::support::split; +using lyx::support::strToInt; +using lyx::support::subst; +using lyx::support::tempName; +using lyx::support::trim; using std::endl; using std::for_each; @@ -86,8 +121,6 @@ using std::pair; using std::stack; using std::vector; -using lyx::pos_type; - // all these externs should eventually be removed. extern BufferList bufferlist; diff --git a/src/buffer_funcs.C b/src/buffer_funcs.C index e06b32ad84..9319a9d22d 100644 --- a/src/buffer_funcs.C +++ b/src/buffer_funcs.C @@ -31,12 +31,18 @@ #include "support/filetools.h" #include "support/lyxlib.h" +using lyx::support::bformat; +using lyx::support::FileInfo; +using lyx::support::IsFileWriteable; +using lyx::support::LibFileSearch; +using lyx::support::MakeDisplayPath; +using lyx::support::OnlyFilename; +using lyx::support::OnlyPath; +using lyx::support::unlink; + extern BufferList bufferlist; -using namespace lyx::support; - - namespace { bool readFile(Buffer * b, string const & s) diff --git a/src/bufferlist.C b/src/bufferlist.C index 3be8b8603e..45157aabf4 100644 --- a/src/bufferlist.C +++ b/src/bufferlist.C @@ -30,7 +30,13 @@ #include -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::bformat; +using lyx::support::GetEnvPath; +using lyx::support::MakeAbsPath; +using lyx::support::MakeDisplayPath; +using lyx::support::OnlyFilename; +using lyx::support::removeAutosaveFile; using std::endl; using std::find; diff --git a/src/bufferparams.C b/src/bufferparams.C index b6416b0b13..9877d30f17 100644 --- a/src/bufferparams.C +++ b/src/bufferparams.C @@ -43,7 +43,9 @@ #include "support/std_sstream.h" namespace support = lyx::support; -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::rtrim; +using lyx::support::tokenPos; using std::endl; diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index e3060c81e4..58fd4ea709 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -37,7 +37,7 @@ #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::support::bformat; using std::istringstream; using std::ostringstream; diff --git a/src/chset.C b/src/chset.C index 3c783e09df..9cc115f833 100644 --- a/src/chset.C +++ b/src/chset.C @@ -12,15 +12,18 @@ #include #include "chset.h" + +#include "debug.h" + #include "support/filetools.h" #include "support/lyxlib.h" -#include "debug.h" #include #include -using namespace lyx::support; +using lyx::support::atoi; +using lyx::support::LibFileSearch; using std::endl; using std::getline; diff --git a/src/converter.C b/src/converter.C index 7f7ef49fa0..48cad85390 100644 --- a/src/converter.C +++ b/src/converter.C @@ -11,13 +11,14 @@ #include #include "converter.h" -#include "bufferparams.h" -#include "format.h" + #include "buffer.h" #include "buffer_funcs.h" -#include "LaTeX.h" -#include "gettext.h" +#include "bufferparams.h" #include "debug.h" +#include "format.h" +#include "gettext.h" +#include "LaTeX.h" #include "frontends/Alert.h" @@ -26,7 +27,24 @@ #include "support/path.h" #include "support/systemcall.h" -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::bformat; +using lyx::support::ChangeExtension; +using lyx::support::compare_ascii_no_case; +using lyx::support::contains; +using lyx::support::DirList; +using lyx::support::GetExtension; +using lyx::support::LibScriptSearch; +using lyx::support::MakeRelPath; +using lyx::support::OnlyFilename; +using lyx::support::OnlyPath; +using lyx::support::Path; +using lyx::support::prefixIs; +using lyx::support::QuoteName; +using lyx::support::rename; +using lyx::support::split; +using lyx::support::subst; +using lyx::support::Systemcall; using std::endl; using std::find_if; diff --git a/src/counters.C b/src/counters.C index 4f66ef083e..6d18c38340 100644 --- a/src/counters.C +++ b/src/counters.C @@ -12,16 +12,17 @@ #include #include "counters.h" + #include "debug.h" -#include "support/std_sstream.h" #include "support/lstrings.h" #include -using namespace lyx::support; +#include "support/std_sstream.h" using std::endl; + using std::ostringstream; diff --git a/src/debug.C b/src/debug.C index f89120ee0a..e4e9b82bf7 100644 --- a/src/debug.C +++ b/src/debug.C @@ -13,14 +13,19 @@ #include "debug.h" #include "gettext.h" + #include "support/lstrings.h" #include -using namespace lyx::support; +using lyx::support::ascii_lowercase; +using lyx::support::bformat; +using lyx::support::isStrInt; +using lyx::support::strToInt; + +using std::setw; using std::ostream; -using std::setw; namespace { diff --git a/src/exporter.C b/src/exporter.C index 6076fb4c6c..375416fa8d 100644 --- a/src/exporter.C +++ b/src/exporter.C @@ -31,7 +31,11 @@ #include "support/filetools.h" -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::bformat; +using lyx::support::ChangeExtension; +using lyx::support::contains; +using lyx::support::MakeDisplayPath; using std::find; diff --git a/src/factory.C b/src/factory.C index 882c6cc896..ca51101258 100644 --- a/src/factory.C +++ b/src/factory.C @@ -54,7 +54,7 @@ #include "support/lstrings.h" #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::support::compare_ascii_no_case; using std::endl; diff --git a/src/format.C b/src/format.C index fd9a07e4a5..76fe2ebf4a 100644 --- a/src/format.C +++ b/src/format.C @@ -24,7 +24,15 @@ #include "support/systemcall.h" #include "support/lyxfunctional.h" -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::compare_ascii_no_case; +using lyx::support::contains; +using lyx::support::OnlyFilename; +using lyx::support::OnlyPath; +using lyx::support::Path; +using lyx::support::QuoteName; +using lyx::support::subst; +using lyx::support::Systemcall; namespace { diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index c7933098b6..f13928fd03 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -43,7 +43,9 @@ #include #include -using namespace lyx::support; +using lyx::support::MakeDisplayPath; +using lyx::support::OnlyFilename; + using std::endl; diff --git a/src/frontends/controllers/ControlAboutlyx.C b/src/frontends/controllers/ControlAboutlyx.C index 7d25c60410..a7ac4e76f5 100644 --- a/src/frontends/controllers/ControlAboutlyx.C +++ b/src/frontends/controllers/ControlAboutlyx.C @@ -21,7 +21,10 @@ #include -using namespace lyx::support; +using lyx::support::FileSearch; +using lyx::support::MakeDisplayPath; +using lyx::support::system_lyxdir; +using lyx::support::user_lyxdir; using std::ostream; using std::ostringstream; diff --git a/src/frontends/controllers/ControlBibtex.C b/src/frontends/controllers/ControlBibtex.C index bcbb76b3de..ffb1d15d0d 100644 --- a/src/frontends/controllers/ControlBibtex.C +++ b/src/frontends/controllers/ControlBibtex.C @@ -21,7 +21,7 @@ #include "support/filetools.h" -using namespace lyx::support; +using lyx::support::OnlyFilename; using std::pair; using std::vector; diff --git a/src/frontends/controllers/ControlChanges.C b/src/frontends/controllers/ControlChanges.C index 4af90eeb80..280d034c4f 100644 --- a/src/frontends/controllers/ControlChanges.C +++ b/src/frontends/controllers/ControlChanges.C @@ -21,7 +21,8 @@ #include "lyxfind.h" #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::rtrim; + ControlChanges::ControlChanges(Dialog & parent) : Dialog::Controller(parent) diff --git a/src/frontends/controllers/ControlCharacter.C b/src/frontends/controllers/ControlCharacter.C index 409fb66272..ddce11cf1f 100644 --- a/src/frontends/controllers/ControlCharacter.C +++ b/src/frontends/controllers/ControlCharacter.C @@ -19,7 +19,8 @@ #include "funcrequest.h" #include "language.h" -using namespace bv_funcs; +using bv_funcs::font2string; + ControlCharacter::ControlCharacter(Dialog & parent) : Dialog::Controller(parent), diff --git a/src/frontends/controllers/ControlCommandBuffer.C b/src/frontends/controllers/ControlCommandBuffer.C index 60dc596bf2..b17308e053 100644 --- a/src/frontends/controllers/ControlCommandBuffer.C +++ b/src/frontends/controllers/ControlCommandBuffer.C @@ -20,15 +20,15 @@ #include "support/lyxalgo.h" #include "support/lstrings.h" -using namespace lyx::support; +using bv_funcs::currentState; + +using lyx::support::prefixIs; using std::back_inserter; using std::transform; using std::vector; -using namespace bv_funcs; - namespace { diff --git a/src/frontends/controllers/ControlDocument.C b/src/frontends/controllers/ControlDocument.C index c820de23ca..66015595b3 100644 --- a/src/frontends/controllers/ControlDocument.C +++ b/src/frontends/controllers/ControlDocument.C @@ -31,7 +31,10 @@ #include "support/filetools.h" #include "support/path_defines.h" -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::AddPath; +using lyx::support::bformat; +using lyx::support::user_lyxdir; ControlDocument::ControlDocument(LyXView & lv, Dialogs & d) diff --git a/src/frontends/controllers/ControlExternal.C b/src/frontends/controllers/ControlExternal.C index 1a01fb6797..22c62770cc 100644 --- a/src/frontends/controllers/ControlExternal.C +++ b/src/frontends/controllers/ControlExternal.C @@ -20,8 +20,6 @@ #include "insets/ExternalTemplate.h" - -using namespace lyx::support; using std::vector; diff --git a/src/frontends/controllers/ControlForks.C b/src/frontends/controllers/ControlForks.C index 3f6df8b7d5..337731cc67 100644 --- a/src/frontends/controllers/ControlForks.C +++ b/src/frontends/controllers/ControlForks.C @@ -21,7 +21,7 @@ #include -using namespace lyx::support; +using lyx::support::ForkedcallsController; using std::vector; diff --git a/src/frontends/controllers/ControlGraphics.C b/src/frontends/controllers/ControlGraphics.C index 47d1d5f9bb..632eeb6f7a 100644 --- a/src/frontends/controllers/ControlGraphics.C +++ b/src/frontends/controllers/ControlGraphics.C @@ -31,7 +31,13 @@ #include "support/tostr.h" #include "support/types.h" -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::FileInfo; +using lyx::support::IsFileReadable; +using lyx::support::MakeAbsPath; +using lyx::support::readBB_from_PSFile; +using lyx::support::system_lyxdir; +using lyx::support::user_lyxdir; using std::make_pair; diff --git a/src/frontends/controllers/ControlInclude.C b/src/frontends/controllers/ControlInclude.C index e240ead72c..24ac6a7c59 100644 --- a/src/frontends/controllers/ControlInclude.C +++ b/src/frontends/controllers/ControlInclude.C @@ -23,7 +23,9 @@ #include -using namespace lyx::support; +using lyx::support::IsFileReadable; +using lyx::support::MakeAbsPath; +using lyx::support::OnlyPath; using std::pair; diff --git a/src/frontends/controllers/ControlMath.C b/src/frontends/controllers/ControlMath.C index 242300a89e..3beedee149 100644 --- a/src/frontends/controllers/ControlMath.C +++ b/src/frontends/controllers/ControlMath.C @@ -18,8 +18,9 @@ #include "support/lstrings.h" #include "support/filetools.h" - -using namespace lyx::support; +using lyx::support::compare; +using lyx::support::LibFileSearch; +using lyx::support::subst; ControlMath::ControlMath(Dialog & dialog) diff --git a/src/frontends/controllers/ControlPrefs.C b/src/frontends/controllers/ControlPrefs.C index 97447eeced..547cc742b4 100644 --- a/src/frontends/controllers/ControlPrefs.C +++ b/src/frontends/controllers/ControlPrefs.C @@ -30,7 +30,9 @@ #include -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::system_lyxdir; +using lyx::support::user_lyxdir; using std::pair; diff --git a/src/frontends/controllers/ControlPrint.C b/src/frontends/controllers/ControlPrint.C index ab8b5d29ce..6aed2e1a1e 100644 --- a/src/frontends/controllers/ControlPrint.C +++ b/src/frontends/controllers/ControlPrint.C @@ -31,10 +31,18 @@ #include "debug.h" -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::ChangeExtension; +using lyx::support::IsDirWriteable; +using lyx::support::MakeAbsPath; +using lyx::support::MakeDisplayPath; +using lyx::support::Path; +using lyx::support::QuoteName; +using lyx::support::Systemcall; using std::endl; + ControlPrint::ControlPrint(LyXView & lv, Dialogs & d) : ControlDialogBD(lv, d), params_(0) diff --git a/src/frontends/controllers/ControlRef.C b/src/frontends/controllers/ControlRef.C index 53b0806f33..f8f8d8bc38 100644 --- a/src/frontends/controllers/ControlRef.C +++ b/src/frontends/controllers/ControlRef.C @@ -18,7 +18,8 @@ #include "support/filetools.h" // MakeAbsPath, MakeDisplayPath -using namespace lyx::support; +using lyx::support::MakeAbsPath; +using lyx::support::MakeDisplayPath; using std::vector; diff --git a/src/frontends/controllers/ControlSendto.C b/src/frontends/controllers/ControlSendto.C index d601aeb2ca..36f3e69e59 100644 --- a/src/frontends/controllers/ControlSendto.C +++ b/src/frontends/controllers/ControlSendto.C @@ -23,7 +23,12 @@ #include "support/lstrings.h" #include "support/systemcall.h" -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::ChangeExtension; +using lyx::support::contains; +using lyx::support::subst; +using lyx::support::Systemcall; +using lyx::support::trim; using std::vector; diff --git a/src/frontends/controllers/ControlShowFile.C b/src/frontends/controllers/ControlShowFile.C index 093c4b7d8b..fe57c8cb98 100644 --- a/src/frontends/controllers/ControlShowFile.C +++ b/src/frontends/controllers/ControlShowFile.C @@ -13,7 +13,8 @@ #include "ControlShowFile.h" #include "support/filetools.h" -using namespace lyx::support; +using lyx::support::GetFileContents; +using lyx::support::OnlyFilename; ControlShowFile::ControlShowFile(Dialog & parent) diff --git a/src/frontends/controllers/ControlSpellchecker.C b/src/frontends/controllers/ControlSpellchecker.C index c02e5ff014..afa264cb06 100644 --- a/src/frontends/controllers/ControlSpellchecker.C +++ b/src/frontends/controllers/ControlSpellchecker.C @@ -34,7 +34,7 @@ #include "frontends/Alert.h" -using namespace lyx::support; +using lyx::support::bformat; using std::endl; diff --git a/src/frontends/controllers/ControlVCLog.C b/src/frontends/controllers/ControlVCLog.C index 78fad86c36..7770aa23e5 100644 --- a/src/frontends/controllers/ControlVCLog.C +++ b/src/frontends/controllers/ControlVCLog.C @@ -18,7 +18,7 @@ #include "support/lyxlib.h" #include -using namespace lyx::support; +using lyx::support::unlink; using std::endl; using std::ostream; diff --git a/src/frontends/controllers/biblio.C b/src/frontends/controllers/biblio.C index 3e106eb16a..5fb9614319 100644 --- a/src/frontends/controllers/biblio.C +++ b/src/frontends/controllers/biblio.C @@ -22,7 +22,17 @@ #include -using namespace lyx::support; +using lyx::support::ascii_lowercase; +using lyx::support::bformat; +using lyx::support::compare_ascii_no_case; +using lyx::support::contains; +using lyx::support::getVectorFromString; +using lyx::support::ltrim; +using lyx::support::rtrim; +using lyx::support::split; +using lyx::support::subst; +using lyx::support::token; +using lyx::support::trim; using std::ostringstream; using std::vector; @@ -470,7 +480,6 @@ string const parseBibTeX(string data, string const & findkey) namespace { -using namespace biblio; char const * const citeCommands[] = { "cite", "citet", "citep", "citealt", "citealp", "citeauthor", diff --git a/src/frontends/controllers/helper_funcs.C b/src/frontends/controllers/helper_funcs.C index 6128056974..53262830d0 100644 --- a/src/frontends/controllers/helper_funcs.C +++ b/src/frontends/controllers/helper_funcs.C @@ -20,7 +20,11 @@ #include "support/filetools.h" // OnlyPath, OnlyFilename -using namespace lyx::support; +using lyx::support::MakeAbsPath; +using lyx::support::MakeRelPath; +using lyx::support::OnlyFilename; +using lyx::support::OnlyPath; +using lyx::support::prefixIs; using std::pair; using std::vector; diff --git a/src/frontends/controllers/tex_helpers.C b/src/frontends/controllers/tex_helpers.C index d542bbabca..2448b6fc11 100644 --- a/src/frontends/controllers/tex_helpers.C +++ b/src/frontends/controllers/tex_helpers.C @@ -24,7 +24,17 @@ #include #include -using namespace lyx::support; +using lyx::support::contains; +using lyx::support::GetFileContents; +using lyx::support::getVectorFromString; +using lyx::support::LibFileSearch; +using lyx::support::OnlyFilename; +using lyx::support::Path; +using lyx::support::Path; +using lyx::support::split; +using lyx::support::Systemcall; +using lyx::support::token; +using lyx::support::user_lyxdir; using std::endl; diff --git a/src/frontends/qt2/FileDialog_private.C b/src/frontends/qt2/FileDialog_private.C index b583d96003..4bc65e36f7 100644 --- a/src/frontends/qt2/FileDialog_private.C +++ b/src/frontends/qt2/FileDialog_private.C @@ -19,7 +19,8 @@ #include #include -using namespace lyx::support; +using lyx::support::split; + namespace { diff --git a/src/frontends/qt2/QAbout.C b/src/frontends/qt2/QAbout.C index 50fc0dd09a..17800ccd04 100644 --- a/src/frontends/qt2/QAbout.C +++ b/src/frontends/qt2/QAbout.C @@ -24,7 +24,7 @@ #include "Qt2BC.h" #include "QAbout.h" -using namespace lyx::support; +using lyx::support::prefixIs; using std::getline; diff --git a/src/frontends/qt2/QBibtex.C b/src/frontends/qt2/QBibtex.C index 2be95b9a3f..9e78349a71 100644 --- a/src/frontends/qt2/QBibtex.C +++ b/src/frontends/qt2/QBibtex.C @@ -29,12 +29,16 @@ #include "QBibtex.h" #include "Qt2BC.h" -using namespace lyx::support; +using lyx::support::ChangeExtension; +using lyx::support::contains; +using lyx::support::prefixIs; +using lyx::support::split; +using lyx::support::trim; using std::vector; -typedef QController > base_class; +typedef QController > base_class; QBibtex::QBibtex(Dialog & parent) : base_class(parent, _("BibTeX")) diff --git a/src/frontends/qt2/QBibtexDialog.C b/src/frontends/qt2/QBibtexDialog.C index 626c30af9a..11df55887c 100644 --- a/src/frontends/qt2/QBibtexDialog.C +++ b/src/frontends/qt2/QBibtexDialog.C @@ -10,7 +10,6 @@ #include - #include "qt_helpers.h" #include "support/filetools.h" @@ -25,8 +24,8 @@ #include "QBibtexDialog.h" #include "QBibtex.h" +using lyx::support::ChangeExtension; -using namespace lyx::support; QBibtexDialog::QBibtexDialog(QBibtex * form) : QBibtexDialogBase(0, 0, false, 0), diff --git a/src/frontends/qt2/QCharacter.C b/src/frontends/qt2/QCharacter.C index 5b2cbbcffc..8eb30caf0b 100644 --- a/src/frontends/qt2/QCharacter.C +++ b/src/frontends/qt2/QCharacter.C @@ -22,10 +22,24 @@ #include #include +using frnt::BarPair; +using frnt::ColorPair; +using frnt::FamilyPair; +using frnt::getBarData; +using frnt::getColorData; +using frnt::getFamilyData; +using frnt::getLanguageData; +using frnt::getSeriesData; +using frnt::getShapeData; +using frnt::getSizeData; +using frnt::LanguagePair; +using frnt::SeriesPair; +using frnt::ShapePair; +using frnt::SizePair; -using namespace frnt; using std::vector; + typedef QController > base_class; diff --git a/src/frontends/qt2/QCitation.C b/src/frontends/qt2/QCitation.C index 85183bccf3..cc407bab53 100644 --- a/src/frontends/qt2/QCitation.C +++ b/src/frontends/qt2/QCitation.C @@ -28,7 +28,9 @@ #include "qt_helpers.h" #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::getStringFromVector; +using lyx::support::getVectorFromString; +using lyx::support::trim; using std::find; diff --git a/src/frontends/qt2/QCommandBuffer.C b/src/frontends/qt2/QCommandBuffer.C index d9658b6c1f..8691a4e4b2 100644 --- a/src/frontends/qt2/QCommandBuffer.C +++ b/src/frontends/qt2/QCommandBuffer.C @@ -23,11 +23,11 @@ #include #include - -using namespace lyx::support; +using lyx::support::LibFileSearch; using std::vector; + namespace { class QTempListBox : public QListBox { diff --git a/src/frontends/qt2/QDocumentDialog.C b/src/frontends/qt2/QDocumentDialog.C index 1b9314de11..24b0b4800a 100644 --- a/src/frontends/qt2/QDocumentDialog.C +++ b/src/frontends/qt2/QDocumentDialog.C @@ -10,7 +10,6 @@ #include - #include "qt_helpers.h" #include "ControlDocument.h" @@ -35,7 +34,8 @@ #include #include "lengthcombo.h" -using namespace lyx::support; +using lyx::support::token; + QDocumentDialog::QDocumentDialog(QDocument * form) : QDocumentDialogBase(0, 0, false, 0), form_(form) diff --git a/src/frontends/qt2/QExternal.C b/src/frontends/qt2/QExternal.C index 2ad19f3ffc..a33f645b31 100644 --- a/src/frontends/qt2/QExternal.C +++ b/src/frontends/qt2/QExternal.C @@ -29,13 +29,11 @@ #include "QExternal.h" #include "Qt2BC.h" - -using namespace lyx::support; +using lyx::support::strToInt; typedef QController > base_class; - QExternal::QExternal(Dialog & parent) : base_class(parent, _("LyX: External Material")) { diff --git a/src/frontends/qt2/QGraphics.C b/src/frontends/qt2/QGraphics.C index 9a30657cff..181479cf90 100644 --- a/src/frontends/qt2/QGraphics.C +++ b/src/frontends/qt2/QGraphics.C @@ -34,12 +34,15 @@ #include "QGraphics.h" #include "Qt2BC.h" -using namespace lyx::support; +using lyx::support::float_equal; +using lyx::support::strToDbl; +using lyx::support::strToInt; +using lyx::support::token; using std::vector; -typedef QController > base_class; +typedef QController > base_class; QGraphics::QGraphics(Dialog & parent) : base_class(parent, _("LyX: Graphics")) diff --git a/src/frontends/qt2/QLImage.C b/src/frontends/qt2/QLImage.C index dc51677182..5ccb39d2ea 100644 --- a/src/frontends/qt2/QLImage.C +++ b/src/frontends/qt2/QLImage.C @@ -25,7 +25,7 @@ #include -using namespace lyx::support; +using lyx::support::lowercase; using std::endl; using std::find_if; diff --git a/src/frontends/qt2/QLPopupMenu.C b/src/frontends/qt2/QLPopupMenu.C index 067281f18a..cae1a1a5cf 100644 --- a/src/frontends/qt2/QLPopupMenu.C +++ b/src/frontends/qt2/QLPopupMenu.C @@ -20,11 +20,12 @@ #include "QLPopupMenu.h" #include "qt_helpers.h" +using lyx::support::subst; -using namespace lyx::support; +using std::make_pair; using std::pair; -using std::make_pair; + namespace { diff --git a/src/frontends/qt2/QMinipage.C b/src/frontends/qt2/QMinipage.C index 7a0c7439ae..2e3b68e7bf 100644 --- a/src/frontends/qt2/QMinipage.C +++ b/src/frontends/qt2/QMinipage.C @@ -23,11 +23,11 @@ #include #include -using namespace lyx::support; +using lyx::support::strToDbl; + typedef QController > base_class; - QMinipage::QMinipage(Dialog & parent) : base_class(parent, _("LyX: Minipage Settings")) { diff --git a/src/frontends/qt2/QParagraph.C b/src/frontends/qt2/QParagraph.C index 45f5ea5ecb..b5ace6096b 100644 --- a/src/frontends/qt2/QParagraph.C +++ b/src/frontends/qt2/QParagraph.C @@ -32,8 +32,10 @@ #include #include - -using namespace lyx::support; +using lyx::support::contains_functor; +using lyx::support::isStrDbl; +using lyx::support::subst; +using lyx::support::trim; using std::bind2nd; using std::remove_if; diff --git a/src/frontends/qt2/QPrefs.C b/src/frontends/qt2/QPrefs.C index 2e8d83fa9e..a6fadcdcea 100644 --- a/src/frontends/qt2/QPrefs.C +++ b/src/frontends/qt2/QPrefs.C @@ -49,7 +49,8 @@ #include #include "qcoloritem.h" -using namespace lyx::support; +using lyx::support::compare_no_case; +using lyx::support::strToDbl; using std::endl; using std::setfill; @@ -62,7 +63,6 @@ using std::vector; typedef Qt2CB > base_class; - QPrefs::QPrefs() : base_class(_("LyX: Preferences")) { diff --git a/src/frontends/qt2/QTexinfo.C b/src/frontends/qt2/QTexinfo.C index b021016f04..4ec666b1e3 100644 --- a/src/frontends/qt2/QTexinfo.C +++ b/src/frontends/qt2/QTexinfo.C @@ -22,12 +22,11 @@ #include #include -using namespace lyx::support; +using lyx::support::OnlyFilename; typedef QController > base_class; - QTexinfo::QTexinfo(Dialog & parent) : base_class(parent, _("LyX: LaTeX Information")), warningPosted(false), activeStyle(ControlTexinfo::cls) diff --git a/src/frontends/qt2/QVCLog.C b/src/frontends/qt2/QVCLog.C index 07b769cd10..83d3af2eea 100644 --- a/src/frontends/qt2/QVCLog.C +++ b/src/frontends/qt2/QVCLog.C @@ -22,8 +22,7 @@ #include #include - -using namespace lyx::support; +using lyx::support::bformat; using std::ostringstream; diff --git a/src/frontends/qt2/QWrap.C b/src/frontends/qt2/QWrap.C index 59dec65a4c..eaef2d5f76 100644 --- a/src/frontends/qt2/QWrap.C +++ b/src/frontends/qt2/QWrap.C @@ -25,11 +25,11 @@ #include #include -using namespace lyx::support; +using lyx::support::strToDbl; + typedef QController > base_class; - QWrap::QWrap(Dialog & parent) : base_class(parent, _("LyX: Text Wrap Settings")) { diff --git a/src/frontends/qt2/QtView.C b/src/frontends/qt2/QtView.C index e165cc3671..e0242ce9e7 100644 --- a/src/frontends/qt2/QtView.C +++ b/src/frontends/qt2/QtView.C @@ -28,7 +28,7 @@ #include #include -using namespace lyx::support; +using lyx::support::LibFileSearch; namespace { diff --git a/src/frontends/qt2/floatplacement.C b/src/frontends/qt2/floatplacement.C index 2fd929cf6e..43eff37982 100644 --- a/src/frontends/qt2/floatplacement.C +++ b/src/frontends/qt2/floatplacement.C @@ -21,10 +21,10 @@ #include #include -using namespace lyx::support; +using lyx::support::contains; + // FIXME: set disabled doesn't work properly - FloatPlacement::FloatPlacement(QWidget * parent, char * name) : QWidget(parent, name) { diff --git a/src/frontends/qt2/lyx_gui.C b/src/frontends/qt2/lyx_gui.C index 8be032184d..6f40e75d93 100644 --- a/src/frontends/qt2/lyx_gui.C +++ b/src/frontends/qt2/lyx_gui.C @@ -40,8 +40,7 @@ #include #include - -using namespace lyx::support; +using lyx::support::ltrim; #ifndef CXX_GLOBAL_CSTD using std::exit; diff --git a/src/frontends/qt2/qfont_loader.C b/src/frontends/qt2/qfont_loader.C index 1172726320..788a58e08d 100644 --- a/src/frontends/qt2/qfont_loader.C +++ b/src/frontends/qt2/qfont_loader.C @@ -30,7 +30,10 @@ #include #endif -using namespace lyx::support; +using lyx::support::contains; +using lyx::support::LibFileSearch; +using lyx::support::OnlyPath; +using lyx::support::Systemcall; using std::endl; using std::make_pair; diff --git a/src/frontends/screen.C b/src/frontends/screen.C index eae3c0f6ed..ce9c258614 100644 --- a/src/frontends/screen.C +++ b/src/frontends/screen.C @@ -42,7 +42,7 @@ #include #include -using namespace lyx::support; +using lyx::support::LibFileSearch; using std::min; using std::max; diff --git a/src/frontends/xforms/ColorHandler.C b/src/frontends/xforms/ColorHandler.C index 4b9c26e049..96600a1816 100644 --- a/src/frontends/xforms/ColorHandler.C +++ b/src/frontends/xforms/ColorHandler.C @@ -24,7 +24,7 @@ #include -using namespace lyx::support; +using lyx::support::bformat; #ifndef CXX_GLOBAL_CSTD using std::pow; diff --git a/src/frontends/xforms/FileDialog.C b/src/frontends/xforms/FileDialog.C index df848ead72..e1766eaeec 100644 --- a/src/frontends/xforms/FileDialog.C +++ b/src/frontends/xforms/FileDialog.C @@ -18,7 +18,7 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::rsplit; using std::endl; diff --git a/src/frontends/xforms/FontInfo.C b/src/frontends/xforms/FontInfo.C index 8d0eb0f902..f9b2502697 100644 --- a/src/frontends/xforms/FontInfo.C +++ b/src/frontends/xforms/FontInfo.C @@ -26,7 +26,8 @@ #include -using namespace lyx::support; +using lyx::support::atoi; +using lyx::support::token; using std::abs; using std::endl; diff --git a/src/frontends/xforms/FormBase.C b/src/frontends/xforms/FormBase.C index 31cba0cffc..57f036571f 100644 --- a/src/frontends/xforms/FormBase.C +++ b/src/frontends/xforms/FormBase.C @@ -25,7 +25,8 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::LibFileSearch; extern "C" { diff --git a/src/frontends/xforms/FormBibitem.C b/src/frontends/xforms/FormBibitem.C index 1b9622a742..a63b1b183c 100644 --- a/src/frontends/xforms/FormBibitem.C +++ b/src/frontends/xforms/FormBibitem.C @@ -22,7 +22,7 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::compare; typedef FormController > base_class; diff --git a/src/frontends/xforms/FormBibtex.C b/src/frontends/xforms/FormBibtex.C index 54ccab834e..ea490c0fcb 100644 --- a/src/frontends/xforms/FormBibtex.C +++ b/src/frontends/xforms/FormBibtex.C @@ -27,7 +27,14 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::ChangeExtension; +using lyx::support::compare; +using lyx::support::contains; +using lyx::support::getStringFromVector; +using lyx::support::getVectorFromString; +using lyx::support::OnlyFilename; +using lyx::support::prefixIs; +using lyx::support::split; using std::vector; diff --git a/src/frontends/xforms/FormCharacter.C b/src/frontends/xforms/FormCharacter.C index 5669cab9a8..6071f51b6d 100644 --- a/src/frontends/xforms/FormCharacter.C +++ b/src/frontends/xforms/FormCharacter.C @@ -25,13 +25,26 @@ #include "lyx_forms.h" #include "combox.h" -using namespace lyx::support; +using frnt::BarPair; +using frnt::ColorPair; +using frnt::FamilyPair; +using frnt::getBarData; +using frnt::getColorData; +using frnt::getFamilyData; +using frnt::getLanguageData; +using frnt::getSeriesData; +using frnt::getShapeData; +using frnt::getSizeData; +using frnt::LanguagePair; +using frnt::SeriesPair; +using frnt::ShapePair; +using frnt::SizePair; + +using lyx::support::getStringFromVector; using std::vector; -using namespace frnt; - typedef FormController > base_class; FormCharacter::FormCharacter(Dialog & parent) diff --git a/src/frontends/xforms/FormCitation.C b/src/frontends/xforms/FormCitation.C index 14e2cd83ed..dee34c0f7f 100644 --- a/src/frontends/xforms/FormCitation.C +++ b/src/frontends/xforms/FormCitation.C @@ -23,7 +23,9 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::getStringFromVector; +using lyx::support::getVectorFromString; +using lyx::support::trim; using std::find; using std::max; diff --git a/src/frontends/xforms/FormDialogView.C b/src/frontends/xforms/FormDialogView.C index c5d1c3037b..dabc6b2b85 100644 --- a/src/frontends/xforms/FormDialogView.C +++ b/src/frontends/xforms/FormDialogView.C @@ -26,7 +26,8 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::LibFileSearch; extern "C" { diff --git a/src/frontends/xforms/FormDocument.C b/src/frontends/xforms/FormDocument.C index 0b13835cef..5f9e426203 100644 --- a/src/frontends/xforms/FormDocument.C +++ b/src/frontends/xforms/FormDocument.C @@ -47,7 +47,11 @@ #include -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::contains_functor; +using lyx::support::getStringFromVector; +using lyx::support::getVectorFromString; +using lyx::support::LibFileSearch; using std::bind2nd; using std::endl; diff --git a/src/frontends/xforms/FormExternal.C b/src/frontends/xforms/FormExternal.C index 7afcb273db..673b448239 100644 --- a/src/frontends/xforms/FormExternal.C +++ b/src/frontends/xforms/FormExternal.C @@ -28,7 +28,8 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::getStringFromVector; +using lyx::support::strToInt; typedef FormController > base_class; diff --git a/src/frontends/xforms/FormFiledialog.C b/src/frontends/xforms/FormFiledialog.C index ad1093167a..1234f636f1 100644 --- a/src/frontends/xforms/FormFiledialog.C +++ b/src/frontends/xforms/FormFiledialog.C @@ -53,13 +53,25 @@ # endif #endif +using lyx::support::AbsolutePath; +using lyx::support::AddName; +using lyx::support::ExpandPath; +using lyx::support::FileInfo; +using lyx::support::getcwd; +using lyx::support::GetEnvPath; +using lyx::support::LyXReadLink; +using lyx::support::MakeAbsPath; +using lyx::support::OnlyFilename; +using lyx::support::regexMatch; +using lyx::support::split; +using lyx::support::suffixIs; +using lyx::support::trim; + using std::max; using std::sort; using std::map; -using namespace lyx::support; - namespace { diff --git a/src/frontends/xforms/FormFloat.C b/src/frontends/xforms/FormFloat.C index 5e85946c21..18977d76a6 100644 --- a/src/frontends/xforms/FormFloat.C +++ b/src/frontends/xforms/FormFloat.C @@ -26,7 +26,7 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::contains; namespace { diff --git a/src/frontends/xforms/FormForks.C b/src/frontends/xforms/FormForks.C index edf91d8b85..689acd9a07 100644 --- a/src/frontends/xforms/FormForks.C +++ b/src/frontends/xforms/FormForks.C @@ -26,7 +26,8 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::split; +using lyx::support::strToInt; using std::find; using std::find_if; diff --git a/src/frontends/xforms/FormGraphics.C b/src/frontends/xforms/FormGraphics.C index ef25223c61..bfeb1f0aa6 100644 --- a/src/frontends/xforms/FormGraphics.C +++ b/src/frontends/xforms/FormGraphics.C @@ -35,9 +35,15 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::float_equal; +using lyx::support::getStringFromVector; +using lyx::support::strToDbl; +using lyx::support::strToInt; +using lyx::support::token; using std::endl; + using std::vector; diff --git a/src/frontends/xforms/FormInclude.C b/src/frontends/xforms/FormInclude.C index 6c517666d5..561e530d9f 100644 --- a/src/frontends/xforms/FormInclude.C +++ b/src/frontends/xforms/FormInclude.C @@ -24,7 +24,7 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::rtrim; typedef FormController > base_class; diff --git a/src/frontends/xforms/FormMinipage.C b/src/frontends/xforms/FormMinipage.C index 73f7724054..8609dda5c0 100644 --- a/src/frontends/xforms/FormMinipage.C +++ b/src/frontends/xforms/FormMinipage.C @@ -24,7 +24,9 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::getStringFromVector; +using lyx::support::isStrDbl; +using lyx::support::subst; typedef FormController > base_class; diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index 478dde261d..102adcae3b 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -33,7 +33,9 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::contains_functor; +using lyx::support::getStringFromVector; +using lyx::support::rtrim; using std::bind2nd; using std::remove_if; diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index 194c1197d0..b7f30e4173 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -37,6 +37,13 @@ #include +using lyx::support::AddName; +using lyx::support::ChangeExtension; +using lyx::support::rtrim; +using lyx::support::strToDbl; +using lyx::support::trim; +using lyx::support::user_lyxdir; + using std::endl; using std::make_pair; using std::max; @@ -45,8 +52,6 @@ using std::min; using std::pair; using std::vector; -using namespace lyx::support; - namespace { diff --git a/src/frontends/xforms/FormPrint.C b/src/frontends/xforms/FormPrint.C index 8e6c05b082..72403ec779 100644 --- a/src/frontends/xforms/FormPrint.C +++ b/src/frontends/xforms/FormPrint.C @@ -27,12 +27,11 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::strToInt; typedef FormCB > base_class; - FormPrint::FormPrint() : base_class(_("Print Document")) {} diff --git a/src/frontends/xforms/FormRef.C b/src/frontends/xforms/FormRef.C index c665d798bd..a6223a2f32 100644 --- a/src/frontends/xforms/FormRef.C +++ b/src/frontends/xforms/FormRef.C @@ -24,7 +24,7 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::getStringFromVector; using std::find; using std::max; diff --git a/src/frontends/xforms/FormSendto.C b/src/frontends/xforms/FormSendto.C index 6c86a2cfd6..1e2cffe780 100644 --- a/src/frontends/xforms/FormSendto.C +++ b/src/frontends/xforms/FormSendto.C @@ -24,7 +24,7 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::trim; using std::vector; diff --git a/src/frontends/xforms/FormTabular.C b/src/frontends/xforms/FormTabular.C index 96fc8631d7..5ac257e0eb 100644 --- a/src/frontends/xforms/FormTabular.C +++ b/src/frontends/xforms/FormTabular.C @@ -24,9 +24,12 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::contains_functor; +using lyx::support::getStringFromVector; +using lyx::support::isStrDbl; using std::bind2nd; + using std::vector; diff --git a/src/frontends/xforms/FormTexinfo.C b/src/frontends/xforms/FormTexinfo.C index 9d569e7914..fd18933537 100644 --- a/src/frontends/xforms/FormTexinfo.C +++ b/src/frontends/xforms/FormTexinfo.C @@ -20,7 +20,7 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::OnlyFilename; typedef FormController > base_class; diff --git a/src/frontends/xforms/FormText.C b/src/frontends/xforms/FormText.C index 8b9ad1a650..f886890f4a 100644 --- a/src/frontends/xforms/FormText.C +++ b/src/frontends/xforms/FormText.C @@ -23,7 +23,7 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::trim; typedef FormController > base_class; diff --git a/src/frontends/xforms/FormThesaurus.C b/src/frontends/xforms/FormThesaurus.C index c9c5785493..e1e8895b13 100644 --- a/src/frontends/xforms/FormThesaurus.C +++ b/src/frontends/xforms/FormThesaurus.C @@ -21,7 +21,9 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::lowercase; +using lyx::support::trim; +using lyx::support::uppercase; #ifndef CXX_GLOBAL_CSTD using std::islower; diff --git a/src/frontends/xforms/FormToc.C b/src/frontends/xforms/FormToc.C index 73008402a0..aab69b800a 100644 --- a/src/frontends/xforms/FormToc.C +++ b/src/frontends/xforms/FormToc.C @@ -21,7 +21,7 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::getStringFromVector; using std::vector; diff --git a/src/frontends/xforms/FormWrap.C b/src/frontends/xforms/FormWrap.C index 7c21859de7..2e8ab02582 100644 --- a/src/frontends/xforms/FormWrap.C +++ b/src/frontends/xforms/FormWrap.C @@ -25,11 +25,12 @@ #include "lyx_forms.h" #include "support/tostr.h" -using namespace lyx::support; +using lyx::support::getStringFromVector; +using lyx::support::subst; + typedef FormController > base_class; - FormWrap::FormWrap(Dialog & parent) : base_class(parent, _("Text Wrap Settings")) {} diff --git a/src/frontends/xforms/Tooltips.C b/src/frontends/xforms/Tooltips.C index ae9c8be635..2367a21147 100644 --- a/src/frontends/xforms/Tooltips.C +++ b/src/frontends/xforms/Tooltips.C @@ -26,7 +26,7 @@ #include -using namespace lyx::support; +using lyx::support::trim; bool Tooltips::enabled_ = true; diff --git a/src/frontends/xforms/XFormsMenubar.C b/src/frontends/xforms/XFormsMenubar.C index 6e92aacb4c..a839c72624 100644 --- a/src/frontends/xforms/XFormsMenubar.C +++ b/src/frontends/xforms/XFormsMenubar.C @@ -25,10 +25,12 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::lowercase; +using lyx::support::subst; using std::endl; using std::for_each; + using std::vector; diff --git a/src/frontends/xforms/XFormsView.C b/src/frontends/xforms/XFormsView.C index 4c9595a68a..50e954ed5a 100644 --- a/src/frontends/xforms/XFormsView.C +++ b/src/frontends/xforms/XFormsView.C @@ -27,7 +27,7 @@ #include -using namespace lyx::support; +using lyx::support::LibFileSearch; using std::abs; using std::endl; diff --git a/src/frontends/xforms/XPainter.C b/src/frontends/xforms/XPainter.C index 9bf41db58c..912e4bdb12 100644 --- a/src/frontends/xforms/XPainter.C +++ b/src/frontends/xforms/XPainter.C @@ -27,7 +27,7 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::uppercase; XPainter::XPainter(XWorkArea & xwa) diff --git a/src/frontends/xforms/checkedwidgets.C b/src/frontends/xforms/checkedwidgets.C index 726e5009f5..c1b984b657 100644 --- a/src/frontends/xforms/checkedwidgets.C +++ b/src/frontends/xforms/checkedwidgets.C @@ -19,7 +19,7 @@ #include "lyx_forms.h" -using namespace lyx::support; +using lyx::support::isStrDbl; void addCheckedLyXLength(BCView & bcview, diff --git a/src/frontends/xforms/lyx_gui.C b/src/frontends/xforms/lyx_gui.C index c15dc8dcf6..9c96a63e88 100644 --- a/src/frontends/xforms/lyx_gui.C +++ b/src/frontends/xforms/lyx_gui.C @@ -42,7 +42,9 @@ #include #include -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::os; +using lyx::support::user_lyxdir; #ifndef CXX_GLOBAL_CSTD using std::exit; diff --git a/src/frontends/xforms/xfont_loader.C b/src/frontends/xforms/xfont_loader.C index 67f91a4bd8..40367b9497 100644 --- a/src/frontends/xforms/xfont_loader.C +++ b/src/frontends/xforms/xfont_loader.C @@ -25,7 +25,9 @@ #include -using namespace lyx::support; +using lyx::support::LibFileSearch; +using lyx::support::OnlyPath; +using lyx::support::Systemcall; using std::endl; diff --git a/src/frontends/xforms/xfont_metrics.C b/src/frontends/xforms/xfont_metrics.C index 3485157f43..3e7c879ca4 100644 --- a/src/frontends/xforms/xfont_metrics.C +++ b/src/frontends/xforms/xfont_metrics.C @@ -25,7 +25,7 @@ #include -using namespace lyx::support; +using lyx::support::uppercase; namespace { diff --git a/src/frontends/xforms/xformsImage.C b/src/frontends/xforms/xformsImage.C index 0746a9cf6f..fe6eec97d3 100644 --- a/src/frontends/xforms/xformsImage.C +++ b/src/frontends/xforms/xformsImage.C @@ -31,7 +31,9 @@ #include -using namespace lyx::support; +using lyx::support::float_equal; +using lyx::support::prefixIs; +using lyx::support::rtrim; using std::find_if; diff --git a/src/frontends/xforms/xforms_helpers.C b/src/frontends/xforms/xforms_helpers.C index cc97b7461a..4cb75c57bd 100644 --- a/src/frontends/xforms/xforms_helpers.C +++ b/src/frontends/xforms/xforms_helpers.C @@ -26,7 +26,12 @@ #include -using namespace lyx::support; +using lyx::support::AbsolutePath; +using lyx::support::FileInfo; +using lyx::support::isStrDbl; +using lyx::support::OnlyPath; +using lyx::support::subst; +using lyx::support::trim; using std::make_pair; diff --git a/src/importer.C b/src/importer.C index a21fd655bf..76b0c223c8 100644 --- a/src/importer.C +++ b/src/importer.C @@ -24,9 +24,12 @@ #include "gettext.h" #include "BufferView.h" -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::ChangeExtension; +using lyx::support::MakeDisplayPath; using std::find; + using std::vector; diff --git a/src/insets/insetbibitem.C b/src/insets/insetbibitem.C index abf8c7ba75..db28388306 100644 --- a/src/insets/insetbibitem.C +++ b/src/insets/insetbibitem.C @@ -22,9 +22,11 @@ #include "support/lstrings.h" #include "support/tostr.h" -using namespace lyx::support; +using lyx::support::prefixIs; +using lyx::support::strToInt; using std::max; + using std::auto_ptr; diff --git a/src/insets/insetbibtex.C b/src/insets/insetbibtex.C index f87c11d3a2..d880674ea2 100644 --- a/src/insets/insetbibtex.C +++ b/src/insets/insetbibtex.C @@ -27,7 +27,21 @@ #include -using namespace lyx::support; +using lyx::support::ascii_lowercase; +using lyx::support::ChangeExtension; +using lyx::support::contains; +using lyx::support::findtexfile; +using lyx::support::IsFileReadable; +using lyx::support::ltrim; +using lyx::support::MakeAbsPath; +using lyx::support::os; +using lyx::support::Path; +using lyx::support::prefixIs; +using lyx::support::rtrim; +using lyx::support::split; +using lyx::support::subst; +using lyx::support::tokenPos; +using lyx::support::trim; using std::endl; using std::getline; diff --git a/src/insets/insetcaption.C b/src/insets/insetcaption.C index 76b23ccec3..c75e769ed4 100644 --- a/src/insets/insetcaption.C +++ b/src/insets/insetcaption.C @@ -30,9 +30,10 @@ #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::support::bformat; using std::endl; + using std::ostream; using std::ostringstream; diff --git a/src/insets/insetcite.C b/src/insets/insetcite.C index 37021c38ca..14f69222a9 100644 --- a/src/insets/insetcite.C +++ b/src/insets/insetcite.C @@ -23,7 +23,12 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::ascii_lowercase; +using lyx::support::contains; +using lyx::support::getVectorFromString; +using lyx::support::ltrim; +using lyx::support::rtrim; +using lyx::support::split; using std::ostream; using std::vector; diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index afb4160571..becba55719 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -27,9 +27,10 @@ #include "frontends/Painter.h" #include "frontends/LyXView.h" -using namespace lyx::graphics; +using lyx::graphics::PreviewLoader; using std::endl; + using std::max; using std::ostream; diff --git a/src/insets/insetert.C b/src/insets/insetert.C index 5e530c4f96..cd5225707f 100644 --- a/src/insets/insetert.C +++ b/src/insets/insetert.C @@ -29,10 +29,11 @@ #include "support/tostr.h" -using namespace lyx::support; - using lyx::pos_type; +using lyx::support::split; +using lyx::support::strToInt; + using std::endl; using std::min; diff --git a/src/insets/insetfloat.C b/src/insets/insetfloat.C index 84d2487e37..e2212213ea 100644 --- a/src/insets/insetfloat.C +++ b/src/insets/insetfloat.C @@ -31,9 +31,10 @@ #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::support::contains; using std::endl; + using std::auto_ptr; using std::istringstream; using std::ostream; diff --git a/src/insets/insetfloatlist.C b/src/insets/insetfloatlist.C index 29bfb7e99f..5aed5db8ae 100644 --- a/src/insets/insetfloatlist.C +++ b/src/insets/insetfloatlist.C @@ -26,9 +26,10 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::bformat; using std::endl; + using std::ostream; diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index d743971750..2e6de1081a 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -82,9 +82,24 @@ TODO #include "support/std_sstream.h" namespace support = lyx::support; -using namespace lyx::support; +using lyx::support::AbsolutePath; +using lyx::support::bformat; +using lyx::support::ChangeExtension; +using lyx::support::contains; +using lyx::support::FileName; +using lyx::support::float_equal; +using lyx::support::GetExtension; +using lyx::support::getExtFromContents; +using lyx::support::IsFileReadable; +using lyx::support::LibFileSearch; +using lyx::support::os; +using lyx::support::rtrim; +using lyx::support::Systemcall; +using lyx::support::unzipFile; +using lyx::support::unzippedFileName; using std::endl; + using std::auto_ptr; using std::istringstream; using std::ostream; diff --git a/src/insets/insetgraphicsParams.C b/src/insets/insetgraphicsParams.C index b3bcf7d3f9..a4bb4cbe8f 100644 --- a/src/insets/insetgraphicsParams.C +++ b/src/insets/insetgraphicsParams.C @@ -26,7 +26,10 @@ #include "support/lstrings.h" #include "support/translator.h" -using namespace lyx::support; +using lyx::support::float_equal; +using lyx::support::readBB_from_PSFile; +using lyx::support::strToInt; +using lyx::support::token; using std::ostream; diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index f3ae71be0a..9d75647026 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -40,7 +40,18 @@ #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::ChangeExtension; +using lyx::support::contains; +using lyx::support::FileInfo; +using lyx::support::FileMonitor; +using lyx::support::GetFileContents; +using lyx::support::IsFileReadable; +using lyx::support::IsLyXFilename; +using lyx::support::MakeAbsPath; +using lyx::support::MakeDisplayPath; +using lyx::support::OnlyPath; +using lyx::support::subst; using std::endl; diff --git a/src/insets/insetlabel.C b/src/insets/insetlabel.C index 27c96fc163..fd61661139 100644 --- a/src/insets/insetlabel.C +++ b/src/insets/insetlabel.C @@ -17,7 +17,7 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::escape; using std::ostream; diff --git a/src/insets/insetlatexaccent.C b/src/insets/insetlatexaccent.C index a3cb9de05c..bb4f2e3f9b 100644 --- a/src/insets/insetlatexaccent.C +++ b/src/insets/insetlatexaccent.C @@ -23,9 +23,11 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::contains; +using lyx::support::trim; using std::endl; + using std::auto_ptr; using std::ostream; diff --git a/src/insets/insetquotes.C b/src/insets/insetquotes.C index 21c205d6f5..ac80199bfe 100644 --- a/src/insets/insetquotes.C +++ b/src/insets/insetquotes.C @@ -29,9 +29,10 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::prefixIs; using std::endl; + using std::auto_ptr; using std::ostream; diff --git a/src/insets/insetref.C b/src/insets/insetref.C index 989b51d8e1..e1262f00f8 100644 --- a/src/insets/insetref.C +++ b/src/insets/insetref.C @@ -21,7 +21,7 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::escape; using std::ostream; diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 456ea27580..c9a759c112 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -36,8 +36,10 @@ #include "support/std_sstream.h" -using namespace lyx::support; -using namespace lyx::graphics; +using lyx::graphics::PreviewLoader; + +using lyx::support::ltrim; +using lyx::support::strToInt; using std::endl; using std::max; diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 3ab0859bce..0c98591a21 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -44,6 +44,15 @@ #include +using bv_funcs::replaceSelection; + +using lyx::pos_type; + +using lyx::graphics::PreviewLoader; + +using lyx::support::isStrUnsignedInt; +using lyx::support::strToUnsignedInt; + using std::endl; using std::for_each; using std::max; @@ -52,12 +61,6 @@ using std::auto_ptr; using std::ostream; using std::vector; -using namespace lyx::support; -using namespace lyx::graphics; -using namespace bv_funcs; - -using lyx::pos_type; - InsetText::InsetText(BufferParams const & bp) : UpdatableInset(), text_(0, this, true, paragraphs) diff --git a/src/insets/inseturl.C b/src/insets/inseturl.C index a67392e604..2bc9ac98ba 100644 --- a/src/insets/inseturl.C +++ b/src/insets/inseturl.C @@ -19,7 +19,7 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::subst; using std::ostream; diff --git a/src/insets/renderers.C b/src/insets/renderers.C index f010b24306..1e80eafe90 100644 --- a/src/insets/renderers.C +++ b/src/insets/renderers.C @@ -26,7 +26,8 @@ #include "support/filetools.h" -using namespace lyx::support; +using lyx::support::AbsolutePath; +using lyx::support::OnlyFilename; RenderInset::RenderInset() diff --git a/src/insets/updatableinset.C b/src/insets/updatableinset.C index 30b83b0f2b..9b14c4798f 100644 --- a/src/insets/updatableinset.C +++ b/src/insets/updatableinset.C @@ -23,7 +23,8 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::strToDbl; +using lyx::support::strToInt; // some stuff for inset locking diff --git a/src/ispell.C b/src/ispell.C index 65a51e3c18..acf8c6a404 100644 --- a/src/ispell.C +++ b/src/ispell.C @@ -30,8 +30,6 @@ #endif #include -using namespace lyx::support; - #ifndef CXX_GLOBAL_CSTD using std::strcpy; using std::strlen; diff --git a/src/lastfiles.C b/src/lastfiles.C index 69b44af7ae..2598077bf8 100644 --- a/src/lastfiles.C +++ b/src/lastfiles.C @@ -19,7 +19,7 @@ #include #include -using namespace lyx::support; +using lyx::support::FileInfo; using std::copy; using std::endl; diff --git a/src/lyx_cb.C b/src/lyx_cb.C index e48207320c..6149734b94 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -45,7 +45,27 @@ #include #include -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::bformat; +using lyx::support::destroyDir; +using lyx::support::FileInfo; +using lyx::support::ForkedProcess; +using lyx::support::IsLyXFilename; +using lyx::support::LibFileSearch; +using lyx::support::MakeAbsPath; +using lyx::support::MakeDisplayPath; +using lyx::support::OnlyFilename; +using lyx::support::OnlyPath; +using lyx::support::os; +using lyx::support::Path; +using lyx::support::removeAutosaveFile; +using lyx::support::rename; +using lyx::support::split; +using lyx::support::system_lyxdir; +using lyx::support::Systemcall; +using lyx::support::tempName; +using lyx::support::unlink; +using lyx::support::user_lyxdir; using std::back_inserter; using std::copy; @@ -56,6 +76,7 @@ using std::ifstream; using std::ios; using std::istream_iterator; + extern BufferList bufferlist; // this should be static, but I need it in buffer.C bool quitting; // flag, that we are quitting the program diff --git a/src/lyx_main.C b/src/lyx_main.C index 62861fa091..24db8b03af 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -52,10 +52,27 @@ #include #include -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::AddPath; +using lyx::support::bformat; +using lyx::support::createDirectory; +using lyx::support::CreateLyXTmpDir; +using lyx::support::FileInfo; +using lyx::support::FileSearch; +using lyx::support::GetEnv; +using lyx::support::GetEnvPath; +using lyx::support::i18nLibFileSearch; +using lyx::support::LibFileSearch; +using lyx::support::os; +using lyx::support::Path; +using lyx::support::rtrim; +using lyx::support::setLyxPaths; +using lyx::support::system_lyxdir; +using lyx::support::user_lyxdir; + +using std::endl; using std::vector; -using std::endl; #ifndef CXX_GLOBAL_CSTD using std::exit; @@ -63,6 +80,7 @@ using std::signal; using std::system; #endif + extern void QuitLyX(); extern LyXServer * lyxserver; diff --git a/src/lyxfind.C b/src/lyxfind.C index aa790c6e9b..3e30e438a0 100644 --- a/src/lyxfind.C +++ b/src/lyxfind.C @@ -12,16 +12,21 @@ #include -#include "lyxtext.h" #include "lyxfind.h" -#include "frontends/Alert.h" -#include "support/textutils.h" -#include "BufferView.h" + #include "buffer.h" +#include "BufferView.h" #include "gettext.h" +#include "lyxtext.h" + +#include "frontends/Alert.h" + #include "insets/insettext.h" -using namespace lyx::support; +#include "support/textutils.h" + +using lyx::support::lowercase; +using lyx::support::uppercase; namespace lyx { diff --git a/src/lyxfont.C b/src/lyxfont.C index cc551c7f1d..6b49371f8c 100644 --- a/src/lyxfont.C +++ b/src/lyxfont.C @@ -15,20 +15,27 @@ #include #include "lyxfont.h" -#include "gettext.h" -#include "debug.h" -#include "lyxrc.h" -#include "lyxlex.h" -#include "language.h" -#include "support/std_sstream.h" -#include "support/lstrings.h" -#include "bufferparams.h" // stateText -using namespace lyx::support; +#include "bufferparams.h" // stateText +#include "debug.h" +#include "gettext.h" +#include "language.h" +#include "lyxlex.h" +#include "lyxrc.h" + +#include "support/lstrings.h" + +#include "support/std_sstream.h" + +using lyx::support::ascii_lowercase; +using lyx::support::bformat; +using lyx::support::rtrim; +using lyx::support::subst; + +using std::endl; using std::ostream; using std::ostringstream; -using std::endl; #ifndef CXX_GLOBAL_CSTD using std::strlen; diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 613c2f318c..ae167e8077 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -73,14 +73,42 @@ #include "support/std_sstream.h" -using namespace lyx::support; +using bv_funcs::apply_freefont; +using bv_funcs::changeDepth; +using bv_funcs::currentState; +using bv_funcs::DEC_DEPTH; +using bv_funcs::freefont2string; +using bv_funcs::INC_DEPTH; +using bv_funcs::update_and_apply_freefont; + +using lyx::support::AddName; +using lyx::support::AddPath; +using lyx::support::bformat; +using lyx::support::ChangeExtension; +using lyx::support::FileInfo; +using lyx::support::FileSearch; +using lyx::support::ForkedcallsController; +using lyx::support::i18nLibFileSearch; +using lyx::support::IsDirWriteable; +using lyx::support::IsFileReadable; +using lyx::support::isStrInt; +using lyx::support::MakeAbsPath; +using lyx::support::MakeDisplayPath; +using lyx::support::Path; +using lyx::support::rtrim; +using lyx::support::split; +using lyx::support::strToInt; +using lyx::support::strToUnsignedInt; +using lyx::support::system_lyxdir; +using lyx::support::token; +using lyx::support::trim; +using lyx::support::user_lyxdir; using std::endl; using std::make_pair; using std::istringstream; -using namespace bv_funcs; extern BufferList bufferlist; extern LyXServer * lyxserver; diff --git a/src/lyxlayout.C b/src/lyxlayout.C index d1ddac4b74..b87d2c1c17 100644 --- a/src/lyxlayout.C +++ b/src/lyxlayout.C @@ -19,10 +19,12 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::subst; +using lyx::support::trim; using std::endl; + // The order of the LayoutTags enum is no more important. [asierra300396] // Tags indexes. enum LayoutTags { diff --git a/src/lyxlex.C b/src/lyxlex.C index 8d1b30b60c..ebabf59977 100644 --- a/src/lyxlex.C +++ b/src/lyxlex.C @@ -14,16 +14,27 @@ #include #include "lyxlex.h" -#include "lyxlex_pimpl.h" + #include "debug.h" +#include "lyxlex_pimpl.h" + #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::compare_ascii_no_case; +using lyx::support::isStrDbl; +using lyx::support::isStrInt; +using lyx::support::ltrim; +using lyx::support::prefixIs; +using lyx::support::strToDbl; +using lyx::support::strToInt; +using lyx::support::subst; +using lyx::support::trim; -using std::ostream; -using std::istream; using std::endl; +using std::istream; +using std::ostream; + LyXLex::LyXLex(keyword_item * tab, int num) : pimpl_(new Pimpl(tab, num)) diff --git a/src/lyxlex_pimpl.C b/src/lyxlex_pimpl.C index 4e0eafb0b8..f5c1a1b412 100644 --- a/src/lyxlex_pimpl.C +++ b/src/lyxlex_pimpl.C @@ -13,14 +13,18 @@ #include #include "lyxlex_pimpl.h" + #include "debug.h" -#include "support/lyxalgo.h" #include "support/filetools.h" +#include "support/lyxalgo.h" #include "support/lstrings.h" - -using namespace lyx::support; +using lyx::support::compare_ascii_no_case; +using lyx::support::getExtFromContents; +using lyx::support::MakeDisplayPath; +using lyx::support::split; +using lyx::support::subst; using std::endl; using std::getline; diff --git a/src/lyxrc.C b/src/lyxrc.C index 080d731508..157e1d6644 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -28,20 +28,26 @@ #include "lyxlex.h" #include "lyxfont.h" -#include "support/tostr.h" #include "support/filetools.h" #include "support/lstrings.h" -#include "support/userinfo.h" #include "support/translator.h" +#include "support/tostr.h" +#include "support/userinfo.h" -using namespace lyx::support; +using lyx::support::ascii_lowercase; +using lyx::support::ExpandPath; +using lyx::support::GetEnv; +using lyx::support::LibFileSearch; +using lyx::support::token; -using std::ostream; -using std::ofstream; using std::cout; -using std::ios; using std::endl; +using std::ios; +using std::ofstream; +using std::ostream; + + namespace lyx { namespace graphics { /// The translator between the DisplayType and the corresponding lyx string. diff --git a/src/lyxserver.C b/src/lyxserver.C index aee81d0de5..de288e2817 100644 --- a/src/lyxserver.C +++ b/src/lyxserver.C @@ -60,11 +60,14 @@ #include "support/os2_errortable.h" #endif - -using namespace lyx::support; +using lyx::support::compare; +using lyx::support::rtrim; +using lyx::support::split; +using lyx::support::unlink; using std::endl; + // provide an empty mkfifo() if we do not have one. This disables the // lyxserver. #ifndef HAVE_MKFIFO diff --git a/src/lyxtextclass.C b/src/lyxtextclass.C index 9ed063af57..b37e698b96 100644 --- a/src/lyxtextclass.C +++ b/src/lyxtextclass.C @@ -24,8 +24,10 @@ #include "support/lstrings.h" #include "support/filetools.h" - -using namespace lyx::support; +using lyx::support::LibFileSearch; +using lyx::support::MakeDisplayPath; +using lyx::support::rtrim; +using lyx::support::subst; using std::endl; using std::find_if; @@ -33,6 +35,7 @@ using std::remove_if; using std::ostream; + namespace { // anon struct compare_name { diff --git a/src/lyxtextclasslist.C b/src/lyxtextclasslist.C index 45a49ad39c..435b8ac95c 100644 --- a/src/lyxtextclasslist.C +++ b/src/lyxtextclasslist.C @@ -19,15 +19,15 @@ #include "support/lyxfunctional.h" #include "support/filetools.h" +using lyx::textclass_type; -using namespace lyx::support; +using lyx::support::LibFileSearch; +using lyx::support::MakeDisplayPath; #ifndef CXX_GLOBAL_CSTD using std::exit; #endif -using lyx::textclass_type; - using std::endl; using std::find_if; using std::make_pair; diff --git a/src/lyxvc.C b/src/lyxvc.C index 9bc0208310..7244d8dccd 100644 --- a/src/lyxvc.C +++ b/src/lyxvc.C @@ -26,10 +26,13 @@ #include "support/filetools.h" #include "support/lyxlib.h" - -using namespace lyx::support; +using lyx::support::bformat; +using lyx::support::IsFileReadable; +using lyx::support::MakeDisplayPath; +using lyx::support::tempName; using std::endl; + using std::pair; diff --git a/src/main.C b/src/main.C index cc7462ff88..c4d12b50ac 100644 --- a/src/main.C +++ b/src/main.C @@ -19,7 +19,8 @@ #include #endif -using namespace lyx::support; +using lyx::support::os; + int main(int argc, char * argv[]) { diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 2530e8897a..f28bd4af7b 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -35,8 +35,9 @@ #include "frontends/Dialogs.h" #include "ref_inset.h" - -using namespace lyx::support; +using lyx::support::atoi; +using lyx::support::split; +using lyx::support::token; using std::abs; using std::endl; diff --git a/src/mathed/formulamacro.C b/src/mathed/formulamacro.C index e7b1c57e80..f21e599d47 100644 --- a/src/mathed/formulamacro.C +++ b/src/mathed/formulamacro.C @@ -24,7 +24,7 @@ #include "lyxlex.h" #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::support::bformat; using std::auto_ptr; using std::ostream; diff --git a/src/mathed/math_autocorrect.C b/src/mathed/math_autocorrect.C index 8810f63cde..423e12475f 100644 --- a/src/mathed/math_autocorrect.C +++ b/src/mathed/math_autocorrect.C @@ -20,7 +20,7 @@ #include -using namespace lyx::support; +using lyx::support::LibFileSearch; using std::ifstream; using std::istream; diff --git a/src/mathed/math_extern.C b/src/mathed/math_extern.C index 4ad4ea6527..2c42c7e95b 100644 --- a/src/mathed/math_extern.C +++ b/src/mathed/math_extern.C @@ -38,7 +38,11 @@ #include -using namespace lyx::support; +using lyx::support::cmd_ret; +using lyx::support::getVectorFromString; +using lyx::support::LibFileSearch; +using lyx::support::RunCommand; +using lyx::support::subst; using std::endl; using std::find_if; diff --git a/src/mathed/math_factory.C b/src/mathed/math_factory.C index f083c9a175..8eab4f5b91 100644 --- a/src/mathed/math_factory.C +++ b/src/mathed/math_factory.C @@ -59,7 +59,8 @@ #include -using namespace lyx::support; +using lyx::support::LibFileSearch; +using lyx::support::split; using std::endl; using std::istringstream; diff --git a/src/mathed/math_hullinset.C b/src/mathed/math_hullinset.C index d39611c0d4..f307e21454 100644 --- a/src/mathed/math_hullinset.C +++ b/src/mathed/math_hullinset.C @@ -27,7 +27,7 @@ #include "lyxrc.h" #include "gettext.h" -using namespace lyx::support; +using lyx::support::trim; using std::endl; using std::max; diff --git a/src/messages.C b/src/messages.C index 2dc56ae049..e437ffced8 100644 --- a/src/messages.C +++ b/src/messages.C @@ -13,7 +13,8 @@ #include "support/filetools.h" #include "support/path_defines.h" -using namespace lyx::support; +using lyx::support::GetEnvPath; +using lyx::support::lyx_localedir; #ifdef ENABLE_NLS diff --git a/src/paragraph.C b/src/paragraph.C index 6ab5f5d49e..21584b6b23 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -39,14 +39,15 @@ #include "support/textutils.h" #include "support/std_sstream.h" +using lyx::pos_type; -using namespace lyx::support; +using lyx::support::contains; +using lyx::support::subst; + +using std::endl; using std::ostream; using std::ostringstream; -using std::endl; - -using lyx::pos_type; Paragraph::Paragraph() diff --git a/src/paragraph_funcs.C b/src/paragraph_funcs.C index be520c2e93..973743df74 100644 --- a/src/paragraph_funcs.C +++ b/src/paragraph_funcs.C @@ -40,14 +40,17 @@ #include "support/lstrings.h" #include "support/std_sstream.h" -using namespace lyx::support; - using lyx::pos_type; -//using lyx::layout_type; + +using lyx::support::bformat; +using lyx::support::subst; + using std::endl; + using std::istringstream; using std::ostream; + extern string bibitemWidest(Buffer const &); diff --git a/src/tabular.C b/src/tabular.C index f7afb26ddb..ce073eb463 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -33,7 +33,11 @@ #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::support::ltrim; +using lyx::support::prefixIs; +using lyx::support::rtrim; +using lyx::support::strToInt; +using lyx::support::suffixIs; using std::abs; using std::endl; @@ -49,6 +53,7 @@ using std::vector; using std::strlen; #endif + namespace { int const WIDTH_OF_LINE = 5; diff --git a/src/tex2lyx/lyxfont.C b/src/tex2lyx/lyxfont.C index 7fff253ee8..11fc7078ec 100644 --- a/src/tex2lyx/lyxfont.C +++ b/src/tex2lyx/lyxfont.C @@ -14,7 +14,7 @@ #include "lyxlex.h" #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::ascii_lowercase; LyXFont & LyXFont::lyxRead(LyXLex & lex) diff --git a/src/text.C b/src/text.C index d72daeba57..5af0a86ec1 100644 --- a/src/text.C +++ b/src/text.C @@ -46,16 +46,18 @@ #include "support/lstrings.h" #include "support/textutils.h" - -using namespace lyx::support; - -using std::max; -using std::endl; +using bv_funcs::number; using lyx::pos_type; using lyx::word_location; -using namespace bv_funcs; +using lyx::support::contains; +using lyx::support::lowercase; +using lyx::support::uppercase; + +using std::max; +using std::endl; + /// top, right, bottom pixel margin extern int const PAPER_MARGIN = 20; diff --git a/src/text2.C b/src/text2.C index 4e12656abe..0ad54767a3 100644 --- a/src/text2.C +++ b/src/text2.C @@ -58,14 +58,14 @@ #include "support/std_sstream.h" -using namespace lyx::support; +using lyx::pos_type; + +using lyx::support::bformat; using std::endl; using std::ostringstream; -using lyx::pos_type; - LyXText::LyXText(BufferView * bv, InsetText * inset, bool ininset, ParagraphList & paragraphs) diff --git a/src/text3.C b/src/text3.C index b3797f0333..b826227bdc 100644 --- a/src/text3.C +++ b/src/text3.C @@ -48,8 +48,12 @@ #include "support/std_sstream.h" #include -using namespace lyx::support; -using namespace bv_funcs; +using bv_funcs::replaceSelection; + +using lyx::pos_type; + +using lyx::support::isStrUnsignedInt; +using lyx::support::strToUnsignedInt; using std::endl; using std::find; @@ -57,8 +61,6 @@ using std::find; using std::istringstream; using std::vector; -using lyx::pos_type; - extern string current_layout; extern int bibitemMaxWidth(BufferView *, LyXFont const &); diff --git a/src/trans.C b/src/trans.C index 0ee9434956..32d487a0dc 100644 --- a/src/trans.C +++ b/src/trans.C @@ -18,10 +18,12 @@ #include "debug.h" #include "trans_mgr.h" -using namespace lyx::support; +using lyx::support::contains; +using lyx::support::LibFileSearch; + +using std::endl; using std::map; -using std::endl; // KmodInfo diff --git a/src/trans_mgr.C b/src/trans_mgr.C index 6a9abf437d..407507cd7e 100644 --- a/src/trans_mgr.C +++ b/src/trans_mgr.C @@ -19,11 +19,13 @@ #include "lyxrc.h" #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::split; using std::endl; + using std::pair; + extern string const DoAccent(string const &, tex_accent); extern string const DoAccent(char, tex_accent); diff --git a/src/vc-backend.C b/src/vc-backend.C index 07a17dc69e..786826d22c 100644 --- a/src/vc-backend.C +++ b/src/vc-backend.C @@ -24,7 +24,16 @@ #include -using namespace lyx::support; +using lyx::support::AddName; +using lyx::support::AddPath; +using lyx::support::contains; +using lyx::support::FileInfo; +using lyx::support::OnlyFilename; +using lyx::support::OnlyPath; +using lyx::support::Path; +using lyx::support::rtrim; +using lyx::support::split; +using lyx::support::Systemcall; #ifndef CXX_GLOBAL_CSTD using std::asctime; diff --git a/src/vspace.C b/src/vspace.C index 512e64eefc..bd4c534d1f 100644 --- a/src/vspace.C +++ b/src/vspace.C @@ -19,7 +19,12 @@ #include "support/lstrings.h" -using namespace lyx::support; +using lyx::support::compare; +using lyx::support::isStrDbl; +using lyx::support::ltrim; +using lyx::support::prefixIs; +using lyx::support::rtrim; +using lyx::support::strToDbl; namespace {