From 9383f4c3c6f9cfab2d658701ba66e2b54cd68bea Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 12 Dec 2007 10:16:00 +0000 Subject: [PATCH] 'using namespace std' instead of 'using std::xxx' git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ASpell.cpp | 2 +- src/Author.cpp | 2 +- src/BiblioInfo.cpp | 6 +----- src/Box.cpp | 2 +- src/BranchList.cpp | 2 +- src/Buffer.cpp | 16 +--------------- src/BufferList.cpp | 12 +----------- src/BufferParams.cpp | 12 ++---------- src/BufferView.cpp | 12 +----------- src/Bullet.cpp | 2 +- src/Chktex.cpp | 4 +--- src/CmdDef.cpp | 3 +-- src/Color.cpp | 13 +------------ src/Converter.cpp | 6 +----- src/ConverterCache.cpp | 2 +- src/Counters.cpp | 4 +--- src/Cursor.cpp | 7 +------ src/CutAndPaste.cpp | 8 +------- src/DepTable.cpp | 8 +------- src/EmbeddedFiles.cpp | 11 +---------- src/Encoding.cpp | 7 +------ src/ErrorList.cpp | 3 +-- src/Exporter.cpp | 5 +---- src/FloatList.cpp | 3 +-- src/Floating.cpp | 2 +- src/Font.cpp | 12 +----------- src/FontInfo.cpp | 3 +-- src/FontList.cpp | 2 +- src/Format.cpp | 5 +---- src/FuncRequest.cpp | 6 +----- src/Graph.cpp | 5 +---- src/ISpell.cpp | 11 +---------- src/InsetList.cpp | 3 +-- src/KeyMap.cpp | 6 +----- src/KeySequence.cpp | 4 +--- src/LaTeX.cpp | 12 +----------- src/LaTeXFeatures.cpp | 9 +-------- src/Language.cpp | 4 +--- src/Layout.cpp | 3 +-- src/Length.cpp | 4 +--- src/Lexer.cpp | 10 +--------- src/LyX.cpp | 13 +------------ src/LyXAction.cpp | 3 +-- src/LyXFunc.cpp | 9 +-------- src/LyXRC.cpp | 10 +--------- src/LyXVC.cpp | 3 +-- src/MenuBackend.cpp | 14 ++------------ src/MetricsInfo.cpp | 3 +-- src/ModuleList.cpp | 5 +---- src/Mover.cpp | 3 +-- src/PDFOptions.cpp | 6 ++---- src/PSpell.cpp | 4 +--- src/Paragraph.cpp | 12 +----------- src/ParagraphMetrics.cpp | 9 +-------- src/ParagraphParameters.cpp | 10 +++------- src/PrinterParams.cpp | 4 ++-- src/Section.cpp | 2 +- src/Server.cpp | 4 +--- src/ServerSocket.cpp | 4 +--- src/Session.cpp | 23 ++++++----------------- src/Spacing.cpp | 6 +----- src/SpellBase.cpp | 3 +-- src/Text.cpp | 3 +-- src/Text2.cpp | 7 +------ src/Text3.cpp | 5 +---- src/TextClass.cpp | 6 +----- src/TextClassList.cpp | 10 +--------- src/TextMetrics.cpp | 5 +---- src/Thesaurus.cpp | 4 +--- src/TocBackend.cpp | 3 +-- src/ToolbarBackend.cpp | 8 ++------ src/Trans.cpp | 7 ++----- src/Undo.cpp | 2 +- src/VCBackend.cpp | 19 +++++-------------- src/VSpace.cpp | 3 +-- src/Variables.cpp | 4 +--- src/boost.cpp | 2 +- src/client/Messages.cpp | 5 +---- src/client/boost.cpp | 1 - src/client/client.cpp | 15 ++++----------- src/client/debug.cpp | 5 +---- src/client/gettext.cpp | 3 +-- src/factory.cpp | 5 +---- src/frontends/qt4/FloatPlacement.cpp | 3 ++- src/frontends/qt4/GuiAlert.cpp | 3 +-- src/frontends/qt4/GuiApplication.cpp | 6 +----- src/frontends/qt4/GuiBibtex.cpp | 5 +---- src/frontends/qt4/GuiBox.cpp | 4 +--- src/frontends/qt4/GuiBranch.cpp | 3 +-- src/frontends/qt4/GuiCharacter.cpp | 4 +--- src/frontends/qt4/GuiCitation.cpp | 4 +--- src/frontends/qt4/GuiClipboard.cpp | 10 +++++----- src/frontends/qt4/GuiCommandBuffer.cpp | 6 +----- src/frontends/qt4/GuiDelimiter.cpp | 2 +- src/frontends/qt4/GuiDialog.cpp | 5 ++--- src/frontends/qt4/GuiDocument.cpp | 8 +------- src/frontends/qt4/GuiErrorList.cpp | 3 +-- src/frontends/qt4/GuiExternal.cpp | 5 +---- src/frontends/qt4/GuiFloat.cpp | 3 +-- src/frontends/qt4/GuiFontMetrics.cpp | 2 +- src/frontends/qt4/GuiGraphics.cpp | 11 +---------- src/frontends/qt4/GuiInclude.cpp | 6 +----- src/frontends/qt4/GuiIndex.cpp | 3 +-- src/frontends/qt4/GuiKeySymbol.cpp | 4 +--- src/frontends/qt4/GuiListings.cpp | 17 ++++++++--------- src/frontends/qt4/GuiLog.cpp | 5 +---- src/frontends/qt4/GuiMath.cpp | 3 +-- src/frontends/qt4/GuiMathMatrix.cpp | 3 +-- src/frontends/qt4/GuiNomencl.cpp | 2 +- src/frontends/qt4/GuiNote.cpp | 3 +-- src/frontends/qt4/GuiPainter.cpp | 4 +--- src/frontends/qt4/GuiParagraph.cpp | 5 +---- src/frontends/qt4/GuiPrefs.cpp | 5 +---- src/frontends/qt4/GuiPrint.cpp | 3 +-- src/frontends/qt4/GuiRef.cpp | 3 +-- src/frontends/qt4/GuiSearch.cpp | 3 +-- src/frontends/qt4/GuiSendto.cpp | 4 +--- src/frontends/qt4/GuiSpellchecker.cpp | 3 +-- src/frontends/qt4/GuiTabular.cpp | 3 +-- src/frontends/qt4/GuiTabularCreate.cpp | 3 +-- src/frontends/qt4/GuiTexinfo.cpp | 4 +--- src/frontends/qt4/GuiThesaurus.cpp | 3 +-- src/frontends/qt4/GuiToc.cpp | 3 +-- src/frontends/qt4/GuiToolbar.cpp | 4 +--- src/frontends/qt4/GuiToolbars.cpp | 3 +-- src/frontends/qt4/GuiVSpace.cpp | 3 +-- src/frontends/qt4/GuiView.cpp | 4 +--- src/frontends/qt4/GuiViewSource.cpp | 2 +- src/frontends/qt4/GuiWorkArea.cpp | 5 +---- src/frontends/qt4/GuiWrap.cpp | 3 +-- src/frontends/qt4/LyXFileDialog.cpp | 5 +++-- src/frontends/qt4/PanelStack.cpp | 4 +--- src/frontends/qt4/TocModel.cpp | 3 +-- src/frontends/qt4/Validator.cpp | 3 +-- src/frontends/qt4/qt_helpers.cpp | 4 +--- src/frontends/tests/biblio.cpp | 5 +---- src/graphics/GraphicsCache.cpp | 3 +-- src/graphics/GraphicsCacheItem.cpp | 4 +--- src/graphics/GraphicsConverter.cpp | 11 +++-------- src/graphics/GraphicsLoader.cpp | 5 +---- src/graphics/GraphicsParams.cpp | 5 +---- src/graphics/GraphicsTypes.cpp | 3 +-- src/graphics/PreviewImage.cpp | 3 +-- src/graphics/PreviewLoader.cpp | 18 ++---------------- src/insets/ExternalSupport.cpp | 5 +---- src/insets/ExternalTemplate.cpp | 6 +----- src/insets/ExternalTransforms.cpp | 3 +-- src/insets/InsetBibtex.cpp | 9 +-------- src/insets/InsetBox.cpp | 8 +------- src/insets/InsetBranch.cpp | 6 +----- src/insets/InsetCaption.cpp | 6 +----- src/insets/InsetCitation.cpp | 3 +-- src/insets/InsetCollapsable.cpp | 6 +----- src/insets/InsetCommand.cpp | 5 +---- src/insets/InsetCommandParams.cpp | 3 +-- src/insets/InsetERT.cpp | 9 +-------- src/insets/InsetExternal.cpp | 6 +----- src/insets/InsetFlex.cpp | 4 +--- src/insets/InsetFloat.cpp | 7 +------ src/insets/InsetFloatList.cpp | 3 +-- src/insets/InsetFoot.cpp | 6 ++---- src/insets/InsetGraphics.cpp | 7 +------ src/insets/InsetGraphicsParams.cpp | 4 +--- src/insets/InsetHyperlink.cpp | 4 +--- src/insets/InsetInclude.cpp | 8 +------- src/insets/InsetIndex.cpp | 4 +--- src/insets/InsetInfo.cpp | 6 +----- src/insets/InsetLine.cpp | 4 ++-- src/insets/InsetListings.cpp | 5 +---- src/insets/InsetListingsParams.cpp | 6 +----- src/insets/InsetNewline.cpp | 4 +--- src/insets/InsetNomencl.cpp | 3 +-- src/insets/InsetNote.cpp | 7 +------ src/insets/InsetQuotes.cpp | 6 +----- src/insets/InsetRef.cpp | 4 +--- src/insets/InsetSpace.cpp | 6 ++---- src/insets/InsetSpecialChar.cpp | 5 ++--- src/insets/InsetTOC.cpp | 4 +--- src/insets/InsetTabular.cpp | 16 +--------------- src/insets/InsetText.cpp | 14 ++++---------- src/insets/InsetTheorem.cpp | 5 +---- src/insets/InsetVSpace.cpp | 8 +------- src/insets/InsetWrap.cpp | 7 +------ src/insets/MailInset.cpp | 3 +-- src/insets/RenderPreview.cpp | 3 +-- src/lengthcommon.cpp | 4 ++-- src/lyxfind.cpp | 4 ++-- src/mathed/CommandInset.cpp | 2 +- src/mathed/InsetFormulaMacro.cpp | 4 +--- src/mathed/InsetMath.cpp | 3 +-- src/mathed/InsetMathArray.cpp | 7 +------ src/mathed/InsetMathCases.cpp | 3 +-- src/mathed/InsetMathDelim.cpp | 2 +- src/mathed/InsetMathExFunc.cpp | 3 +-- src/mathed/InsetMathGrid.cpp | 12 +----------- src/mathed/InsetMathHull.cpp | 10 +--------- src/mathed/InsetMathMBox.cpp | 3 +-- src/mathed/InsetMathNest.cpp | 5 +---- src/mathed/InsetMathNumber.cpp | 2 +- src/mathed/InsetMathRef.cpp | 3 +-- src/mathed/InsetMathRoot.cpp | 2 +- src/mathed/InsetMathScript.cpp | 3 +-- src/mathed/InsetMathSpace.cpp | 2 +- src/mathed/InsetMathSplit.cpp | 3 +-- src/mathed/InsetMathSubstack.cpp | 3 ++- src/mathed/InsetMathXYArrow.cpp | 4 +--- src/mathed/MacroTable.cpp | 9 +-------- src/mathed/MathAtom.cpp | 3 +-- src/mathed/MathAutoCorrect.cpp | 6 +----- src/mathed/MathData.cpp | 8 +------- src/mathed/MathExtern.cpp | 10 +--------- src/mathed/MathFactory.cpp | 6 +----- src/mathed/MathMacro.cpp | 5 ++--- src/mathed/MathMacroTemplate.cpp | 4 +--- src/mathed/MathParser.cpp | 16 +++------------- src/mathed/MathStream.cpp | 3 +-- src/mathed/MathSupport.cpp | 4 +--- src/output.cpp | 4 +--- src/output_docbook.cpp | 6 +----- src/output_latex.cpp | 8 ++------ src/output_plaintext.cpp | 6 +----- src/paragraph_funcs.cpp | 4 +--- src/rowpainter.cpp | 5 +---- src/sgml.cpp | 6 +----- src/support/FileFilterList.cpp | 6 +----- src/support/FileMonitor.cpp | 3 +-- src/support/FileName.cpp | 19 +++++++++++-------- src/support/ForkedCalls.cpp | 13 ++----------- src/support/Messages.cpp | 3 +-- src/support/Package.cpp | 2 +- src/support/convert.cpp | 4 +--- src/support/copy.cpp | 7 +------ src/support/debug.cpp | 5 +---- src/support/docstream.cpp | 4 +--- src/support/environment.cpp | 4 +--- src/support/filetools.cpp | 9 +-------- src/support/gettext.cpp | 3 +-- src/support/lstrings.cpp | 12 +----------- src/support/lyxsum.cpp | 9 +-------- src/support/lyxtime.cpp | 2 +- src/support/minizip/zipunzip.cpp | 8 +------- src/support/os_cygwin.cpp | 3 +-- src/support/os_unix.cpp | 3 +-- src/support/os_win32.cpp | 3 +-- src/support/socktools.cpp | 5 +---- src/support/tempname.cpp | 4 ++-- src/support/unicode.cpp | 6 +----- src/support/userinfo.cpp | 2 +- src/tex2lyx/Context.cpp | 6 +----- src/tex2lyx/Font.cpp | 2 +- src/tex2lyx/Parser.cpp | 11 +---------- src/tex2lyx/boost.cpp | 3 +-- src/tex2lyx/math.cpp | 7 +------ src/tex2lyx/preamble.cpp | 10 +--------- src/tex2lyx/table.cpp | 12 ++---------- src/tex2lyx/tex2lyx.cpp | 15 +-------------- src/tex2lyx/text.cpp | 10 +--------- 257 files changed, 321 insertions(+), 1133 deletions(-) diff --git a/src/ASpell.cpp b/src/ASpell.cpp index 7d32fa55e2..9dff24a300 100644 --- a/src/ASpell.cpp +++ b/src/ASpell.cpp @@ -20,7 +20,7 @@ #include -using std::string; +using namespace std; namespace lyx { diff --git a/src/Author.cpp b/src/Author.cpp index 44acfbc605..d31dd7cb5f 100644 --- a/src/Author.cpp +++ b/src/Author.cpp @@ -18,7 +18,7 @@ #include -using std::string; +using namespace std; namespace lyx { diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index ca4d2850de..b5579da7b1 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -30,11 +30,7 @@ #include "boost/regex.hpp" -using std::string; -using std::vector; -using std::pair; -using std::endl; -using std::set; +using namespace std; namespace lyx { diff --git a/src/Box.cpp b/src/Box.cpp index d968448aba..d17c458982 100644 --- a/src/Box.cpp +++ b/src/Box.cpp @@ -16,7 +16,7 @@ #include -using std::ostream; +using namespace std; namespace lyx { diff --git a/src/BranchList.cpp b/src/BranchList.cpp index b846641e15..2867f49e4a 100644 --- a/src/BranchList.cpp +++ b/src/BranchList.cpp @@ -17,7 +17,7 @@ #include -using std::string; +using namespace std; namespace lyx { diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 0581eacfe2..319942d46b 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -106,21 +106,7 @@ #include #include -using std::endl; -using std::for_each; -using std::make_pair; - -using std::ios; -using std::map; -using std::ostream; -using std::ostringstream; -using std::ofstream; -using std::ifstream; -using std::pair; -using std::stack; -using std::vector; -using std::string; -using std::time_t; +using namespace std; namespace lyx { diff --git a/src/BufferList.cpp b/src/BufferList.cpp index c33d64f21f..a650ba62dc 100644 --- a/src/BufferList.cpp +++ b/src/BufferList.cpp @@ -35,17 +35,7 @@ using boost::bind; -using std::auto_ptr; -using std::endl; -using std::equal_to; -using std::find; -using std::find_if; -using std::for_each; -using std::string; -using std::vector; -using std::back_inserter; -using std::transform; - +using namespace std; namespace lyx { diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 037e18b380..322d9d3ea5 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -53,16 +53,8 @@ #include #include -using std::count; -using std::endl; -using std::find; -using std::string; -using std::istringstream; -using std::make_pair; -using std::ostream; -using std::ostringstream; -using std::pair; -using std::string; +using namespace std; + using lyx::support::FileName; using lyx::support::libFileSearch; using lyx::support::bformat; diff --git a/src/BufferView.cpp b/src/BufferView.cpp index d050da8228..8ce64641e4 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -80,17 +80,7 @@ #include #include -using std::distance; -using std::endl; -using std::ifstream; -using std::istringstream; -using std::istream_iterator; -using std::make_pair; -using std::min; -using std::max; -using std::mem_fun_ref; -using std::string; -using std::vector; +using namespace std; namespace lyx { diff --git a/src/Bullet.cpp b/src/Bullet.cpp index 2db54cec17..da946dcbdc 100644 --- a/src/Bullet.cpp +++ b/src/Bullet.cpp @@ -20,7 +20,7 @@ #include -using std::string; +using namespace std; namespace lyx { diff --git a/src/Chktex.cpp b/src/Chktex.cpp index c88aefb2ba..809d964367 100644 --- a/src/Chktex.cpp +++ b/src/Chktex.cpp @@ -23,9 +23,7 @@ #include -using std::getline; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/CmdDef.cpp b/src/CmdDef.cpp index aac8ac3c1d..b05d726a18 100644 --- a/src/CmdDef.cpp +++ b/src/CmdDef.cpp @@ -22,8 +22,7 @@ #include #include -using std::endl; -using std::string; +using namespace std; namespace lyx { diff --git a/src/Color.cpp b/src/Color.cpp index 95074309c8..f90b24e255 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -30,18 +30,7 @@ #include -#ifndef CXX_GLOBAL_CSTD -using std::floor; -#endif - -using std::max; -using std::min; -using std::setw; - -using std::istringstream; -using std::ostringstream; -using std::string; -using std::endl; +using namespace std; namespace lyx { diff --git a/src/Converter.cpp b/src/Converter.cpp index 53c1a7b5cd..6768299f7c 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -36,11 +36,7 @@ #include "support/Path.h" #include "support/Systemcall.h" -using std::find_if; -using std::string; -using std::vector; -using std::distance; - +using namespace std; namespace lyx { diff --git a/src/ConverterCache.cpp b/src/ConverterCache.cpp index fe5e813fb5..4ca2979a35 100644 --- a/src/ConverterCache.cpp +++ b/src/ConverterCache.cpp @@ -35,7 +35,7 @@ #include #include -using std::string; +using namespace std; namespace lyx { diff --git a/src/Counters.cpp b/src/Counters.cpp index b4bf026e42..ad13330cd7 100644 --- a/src/Counters.cpp +++ b/src/Counters.cpp @@ -23,9 +23,7 @@ #include -using std::endl; -using std::ostringstream; -using std::string; +using namespace std; namespace lyx { diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 520417dfdb..f4489c899c 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -53,12 +53,7 @@ #include #include -using std::string; -using std::vector; -using std::endl; -using std::min; -using std::for_each; - +using namespace std; namespace lyx { diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 6984e5f5da..51fd1bbf1b 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -58,13 +58,7 @@ #include -using std::endl; -using std::for_each; -using std::make_pair; -using std::pair; -using std::vector; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/DepTable.cpp b/src/DepTable.cpp index 8ebb08aa06..b37f914150 100644 --- a/src/DepTable.cpp +++ b/src/DepTable.cpp @@ -24,13 +24,7 @@ #include -using std::endl; -using std::flush; -using std::getline; -using std::string; -using std::ofstream; -using std::ifstream; - +using namespace std; namespace lyx { diff --git a/src/EmbeddedFiles.cpp b/src/EmbeddedFiles.cpp index 5ef9da5792..e31f95460d 100644 --- a/src/EmbeddedFiles.cpp +++ b/src/EmbeddedFiles.cpp @@ -38,16 +38,7 @@ #include #include -using std::ofstream; -using std::endl; -using std::vector; -using std::string; -using std::pair; -using std::make_pair; -using std::istream; -using std::ostream; -using std::getline; -using std::istringstream; +using namespace std; namespace lyx { diff --git a/src/Encoding.cpp b/src/Encoding.cpp index d828b9d7e6..949e673d42 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -27,12 +27,7 @@ #include -#ifndef CXX_GLOBAL_CSTD -using std::strtol; -#endif -using std::endl; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/ErrorList.cpp b/src/ErrorList.cpp index 1fc64c7315..bc007da2dd 100644 --- a/src/ErrorList.cpp +++ b/src/ErrorList.cpp @@ -12,8 +12,7 @@ #include "ErrorList.h" -using std::string; - +using namespace std; namespace lyx { diff --git a/src/Exporter.cpp b/src/Exporter.cpp index 7cb141bcf5..326358560c 100644 --- a/src/Exporter.cpp +++ b/src/Exporter.cpp @@ -29,10 +29,7 @@ #include -using std::find; -using std::string; -using std::vector; - +using namespace std; namespace lyx { diff --git a/src/FloatList.cpp b/src/FloatList.cpp index 1c80fc1b15..28d37ecb02 100644 --- a/src/FloatList.cpp +++ b/src/FloatList.cpp @@ -13,8 +13,7 @@ #include "FloatList.h" #include "Floating.h" -using std::string; - +using namespace std; namespace lyx { diff --git a/src/Floating.cpp b/src/Floating.cpp index 9da1f1a389..645dcf9307 100644 --- a/src/Floating.cpp +++ b/src/Floating.cpp @@ -14,7 +14,7 @@ #include "Floating.h" -using std::string; +using namespace std; namespace lyx { diff --git a/src/Font.cpp b/src/Font.cpp index 7821c58e85..a1492db032 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -31,17 +31,7 @@ #include "support/gettext.h" #include "support/lstrings.h" -using std::endl; -using std::string; -using std::ostream; -using std::ostringstream; -using std::istringstream; -using std::pair; - -#ifndef CXX_GLOBAL_CSTD -using std::strlen; -#endif - +using namespace std; namespace lyx { diff --git a/src/FontInfo.cpp b/src/FontInfo.cpp index 743f6b6325..2623f2ea23 100644 --- a/src/FontInfo.cpp +++ b/src/FontInfo.cpp @@ -20,8 +20,7 @@ #include -using std::endl; - +using namespace std; namespace lyx { diff --git a/src/FontList.cpp b/src/FontList.cpp index a5ffca8102..f6b456d9db 100644 --- a/src/FontList.cpp +++ b/src/FontList.cpp @@ -24,7 +24,7 @@ #include -using std::distance; +using namespace std; namespace lyx { diff --git a/src/Format.cpp b/src/Format.cpp index 6dd5bd6557..6154d69689 100644 --- a/src/Format.cpp +++ b/src/Format.cpp @@ -25,10 +25,7 @@ #include "support/os.h" #include "support/Systemcall.h" -using std::find_if; -using std::string; -using std::distance; - +using namespace std; namespace lyx { diff --git a/src/FuncRequest.cpp b/src/FuncRequest.cpp index 634111f147..af4d97c7d7 100644 --- a/src/FuncRequest.cpp +++ b/src/FuncRequest.cpp @@ -16,11 +16,7 @@ #include #include -using std::getline; -using std::istringstream; -using std::vector; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/Graph.cpp b/src/Graph.cpp index 502ff72944..1f5c66ed83 100644 --- a/src/Graph.cpp +++ b/src/Graph.cpp @@ -15,10 +15,7 @@ #include -using std::vector; -using std::reverse; -using std::fill; - +using namespace std; namespace lyx { diff --git a/src/ISpell.cpp b/src/ISpell.cpp index daeaabab46..28358c828b 100644 --- a/src/ISpell.cpp +++ b/src/ISpell.cpp @@ -36,16 +36,7 @@ using boost::shared_ptr; -#ifndef CXX_GLOBAL_CSTD -using std::strcpy; -using std::strlen; -using std::strpbrk; -#endif - -using std::endl; -using std::max; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/InsetList.cpp b/src/InsetList.cpp index a18c8b6367..1f20585879 100644 --- a/src/InsetList.cpp +++ b/src/InsetList.cpp @@ -20,8 +20,7 @@ #include "insets/InsetBranch.h" -using std::lower_bound; - +using namespace std; namespace lyx { diff --git a/src/KeyMap.cpp b/src/KeyMap.cpp index 6d105ee6e8..f6cc6848b5 100644 --- a/src/KeyMap.cpp +++ b/src/KeyMap.cpp @@ -27,11 +27,7 @@ #include #include -using std::endl; -using std::ios; -using std::ofstream; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/KeySequence.cpp b/src/KeySequence.cpp index 1af1b88f72..3bb207c5de 100644 --- a/src/KeySequence.cpp +++ b/src/KeySequence.cpp @@ -20,9 +20,7 @@ #include "frontends/KeySymbol.h" -using std::make_pair; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 2fe5982055..5c62824e0e 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -36,17 +36,7 @@ using boost::regex; using boost::smatch; -#ifndef CXX_GLOBAL_CSTD -using std::sscanf; -#endif - -using std::endl; -using std::getline; -using std::string; -using std::ifstream; -using std::set; -using std::vector; - +using namespace std; namespace lyx { diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 72ce130ca0..5953c952df 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -31,14 +31,7 @@ #include "support/docstream.h" #include "support/filetools.h" -using std::endl; -using std::find; -using std::string; -using std::list; -using std::ostream; -using std::ostringstream; -using std::set; - +using namespace std; namespace lyx { diff --git a/src/Language.cpp b/src/Language.cpp index 39c6efda93..770ee8686c 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -23,9 +23,7 @@ #include -using std::endl; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/Layout.cpp b/src/Layout.cpp index 6d285881b5..1374fbefd7 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -23,8 +23,7 @@ #include -using std::endl; -using std::string; +using namespace std; namespace lyx { diff --git a/src/Length.cpp b/src/Length.cpp index cc45736570..90da83a74c 100644 --- a/src/Length.cpp +++ b/src/Length.cpp @@ -23,12 +23,10 @@ #include #include +using namespace std; namespace lyx { -using std::ostringstream; -using std::string; - ///////////////////////////////////////////////////////////////////// // diff --git a/src/Lexer.cpp b/src/Lexer.cpp index d8dbe629e6..a6418ef040 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -33,6 +33,7 @@ #include #include +using namespace std; namespace lyx { @@ -47,15 +48,6 @@ using support::split; using support::subst; using support::trim; -using std::endl; -using std::getline; -using std::lower_bound; -using std::sort; -using std::string; -using std::ios; -using std::istream; -using std::ostream; - ////////////////////////////////////////////////////////////////////// // diff --git a/src/LyX.cpp b/src/LyX.cpp index db9e92033a..e74dfc7814 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -69,18 +69,7 @@ #include #include -using std::endl; -using std::for_each; -using std::map; -using std::make_pair; -using std::string; -using std::vector; - -#ifndef CXX_GLOBAL_CSTD -using std::exit; -using std::signal; -using std::system; -#endif +using namespace std; namespace lyx { diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index c3d6ff3a77..e493aa0d52 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -22,14 +22,13 @@ #include +using namespace std; namespace lyx { using support::split; using support::trim; -using std::string; - /* NAMING RULES FOR USER-COMMANDS diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 77732fc72f..4e05990dc9 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -95,14 +95,7 @@ #include -using std::endl; -using std::make_pair; -using std::pair; -using std::string; -using std::istringstream; -using std::ostringstream; -using std::find; -using std::vector; +using namespace std; namespace lyx { diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index a9e01d961c..d7b6f09b45 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -40,6 +40,7 @@ #include "support/os.h" #include "support/userinfo.h" +using namespace std; namespace lyx { @@ -53,15 +54,6 @@ using support::getEnv; using support::libFileSearch; using support::token; -using std::cout; -using std::endl; - -using std::ios; -using std::ofstream; -using std::ostream; -using std::string; - - namespace { // when adding something to this array keep it sorted! diff --git a/src/LyXVC.cpp b/src/LyXVC.cpp index 2e316d6af7..aff782494f 100644 --- a/src/LyXVC.cpp +++ b/src/LyXVC.cpp @@ -27,6 +27,7 @@ #include "support/lstrings.h" #include "support/lyxlib.h" +using namespace std; namespace lyx { @@ -35,8 +36,6 @@ using support::FileName; using support::makeAbsPath; using support::tempName; -using std::string; - namespace Alert = frontend::Alert; diff --git a/src/MenuBackend.cpp b/src/MenuBackend.cpp index ca4dd00d48..5c20906999 100644 --- a/src/MenuBackend.cpp +++ b/src/MenuBackend.cpp @@ -48,6 +48,8 @@ #include #include +using namespace std; +using boost::bind; namespace lyx { @@ -56,18 +58,6 @@ using support::contains; using support::makeDisplayPath; using support::token; -using boost::bind; - -using std::auto_ptr; -using std::endl; -using std::equal_to; -using std::find_if; -using std::max; -using std::sort; -using std::string; -using std::vector; -using std::stack; - namespace { class MenuNamesEqual : public std::unary_function { diff --git a/src/MetricsInfo.cpp b/src/MetricsInfo.cpp index 97d733aa99..02a458dbeb 100644 --- a/src/MetricsInfo.cpp +++ b/src/MetricsInfo.cpp @@ -22,11 +22,10 @@ #include +using namespace std; namespace lyx { -using std::string; - MetricsBase::MetricsBase() : bv(0), font(), style(LM_ST_TEXT), fontname("mathnormal"), diff --git a/src/ModuleList.cpp b/src/ModuleList.cpp index 258b71c585..1e7f13ca36 100644 --- a/src/ModuleList.cpp +++ b/src/ModuleList.cpp @@ -22,10 +22,7 @@ #include #include -using std::endl; -using std::map; -using std::string; -using std::vector; +using namespace std; namespace lyx { diff --git a/src/Mover.cpp b/src/Mover.cpp index 112b857f4a..b989cf118e 100644 --- a/src/Mover.cpp +++ b/src/Mover.cpp @@ -20,8 +20,7 @@ #include #include -using std::ios; -using std::string; +using namespace std; namespace lyx { diff --git a/src/PDFOptions.cpp b/src/PDFOptions.cpp index 94896f562b..8ef2665631 100644 --- a/src/PDFOptions.cpp +++ b/src/PDFOptions.cpp @@ -20,12 +20,10 @@ #include #include -namespace lyx { +using namespace std; +namespace lyx { -using std::ostream; -using std::ostringstream; -using std::string; const string PDFOptions::pagemode_fullscreen("FullScreen"); diff --git a/src/PSpell.cpp b/src/PSpell.cpp index 0a60cd84eb..bb5862da9a 100644 --- a/src/PSpell.cpp +++ b/src/PSpell.cpp @@ -24,12 +24,10 @@ extern "C" { #include +using namespace std; namespace lyx { -using std::endl; -using std::string; - PSpell::PSpell(BufferParams const &, string const & lang) : els(0), spell_error_object(0) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 42c4bec1cc..ecb0733969 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -58,9 +58,7 @@ #include #include -using std::endl; -using std::string; -using std::ostream; +using namespace std; namespace lyx { @@ -214,14 +212,6 @@ public: }; - - -using std::endl; -using std::upper_bound; -using std::lower_bound; -using std::string; - - // Initialization of the counter for the paragraph id's, unsigned int Paragraph::Private::paragraph_id = 0; diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp index ff1eb3ffc1..5d89a3c280 100644 --- a/src/ParagraphMetrics.cpp +++ b/src/ParagraphMetrics.cpp @@ -57,6 +57,7 @@ #include #include +using namespace std; namespace lyx { @@ -64,14 +65,6 @@ using lyx::support::contains; using lyx::support::rsplit; using support::subst; -using std::distance; -using std::endl; -using std::list; -using std::stack; -using std::string; -using std::ostream; -using std::ostringstream; - ParagraphMetrics::ParagraphMetrics(Paragraph const & par): position_(-1), par_(&par) { diff --git a/src/ParagraphParameters.cpp b/src/ParagraphParameters.cpp index bbbdca4b39..c8c0a5dab4 100644 --- a/src/ParagraphParameters.cpp +++ b/src/ParagraphParameters.cpp @@ -27,16 +27,12 @@ #include -using lyx::support::rtrim; - -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::string; - +using namespace std; namespace lyx { +using support::rtrim; + //NOTE The order of these MUST be the same as in Layout.h. static char const * const string_align[] = { "block", "left", "right", "center", "default", "" diff --git a/src/PrinterParams.cpp b/src/PrinterParams.cpp index 52de90c10c..7a96aae471 100644 --- a/src/PrinterParams.cpp +++ b/src/PrinterParams.cpp @@ -17,9 +17,9 @@ #include -namespace lyx { +using namespace std; -using std::string; +namespace lyx { PrinterParams::PrinterParams(Target t, diff --git a/src/Section.cpp b/src/Section.cpp index fcacc7e8f0..7cca23be14 100644 --- a/src/Section.cpp +++ b/src/Section.cpp @@ -12,10 +12,10 @@ #include "Section.h" +using namespace std; namespace lyx { -using std::string; string const & Section::name() const { diff --git a/src/Server.cpp b/src/Server.cpp index a9233745af..e4a4434368 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -58,6 +58,7 @@ #endif #include +using namespace std; namespace lyx { @@ -66,9 +67,6 @@ using support::FileName; using support::rtrim; using support::split; -using std::endl; -using std::string; - ///////////////////////////////////////////////////////////////////// // diff --git a/src/ServerSocket.cpp b/src/ServerSocket.cpp index ae80d9b750..ba56a7d873 100644 --- a/src/ServerSocket.cpp +++ b/src/ServerSocket.cpp @@ -39,9 +39,7 @@ using boost::shared_ptr; -using std::endl; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/Session.cpp b/src/Session.cpp index 839ec38ada..e76a2ec6d2 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -21,23 +21,7 @@ #include #include -using lyx::support::absolutePath; -using lyx::support::addName; -using lyx::support::FileName; -using lyx::support::package; - -using std::vector; -using std::getline; -using std::string; -using std::ifstream; -using std::ofstream; -using std::istream; -using std::ostream; -using std::endl; -using std::istringstream; -using std::copy; -using std::find; -using std::ostream_iterator; +using namespace std; namespace { @@ -53,6 +37,11 @@ string const sec_toolbars = "[toolbars]"; namespace lyx { +using support::absolutePath; +using support::addName; +using support::FileName; +using support::package; + LastFilesSection::LastFilesSection(unsigned int num) : default_num_last_files(4), absolute_max_last_files(100) diff --git a/src/Spacing.cpp b/src/Spacing.cpp index d2ed1acd80..9589cff1cd 100644 --- a/src/Spacing.cpp +++ b/src/Spacing.cpp @@ -18,15 +18,11 @@ #include #include +using namespace std; namespace lyx { -using std::ostream; -using std::ostringstream; -using std::string; - - string const Spacing::spacing_string[] = {"single", "onehalf", "double", "other"}; diff --git a/src/SpellBase.cpp b/src/SpellBase.cpp index 54b6b20549..ea76127bad 100644 --- a/src/SpellBase.cpp +++ b/src/SpellBase.cpp @@ -15,11 +15,10 @@ #include "support/gettext.h" #include "support/docstring.h" +using namespace std; namespace lyx { -using std::string; - bool SpellBase::alive() { diff --git a/src/Text.cpp b/src/Text.cpp index faeb92c4b4..ce49dfc549 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -73,8 +73,7 @@ #include -using std::auto_ptr; -using std::string; +using namespace std; namespace lyx { diff --git a/src/Text2.cpp b/src/Text2.cpp index d03d71d107..e9d1131808 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -61,12 +61,7 @@ #include -using std::endl; -using std::ostringstream; -using std::string; -using std::max; -using std::min; -using std::istringstream; +using namespace std; namespace lyx { diff --git a/src/Text3.cpp b/src/Text3.cpp index fa9fa8d69f..a8e079fdf6 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -74,10 +74,7 @@ #include #include -using std::endl; -using std::string; -using std::istringstream; -using std::ostringstream; +using namespace std; namespace lyx { diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 8f1ca29651..2253108761 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -35,11 +35,7 @@ #include -using std::endl; -using std::find_if; -using std::remove_if; -using std::string; -using std::ostream; +using namespace std; namespace lyx { diff --git a/src/TextClassList.cpp b/src/TextClassList.cpp index 558eae4770..eceacd29da 100644 --- a/src/TextClassList.cpp +++ b/src/TextClassList.cpp @@ -35,15 +35,7 @@ using boost::bind; using boost::regex; using boost::smatch; -using std::endl; -using std::equal_to; -using std::find_if; -using std::make_pair; -using std::sort; -using std::string; -using std::pair; -using std::ifstream; - +using namespace std; // Gets textclass number from name pair const diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 4fa2857ad6..a0ac6afdfa 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -49,10 +49,7 @@ #include "frontends/FontMetrics.h" #include "frontends/Painter.h" -using std::make_pair; -using std::max; -using std::min; -using std::pair; +using namespace std; namespace lyx { diff --git a/src/Thesaurus.cpp b/src/Thesaurus.cpp index 466abebc1d..6e5d80a07d 100644 --- a/src/Thesaurus.cpp +++ b/src/Thesaurus.cpp @@ -20,15 +20,13 @@ #include +using namespace std; namespace lyx { #ifdef HAVE_LIBAIKSAURUS using support::bformat; -using std::sort; -using std::string; - Thesaurus::Thesaurus() : aik_(new Aiksaurus) diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp index c11dc939c2..daa95283d3 100644 --- a/src/TocBackend.cpp +++ b/src/TocBackend.cpp @@ -30,8 +30,7 @@ #include "support/debug.h" #include "support/docstream.h" -using std::string; - +using namespace std; namespace lyx { diff --git a/src/ToolbarBackend.cpp b/src/ToolbarBackend.cpp index b5c7d40574..cbe318267d 100644 --- a/src/ToolbarBackend.cpp +++ b/src/ToolbarBackend.cpp @@ -22,17 +22,13 @@ #include #include +using namespace std; + namespace lyx { using support::compare_ascii_no_case; using support::getVectorFromString; -using std::make_pair; -using std::string; -using std::vector; -using std::find_if; - - namespace { class ToolbarNamesEqual diff --git a/src/Trans.cpp b/src/Trans.cpp index f2dc6680db..9d061d15ec 100644 --- a/src/Trans.cpp +++ b/src/Trans.cpp @@ -27,17 +27,14 @@ #include "support/convert.h" #include "support/docstream.h" +using namespace std; + namespace lyx { using support::split; using support::contains; using support::libFileSearch; -using std::endl; -using std::string; -using std::pair; -using std::map; - ///////////////////////////////////////////////////////////////////// // diff --git a/src/Undo.cpp b/src/Undo.cpp index 0c906db882..74e8cbc2c3 100644 --- a/src/Undo.cpp +++ b/src/Undo.cpp @@ -36,7 +36,7 @@ #include #include -using std::advance; +using namespace std; namespace lyx { diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index 0fd2094822..c92a648ffd 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -23,6 +23,11 @@ #include +using namespace std; + +using boost::regex; +using boost::regex_match; +using boost::smatch; namespace lyx { @@ -37,20 +42,6 @@ using support::rtrim; using support::split; using support::Systemcall; -using boost::regex; -using boost::regex_match; -using boost::smatch; - -#ifndef CXX_GLOBAL_CSTD -using std::asctime; -using std::gmtime; -#endif - -using std::endl; -using std::getline; -using std::string; -using std::ifstream; - int VCS::doVCCommand(string const & cmd, FileName const & path) { diff --git a/src/VSpace.cpp b/src/VSpace.cpp index 9794987970..b42409e88d 100644 --- a/src/VSpace.cpp +++ b/src/VSpace.cpp @@ -23,6 +23,7 @@ #include "support/convert.h" #include "support/lstrings.h" +using namespace std; namespace lyx { @@ -32,8 +33,6 @@ using support::ltrim; using support::prefixIs; using support::rtrim; -using std::string; - namespace { diff --git a/src/Variables.cpp b/src/Variables.cpp index 46e542a321..2257f9f1e3 100644 --- a/src/Variables.cpp +++ b/src/Variables.cpp @@ -14,6 +14,7 @@ #include "Variables.h" #include "support/LRegex.h" +using namespace std; void Variables::set(string const & var, string const & val) { @@ -67,10 +68,7 @@ string const Variables::expand(string const & s) const #include - namespace lyx { -using std::endl; -using std::cout; int main() { Variables vars; diff --git a/src/boost.cpp b/src/boost.cpp index 46d43df40e..768f4117f0 100644 --- a/src/boost.cpp +++ b/src/boost.cpp @@ -20,7 +20,7 @@ #include #include -using std::endl; +using namespace std; using lyx::lyxerr; using lyx::LyX; diff --git a/src/client/Messages.cpp b/src/client/Messages.cpp index 081c6d31ee..0b2aa7319d 100644 --- a/src/client/Messages.cpp +++ b/src/client/Messages.cpp @@ -18,18 +18,15 @@ #include #include +using namespace std; namespace lyx { using support::package; -using std::endl; -using std::string; - #ifdef ENABLE_NLS - #if 0 #include diff --git a/src/client/boost.cpp b/src/client/boost.cpp index c3183ea51e..0d28e322f2 100644 --- a/src/client/boost.cpp +++ b/src/client/boost.cpp @@ -19,7 +19,6 @@ #include #include - using std::endl; namespace boost { diff --git a/src/client/client.cpp b/src/client/client.cpp index 5540f1a2f5..4b1962eb3b 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -54,22 +54,15 @@ #include #include - -namespace lyx { - -using support::FileName; -using support::prefixIs; +using namespace std; using ::boost::scoped_ptr; namespace fs = ::boost::filesystem; -using std::string; -using std::vector; -using std::cout; -using std::cerr; -using std::cin; -using std::endl; +namespace lyx { +using support::FileName; +using support::prefixIs; namespace support { diff --git a/src/client/debug.cpp b/src/client/debug.cpp index 320bbf1e8b..40cf5f5bc7 100644 --- a/src/client/debug.cpp +++ b/src/client/debug.cpp @@ -21,6 +21,7 @@ #include #include +using namespace std; namespace lyx { @@ -28,10 +29,6 @@ using support::ascii_lowercase; using support::bformat; using support::isStrInt; -using std::setw; -using std::string; -using std::ostream; - namespace { struct ErrorItem { diff --git a/src/client/gettext.cpp b/src/client/gettext.cpp index f5b99cdf7f..e62c0efa51 100644 --- a/src/client/gettext.cpp +++ b/src/client/gettext.cpp @@ -14,6 +14,7 @@ #include "support/gettext.h" #include "Messages.h" +using namespace std; namespace lyx { @@ -22,8 +23,6 @@ namespace lyx { # include #endif -using std::string; - namespace { diff --git a/src/factory.cpp b/src/factory.cpp index 0f3ebb6152..63654d7b9e 100644 --- a/src/factory.cpp +++ b/src/factory.cpp @@ -67,10 +67,7 @@ #include -using std::auto_ptr; -using std::endl; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/frontends/qt4/FloatPlacement.cpp b/src/frontends/qt4/FloatPlacement.cpp index 145c987071..ffcedaf32b 100644 --- a/src/frontends/qt4/FloatPlacement.cpp +++ b/src/frontends/qt4/FloatPlacement.cpp @@ -17,8 +17,9 @@ #include "insets/InsetFloat.h" #include "support/lstrings.h" +using namespace std; + using lyx::support::contains; -using std::string; //namespace lyx { diff --git a/src/frontends/qt4/GuiAlert.cpp b/src/frontends/qt4/GuiAlert.cpp index 2835ec90d3..512700421b 100644 --- a/src/frontends/qt4/GuiAlert.cpp +++ b/src/frontends/qt4/GuiAlert.cpp @@ -31,8 +31,7 @@ #include -using std::endl; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 9cf2d707a4..a84e5ae316 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -71,11 +71,7 @@ #include -using std::endl; -using std::map; -using std::string; -using std::vector; - +using namespace std; namespace lyx { diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp index 71772c7bcc..7c62b2913a 100644 --- a/src/frontends/qt4/GuiBibtex.cpp +++ b/src/frontends/qt4/GuiBibtex.cpp @@ -36,10 +36,7 @@ #include #include -using std::pair; -using std::string; -using std::vector; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index c29a4e24d5..91243256fd 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -31,9 +31,7 @@ #include #include -using std::string; -using std::vector; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiBranch.cpp b/src/frontends/qt4/GuiBranch.cpp index b7aa73a7cb..f3599d1283 100644 --- a/src/frontends/qt4/GuiBranch.cpp +++ b/src/frontends/qt4/GuiBranch.cpp @@ -27,8 +27,7 @@ #include #include -using std::string; -using std::vector; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiCharacter.cpp b/src/frontends/qt4/GuiCharacter.cpp index b8d5044fde..f547a38b0d 100644 --- a/src/frontends/qt4/GuiCharacter.cpp +++ b/src/frontends/qt4/GuiCharacter.cpp @@ -23,9 +23,7 @@ #include -using std::vector; -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp index 7e6470b963..65a6b4cf6a 100644 --- a/src/frontends/qt4/GuiCitation.cpp +++ b/src/frontends/qt4/GuiCitation.cpp @@ -40,9 +40,7 @@ #include #include -using std::string; -using std::vector; -using std::pair; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiClipboard.cpp b/src/frontends/qt4/GuiClipboard.cpp index 7522aeb581..f7b32c2d44 100644 --- a/src/frontends/qt4/GuiClipboard.cpp +++ b/src/frontends/qt4/GuiClipboard.cpp @@ -24,15 +24,15 @@ #include "support/lstrings.h" -using lyx::support::internalLineEnding; -using lyx::support::externalLineEnding; - -using std::string; +using namespace std; 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 ce6896ef9f..1f36f91c41 100644 --- a/src/frontends/qt4/GuiCommandBuffer.cpp +++ b/src/frontends/qt4/GuiCommandBuffer.cpp @@ -37,11 +37,7 @@ #include #include -using std::back_inserter; -using std::transform; -using std::string; -using std::vector; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiDelimiter.cpp b/src/frontends/qt4/GuiDelimiter.cpp index 0d7e55dbe7..0daa2fdad6 100644 --- a/src/frontends/qt4/GuiDelimiter.cpp +++ b/src/frontends/qt4/GuiDelimiter.cpp @@ -25,7 +25,7 @@ // Set to zero if unicode symbols are preferred. #define USE_PIXMAP 1 -using std::string; +using namespace std; static char const * latex_delimiters[] = { "(", ")", "{", "}", "[", "]", diff --git a/src/frontends/qt4/GuiDialog.cpp b/src/frontends/qt4/GuiDialog.cpp index 80fca20fea..31d6806064 100644 --- a/src/frontends/qt4/GuiDialog.cpp +++ b/src/frontends/qt4/GuiDialog.cpp @@ -21,7 +21,7 @@ #include #include -using std::string; +using namespace std; namespace lyx { namespace frontend { @@ -115,8 +115,7 @@ void GuiDialog::updateView() #include "FuncRequest.h" #include "insets/InsetCommand.h" - -using std::string; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 93d1f19efa..80e5f50aa2 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -55,13 +55,7 @@ #include #include -using std::distance; -using std::make_pair; -using std::pair; -using std::vector; -using std::string; -using std::ostringstream; -using std::sort; +using namespace std; /// template diff --git a/src/frontends/qt4/GuiErrorList.cpp b/src/frontends/qt4/GuiErrorList.cpp index 0289b58436..99c7b4cbb7 100644 --- a/src/frontends/qt4/GuiErrorList.cpp +++ b/src/frontends/qt4/GuiErrorList.cpp @@ -28,8 +28,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiExternal.cpp b/src/frontends/qt4/GuiExternal.cpp index 2bf12fcd20..a3dc99831e 100644 --- a/src/frontends/qt4/GuiExternal.cpp +++ b/src/frontends/qt4/GuiExternal.cpp @@ -45,10 +45,7 @@ #include #include -using std::advance; -using std::vector; -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiFloat.cpp b/src/frontends/qt4/GuiFloat.cpp index 6ac3cf7d54..25d0f1aacb 100644 --- a/src/frontends/qt4/GuiFloat.cpp +++ b/src/frontends/qt4/GuiFloat.cpp @@ -20,8 +20,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiFontMetrics.cpp b/src/frontends/qt4/GuiFontMetrics.cpp index b6eb969278..19359dc008 100644 --- a/src/frontends/qt4/GuiFontMetrics.cpp +++ b/src/frontends/qt4/GuiFontMetrics.cpp @@ -22,7 +22,7 @@ #include -using std::string; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index 74c86496e4..35a6c71005 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -54,16 +54,7 @@ #include #include -#ifndef CXX_GLOBAL_CSTD -using std::floor; -#endif -using std::find; -using std::vector; -using std::string; -using std::transform; -using std::make_pair; -using std::pair; -using std::vector; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiInclude.cpp b/src/frontends/qt4/GuiInclude.cpp index 5aaf12a889..2c99e27806 100644 --- a/src/frontends/qt4/GuiInclude.cpp +++ b/src/frontends/qt4/GuiInclude.cpp @@ -38,11 +38,7 @@ #include -using std::string; -using std::vector; -using std::pair; -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiIndex.cpp b/src/frontends/qt4/GuiIndex.cpp index 4f27d2b4d5..860055e1b5 100644 --- a/src/frontends/qt4/GuiIndex.cpp +++ b/src/frontends/qt4/GuiIndex.cpp @@ -20,8 +20,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiKeySymbol.cpp b/src/frontends/qt4/GuiKeySymbol.cpp index 32ad7d06b4..d3ba7f2965 100644 --- a/src/frontends/qt4/GuiKeySymbol.cpp +++ b/src/frontends/qt4/GuiKeySymbol.cpp @@ -29,9 +29,7 @@ #include - -using std::string; -using std::map; +using namespace std; namespace lyx { diff --git a/src/frontends/qt4/GuiListings.cpp b/src/frontends/qt4/GuiListings.cpp index 3d56be910b..8341e99419 100644 --- a/src/frontends/qt4/GuiListings.cpp +++ b/src/frontends/qt4/GuiListings.cpp @@ -27,18 +27,17 @@ #include #include +using namespace std; -using std::string; -using std::vector; -using lyx::support::findToken; -using lyx::support::getVectorFromString; -using lyx::support::getStringFromVector; -using lyx::support::prefixIs; -using lyx::support::suffixIs; -using lyx::support::contains; +namespace lyx { +using support::findToken; +using support::getVectorFromString; +using support::getStringFromVector; +using support::prefixIs; +using support::suffixIs; +using support::contains; -namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiLog.cpp b/src/frontends/qt4/GuiLog.cpp index 09c11502b9..899e1d5743 100644 --- a/src/frontends/qt4/GuiLog.cpp +++ b/src/frontends/qt4/GuiLog.cpp @@ -26,10 +26,7 @@ #include #include -using std::istringstream; -using std::ostream; -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiMath.cpp b/src/frontends/qt4/GuiMath.cpp index a0979d5f8c..7ef65f971f 100644 --- a/src/frontends/qt4/GuiMath.cpp +++ b/src/frontends/qt4/GuiMath.cpp @@ -14,8 +14,7 @@ #include "support/debug.h" #include "FuncRequest.h" -using std::string; -using std::map; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiMathMatrix.cpp b/src/frontends/qt4/GuiMathMatrix.cpp index 151196196c..53566e7120 100644 --- a/src/frontends/qt4/GuiMathMatrix.cpp +++ b/src/frontends/qt4/GuiMathMatrix.cpp @@ -22,8 +22,7 @@ #include #include -using std::ostringstream; -using std::string; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiNomencl.cpp b/src/frontends/qt4/GuiNomencl.cpp index 40302d8753..f3b6e3c7ef 100644 --- a/src/frontends/qt4/GuiNomencl.cpp +++ b/src/frontends/qt4/GuiNomencl.cpp @@ -23,7 +23,7 @@ #include #include -using std::string; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiNote.cpp b/src/frontends/qt4/GuiNote.cpp index 2c432f3b3b..4f15294755 100644 --- a/src/frontends/qt4/GuiNote.cpp +++ b/src/frontends/qt4/GuiNote.cpp @@ -19,8 +19,7 @@ #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp index dae8eda5ea..a1478d6090 100644 --- a/src/frontends/qt4/GuiPainter.cpp +++ b/src/frontends/qt4/GuiPainter.cpp @@ -37,9 +37,7 @@ #define USE_PIXMAP_CACHE 1 #endif -using std::endl; -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiParagraph.cpp b/src/frontends/qt4/GuiParagraph.cpp index 7e785a54d2..e6ccc7dadd 100644 --- a/src/frontends/qt4/GuiParagraph.cpp +++ b/src/frontends/qt4/GuiParagraph.cpp @@ -39,10 +39,7 @@ #include -using std::istringstream; -using std::ostringstream; -using std::string; -using std::endl; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 23f8a5752f..5c7dc1a9cb 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -65,10 +65,7 @@ using namespace Ui; -using std::endl; -using std::ostringstream; -using std::string; -using std::vector; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiPrint.cpp b/src/frontends/qt4/GuiPrint.cpp index 466b905d34..f54cde7fe4 100644 --- a/src/frontends/qt4/GuiPrint.cpp +++ b/src/frontends/qt4/GuiPrint.cpp @@ -33,8 +33,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index 5a0c01c054..0567fdf49b 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -31,8 +31,7 @@ #include #include -using std::vector; -using std::string; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiSearch.cpp b/src/frontends/qt4/GuiSearch.cpp index 6039c20a59..814b208a56 100644 --- a/src/frontends/qt4/GuiSearch.cpp +++ b/src/frontends/qt4/GuiSearch.cpp @@ -23,8 +23,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiSendto.cpp b/src/frontends/qt4/GuiSendto.cpp index c6cc0d62b2..84b960de6a 100644 --- a/src/frontends/qt4/GuiSendto.cpp +++ b/src/frontends/qt4/GuiSendto.cpp @@ -27,9 +27,7 @@ #include #include -using std::vector; -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index 1663d2a9a7..87804fe0db 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -46,8 +46,7 @@ #include "frontends/alert.h" -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 7d8e1b1ba8..4bd8ac77c8 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -31,8 +31,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiTabularCreate.cpp b/src/frontends/qt4/GuiTabularCreate.cpp index 2a8b5f6436..ba167bd384 100644 --- a/src/frontends/qt4/GuiTabularCreate.cpp +++ b/src/frontends/qt4/GuiTabularCreate.cpp @@ -21,8 +21,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiTexinfo.cpp b/src/frontends/qt4/GuiTexinfo.cpp index 23b0b39b5f..048df8d7e6 100644 --- a/src/frontends/qt4/GuiTexinfo.cpp +++ b/src/frontends/qt4/GuiTexinfo.cpp @@ -30,9 +30,7 @@ #include #include -using std::string; -using std::vector; -using std::endl; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiThesaurus.cpp b/src/frontends/qt4/GuiThesaurus.cpp index 9f2d08e338..347221f090 100644 --- a/src/frontends/qt4/GuiThesaurus.cpp +++ b/src/frontends/qt4/GuiThesaurus.cpp @@ -25,8 +25,7 @@ #include "lyxfind.h" #include "FuncRequest.h" -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiToc.cpp b/src/frontends/qt4/GuiToc.cpp index 78ed45c50f..74fdae35a6 100644 --- a/src/frontends/qt4/GuiToc.cpp +++ b/src/frontends/qt4/GuiToc.cpp @@ -35,8 +35,7 @@ #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp index b89e900b16..aaed4f2a28 100644 --- a/src/frontends/qt4/GuiToolbar.cpp +++ b/src/frontends/qt4/GuiToolbar.cpp @@ -50,6 +50,7 @@ #include +using namespace std; static void initializeResources() { @@ -64,9 +65,6 @@ static void initializeResources() namespace lyx { namespace frontend { -using std::string; -using std::endl; - using support::libFileSearch; using support::subst; using support::compare; diff --git a/src/frontends/qt4/GuiToolbars.cpp b/src/frontends/qt4/GuiToolbars.cpp index d6183e02f3..3bc5a4a3f6 100644 --- a/src/frontends/qt4/GuiToolbars.cpp +++ b/src/frontends/qt4/GuiToolbars.cpp @@ -30,8 +30,7 @@ #include "TextClass.h" #include "ToolbarBackend.h" - -using std::string; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiVSpace.cpp b/src/frontends/qt4/GuiVSpace.cpp index 3dcb45dab1..51b1672e46 100644 --- a/src/frontends/qt4/GuiVSpace.cpp +++ b/src/frontends/qt4/GuiVSpace.cpp @@ -34,8 +34,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 339d87ab5d..0217a12837 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -93,9 +93,7 @@ # include #endif -using std::endl; -using std::string; -using std::vector; +using namespace std; namespace lyx { diff --git a/src/frontends/qt4/GuiViewSource.cpp b/src/frontends/qt4/GuiViewSource.cpp index a856d54949..8f23234c8e 100644 --- a/src/frontends/qt4/GuiViewSource.cpp +++ b/src/frontends/qt4/GuiViewSource.cpp @@ -29,7 +29,7 @@ #include #include -using std::string; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 2c53eb524f..997f341148 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -70,10 +70,7 @@ int const CursorWidth = 1; #undef KeyPress #undef NoModifier -using std::endl; -using std::min; -using std::max; -using std::string; +using namespace std; namespace lyx { diff --git a/src/frontends/qt4/GuiWrap.cpp b/src/frontends/qt4/GuiWrap.cpp index 40a30caae0..7c31e48b1b 100644 --- a/src/frontends/qt4/GuiWrap.cpp +++ b/src/frontends/qt4/GuiWrap.cpp @@ -25,8 +25,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/LyXFileDialog.cpp b/src/frontends/qt4/LyXFileDialog.cpp index 30c45848b8..56fef5d74d 100644 --- a/src/frontends/qt4/LyXFileDialog.cpp +++ b/src/frontends/qt4/LyXFileDialog.cpp @@ -21,11 +21,12 @@ #include #include -using lyx::support::split; -using std::string; +using namespace std; 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/PanelStack.cpp b/src/frontends/qt4/PanelStack.cpp index 37cdcc47f3..feb80b78be 100644 --- a/src/frontends/qt4/PanelStack.cpp +++ b/src/frontends/qt4/PanelStack.cpp @@ -26,9 +26,7 @@ #include - -using std::endl; -using std::cout; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/TocModel.cpp b/src/frontends/qt4/TocModel.cpp index c247817b41..287d7fab79 100644 --- a/src/frontends/qt4/TocModel.cpp +++ b/src/frontends/qt4/TocModel.cpp @@ -17,8 +17,7 @@ #include -using std::max; -using std::min; +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/Validator.cpp b/src/frontends/qt4/Validator.cpp index a58a27d312..f39e503ae5 100644 --- a/src/frontends/qt4/Validator.cpp +++ b/src/frontends/qt4/Validator.cpp @@ -26,8 +26,7 @@ #include #include -using std::string; - +using namespace std; namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/qt_helpers.cpp b/src/frontends/qt4/qt_helpers.cpp index 02a344ef9e..aad055d2f0 100644 --- a/src/frontends/qt4/qt_helpers.cpp +++ b/src/frontends/qt4/qt_helpers.cpp @@ -43,9 +43,7 @@ #include #include -using std::string; -using std::vector; -using std::endl; +using namespace std; namespace lyx { diff --git a/src/frontends/tests/biblio.cpp b/src/frontends/tests/biblio.cpp index fc4e211b58..2d6d05720a 100644 --- a/src/frontends/tests/biblio.cpp +++ b/src/frontends/tests/biblio.cpp @@ -5,10 +5,7 @@ #include - -using std::cout; -using std::endl; -using std::string; +using namespace std; // Escape special chars. // All characters are literals except: '.|*?+(){}[]^$\' diff --git a/src/graphics/GraphicsCache.cpp b/src/graphics/GraphicsCache.cpp index 57bb6a9e5f..ed87453fa1 100644 --- a/src/graphics/GraphicsCache.cpp +++ b/src/graphics/GraphicsCache.cpp @@ -21,8 +21,7 @@ #include -using std::string; - +using namespace std; namespace lyx { diff --git a/src/graphics/GraphicsCacheItem.cpp b/src/graphics/GraphicsCacheItem.cpp index 229dd89e90..4f90611033 100644 --- a/src/graphics/GraphicsCacheItem.cpp +++ b/src/graphics/GraphicsCacheItem.cpp @@ -26,6 +26,7 @@ #include +using namespace std; namespace lyx { @@ -36,9 +37,6 @@ using support::onlyFilename; using support::tempName; using support::unzipFile; -using std::endl; -using std::string; - namespace graphics { diff --git a/src/graphics/GraphicsConverter.cpp b/src/graphics/GraphicsConverter.cpp index 9f736803cd..fab772a706 100644 --- a/src/graphics/GraphicsConverter.cpp +++ b/src/graphics/GraphicsConverter.cpp @@ -28,7 +28,9 @@ #include #include -namespace support = lyx::support; +using namespace std; + +namespace lyx { using support::addExtension; using support::changeExtension; @@ -43,13 +45,6 @@ using support::quote_python; using support::subst; using support::tempName; -using std::endl; -using std::ostream; -using std::ostringstream; -using std::string; - - -namespace lyx { namespace graphics { class Converter::Impl : public boost::signals::trackable { diff --git a/src/graphics/GraphicsLoader.cpp b/src/graphics/GraphicsLoader.cpp index 36f6eec2da..5545ed194e 100644 --- a/src/graphics/GraphicsLoader.cpp +++ b/src/graphics/GraphicsLoader.cpp @@ -25,10 +25,7 @@ #include #include -using std::string; -using std::endl; -using std::list; - +using namespace std; namespace lyx { namespace graphics { diff --git a/src/graphics/GraphicsParams.cpp b/src/graphics/GraphicsParams.cpp index 0677d95b2a..c5274f6552 100644 --- a/src/graphics/GraphicsParams.cpp +++ b/src/graphics/GraphicsParams.cpp @@ -16,10 +16,7 @@ #include - -using std::string; -using std::abs; - +using namespace std; namespace lyx { namespace graphics { diff --git a/src/graphics/GraphicsTypes.cpp b/src/graphics/GraphicsTypes.cpp index f8f6f45a91..126bf55f6c 100644 --- a/src/graphics/GraphicsTypes.cpp +++ b/src/graphics/GraphicsTypes.cpp @@ -14,8 +14,7 @@ #include -using std::string; - +using namespace std; namespace lyx { namespace graphics { diff --git a/src/graphics/PreviewImage.cpp b/src/graphics/PreviewImage.cpp index ba51f85ce4..07d04d7b4d 100644 --- a/src/graphics/PreviewImage.cpp +++ b/src/graphics/PreviewImage.cpp @@ -20,8 +20,7 @@ #include -using std::string; - +using namespace std; namespace lyx { diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index e13673bac3..96afd27842 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -43,24 +43,10 @@ #include #include -using lyx::support::FileName; - -using std::endl; -using std::find; -using std::fill; -using std::find_if; -using std::make_pair; +using namespace std; using boost::bind; - -using std::ifstream; -using std::list; -using std::map; -using std::ostringstream; -using std::pair; -using std::vector; -using std::string; - +using lyx::support::FileName; namespace { diff --git a/src/insets/ExternalSupport.cpp b/src/insets/ExternalSupport.cpp index 108df0e555..ec85244aa8 100644 --- a/src/insets/ExternalSupport.cpp +++ b/src/insets/ExternalSupport.cpp @@ -36,10 +36,7 @@ #include -using std::endl; -using std::string; -using std::vector; - +using namespace std; namespace lyx { diff --git a/src/insets/ExternalTemplate.cpp b/src/insets/ExternalTemplate.cpp index 0c93cbe5ea..9f6ba3ce5d 100644 --- a/src/insets/ExternalTemplate.cpp +++ b/src/insets/ExternalTemplate.cpp @@ -23,11 +23,7 @@ #include -using std::endl; -using std::for_each; -using std::string; -using std::ostream; -using std::vector; +using namespace std; namespace lyx { namespace external { diff --git a/src/insets/ExternalTransforms.cpp b/src/insets/ExternalTransforms.cpp index 8506d8e8d2..6bbbb6813e 100644 --- a/src/insets/ExternalTransforms.cpp +++ b/src/insets/ExternalTransforms.cpp @@ -24,13 +24,12 @@ #include // std::abs #include +using namespace std; namespace lyx { namespace external { using support::float_equal; -using std::string; - string const ExtraData::get(string const & id) const { diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 3f92e03234..726b93e234 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -39,6 +39,7 @@ #include +using namespace std; namespace lyx { @@ -68,14 +69,6 @@ using support::lowercase; namespace Alert = frontend::Alert; namespace os = support::os; -using std::endl; -using std::getline; -using std::string; -using std::ostream; -using std::pair; -using std::vector; -using std::map; - InsetBibtex::InsetBibtex(InsetCommandParams const & p) : InsetCommand(p, "bibtex") diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index df1bd47784..f6d6f6abbf 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -30,16 +30,10 @@ #include +using namespace std; namespace lyx { -using std::string; -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::endl; - - namespace { typedef Translator BoxTranslator; diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index 641efa3024..8b9d872662 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -28,14 +28,10 @@ #include +using namespace std; namespace lyx { -using std::string; -using std::istringstream; -using std::ostream; -using std::ostringstream; - InsetBranch::InsetBranch(BufferParams const & bp, InsetBranchParams const & params) diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index 0927cf0f48..6a67075e99 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -41,11 +41,7 @@ #include - -using std::endl; -using std::string; -using std::ostream; - +using namespace std; namespace lyx { diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index 5d5bbdacd2..0a8929260f 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -26,8 +26,7 @@ #include -using std::string; -using std::vector; +using namespace std; namespace lyx { diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 2a2d8db9f7..a74072f25b 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -37,14 +37,10 @@ #include "support/docstream.h" +using namespace std; namespace lyx { -using std::endl; -using std::max; -using std::ostream; -using std::string; - InsetCollapsable::CollapseStatus InsetCollapsable::status() const { diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp index d811d9c0e6..2cb37b4f0a 100644 --- a/src/insets/InsetCommand.cpp +++ b/src/insets/InsetCommand.cpp @@ -24,13 +24,10 @@ #include +using namespace std; namespace lyx { -using std::string; -using std::istringstream; -using std::ostringstream; - // FIXME Would it now be possible to use the InsetCode in // place of the mailer name and recover that information? diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp index 39b066bace..ca248155d2 100644 --- a/src/insets/InsetCommandParams.cpp +++ b/src/insets/InsetCommandParams.cpp @@ -37,8 +37,7 @@ #include -using std::string; - +using namespace std; namespace lyx { diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index 05da70c14f..4264fa6aa4 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -37,19 +37,12 @@ #include +using namespace std; namespace lyx { using support::token; -using std::endl; -using std::min; - -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::string; - InsetERT::InsetERT(BufferParams const & bp, CollapseStatus status) : InsetCollapsable(bp, status) diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index 74339bc656..2ce1566a4d 100644 --- a/src/insets/InsetExternal.cpp +++ b/src/insets/InsetExternal.cpp @@ -43,11 +43,7 @@ #include -using std::string; -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::vector; +using namespace std; using lyx::support::DocFileName; diff --git a/src/insets/InsetFlex.cpp b/src/insets/InsetFlex.cpp index 654b9b7253..cf499e9862 100644 --- a/src/insets/InsetFlex.cpp +++ b/src/insets/InsetFlex.cpp @@ -36,12 +36,10 @@ #include +using namespace std; namespace lyx { -using std::string; -using std::ostream; - InsetFlex::InsetFlex(BufferParams const & bp, InsetLayout const & il) diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp index c601b647e8..0d80dcbf5b 100644 --- a/src/insets/InsetFloat.cpp +++ b/src/insets/InsetFloat.cpp @@ -34,15 +34,10 @@ #include "support/docstream.h" #include "support/convert.h" +using namespace std; namespace lyx { -using std::endl; -using std::string; -using std::istringstream; -using std::ostream; -using std::ostringstream; - // With this inset it will be possible to support the latex package // float.sty, and I am sure that with this and some additional support diff --git a/src/insets/InsetFloatList.cpp b/src/insets/InsetFloatList.cpp index eafb610656..cec2f97372 100644 --- a/src/insets/InsetFloatList.cpp +++ b/src/insets/InsetFloatList.cpp @@ -30,13 +30,12 @@ #include +using namespace std; namespace lyx { using support::bformat; -using std::string; - InsetFloatList::InsetFloatList() : InsetCommand(InsetCommandParams(FLOAT_LIST_CODE), "toc") diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp index 238f6b78bf..4499860419 100644 --- a/src/insets/InsetFoot.cpp +++ b/src/insets/InsetFoot.cpp @@ -29,11 +29,9 @@ #include -namespace lyx { +using namespace std; -using std::string; -using std::auto_ptr; -using std::ostream; +namespace lyx { InsetFoot::InsetFoot(BufferParams const & bp) diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index be567ce62e..39e5fb5875 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -89,6 +89,7 @@ TODO #include #include +using namespace std; namespace lyx { @@ -111,12 +112,6 @@ using support::Systemcall; using support::unzipFile; using support::unzippedFileName; -using std::endl; -using std::string; -using std::istringstream; -using std::ostream; -using std::ostringstream; - namespace { diff --git a/src/insets/InsetGraphicsParams.cpp b/src/insets/InsetGraphicsParams.cpp index 8fee672724..e88ef42839 100644 --- a/src/insets/InsetGraphicsParams.cpp +++ b/src/insets/InsetGraphicsParams.cpp @@ -30,6 +30,7 @@ #include +using namespace std; namespace lyx { @@ -38,9 +39,6 @@ using support::readBB_from_PSFile; using support::token; using support::DocFileName; -using std::string; -using std::ostream; - InsetGraphicsParams::InsetGraphicsParams() { diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index 5c5e885a04..e254b93751 100644 --- a/src/insets/InsetHyperlink.cpp +++ b/src/insets/InsetHyperlink.cpp @@ -22,9 +22,7 @@ #include "support/lstrings.h" #include "support/docstream.h" -using std::string; -using std::find; -using std::replace; +using namespace std; namespace lyx { diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index e8d91dfced..9aff3d66b8 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -53,6 +53,7 @@ #include +using namespace std; namespace lyx { @@ -76,13 +77,6 @@ using support::onlyPath; using support::prefixIs; using support::subst; -using std::find; -using std::string; -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::vector; - namespace Alert = frontend::Alert; diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp index 1c479b6bbd..35c09245bf 100644 --- a/src/insets/InsetIndex.cpp +++ b/src/insets/InsetIndex.cpp @@ -21,12 +21,10 @@ #include +using namespace std; namespace lyx { -using std::string; -using std::ostream; - InsetIndex::InsetIndex(BufferParams const & bp) : InsetCollapsable(bp) diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 16efeeefd6..063c7bee73 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -34,11 +34,7 @@ #include "support/lstrings.h" #include "support/ExceptionMessage.h" -using std::pair; -using std::string; -using std::ostream; -using std::ostringstream; -using std::stack; +using namespace std; namespace lyx { diff --git a/src/insets/InsetLine.cpp b/src/insets/InsetLine.cpp index a12da39891..f331092cec 100644 --- a/src/insets/InsetLine.cpp +++ b/src/insets/InsetLine.cpp @@ -25,12 +25,12 @@ #include "frontends/Painter.h" +using namespace std; + namespace lyx { using frontend::Painter; -using std::ostream; - void InsetLine::read(Buffer const &, Lexer &) { diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp index 2d9fc16796..f205cc822c 100644 --- a/src/insets/InsetListings.cpp +++ b/src/insets/InsetListings.cpp @@ -32,10 +32,7 @@ #include -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::string; +using namespace std; namespace lyx { diff --git a/src/insets/InsetListingsParams.cpp b/src/insets/InsetListingsParams.cpp index fb0be3e605..599e2f1e13 100644 --- a/src/insets/InsetListingsParams.cpp +++ b/src/insets/InsetListingsParams.cpp @@ -24,11 +24,7 @@ #include -using std::map; -using std::vector; -using std::ostream; -using std::string; -using std::exception; +using namespace std; namespace lyx { diff --git a/src/insets/InsetNewline.cpp b/src/insets/InsetNewline.cpp index 103fbe866a..104fdfab48 100644 --- a/src/insets/InsetNewline.cpp +++ b/src/insets/InsetNewline.cpp @@ -23,12 +23,10 @@ #include "support/docstring.h" #include "support/docstream.h" +using namespace std; namespace lyx { -using std::endl; -using std::ostream; - void InsetNewline::read(Buffer const &, Lexer &) { diff --git a/src/insets/InsetNomencl.cpp b/src/insets/InsetNomencl.cpp index dec08854d2..5dd474cbfa 100644 --- a/src/insets/InsetNomencl.cpp +++ b/src/insets/InsetNomencl.cpp @@ -24,11 +24,10 @@ #include "support/docstream.h" +using namespace std; namespace lyx { -using std::string; - InsetNomencl::InsetNomencl(InsetCommandParams const & p) : InsetCommand(p, "nomenclature"), diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index e69bd6ee90..62c8915b6f 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -38,15 +38,10 @@ #include #include +using namespace std; namespace lyx { -using std::string; -using std::istringstream; -using std::ostream; -using std::ostringstream; - - namespace { typedef Translator NoteTranslator; diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp index 50b9ec1808..14a8f629b4 100644 --- a/src/insets/InsetQuotes.cpp +++ b/src/insets/InsetQuotes.cpp @@ -31,16 +31,12 @@ #include "support/docstream.h" #include "support/lstrings.h" +using namespace std; namespace lyx { using support::prefixIs; -using std::endl; -using std::string; -using std::ostream; - - namespace { /* codes used to read/write quotes to LyX files diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index 498a06b915..f22c2f67f1 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -24,14 +24,12 @@ #include "support/docstream.h" #include "support/lstrings.h" +using namespace std; namespace lyx { using support::escape; -using std::string; -using std::ostream; - InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf) : InsetCommand(p, "ref"), isLatex(buf.isLatex()) diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp index d1f2b399f4..5a5b105210 100644 --- a/src/insets/InsetSpace.cpp +++ b/src/insets/InsetSpace.cpp @@ -26,11 +26,9 @@ #include "support/docstream.h" -namespace lyx { +using namespace std; -using std::string; -using std::max; -using std::ostream; +namespace lyx { InsetSpace::InsetSpace() diff --git a/src/insets/InsetSpecialChar.cpp b/src/insets/InsetSpecialChar.cpp index 0463795ee1..b6f6b2ac83 100644 --- a/src/insets/InsetSpecialChar.cpp +++ b/src/insets/InsetSpecialChar.cpp @@ -25,10 +25,9 @@ #include "support/docstream.h" -namespace lyx { +using namespace std; -using std::string; -using std::ostream; +namespace lyx { InsetSpecialChar::InsetSpecialChar(Kind k) diff --git a/src/insets/InsetTOC.cpp b/src/insets/InsetTOC.cpp index ea9345bb6d..dc4bb4f360 100644 --- a/src/insets/InsetTOC.cpp +++ b/src/insets/InsetTOC.cpp @@ -22,12 +22,10 @@ #include +using namespace std; namespace lyx { -using std::string; -using std::ostream; - InsetTOC::InsetTOC(InsetCommandParams const & p) : InsetCommand(p, "toc") diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 8904bfc0b2..849f1a8513 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -62,21 +62,7 @@ #include #include -using std::abs; -using std::endl; -using std::getline; -using std::istream; -using std::istringstream; -using std::max; -using std::ostream; -using std::ostringstream; -using std::string; -using std::swap; -using std::vector; - -#ifndef CXX_GLOBAL_CSTD -using std::strlen; -#endif +using namespace std; using boost::shared_ptr; using boost::dynamic_pointer_cast; diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 18c8c9543a..830a380626 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -54,6 +54,10 @@ #include #include +using namespace std; + +using boost::bind; +using boost::ref; namespace lyx { @@ -61,16 +65,6 @@ using graphics::PreviewLoader; using support::isStrUnsignedInt; -using boost::bind; -using boost::ref; - -using std::endl; -using std::for_each; -using std::max; -using std::string; -using std::ostream; -using std::vector; - InsetText::InsetText(BufferParams const & bp) : drawFrame_(false), frame_color_(Color_insetframe) diff --git a/src/insets/InsetTheorem.cpp b/src/insets/InsetTheorem.cpp index 9a62fbf483..3dae9df1b2 100644 --- a/src/insets/InsetTheorem.cpp +++ b/src/insets/InsetTheorem.cpp @@ -22,13 +22,10 @@ #include +using namespace std; namespace lyx { -using std::endl; -using std::ostream; - - /* The intention is to be able to create arbitrary theorem like environments sing this class and some helper/container classes. It should be possible diff --git a/src/insets/InsetVSpace.cpp b/src/insets/InsetVSpace.cpp index 2444f67531..24cfe3ebcf 100644 --- a/src/insets/InsetVSpace.cpp +++ b/src/insets/InsetVSpace.cpp @@ -29,16 +29,10 @@ #include +using namespace std; namespace lyx { -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::string; -using std::max; - - namespace { int const ADD_TO_VSPACE_WIDTH = 5; diff --git a/src/insets/InsetWrap.cpp b/src/insets/InsetWrap.cpp index aea6976a52..9155960c2f 100644 --- a/src/insets/InsetWrap.cpp +++ b/src/insets/InsetWrap.cpp @@ -34,15 +34,10 @@ #include "support/convert.h" #include "support/docstream.h" +using namespace std; namespace lyx { -using std::string; -using std::endl; -using std::istringstream; -using std::ostream; -using std::ostringstream; - InsetWrap::InsetWrap(BufferParams const & bp, string const & type) : InsetCollapsable(bp), name_(from_utf8(type)) diff --git a/src/insets/MailInset.cpp b/src/insets/MailInset.cpp index 04e0d886fa..5d61a3980c 100644 --- a/src/insets/MailInset.cpp +++ b/src/insets/MailInset.cpp @@ -19,11 +19,10 @@ #include +using namespace std; namespace lyx { -using std::string; - void MailInset::showDialog(BufferView * bv) const { diff --git a/src/insets/RenderPreview.cpp b/src/insets/RenderPreview.cpp index 4ad8ef1269..233c86d58c 100644 --- a/src/insets/RenderPreview.cpp +++ b/src/insets/RenderPreview.cpp @@ -32,13 +32,12 @@ #include +using namespace std; namespace lyx { using support::FileName; -using std::string; - LyXRC_PreviewStatus RenderPreview::status() { diff --git a/src/lengthcommon.cpp b/src/lengthcommon.cpp index 05baafaaa2..b29b692f6e 100644 --- a/src/lengthcommon.cpp +++ b/src/lengthcommon.cpp @@ -17,9 +17,9 @@ #include -namespace lyx { +using namespace std; -using std::string; +namespace lyx { // I am not sure if "mu" should be possible to select (Lgb) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index e9a462a875..08c63fbb85 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -35,14 +35,14 @@ #include "support/docstream.h" #include "support/lstrings.h" +using namespace std; + namespace lyx { using support::compare_no_case; using support::uppercase; using support::split; -using std::advance; - namespace { diff --git a/src/mathed/CommandInset.cpp b/src/mathed/CommandInset.cpp index 01337c595f..7c24458cf5 100644 --- a/src/mathed/CommandInset.cpp +++ b/src/mathed/CommandInset.cpp @@ -18,10 +18,10 @@ #include +using namespace std; namespace lyx { -using std::string; CommandInset::CommandInset(docstring const & name) : InsetMathNest(2), name_(name), set_label_(false) diff --git a/src/mathed/InsetFormulaMacro.cpp b/src/mathed/InsetFormulaMacro.cpp index 2941e5597d..1e929d28f4 100644 --- a/src/mathed/InsetFormulaMacro.cpp +++ b/src/mathed/InsetFormulaMacro.cpp @@ -29,9 +29,7 @@ #include -using std::string; -using std::ostream; -using std::endl; +using namespace std; namespace lyx { diff --git a/src/mathed/InsetMath.cpp b/src/mathed/InsetMath.cpp index 49d381cd94..b7c7d57619 100644 --- a/src/mathed/InsetMath.cpp +++ b/src/mathed/InsetMath.cpp @@ -23,8 +23,7 @@ #include -using std::endl; - +using namespace std; namespace lyx { diff --git a/src/mathed/InsetMathArray.cpp b/src/mathed/InsetMathArray.cpp index bbfb583b9e..319e7ef55c 100644 --- a/src/mathed/InsetMathArray.cpp +++ b/src/mathed/InsetMathArray.cpp @@ -23,15 +23,10 @@ #include #include +using namespace std; namespace lyx { -using std::getline; -using std::istringstream; -using std::istream_iterator; -using std::vector; -using std::string; - InsetMathArray::InsetMathArray(docstring const & name, int m, int n) : InsetMathGrid(m, n), name_(name) diff --git a/src/mathed/InsetMathCases.cpp b/src/mathed/InsetMathCases.cpp index 8a45e21555..c38e91fda0 100644 --- a/src/mathed/InsetMathCases.cpp +++ b/src/mathed/InsetMathCases.cpp @@ -26,13 +26,12 @@ #include +using namespace std; namespace lyx { using support::bformat; -using std::endl; - InsetMathCases::InsetMathCases(row_type n) : InsetMathGrid(2, n, 'c', from_ascii("ll")) diff --git a/src/mathed/InsetMathDelim.cpp b/src/mathed/InsetMathDelim.cpp index 298a8a8263..5c732751a6 100644 --- a/src/mathed/InsetMathDelim.cpp +++ b/src/mathed/InsetMathDelim.cpp @@ -22,6 +22,7 @@ #include "frontends/FontMetrics.h" +using namespace std; namespace lyx { @@ -72,7 +73,6 @@ void InsetMathDelim::normalize(NormalStream & os) const void InsetMathDelim::metrics(MetricsInfo & mi, Dimension & dim) const { - using std::max; Dimension dim0; cell(0).metrics(mi, dim0); Dimension t = theFontMetrics(mi.base.font).dimension('I'); diff --git a/src/mathed/InsetMathExFunc.cpp b/src/mathed/InsetMathExFunc.cpp index 360f1c17ef..7b03387ba3 100644 --- a/src/mathed/InsetMathExFunc.cpp +++ b/src/mathed/InsetMathExFunc.cpp @@ -19,11 +19,10 @@ #include "support/docstream.h" +using namespace std; namespace lyx { -using std::string; - InsetMathExFunc::InsetMathExFunc(docstring const & name) : InsetMathNest(1), name_(name) diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index a7e0d6e349..09df2b4973 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -33,22 +33,12 @@ #include +using namespace std; namespace lyx { using support::bformat; -using std::endl; -using std::max; -using std::min; -using std::swap; - -using std::string; -using std::istream; -using std::istringstream; -using std::vector; - - namespace { docstring verboseHLine(int n) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 894504e7a4..8cbb24e6e8 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -55,6 +55,7 @@ #include +using namespace std; namespace lyx { @@ -62,15 +63,6 @@ using cap::grabAndEraseSelection; using support::bformat; using support::subst; -using std::endl; -using std::max; -using std::ostream; -using std::istringstream; -using std::ostringstream; -using std::swap; -using std::vector; - - namespace { int getCols(HullType type) diff --git a/src/mathed/InsetMathMBox.cpp b/src/mathed/InsetMathMBox.cpp index 680eb4df8f..4fc4ffd95e 100644 --- a/src/mathed/InsetMathMBox.cpp +++ b/src/mathed/InsetMathMBox.cpp @@ -26,11 +26,10 @@ #include "TexRow.h" #include "TextMetrics.h" +using namespace std; namespace lyx { -using std::endl; - InsetMathMBox::InsetMathMBox() { diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 99edfadb8b..c23be25152 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -59,6 +59,7 @@ #include +using namespace std; namespace lyx { @@ -68,10 +69,6 @@ using cap::cutSelection; using cap::replaceSelection; using cap::selClearOrDel; -using std::endl; -using std::string; -using std::istringstream; - InsetMathNest::InsetMathNest(idx_type nargs) : cells_(nargs), lock_(false), mouse_hover_(false) diff --git a/src/mathed/InsetMathNumber.cpp b/src/mathed/InsetMathNumber.cpp index a352c6f861..86d68f29d6 100644 --- a/src/mathed/InsetMathNumber.cpp +++ b/src/mathed/InsetMathNumber.cpp @@ -15,10 +15,10 @@ #include "MathStream.h" #include "MathSupport.h" +using namespace std; namespace lyx { -using std::vector; InsetMathNumber::InsetMathNumber(docstring const & s) : str_(s) diff --git a/src/mathed/InsetMathRef.cpp b/src/mathed/InsetMathRef.cpp index 35322dcda5..f17acde308 100644 --- a/src/mathed/InsetMathRef.cpp +++ b/src/mathed/InsetMathRef.cpp @@ -30,8 +30,7 @@ #include -using std::string; - +using namespace std; namespace lyx { diff --git a/src/mathed/InsetMathRoot.cpp b/src/mathed/InsetMathRoot.cpp index 2c453bafa1..0017e1c954 100644 --- a/src/mathed/InsetMathRoot.cpp +++ b/src/mathed/InsetMathRoot.cpp @@ -18,6 +18,7 @@ #include "frontends/Painter.h" +using namespace std; namespace lyx { @@ -35,7 +36,6 @@ Inset * InsetMathRoot::clone() const void InsetMathRoot::metrics(MetricsInfo & mi, Dimension & dim) const { - using std::max; InsetMathNest::metrics(mi); Dimension const & dim0 = cell(0).dimension(*mi.base.bv); Dimension const & dim1 = cell(1).dimension(*mi.base.bv); diff --git a/src/mathed/InsetMathScript.cpp b/src/mathed/InsetMathScript.cpp index 8b1c0e1fc5..a6d81617d7 100644 --- a/src/mathed/InsetMathScript.cpp +++ b/src/mathed/InsetMathScript.cpp @@ -25,11 +25,10 @@ #include +using namespace std; namespace lyx { -using std::string; -using std::max; InsetMathScript::InsetMathScript() : InsetMathNest(1), cell_1_is_up_(false), limits_(0) diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index 88701f2f56..7d44accf7b 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -18,7 +18,7 @@ #include "frontends/Painter.h" -using std::string; +using namespace std; namespace lyx { diff --git a/src/mathed/InsetMathSplit.cpp b/src/mathed/InsetMathSplit.cpp index d5a7200b2f..647f5cf737 100644 --- a/src/mathed/InsetMathSplit.cpp +++ b/src/mathed/InsetMathSplit.cpp @@ -25,13 +25,12 @@ #include +using namespace std; namespace lyx { using support::bformat; -using std::string; - InsetMathSplit::InsetMathSplit(docstring const & name, char valign) : InsetMathGrid(1, 1, valign, docstring()), name_(name) diff --git a/src/mathed/InsetMathSubstack.cpp b/src/mathed/InsetMathSubstack.cpp index 433f7cca59..1ecf2b04e7 100644 --- a/src/mathed/InsetMathSubstack.cpp +++ b/src/mathed/InsetMathSubstack.cpp @@ -24,11 +24,12 @@ #include +using namespace std; + namespace lyx { using support::bformat; -using std::string; InsetMathSubstack::InsetMathSubstack() : InsetMathGrid(1, 1) diff --git a/src/mathed/InsetMathXYArrow.cpp b/src/mathed/InsetMathXYArrow.cpp index 62acb0a174..22f20a2b61 100644 --- a/src/mathed/InsetMathXYArrow.cpp +++ b/src/mathed/InsetMathXYArrow.cpp @@ -16,13 +16,11 @@ #include "frontends/Painter.h" #include "support/debug.h" +using namespace std; namespace lyx { -using std::max; - - InsetMathXYArrow::InsetMathXYArrow() : InsetMathNest(2) {} diff --git a/src/mathed/MacroTable.cpp b/src/mathed/MacroTable.cpp index fb46f40170..3b163db43a 100644 --- a/src/mathed/MacroTable.cpp +++ b/src/mathed/MacroTable.cpp @@ -26,17 +26,10 @@ #include +using namespace std; namespace lyx { -using std::endl; -using std::istringstream; -using std::map; -using std::pair; -using std::string; -using std::vector; -using std::size_t; - ///////////////////////////////////////////////////////////////////// // diff --git a/src/mathed/MathAtom.cpp b/src/mathed/MathAtom.cpp index cd476cdb29..6787e282f3 100644 --- a/src/mathed/MathAtom.cpp +++ b/src/mathed/MathAtom.cpp @@ -13,11 +13,10 @@ #include "MathAtom.h" #include "InsetMath.h" +using namespace std; namespace lyx { -using std::swap; - MathAtom::MathAtom() : nucleus_(0) diff --git a/src/mathed/MathAutoCorrect.cpp b/src/mathed/MathAutoCorrect.cpp index c8b6788af5..958a126526 100644 --- a/src/mathed/MathAutoCorrect.cpp +++ b/src/mathed/MathAutoCorrect.cpp @@ -23,16 +23,12 @@ #include #include +using namespace std; namespace lyx { using support::libFileSearch; -using std::string; -using std::ifstream; -using std::endl; -using std::vector; - namespace { class Correction { diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp index 253a888c74..5cb566d8ca 100644 --- a/src/mathed/MathData.cpp +++ b/src/mathed/MathData.cpp @@ -37,16 +37,10 @@ #include #include +using namespace std; namespace lyx { -using std::abs; -using std::endl; -using std::min; -using std::ostringstream; -using std::string; -using std::vector; - MathData::MathData(const_iterator from, const_iterator to) : base_type(from, to) diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp index 49b01631d1..4ca2e021c4 100644 --- a/src/mathed/MathExtern.cpp +++ b/src/mathed/MathExtern.cpp @@ -44,6 +44,7 @@ #include #include +using namespace std; namespace lyx { @@ -56,15 +57,6 @@ using support::quoteName; using support::tempName; using support::subst; -using std::auto_ptr; -using std::endl; -using std::find_if; -using std::istringstream; -using std::ostream; -using std::swap; -using std::string; -using std::vector; - 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 8af81f3a8d..d79885b3b2 100644 --- a/src/mathed/MathFactory.cpp +++ b/src/mathed/MathFactory.cpp @@ -57,17 +57,13 @@ #include "frontends/FontLoader.h" +using namespace std; namespace lyx { using support::libFileSearch; using support::split; -using std::string; -using std::endl; -using std::istringstream; -using std::vector; - bool has_math_fonts; diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp index 19ca28cf1b..b3cc80ae72 100644 --- a/src/mathed/MathMacro.cpp +++ b/src/mathed/MathMacro.cpp @@ -31,10 +31,9 @@ #include #include -namespace lyx { +using namespace std; -using std::string; -using std::max; +namespace lyx { /// A proxy for the macro values diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index 3ff517eb86..9e92ba9786 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -45,14 +45,12 @@ #include +using namespace std; namespace lyx { using support::bformat; -using std::ostream; -using std::endl; - class InsetMathWrapper : public InsetMath { public: diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index 4c3f60a433..84069deb2b 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -70,21 +70,11 @@ following hack as starting point to write some macros: #include - -namespace lyx { - -using std::endl; -using std::fill; - -using std::string; -using std::ios; -using std::istream; -using std::ostream; -using std::vector; - - //#define FILEDEBUG +using namespace std; + +namespace lyx { namespace { diff --git a/src/mathed/MathStream.cpp b/src/mathed/MathStream.cpp index 43d618f8ce..c30da8240a 100644 --- a/src/mathed/MathStream.cpp +++ b/src/mathed/MathStream.cpp @@ -22,11 +22,10 @@ #include #include +using namespace std; namespace lyx { -using std::strlen; - ////////////////////////////////////////////////////////////////////// diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 5a60602c8f..aa3a627add 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -29,14 +29,12 @@ #include #include +using namespace std; namespace lyx { using frontend::Painter; -using std::max; -using std::endl; - /// class Matrix { diff --git a/src/output.cpp b/src/output.cpp index b3377b3762..0e51cf3bec 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -19,15 +19,13 @@ #include "support/filetools.h" #include "support/lstrings.h" +using namespace std; namespace lyx { using support::bformat; using support::FileName; -using std::ofstream; -using std::string; - namespace { template diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp index ba4bc9b09e..6103990257 100644 --- a/src/output_docbook.cpp +++ b/src/output_docbook.cpp @@ -34,16 +34,12 @@ #include +using namespace std; namespace lyx { using support::subst; -using std::endl; -using std::ostream; -using std::vector; -using std::string; - namespace { ParagraphList::const_iterator searchParagraph( diff --git a/src/output_latex.cpp b/src/output_latex.cpp index e953d91d9d..5d1090c304 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -35,16 +35,12 @@ #include +using namespace std; + namespace lyx { using support::subst; -using std::endl; -using std::string; -using std::pair; -using std::make_pair; - - namespace { diff --git a/src/output_plaintext.cpp b/src/output_plaintext.cpp index eb11c57660..f9629e9203 100644 --- a/src/output_plaintext.cpp +++ b/src/output_plaintext.cpp @@ -25,6 +25,7 @@ #include "support/lstrings.h" +using namespace std; namespace lyx { @@ -33,11 +34,6 @@ using support::compare_ascii_no_case; using support::contains; using support::FileName; -using std::endl; -using std::ostream; -using std::pair; -using std::string; - void writePlaintextFile(Buffer const & buf, FileName const & fname, OutputParams const & runparams) diff --git a/src/paragraph_funcs.cpp b/src/paragraph_funcs.cpp index 9e56bd550b..2f87daf5b5 100644 --- a/src/paragraph_funcs.cpp +++ b/src/paragraph_funcs.cpp @@ -24,12 +24,10 @@ #include +using namespace std; namespace lyx { -using std::endl; - - static bool moveItem(Paragraph & fromPar, pos_type fromPos, Paragraph & toPar, pos_type toPos, BufferParams const & params) { diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index 653c9d1276..a95870bdf5 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -46,10 +46,7 @@ #include -using std::endl; -using std::max; -using std::string; - +using namespace std; namespace lyx { diff --git a/src/sgml.cpp b/src/sgml.cpp index 6568a35bcd..4addbd319a 100644 --- a/src/sgml.cpp +++ b/src/sgml.cpp @@ -30,16 +30,12 @@ #include #include +using namespace std; namespace lyx { using support::subst; -using std::map; -using std::ostream; -using std::ostringstream; -using std::string; - docstring sgml::escapeChar(char_type c) { docstring str; diff --git a/src/support/FileFilterList.cpp b/src/support/FileFilterList.cpp index 4b39efdfda..e4e79c721f 100644 --- a/src/support/FileFilterList.cpp +++ b/src/support/FileFilterList.cpp @@ -20,11 +20,7 @@ #include -using std::distance; -using std::ostringstream; -using std::string; -using std::vector; - +using namespace std; namespace { diff --git a/src/support/FileMonitor.cpp b/src/support/FileMonitor.cpp index d9571bcc01..f7cca518ab 100644 --- a/src/support/FileMonitor.cpp +++ b/src/support/FileMonitor.cpp @@ -19,8 +19,7 @@ #include #include - -using std::string; +using namespace std; namespace lyx { namespace support { diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 32422b8146..40e717516c 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -42,12 +43,7 @@ #include #include - -using std::map; -using std::string; -using std::ifstream; -using std::ostringstream; -using std::endl; +using namespace std; namespace lyx { namespace support { @@ -295,8 +291,15 @@ unsigned long FileName::checksum() const LYXERR0('"' << absFilename() << "\" is a directory!"); return 0; } - LYXERR0("Checksumming \"" << absFilename() << "\"."); - return sum(absFilename().c_str()); + if (!lyxerr.debugging(Debug::FILES)) + return sum(absFilename().c_str()); + + QTime t; + t.start(); + unsigned long r = sum(absFilename().c_str()); + lyxerr << "Checksumming \"" << absFilename() << "\" lasted " + << t.elapsed() << " ms." << endl; + return r; } diff --git a/src/support/ForkedCalls.cpp b/src/support/ForkedCalls.cpp index 03e99ee32d..545ebeac98 100644 --- a/src/support/ForkedCalls.cpp +++ b/src/support/ForkedCalls.cpp @@ -42,21 +42,12 @@ # include # endif # include -# ifndef CXX_GLOBAL_CSTD - using std::signal; - using std::strerror; -# endif #endif +using namespace std; + using boost::bind; -using std::endl; -using std::equal_to; -using std::find_if; -using std::string; -using std::vector; - - namespace lyx { namespace support { diff --git a/src/support/Messages.cpp b/src/support/Messages.cpp index 7c57b92cd2..00735e4808 100644 --- a/src/support/Messages.cpp +++ b/src/support/Messages.cpp @@ -21,8 +21,7 @@ #include -using std::map; -using std::string; +using namespace std; namespace { diff --git a/src/support/Package.cpp b/src/support/Package.cpp index b526df6d4d..9ffc8dc3f8 100644 --- a/src/support/Package.cpp +++ b/src/support/Package.cpp @@ -38,7 +38,7 @@ # include // FSFindFolder, FSRefMakePath #endif -using std::string; +using namespace std; namespace lyx { namespace support { diff --git a/src/support/convert.cpp b/src/support/convert.cpp index b7ce3fc90b..125d40492c 100644 --- a/src/support/convert.cpp +++ b/src/support/convert.cpp @@ -18,14 +18,12 @@ #include +using namespace std; namespace lyx { using boost::lexical_cast; -using std::string; - - template<> string convert(bool b) { diff --git a/src/support/copy.cpp b/src/support/copy.cpp index 98d1ed78c5..3c7c43ad56 100644 --- a/src/support/copy.cpp +++ b/src/support/copy.cpp @@ -22,12 +22,7 @@ # include #endif - -using std::ifstream; -using std::ofstream; -using std::ios; -using std::string; - +using namespace std; namespace lyx { namespace support { diff --git a/src/support/debug.cpp b/src/support/debug.cpp index 2e1c7ab1d9..a20e06b415 100644 --- a/src/support/debug.cpp +++ b/src/support/debug.cpp @@ -21,10 +21,7 @@ #include #include -using std::setw; -using std::string; -using std::ostream; - +using namespace std; namespace lyx { diff --git a/src/support/docstream.cpp b/src/support/docstream.cpp index 481fd8555a..3dad26c329 100644 --- a/src/support/docstream.cpp +++ b/src/support/docstream.cpp @@ -18,12 +18,10 @@ #include #include +using namespace std; using lyx::ucs4_codeset; -using std::string; - - namespace { // We use C IO throughout this file, because the facets might be used with diff --git a/src/support/environment.cpp b/src/support/environment.cpp index 477dbf6848..e1bbaccc06 100644 --- a/src/support/environment.cpp +++ b/src/support/environment.cpp @@ -23,9 +23,7 @@ #include #include -using std::string; -using std::vector; - +using namespace std; namespace lyx { namespace support { diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index cc77812708..feb90e752c 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -50,14 +50,7 @@ #include #include -using std::endl; -using std::getline; -using std::make_pair; -using std::string; -using std::ifstream; -using std::ostringstream; -using std::vector; -using std::pair; +using namespace std; namespace lyx { namespace support { diff --git a/src/support/gettext.cpp b/src/support/gettext.cpp index ce3a52da6d..9cd1a3ffbd 100644 --- a/src/support/gettext.cpp +++ b/src/support/gettext.cpp @@ -20,8 +20,7 @@ # include #endif -using std::string; - +using namespace std; namespace lyx { diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index 1952300ecd..aa5bbc6cbc 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -28,17 +28,7 @@ #include #include - -using std::transform; -using std::string; -using std::vector; - -#ifndef CXX_GLOBAL_CSTD -using std::isdigit; -using std::tolower; -using std::toupper; -#endif - +using namespace std; namespace lyx { diff --git a/src/support/lyxsum.cpp b/src/support/lyxsum.cpp index e191a32bb8..781ca7f559 100644 --- a/src/support/lyxsum.cpp +++ b/src/support/lyxsum.cpp @@ -19,8 +19,7 @@ #include #include -using std::endl; -using std::string; +using namespace std; // OK, this is ugly, but it is the only workaround I found to compile // with gcc (any version) on a system which uses a non-GNU toolchain. @@ -92,7 +91,6 @@ unsigned long sum(char const * file) #include #include - namespace { template @@ -110,11 +108,6 @@ unsigned long do_crc(InputIterator first, InputIterator last) namespace lyx { namespace support { -using std::ifstream; -using std::istreambuf_iterator; -using std::istream_iterator; -using std::ios; -using std::ios_base; unsigned long sum(char const * file) { diff --git a/src/support/lyxtime.cpp b/src/support/lyxtime.cpp index ad97912d3e..7f2530d415 100644 --- a/src/support/lyxtime.cpp +++ b/src/support/lyxtime.cpp @@ -12,7 +12,7 @@ #include "support/lyxtime.h" -using std::string; +using namespace std; namespace lyx { diff --git a/src/support/minizip/zipunzip.cpp b/src/support/minizip/zipunzip.cpp index 964dcd6b29..e6307a2cb0 100644 --- a/src/support/minizip/zipunzip.cpp +++ b/src/support/minizip/zipunzip.cpp @@ -55,10 +55,6 @@ #include #include #include -using std::string; -using std::vector; -using std::pair; - #ifdef HAVE_UNISTD_H # include @@ -94,10 +90,8 @@ using std::pair; #define WRITEBUFFERSIZE (16384) #define MAXFILENAME (256) +using namespace std; -#ifndef CXX_GLOBAL_CSTD -using std::fgetc; -#endif #ifdef WIN32 uLong filetime(const char * f, tm_zip * tmzip, uLong * dt) diff --git a/src/support/os_cygwin.cpp b/src/support/os_cygwin.cpp index 952f038f1a..cf57336f7d 100644 --- a/src/support/os_cygwin.cpp +++ b/src/support/os_cygwin.cpp @@ -27,8 +27,7 @@ #include -using std::string; - +using namespace std; namespace lyx { namespace support { diff --git a/src/support/os_unix.cpp b/src/support/os_unix.cpp index e2c7725221..8e61c65649 100644 --- a/src/support/os_unix.cpp +++ b/src/support/os_unix.cpp @@ -19,8 +19,7 @@ #include #endif -using std::string; - +using namespace std; namespace lyx { namespace support { diff --git a/src/support/os_win32.cpp b/src/support/os_win32.cpp index 8c44bed84f..4beaaa16e4 100644 --- a/src/support/os_win32.cpp +++ b/src/support/os_win32.cpp @@ -62,8 +62,7 @@ # endif #endif -using std::string; - +using namespace std; namespace lyx { namespace support { diff --git a/src/support/socktools.cpp b/src/support/socktools.cpp index 9215228df9..7537e12604 100644 --- a/src/support/socktools.cpp +++ b/src/support/socktools.cpp @@ -50,11 +50,8 @@ int accept(int) #include -using std::string; +using namespace std; -#ifndef CXX_GLOBAL_CSTD -using std::strerror; -#endif // This MACRO eppears to be defined only on Linux. #if !defined(SUN_LEN) diff --git a/src/support/tempname.cpp b/src/support/tempname.cpp index 7030c2a72c..e5d19f30fe 100644 --- a/src/support/tempname.cpp +++ b/src/support/tempname.cpp @@ -42,9 +42,9 @@ extern "C" int mkstemp(char *); # endif #endif -using boost::scoped_array; +using namespace std; -using std::string; +using boost::scoped_array; namespace lyx { namespace support { diff --git a/src/support/unicode.cpp b/src/support/unicode.cpp index 48cb1a186e..d9bdc872f6 100644 --- a/src/support/unicode.cpp +++ b/src/support/unicode.cpp @@ -25,11 +25,7 @@ #include #include -using std::endl; -using std::map; -using std::make_pair; -using std::string; -using std::vector; +using namespace std; namespace { diff --git a/src/support/userinfo.cpp b/src/support/userinfo.cpp index 1b9b3c1a43..ca4e0e9480 100644 --- a/src/support/userinfo.cpp +++ b/src/support/userinfo.cpp @@ -30,7 +30,7 @@ # include #endif -using std::string; +using namespace std; namespace lyx { namespace support { diff --git a/src/tex2lyx/Context.cpp b/src/tex2lyx/Context.cpp index ae64f43480..a587401907 100644 --- a/src/tex2lyx/Context.cpp +++ b/src/tex2lyx/Context.cpp @@ -17,14 +17,10 @@ #include +using namespace std; namespace lyx { -using std::ostream; -using std::endl; -using std::string; - - namespace { void begin_layout(ostream & os, LayoutPtr const & layout, TeXFont const & font, diff --git a/src/tex2lyx/Font.cpp b/src/tex2lyx/Font.cpp index 24ee436ec2..a5a3042683 100644 --- a/src/tex2lyx/Font.cpp +++ b/src/tex2lyx/Font.cpp @@ -14,7 +14,7 @@ #include "Lexer.h" #include "support/lstrings.h" -using std::string; +using namespace std; namespace lyx { diff --git a/src/tex2lyx/Parser.cpp b/src/tex2lyx/Parser.cpp index cdd5c39921..2c826fed4a 100644 --- a/src/tex2lyx/Parser.cpp +++ b/src/tex2lyx/Parser.cpp @@ -15,19 +15,10 @@ #include #include +using namespace std; namespace lyx { -using std::cerr; -using std::endl; -using std::fill; -using std::istream; -using std::istringstream; -using std::ostringstream; -using std::ostream; -using std::string; - - namespace { CatCode theCatcode[256]; diff --git a/src/tex2lyx/boost.cpp b/src/tex2lyx/boost.cpp index e073058e87..49db80c9d9 100644 --- a/src/tex2lyx/boost.cpp +++ b/src/tex2lyx/boost.cpp @@ -18,8 +18,7 @@ #include #include - -using std::endl; +using namespace std; namespace boost { diff --git a/src/tex2lyx/math.cpp b/src/tex2lyx/math.cpp index 30af6a6cb2..e5ba486957 100644 --- a/src/tex2lyx/math.cpp +++ b/src/tex2lyx/math.cpp @@ -16,15 +16,10 @@ #include +using namespace std; namespace lyx { -using std::cerr; -using std::endl; - -using std::ostream; -using std::string; - bool is_math_env(string const & name) { diff --git a/src/tex2lyx/preamble.cpp b/src/tex2lyx/preamble.cpp index 77f9c37df6..235ff45799 100644 --- a/src/tex2lyx/preamble.cpp +++ b/src/tex2lyx/preamble.cpp @@ -29,18 +29,10 @@ #include #include +using namespace std; namespace lyx { -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::string; -using std::vector; -using std::cerr; -using std::endl; -using std::find; - using support::FileName; using support::libFileSearch; using support::isStrDbl; diff --git a/src/tex2lyx/table.cpp b/src/tex2lyx/table.cpp index 2fa33955e7..79f750d8c7 100644 --- a/src/tex2lyx/table.cpp +++ b/src/tex2lyx/table.cpp @@ -24,20 +24,12 @@ #include #include +using namespace std; namespace lyx { -using std::cerr; -using std::endl; -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::string; -using std::vector; - - // filled in preamble.cpp -std::map special_columns; +map special_columns; namespace { diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp index 32a06c6bde..eb57628850 100644 --- a/src/tex2lyx/tex2lyx.cpp +++ b/src/tex2lyx/tex2lyx.cpp @@ -35,23 +35,10 @@ #include #include +using namespace std; namespace lyx { -using std::endl; -using std::cout; -using std::cerr; -using std::getline; - -using std::ifstream; -using std::ofstream; -using std::istringstream; -using std::ostringstream; -using std::stringstream; -using std::string; -using std::vector; -using std::map; - using support::changeExtension; using support::FileName; using support::isStrUnsignedInt; diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index c0d1258e63..78069912df 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -30,15 +30,7 @@ #include #include -using std::cerr; -using std::endl; -using std::find; -using std::map; -using std::ostream; -using std::ostringstream; -using std::istringstream; -using std::string; -using std::vector; +using namespace std; namespace lyx { -- 2.39.5