diff --git a/src/Author.cpp b/src/Author.cpp index d31dd7cb5f..aa9c970a34 100644 --- a/src/Author.cpp +++ b/src/Author.cpp @@ -19,12 +19,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::token; -using support::trim; - bool operator==(Author const & l, Author const & r) { diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index b5579da7b1..538922f0a2 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -31,14 +31,10 @@ #include "boost/regex.hpp" using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; -using support::compare_no_case; -using support::getVectorFromString; -using support::ltrim; -using support::rtrim; ////////////////////////////////////////////////////////////////////// // diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 83002cc6f7..d9b0acbfb4 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -107,34 +107,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::addName; -using support::bformat; -using support::changeExtension; -using support::cmd_ret; -using support::createBufferTmpDir; -using support::FileName; -using support::FileNameList; -using support::libFileSearch; -using support::latex_path; -using support::ltrim; -using support::makeAbsPath; -using support::makeDisplayPath; -using support::makeLatexName; -using support::onlyFilename; -using support::onlyPath; -using support::quoteName; -using support::removeAutosaveFile; -using support::rename; -using support::runCommand; -using support::split; -using support::subst; -using support::tempName; -using support::trim; -using support::suffixIs; - namespace Alert = frontend::Alert; namespace os = support::os; @@ -1026,7 +1002,7 @@ bool Buffer::makeLaTeXFile(FileName const & fname, catch (...) { lyxerr << "Caught some really weird exception..." << endl; LyX::cref().emergencyCleanup(); - abort(); + lyx::support::abort(); } ofs.close(); diff --git a/src/BufferList.cpp b/src/BufferList.cpp index a650ba62dc..8584d46bee 100644 --- a/src/BufferList.cpp +++ b/src/BufferList.cpp @@ -36,18 +36,10 @@ using boost::bind; using namespace std; +using namespace lyx::support; namespace lyx { -using support::addName; -using support::bformat; -using support::FileName; -using support::makeDisplayPath; -using support::onlyFilename; -using support::removeAutosaveFile; -using support::package; -using support::prefixIs; - namespace Alert = lyx::frontend::Alert; diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 322d9d3ea5..3dfe0656f8 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -54,13 +54,7 @@ #include using namespace std; - -using lyx::support::FileName; -using lyx::support::libFileSearch; -using lyx::support::bformat; -using lyx::support::rtrim; -using lyx::support::tokenPos; -using lyx::support::prefixIs; +using namespace lyx::support; static char const * const string_paragraph_separation[] = { diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 8ce64641e4..468e0a0a90 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -81,18 +81,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::addPath; -using support::bformat; -using support::FileFilterList; -using support::FileName; -using support::fileSearch; -using support::makeDisplayPath; -using support::makeAbsPath; -using support::package; - namespace Alert = frontend::Alert; namespace { diff --git a/src/Chktex.cpp b/src/Chktex.cpp index 809d964367..20ee902876 100644 --- a/src/Chktex.cpp +++ b/src/Chktex.cpp @@ -24,16 +24,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::changeExtension; -using support::FileName; -using support::makeAbsPath; -using support::onlyFilename; -using support::split; -using support::Systemcall; - Chktex::Chktex(string const & chktex, string const & f, string const & p) : cmd(chktex), file(f), path(p) diff --git a/src/CmdDef.cpp b/src/CmdDef.cpp index b05d726a18..f7dbb71a09 100644 --- a/src/CmdDef.cpp +++ b/src/CmdDef.cpp @@ -23,14 +23,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; -using support::i18nLibFileSearch; -using support::trim; - - namespace { enum CmdDefTags { diff --git a/src/Color.cpp b/src/Color.cpp index f90b24e255..68b71f37fb 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -31,10 +31,10 @@ using namespace std; +using namespace lyx::support; namespace lyx { -using support::ascii_lowercase; struct ColorSet::ColorEntry { ColorCode lcolor; diff --git a/src/Converter.cpp b/src/Converter.cpp index 6768299f7c..4f27e8f33f 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -37,31 +37,10 @@ #include "support/Systemcall.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::addName; -using support::bformat; -using support::changeExtension; -using support::compare_ascii_no_case; -using support::contains; -using support::FileName; -using support::FileNameList; -using support::getExtension; -using support::libFileSearch; -using support::libScriptSearch; -using support::makeAbsPath; -using support::makeRelPath; -using support::onlyFilename; -using support::onlyPath; -using support::package; -using support::prefixIs; -using support::quoteName; -using support::removeExtension; -using support::split; -using support::subst; -using support::Systemcall; - namespace Alert = lyx::frontend::Alert; diff --git a/src/ConverterCache.cpp b/src/ConverterCache.cpp index 4ca2979a35..d82f939ff2 100644 --- a/src/ConverterCache.cpp +++ b/src/ConverterCache.cpp @@ -36,12 +36,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; -using support::addName; - namespace { unsigned long do_crc(string const & s) diff --git a/src/Counters.cpp b/src/Counters.cpp index ad13330cd7..1c910b115c 100644 --- a/src/Counters.cpp +++ b/src/Counters.cpp @@ -24,10 +24,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::lowercase; Counter::Counter() { diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 51fd1bbf1b..44f04bf4e2 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -59,12 +59,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; -using frontend::Clipboard; - namespace { typedef std::pair PitPosPair; diff --git a/src/DepTable.cpp b/src/DepTable.cpp index b37f914150..17eab19fb3 100644 --- a/src/DepTable.cpp +++ b/src/DepTable.cpp @@ -25,13 +25,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; -using support::ltrim; -using support::onlyFilename; -using support::suffixIs; inline bool DepTable::dep_info::changed() const diff --git a/src/EmbeddedFiles.cpp b/src/EmbeddedFiles.cpp index e31f95460d..325ca23362 100644 --- a/src/EmbeddedFiles.cpp +++ b/src/EmbeddedFiles.cpp @@ -39,23 +39,12 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace Alert = frontend::Alert; -using support::FileName; -using support::DocFileName; -using support::makeAbsPath; -using support::addName; -using support::absolutePath; -using support::onlyFilename; -using support::makeRelPath; -using support::changeExtension; -using support::bformat; -using support::prefixIs; -using support::makedir; - EmbeddedFile::EmbeddedFile(string const & file, string const & inzip_name, bool embed, Inset const * inset) diff --git a/src/Encoding.cpp b/src/Encoding.cpp index 949e673d42..ec06b562d2 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -28,11 +28,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; - Encodings encodings; namespace { diff --git a/src/ErrorList.cpp b/src/ErrorList.cpp index bc007da2dd..be395cbd2e 100644 --- a/src/ErrorList.cpp +++ b/src/ErrorList.cpp @@ -16,6 +16,7 @@ using namespace std; namespace lyx { + ErrorItem::ErrorItem(docstring const & error_, docstring const & description_, int par_id_, pos_type pos_start_, pos_type pos_end_) : error(error_), description(description_), par_id(par_id_), diff --git a/src/Exporter.cpp b/src/Exporter.cpp index 326358560c..8546b0a8ca 100644 --- a/src/Exporter.cpp +++ b/src/Exporter.cpp @@ -30,17 +30,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; -using support::FileName; -using support::makeDisplayPath; -using support::onlyFilename; -using support::onlyPath; -using support::package; -using support::prefixIs; - namespace Alert = frontend::Alert; /// ask the user what to do if a file already exists diff --git a/src/Font.cpp b/src/Font.cpp index a1492db032..03997b2c6f 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -32,14 +32,10 @@ #include "support/lstrings.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::ascii_lowercase; -using support::bformat; -using support::rtrim; -using support::subst; - // // Names for the GUI // diff --git a/src/Format.cpp b/src/Format.cpp index 6154d69689..077a33e08e 100644 --- a/src/Format.cpp +++ b/src/Format.cpp @@ -26,22 +26,10 @@ #include "support/Systemcall.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::absolutePath; -using support::bformat; -using support::compare_ascii_no_case; -using support::contains; -using support::FileName; -using support::libScriptSearch; -using support::makeDisplayPath; -using support::onlyPath; -using support::quoteName; -using support::subst; -using support::Systemcall; -using support::token; - namespace Alert = frontend::Alert; namespace os = support::os; diff --git a/src/ISpell.cpp b/src/ISpell.cpp index 28358c828b..6b7d1324d6 100644 --- a/src/ISpell.cpp +++ b/src/ISpell.cpp @@ -37,11 +37,10 @@ using boost::shared_ptr; using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; - namespace { class LaunchIspell : public support::ForkedProcess { diff --git a/src/KeyMap.cpp b/src/KeyMap.cpp index f6cc6848b5..67384b5adf 100644 --- a/src/KeyMap.cpp +++ b/src/KeyMap.cpp @@ -28,12 +28,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; -using support::i18nLibFileSearch; - string const KeyMap::printKeySym(KeySymbol const & key, KeyModifier mod) { diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 7a71b457c9..efa764b18b 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -37,29 +37,10 @@ using boost::regex; using boost::smatch; using namespace std; +using namespace lyx::support; namespace lyx { -using support::absolutePath; -using support::bformat; -using support::changeExtension; -using support::contains; -using support::FileName; -using support::findtexfile; -using support::getcwd; -using support::makeAbsPath; -using support::onlyFilename; -using support::prefixIs; -using support::quoteName; -using support::removeExtension; -using support::rtrim; -using support::rsplit; -using support::split; -using support::subst; -using support::suffixIs; -using support::Systemcall; -using support::trim; - namespace os = support::os; // TODO: in no particular order diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 5953c952df..1b29d2206a 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -32,14 +32,10 @@ #include "support/filetools.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::isSGMLFilename; -using support::libFileSearch; -using support::makeRelPath; -using support::onlyPath; - ///////////////////////////////////////////////////////////////////// // // Strings diff --git a/src/Layout.cpp b/src/Layout.cpp index 1374fbefd7..08ae3f1973 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -24,13 +24,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::subst; -using support::trim; - - /// Special value of toclevel for layouts that to not belong in a TOC const int Layout::NOT_IN_TOC = -1000; diff --git a/src/Lexer.cpp b/src/Lexer.cpp index a6418ef040..781aa52d15 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -34,21 +34,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::compare_ascii_no_case; -using support::FileName; -using support::isStrDbl; -using support::isStrInt; -using support::ltrim; -using support::makeDisplayPath; -using support::prefixIs; -using support::split; -using support::subst; -using support::trim; - - ////////////////////////////////////////////////////////////////////// // // Lexer::Pimpl diff --git a/src/LyX.cpp b/src/LyX.cpp index e74dfc7814..f4fdda708f 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -70,24 +70,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::addName; -using support::addPath; -using support::bformat; -using support::changeExtension; -using support::createLyXTmpDir; -using support::FileName; -using support::fileSearch; -using support::getEnv; -using support::i18nLibFileSearch; -using support::libFileSearch; -using support::package; -using support::prependEnvPath; -using support::rtrim; -using support::Systemcall; - namespace Alert = frontend::Alert; namespace os = support::os; diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index e493aa0d52..36f92780be 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -23,13 +23,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::split; -using support::trim; - - /* NAMING RULES FOR USER-COMMANDS Here's the set of rules to apply when a new command name is introduced: diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 4e05990dc9..5da4fd1a57 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -96,34 +96,12 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { using frontend::LyXView; -using support::absolutePath; -using support::addName; -using support::addPath; -using support::bformat; -using support::changeExtension; -using support::contains; -using support::FileFilterList; -using support::FileName; -using support::fileSearch; -using support::i18nLibFileSearch; -using support::makeDisplayPath; -using support::makeAbsPath; -using support::package; -using support::quoteName; -using support::rtrim; -using support::split; -using support::subst; -using support::Systemcall; -using support::token; -using support::trim; -using support::prefixIs; - - namespace Alert = frontend::Alert; extern bool quitting; diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index d7b6f09b45..666e63efdc 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -41,19 +41,12 @@ #include "support/userinfo.h" using namespace std; +using namespace lyx::support; namespace lyx { namespace os = support::os; -using support::ascii_lowercase; -using support::bformat; -using support::expandPath; -using support::FileName; -using support::getEnv; -using support::libFileSearch; -using support::token; - namespace { // when adding something to this array keep it sorted! diff --git a/src/LyXVC.cpp b/src/LyXVC.cpp index aff782494f..1e595894b8 100644 --- a/src/LyXVC.cpp +++ b/src/LyXVC.cpp @@ -28,14 +28,10 @@ #include "support/lyxlib.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; -using support::FileName; -using support::makeAbsPath; -using support::tempName; - namespace Alert = frontend::Alert; diff --git a/src/MenuBackend.cpp b/src/MenuBackend.cpp index 5c20906999..e9b4009fda 100644 --- a/src/MenuBackend.cpp +++ b/src/MenuBackend.cpp @@ -50,14 +50,10 @@ using namespace std; using boost::bind; +using namespace lyx::support; namespace lyx { -using support::compare_ascii_no_case; -using support::contains; -using support::makeDisplayPath; -using support::token; - namespace { class MenuNamesEqual : public std::unary_function { diff --git a/src/ModuleList.cpp b/src/ModuleList.cpp index 1e7f13ca36..baa185c1a2 100644 --- a/src/ModuleList.cpp +++ b/src/ModuleList.cpp @@ -23,12 +23,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; -using support::libFileSearch; -using support::makeDisplayPath; //global variable: module list ModuleList moduleList; diff --git a/src/Mover.cpp b/src/Mover.cpp index b989cf118e..c188ff9556 100644 --- a/src/Mover.cpp +++ b/src/Mover.cpp @@ -21,10 +21,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::quoteName; bool Mover::copy(support::FileName const & from, support::FileName const & to, unsigned long int mode) const diff --git a/src/PDFOptions.cpp b/src/PDFOptions.cpp index 8ef2665631..307c9b169f 100644 --- a/src/PDFOptions.cpp +++ b/src/PDFOptions.cpp @@ -21,6 +21,7 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { @@ -123,7 +124,7 @@ void PDFOptions::writeLaTeX(odocstream & os, bool hyper_required) const if (!pagemode.empty()) opt += "pdfpagemode=" + pagemode + ','; - opt = support::rtrim(opt,","); + opt = rtrim(opt,","); opt += "]\n {hyperref}\n"; // load the pdftitle etc. as hypersetup, otherwise you'll get @@ -141,7 +142,7 @@ void PDFOptions::writeLaTeX(odocstream & os, bool hyper_required) const hyperset += "\n "; hyperset += quoted_options_get(); } - hyperset = support::rtrim(hyperset,","); + hyperset = rtrim(hyperset,","); if (!hyperset.empty()) opt += "\\hypersetup{" + hyperset + "}\n "; diff --git a/src/PSpell.cpp b/src/PSpell.cpp index bb5862da9a..c4b4d980ac 100644 --- a/src/PSpell.cpp +++ b/src/PSpell.cpp @@ -25,6 +25,7 @@ extern "C" { #include using namespace std; +using namespace lyx::support; namespace lyx { diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index ecb0733969..595d8223ca 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -59,17 +59,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::contains; -using support::lowercase; -using support::prefixIs; -using support::subst; -using support::suffixIs; -using support::rsplit; -using support::uppercase; - namespace { /// Inset identifier (above 0x10ffff, for ucs-4) char_type const META_INSET = 0x200001; diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp index 5d89a3c280..36d850b1d9 100644 --- a/src/ParagraphMetrics.cpp +++ b/src/ParagraphMetrics.cpp @@ -58,13 +58,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using lyx::support::contains; -using lyx::support::rsplit; -using support::subst; - ParagraphMetrics::ParagraphMetrics(Paragraph const & par): position_(-1), par_(&par) { diff --git a/src/ParagraphParameters.cpp b/src/ParagraphParameters.cpp index c8c0a5dab4..0e2ce0ee81 100644 --- a/src/ParagraphParameters.cpp +++ b/src/ParagraphParameters.cpp @@ -28,10 +28,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::rtrim; //NOTE The order of these MUST be the same as in Layout.h. static char const * const string_align[] = { diff --git a/src/Server.cpp b/src/Server.cpp index e4a4434368..286be5d4da 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -59,15 +59,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::compare; -using support::FileName; -using support::rtrim; -using support::split; - - ///////////////////////////////////////////////////////////////////// // // LyXComm diff --git a/src/Text.cpp b/src/Text.cpp index ce49dfc549..70464c10dc 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -74,14 +74,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; -using support::contains; -using support::split; -using support::subst; - using cap::cutSelection; using cap::pasteParagraphList; diff --git a/src/Text3.cpp b/src/Text3.cpp index a8e079fdf6..8490e44917 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -75,6 +75,7 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { @@ -84,9 +85,6 @@ using cap::pasteFromStack; using cap::pasteClipboard; using cap::replaceSelection; -using support::isStrUnsignedInt; -using support::token; - // globals... static Font freefont(ignore_font, ignore_language); static bool toggleall = false; diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 2253108761..7f3772ec95 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -36,18 +36,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; -using support::libFileSearch; -using support::makeDisplayPath; -using support::quoteName; -using support::rtrim; -using support::subst; -using support::addName; - - namespace { class LayoutNamesEqual : public std::unary_function { diff --git a/src/TextClassList.cpp b/src/TextClassList.cpp index eceacd29da..fec02e520f 100644 --- a/src/TextClassList.cpp +++ b/src/TextClassList.cpp @@ -23,20 +23,15 @@ #include +using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; -using support::addName; -using support::libFileSearch; -using support::makeDisplayPath; - using boost::bind; using boost::regex; using boost::smatch; -using namespace std; - // Gets textclass number from name pair const TextClassList::numberOfClass(string const & textclass) const diff --git a/src/ToolbarBackend.cpp b/src/ToolbarBackend.cpp index cbe318267d..91eab84e1b 100644 --- a/src/ToolbarBackend.cpp +++ b/src/ToolbarBackend.cpp @@ -23,12 +23,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::compare_ascii_no_case; -using support::getVectorFromString; - namespace { class ToolbarNamesEqual diff --git a/src/Trans.cpp b/src/Trans.cpp index 9d061d15ec..8954f1d4c7 100644 --- a/src/Trans.cpp +++ b/src/Trans.cpp @@ -28,14 +28,10 @@ #include "support/docstream.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::split; -using support::contains; -using support::libFileSearch; - - ///////////////////////////////////////////////////////////////////// // // TeXAccents diff --git a/src/Undo.cpp b/src/Undo.cpp index 74e8cbc2c3..401051e3f5 100644 --- a/src/Undo.cpp +++ b/src/Undo.cpp @@ -37,6 +37,7 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index c92a648ffd..1726b921ef 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -24,6 +24,7 @@ #include using namespace std; +using namespace lyx::support; using boost::regex; using boost::regex_match; @@ -31,17 +32,6 @@ using boost::smatch; namespace lyx { -using support::addName; -using support::addPath; -using support::contains; -using support::FileName; -using support::onlyFilename; -using support::onlyPath; -using support::quoteName; -using support::rtrim; -using support::split; -using support::Systemcall; - int VCS::doVCCommand(string const & cmd, FileName const & path) { diff --git a/src/VSpace.cpp b/src/VSpace.cpp index b42409e88d..45379fd85d 100644 --- a/src/VSpace.cpp +++ b/src/VSpace.cpp @@ -24,16 +24,10 @@ #include "support/lstrings.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::compare; -using support::isStrDbl; -using support::ltrim; -using support::prefixIs; -using support::rtrim; - - namespace { /// used to return numeric values in parsing vspace diff --git a/src/buffer_funcs.cpp b/src/buffer_funcs.cpp index a76a2a9952..3f031df6be 100644 --- a/src/buffer_funcs.cpp +++ b/src/buffer_funcs.cpp @@ -51,20 +51,11 @@ #include "support/lstrings.h" #include "support/lyxlib.h" +using namespace std; +using namespace lyx::support; namespace lyx { -using namespace std; - -using support::addName; -using support::bformat; -using support::FileName; -using support::libFileSearch; -using support::makeAbsPath; -using support::makeDisplayPath; -using support::onlyFilename; -using support::onlyPath; - namespace Alert = frontend::Alert; diff --git a/src/client/Messages.cpp b/src/client/Messages.cpp index 0b2aa7319d..6a51e171fc 100644 --- a/src/client/Messages.cpp +++ b/src/client/Messages.cpp @@ -19,11 +19,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::package; - #ifdef ENABLE_NLS diff --git a/src/client/client.cpp b/src/client/client.cpp index 4b1962eb3b..3c17593935 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -55,15 +55,13 @@ #include using namespace std; +using namespace lyx::support; using ::boost::scoped_ptr; namespace fs = ::boost::filesystem; namespace lyx { -using support::FileName; -using support::prefixIs; - namespace support { string itoa(unsigned int i) diff --git a/src/client/debug.cpp b/src/client/debug.cpp index 40cf5f5bc7..d113e8d405 100644 --- a/src/client/debug.cpp +++ b/src/client/debug.cpp @@ -22,13 +22,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::ascii_lowercase; -using support::bformat; -using support::isStrInt; - namespace { struct ErrorItem { diff --git a/src/client/gettext.cpp b/src/client/gettext.cpp index e62c0efa51..013daf967f 100644 --- a/src/client/gettext.cpp +++ b/src/client/gettext.cpp @@ -15,6 +15,7 @@ #include "Messages.h" using namespace std; +using namespace lyx::support; namespace lyx { diff --git a/src/frontends/qt4/Dialog.cpp b/src/frontends/qt4/Dialog.cpp index 04e09a95fe..7a0bd41fcf 100644 --- a/src/frontends/qt4/Dialog.cpp +++ b/src/frontends/qt4/Dialog.cpp @@ -28,6 +28,7 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/FloatPlacement.cpp b/src/frontends/qt4/FloatPlacement.cpp index ffcedaf32b..563896e0c9 100644 --- a/src/frontends/qt4/FloatPlacement.cpp +++ b/src/frontends/qt4/FloatPlacement.cpp @@ -18,8 +18,8 @@ #include "support/lstrings.h" using namespace std; +using namespace lyx::support; -using lyx::support::contains; //namespace lyx { diff --git a/src/frontends/qt4/GuiAlert.cpp b/src/frontends/qt4/GuiAlert.cpp index 512700421b..a9cb6d82ae 100644 --- a/src/frontends/qt4/GuiAlert.cpp +++ b/src/frontends/qt4/GuiAlert.cpp @@ -32,11 +32,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::bformat; static docstring const formatted(docstring const & text) { diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp index 7c62b2913a..6f0602f480 100644 --- a/src/frontends/qt4/GuiBibtex.cpp +++ b/src/frontends/qt4/GuiBibtex.cpp @@ -37,18 +37,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::changeExtension; -using support::contains; -using support::FileFilterList; -using support::onlyFilename; -using support::prefixIs; -using support::split; -using support::trim; - GuiBibtex::GuiBibtex(GuiView & lv) : GuiCommand(lv, "bibtex") diff --git a/src/frontends/qt4/GuiClipboard.cpp b/src/frontends/qt4/GuiClipboard.cpp index f7b32c2d44..188eafbbce 100644 --- a/src/frontends/qt4/GuiClipboard.cpp +++ b/src/frontends/qt4/GuiClipboard.cpp @@ -25,14 +25,12 @@ #include "support/lstrings.h" using namespace std; +using namespace lyx::support; static char const * const mime_type = "application/x-lyx"; namespace lyx { -using support::internalLineEnding; -using support::externalLineEnding; - namespace frontend { GuiClipboard::GuiClipboard() diff --git a/src/frontends/qt4/GuiCommandBuffer.cpp b/src/frontends/qt4/GuiCommandBuffer.cpp index 1f36f91c41..b2ae0a1f4c 100644 --- a/src/frontends/qt4/GuiCommandBuffer.cpp +++ b/src/frontends/qt4/GuiCommandBuffer.cpp @@ -38,13 +38,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::prefixIs; - - namespace { class QTempListBox : public QListWidget { diff --git a/src/frontends/qt4/GuiErrorList.cpp b/src/frontends/qt4/GuiErrorList.cpp index 99c7b4cbb7..8af229eb93 100644 --- a/src/frontends/qt4/GuiErrorList.cpp +++ b/src/frontends/qt4/GuiErrorList.cpp @@ -29,12 +29,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::bformat; - GuiErrorList::GuiErrorList(GuiView & lv) : GuiDialog(lv, "errorlist") { diff --git a/src/frontends/qt4/GuiExternal.cpp b/src/frontends/qt4/GuiExternal.cpp index a3dc99831e..8113f7d137 100644 --- a/src/frontends/qt4/GuiExternal.cpp +++ b/src/frontends/qt4/GuiExternal.cpp @@ -46,20 +46,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::FileFilterList; -using support::FileName; -using support::float_equal; -using support::isStrDbl; -using support::makeAbsPath; -using support::readBB_from_PSFile; -using support::token; -using support::trim; -using support::os::internal_path; - using namespace external; namespace { diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index 35a6c71005..31d00f6347 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -55,21 +55,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::addName; -using support::FileFilterList; -using support::FileName; -using support::float_equal; -using support::makeAbsPath; -using support::os::internal_path; -using support::package; -using support::readBB_from_PSFile; -using support::token; - - //FIXME setAutoTextCB should really take an argument, as indicated, that //determines what text is to be written for "auto". But making //that work involves more extensive revisions than we now want diff --git a/src/frontends/qt4/GuiInclude.cpp b/src/frontends/qt4/GuiInclude.cpp index 2c99e27806..642e514e74 100644 --- a/src/frontends/qt4/GuiInclude.cpp +++ b/src/frontends/qt4/GuiInclude.cpp @@ -39,19 +39,12 @@ #include using namespace std; +using namespace lyx::support; +using namespace lyx::support::os; namespace lyx { namespace frontend { -using support::FileFilterList; -using support::FileName; -using support::makeAbsPath; -using support::onlyPath; -using support::os::internal_path; -using support::prefixIs; -using support::getStringFromVector; -using support::getVectorFromString; - GuiInclude::GuiInclude(GuiView & lv) : GuiCommand(lv, "include") diff --git a/src/frontends/qt4/GuiListings.cpp b/src/frontends/qt4/GuiListings.cpp index 8341e99419..b8702114d0 100644 --- a/src/frontends/qt4/GuiListings.cpp +++ b/src/frontends/qt4/GuiListings.cpp @@ -28,16 +28,9 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { - -using support::findToken; -using support::getVectorFromString; -using support::getStringFromVector; -using support::prefixIs; -using support::suffixIs; -using support::contains; - namespace frontend { diff --git a/src/frontends/qt4/GuiLog.cpp b/src/frontends/qt4/GuiLog.cpp index 899e1d5743..8107bb8a64 100644 --- a/src/frontends/qt4/GuiLog.cpp +++ b/src/frontends/qt4/GuiLog.cpp @@ -27,12 +27,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::FileName; - ///////////////////////////////////////////////////////////////////// // // LogHighlighter diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 5c7dc1a9cb..792506fd38 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -66,22 +66,12 @@ using namespace Ui; using namespace std; +using namespace lyx::support; +using namespace lyx::support::os; namespace lyx { namespace frontend { -using support::compare_ascii_no_case; -using support::os::external_path; -using support::os::external_path_list; -using support::os::internal_path; -using support::os::internal_path_list; -using support::FileName; -using support::FileFilterList; -using support::addPath; -using support::addName; -using support::mkdir; -using support::package; - ///////////////////////////////////////////////////////////////////// // diff --git a/src/frontends/qt4/GuiPrint.cpp b/src/frontends/qt4/GuiPrint.cpp index f54cde7fe4..1e32a5e0ab 100644 --- a/src/frontends/qt4/GuiPrint.cpp +++ b/src/frontends/qt4/GuiPrint.cpp @@ -34,12 +34,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::FileFilterList; - GuiPrint::GuiPrint(GuiView & lv) : GuiDialog(lv, "print") diff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index 0567fdf49b..a976d04eb7 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -32,13 +32,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::makeAbsPath; -using support::makeDisplayPath; - GuiRef::GuiRef(GuiView & lv) : GuiCommand(lv, "ref") { diff --git a/src/frontends/qt4/GuiSendto.cpp b/src/frontends/qt4/GuiSendto.cpp index 84b960de6a..afb9dc8a27 100644 --- a/src/frontends/qt4/GuiSendto.cpp +++ b/src/frontends/qt4/GuiSendto.cpp @@ -28,11 +28,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::trim; GuiSendTo::GuiSendTo(GuiView & lv) : GuiDialog(lv, "sendto") diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index 87804fe0db..6233a3b31b 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -47,12 +47,11 @@ #include "frontends/alert.h" using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::bformat; -using support::contains; GuiSpellchecker::GuiSpellchecker(GuiView & lv) : GuiDialog(lv, "spellchecker"), exitEarly_(false), diff --git a/src/frontends/qt4/GuiTexinfo.cpp b/src/frontends/qt4/GuiTexinfo.cpp index 048df8d7e6..083b6dc19b 100644 --- a/src/frontends/qt4/GuiTexinfo.cpp +++ b/src/frontends/qt4/GuiTexinfo.cpp @@ -31,17 +31,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { -using support::FileName; -using support::contains; -using support::split; -using support::token; -using support::getExtension; -using support::libFileSearch; -using support::onlyFilename; static string texFileFromList(string const & file, string const & type) { diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 0674d5ed7c..8dfa4ba291 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -93,6 +93,7 @@ #endif using namespace std; +using namespace lyx::support; namespace lyx { @@ -100,16 +101,6 @@ extern bool quitting; namespace frontend { -using support::addPath; -using support::bformat; -using support::FileFilterList; -using support::FileName; -using support::makeAbsPath; -using support::makeDisplayPath; -using support::package; -using support::removeAutosaveFile; -using support::trim; - namespace { class BackgroundWidget : public QWidget diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 997f341148..2c6acace92 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -71,11 +71,10 @@ int const CursorWidth = 1; #undef NoModifier using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; - /// return the LyX mouse button state from Qt's static mouse_button::state q_button_state(Qt::MouseButton button) diff --git a/src/frontends/qt4/LyXFileDialog.cpp b/src/frontends/qt4/LyXFileDialog.cpp index 56fef5d74d..bba57747d8 100644 --- a/src/frontends/qt4/LyXFileDialog.cpp +++ b/src/frontends/qt4/LyXFileDialog.cpp @@ -22,11 +22,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::split; - /// return the Qt form of the label static docstring const getLabel(docstring const & ucs4str) { diff --git a/src/frontends/qt4/qt_helpers.cpp b/src/frontends/qt4/qt_helpers.cpp index aad055d2f0..28843539ad 100644 --- a/src/frontends/qt4/qt_helpers.cpp +++ b/src/frontends/qt4/qt_helpers.cpp @@ -44,28 +44,9 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { - -using support::addName; -using support::bformat; -using support::FileFilterList; -using support::FileName; -using support::getExtension; -using support::getVectorFromString; -using support::libFileSearch; -using support::makeAbsPath; -using support::makeRelPath; -using support::onlyFilename; -using support::onlyPath; -using support::package; -using support::prefixIs; -using support::quoteName; -using support::removeExtension; -using support::Systemcall; -using support::token; -using support::isStrDbl; - namespace frontend { string widgetsToLength(QLineEdit const * input, LengthCombo const * combo) diff --git a/src/graphics/GraphicsCache.cpp b/src/graphics/GraphicsCache.cpp index ed87453fa1..ce5a088249 100644 --- a/src/graphics/GraphicsCache.cpp +++ b/src/graphics/GraphicsCache.cpp @@ -22,11 +22,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; - namespace graphics { /** The cache contains one item per file, so use a map to find the diff --git a/src/graphics/GraphicsCacheItem.cpp b/src/graphics/GraphicsCacheItem.cpp index 4f90611033..f826419d71 100644 --- a/src/graphics/GraphicsCacheItem.cpp +++ b/src/graphics/GraphicsCacheItem.cpp @@ -27,17 +27,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileMonitor; -using support::FileName; -using support::makeDisplayPath; -using support::onlyFilename; -using support::tempName; -using support::unzipFile; - - namespace graphics { class CacheItem::Impl : public boost::signals::trackable { diff --git a/src/graphics/GraphicsConverter.cpp b/src/graphics/GraphicsConverter.cpp index fab772a706..e0f5fda883 100644 --- a/src/graphics/GraphicsConverter.cpp +++ b/src/graphics/GraphicsConverter.cpp @@ -29,22 +29,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::addExtension; -using support::changeExtension; -using support::FileName; -using support::ForkedCall; -using support::getExtension; -using support::libScriptSearch; -using support::onlyPath; -using support::onlyFilename; -using support::quoteName; -using support::quote_python; -using support::subst; -using support::tempName; - namespace graphics { class Converter::Impl : public boost::signals::trackable { diff --git a/src/graphics/GraphicsLoader.cpp b/src/graphics/GraphicsLoader.cpp index 5545ed194e..76dbbb8a63 100644 --- a/src/graphics/GraphicsLoader.cpp +++ b/src/graphics/GraphicsLoader.cpp @@ -26,11 +26,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace graphics { -using support::FileName; ///////////////////////////////////////////////////////////////////// // diff --git a/src/graphics/PreviewImage.cpp b/src/graphics/PreviewImage.cpp index 07d04d7b4d..5402ae8bd8 100644 --- a/src/graphics/PreviewImage.cpp +++ b/src/graphics/PreviewImage.cpp @@ -21,11 +21,9 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { - -using support::FileName; - namespace graphics { class PreviewImage::Impl : public boost::signals::trackable { diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index 96afd27842..7900234c2b 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -44,9 +44,9 @@ #include using namespace std; +using namespace lyx::support; using boost::bind; -using lyx::support::FileName; namespace { diff --git a/src/insets/ExternalSupport.cpp b/src/insets/ExternalSupport.cpp index ec85244aa8..b3f6a98015 100644 --- a/src/insets/ExternalSupport.cpp +++ b/src/insets/ExternalSupport.cpp @@ -37,12 +37,9 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { - -using support::FileName; -using support::isValidLaTeXFilename; - namespace external { Template const * getTemplatePtr(InsetExternalParams const & params) diff --git a/src/insets/ExternalTransforms.cpp b/src/insets/ExternalTransforms.cpp index 6bbbb6813e..bad7b38d6b 100644 --- a/src/insets/ExternalTransforms.cpp +++ b/src/insets/ExternalTransforms.cpp @@ -25,11 +25,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { namespace external { -using support::float_equal; string const ExtraData::get(string const & id) const { diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 726b93e234..3000eb722f 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -40,32 +40,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::absolutePath; -using support::ascii_lowercase; -using support::changeExtension; -using support::contains; -using support::copy; -using support::DocFileName; -using support::FileName; -using support::FileNameList; -using support::findtexfile; -using support::isValidLaTeXFilename; -using support::latex_path; -using support::ltrim; -using support::makeAbsPath; -using support::makeRelPath; -using support::prefixIs; -using support::removeExtension; -using support::rtrim; -using support::split; -using support::subst; -using support::tokenPos; -using support::trim; -using support::lowercase; - namespace Alert = frontend::Alert; namespace os = support::os; diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index 0a8929260f..09e2de0df4 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -27,19 +27,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; -using support::FileNameList; -using support::getStringFromVector; -using support::getVectorFromString; -using support::ltrim; -using support::prefixIs; -using support::rtrim; -using support::split; -using support::tokenPos; - namespace { vector const init_possible_cite_commands() diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp index ca248155d2..80a0ae035e 100644 --- a/src/insets/InsetCommandParams.cpp +++ b/src/insets/InsetCommandParams.cpp @@ -38,12 +38,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::findToken; -using support::ExceptionMessage; -using support::WarningException; InsetCommandParams::InsetCommandParams(InsetCode code) : insetCode_(code), preview_(false) diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index 4264fa6aa4..d419e136b2 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -38,11 +38,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::token; - InsetERT::InsetERT(BufferParams const & bp, CollapseStatus status) : InsetCollapsable(bp, status) diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index 2ce1566a4d..38b0d6b079 100644 --- a/src/insets/InsetExternal.cpp +++ b/src/insets/InsetExternal.cpp @@ -44,8 +44,7 @@ #include using namespace std; - -using lyx::support::DocFileName; +using namespace lyx::support; namespace { diff --git a/src/insets/InsetFloatList.cpp b/src/insets/InsetFloatList.cpp index cec2f97372..ed18d6f2f9 100644 --- a/src/insets/InsetFloatList.cpp +++ b/src/insets/InsetFloatList.cpp @@ -31,11 +31,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; - InsetFloatList::InsetFloatList() : InsetCommand(InsetCommandParams(FLOAT_LIST_CODE), "toc") diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index 39e5fb5875..26e8be32c8 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -90,29 +90,10 @@ TODO #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; -using support::changeExtension; -using support::compare_timestamps; -using support::contains; -using support::DocFileName; -using support::FileName; -using support::float_equal; -using support::getExtension; -using support::isValidLaTeXFilename; -using support::latex_path; -using support::onlyFilename; -using support::removeExtension; -using support::rtrim; -using support::subst; -using support::suffixIs; -using support::Systemcall; -using support::unzipFile; -using support::unzippedFileName; - - namespace { /// Find the most suitable image format for images in \p format diff --git a/src/insets/InsetGraphicsParams.cpp b/src/insets/InsetGraphicsParams.cpp index e88ef42839..9d85bb2a4b 100644 --- a/src/insets/InsetGraphicsParams.cpp +++ b/src/insets/InsetGraphicsParams.cpp @@ -31,14 +31,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::float_equal; -using support::readBB_from_PSFile; -using support::token; -using support::DocFileName; - InsetGraphicsParams::InsetGraphicsParams() { diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index e254b93751..5e0f555245 100644 --- a/src/insets/InsetHyperlink.cpp +++ b/src/insets/InsetHyperlink.cpp @@ -23,11 +23,10 @@ #include "support/docstream.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::subst; - InsetHyperlink::InsetHyperlink(InsetCommandParams const & p) : InsetCommand(p, "href") diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index 9aff3d66b8..43dea4d33b 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -54,29 +54,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::addName; -using support::absolutePath; -using support::bformat; -using support::changeExtension; -using support::contains; -using support::copy; -using support::DocFileName; -using support::FileName; -using support::FileNameList; -using support::getVectorFromString; -using support::isLyXFilename; -using support::isValidLaTeXFilename; -using support::latex_path; -using support::makeAbsPath; -using support::makeRelPath; -using support::onlyFilename; -using support::onlyPath; -using support::prefixIs; -using support::subst; - namespace Alert = frontend::Alert; diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 063c7bee73..2ec19155d2 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -35,15 +35,10 @@ #include "support/ExceptionMessage.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::prefixIs; -using support::trim; -using support::split; -using support::rtrim; -using support::ExceptionMessage; -using support::WarningException; InsetInfo::InsetInfo(BufferParams const & bp, string const & name) : InsetText(bp), type_(UNKNOWN_INFO), name_(), bp_(bp), diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp index f205cc822c..c225446038 100644 --- a/src/insets/InsetListings.cpp +++ b/src/insets/InsetListings.cpp @@ -33,12 +33,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::token; -using support::contains; -using support::subst; char const lstinline_delimiters[] = "!*()-=+|;:'\"`,<.>/?QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm"; diff --git a/src/insets/InsetListingsParams.cpp b/src/insets/InsetListingsParams.cpp index 599e2f1e13..ebe6b27c2c 100644 --- a/src/insets/InsetListingsParams.cpp +++ b/src/insets/InsetListingsParams.cpp @@ -25,19 +25,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; -using support::trim; -using support::rtrim; -using support::subst; -using support::isStrInt; -using support::prefixIs; -using support::suffixIs; -using support::getVectorFromString; -using lyx::support::contains; - namespace { enum param_type { diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp index 14a8f629b4..9e03914dd4 100644 --- a/src/insets/InsetQuotes.cpp +++ b/src/insets/InsetQuotes.cpp @@ -32,11 +32,10 @@ #include "support/lstrings.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::prefixIs; - namespace { /* codes used to read/write quotes to LyX files diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index f22c2f67f1..c1edce5156 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -25,11 +25,10 @@ #include "support/lstrings.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::escape; - InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf) : InsetCommand(p, "ref"), isLatex(buf.isLatex()) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 849f1a8513..dabb855dd5 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -63,18 +63,13 @@ #include using namespace std; +using namespace lyx::support; using boost::shared_ptr; using boost::dynamic_pointer_cast; namespace lyx { -using support::prefixIs; -using support::FileName; -using support::ltrim; -using support::rtrim; -using support::suffixIs; - using cap::dirtyTabularStack; using cap::tabularStackDirty; diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 830a380626..1377bb8d73 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -55,6 +55,7 @@ #include using namespace std; +using namespace lyx::support; using boost::bind; using boost::ref; @@ -63,8 +64,6 @@ namespace lyx { using graphics::PreviewLoader; -using support::isStrUnsignedInt; - InsetText::InsetText(BufferParams const & bp) : drawFrame_(false), frame_color_(Color_insetframe) diff --git a/src/insets/RenderPreview.cpp b/src/insets/RenderPreview.cpp index 233c86d58c..1d4fb9d6a5 100644 --- a/src/insets/RenderPreview.cpp +++ b/src/insets/RenderPreview.cpp @@ -33,11 +33,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; - LyXRC_PreviewStatus RenderPreview::status() { diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 08c63fbb85..514ee4595a 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -36,14 +36,10 @@ #include "support/lstrings.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::compare_no_case; -using support::uppercase; -using support::split; - - namespace { bool parse_bool(docstring & howto) diff --git a/src/mathed/InsetFormulaMacro.cpp b/src/mathed/InsetFormulaMacro.cpp index 1e929d28f4..a97eec6b7a 100644 --- a/src/mathed/InsetFormulaMacro.cpp +++ b/src/mathed/InsetFormulaMacro.cpp @@ -30,11 +30,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; - InsetFormulaMacro::InsetFormulaMacro() : InsetMathNest(2), name_("unknownA") diff --git a/src/mathed/InsetMathCases.cpp b/src/mathed/InsetMathCases.cpp index c38e91fda0..6ade4d2ebe 100644 --- a/src/mathed/InsetMathCases.cpp +++ b/src/mathed/InsetMathCases.cpp @@ -27,11 +27,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; - InsetMathCases::InsetMathCases(row_type n) : InsetMathGrid(2, n, 'c', from_ascii("ll")) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 8cbb24e6e8..dd650971b5 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -56,12 +56,11 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { using cap::grabAndEraseSelection; -using support::bformat; -using support::subst; namespace { diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp index 4ca2e021c4..6985f80aad 100644 --- a/src/mathed/MathExtern.cpp +++ b/src/mathed/MathExtern.cpp @@ -45,18 +45,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::cmd_ret; -using support::getVectorFromString; -using support::libFileSearch; -using support::runCommand; -using support::FileName; -using support::quoteName; -using support::tempName; -using support::subst; - static char const * function_names[] = { "arccos", "arcsin", "arctan", "arg", "bmod", "cos", "cosh", "cot", "coth", "csc", "deg", diff --git a/src/mathed/MathFactory.cpp b/src/mathed/MathFactory.cpp index d79885b3b2..2cd60f055a 100644 --- a/src/mathed/MathFactory.cpp +++ b/src/mathed/MathFactory.cpp @@ -58,12 +58,10 @@ #include "frontends/FontLoader.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::libFileSearch; -using support::split; - bool has_math_fonts; diff --git a/src/output.cpp b/src/output.cpp index 0e51cf3bec..67b0323b49 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -20,12 +20,10 @@ #include "support/lstrings.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::bformat; -using support::FileName; - namespace { template diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp index 6103990257..1244da6edb 100644 --- a/src/output_docbook.cpp +++ b/src/output_docbook.cpp @@ -35,11 +35,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::subst; - namespace { ParagraphList::const_iterator searchParagraph( diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 5d1090c304..95714af9cd 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -36,11 +36,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::subst; - namespace { diff --git a/src/output_plaintext.cpp b/src/output_plaintext.cpp index f9629e9203..2ce6aee5c7 100644 --- a/src/output_plaintext.cpp +++ b/src/output_plaintext.cpp @@ -26,14 +26,10 @@ #include "support/lstrings.h" using namespace std; +using namespace lyx::support; namespace lyx { -using support::ascii_lowercase; -using support::compare_ascii_no_case; -using support::contains; -using support::FileName; - void writePlaintextFile(Buffer const & buf, FileName const & fname, OutputParams const & runparams) diff --git a/src/sgml.cpp b/src/sgml.cpp index 4addbd319a..6ac6c8653b 100644 --- a/src/sgml.cpp +++ b/src/sgml.cpp @@ -31,10 +31,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::subst; docstring sgml::escapeChar(char_type c) { diff --git a/src/support/Messages.cpp b/src/support/Messages.cpp index 00735e4808..b8ae5a0ac3 100644 --- a/src/support/Messages.cpp +++ b/src/support/Messages.cpp @@ -63,13 +63,10 @@ void cleanTranslation(docstring & trans) # include "../intl/libintl.h" # endif +using namespace lyx::support; + namespace lyx { -using support::package; -using support::getEnv; -using support::setEnv; - - // This version use the traditional gettext. Messages::Messages(string const & l) : lang_(l), warned_(false) diff --git a/src/support/debug.cpp b/src/support/debug.cpp index a20e06b415..ab3b6eee75 100644 --- a/src/support/debug.cpp +++ b/src/support/debug.cpp @@ -22,13 +22,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::ascii_lowercase; -using support::bformat; -using support::isStrInt; - namespace { struct ErrorItem { diff --git a/src/tex2lyx/preamble.cpp b/src/tex2lyx/preamble.cpp index 235ff45799..9e88c2b5e4 100644 --- a/src/tex2lyx/preamble.cpp +++ b/src/tex2lyx/preamble.cpp @@ -30,13 +30,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::FileName; -using support::libFileSearch; -using support::isStrDbl; - // special columntypes extern std::map special_columns; diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp index eb57628850..5f4767efb8 100644 --- a/src/tex2lyx/tex2lyx.cpp +++ b/src/tex2lyx/tex2lyx.cpp @@ -36,19 +36,11 @@ #include using namespace std; +using namespace lyx::support; +using namespace lyx::support::os; namespace lyx { -using support::changeExtension; -using support::FileName; -using support::isStrUnsignedInt; -using support::ltrim; -using support::makeAbsPath; -using support::onlyPath; -using support::os::internal_path; -using support::rtrim; - - // Hacks to allow the thing to link in the lyxlayout stuff LayoutPtr captionlayout; diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 78069912df..523c02296c 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -31,19 +31,10 @@ #include using namespace std; +using namespace lyx::support; namespace lyx { -using support::addExtension; -using support::changeExtension; -using support::FileName; -using support::makeAbsPath; -using support::makeRelPath; -using support::rtrim; -using support::suffixIs; -using support::contains; -using support::subst; - void parse_text_in_inset(Parser & p, ostream & os, unsigned flags, bool outer, Context const & context)