From: Angus Leeming Date: Mon, 8 Sep 2003 00:33:41 +0000 (+0000) Subject: Removed all redundant using directives from the source. X-Git-Tag: 1.6.10~16134 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4c6e0fe4226ce3b55d13726977f1e579f17c2ad1;p=features.git Removed all redundant using directives from the source. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7704 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BranchList.C b/src/BranchList.C index 2198a7cc70..f9ab44df82 100644 --- a/src/BranchList.C +++ b/src/BranchList.C @@ -16,7 +16,6 @@ #include using std::bind2nd; -using std::remove_if; using std::binary_function; using namespace lyx::support; diff --git a/src/BufferView.C b/src/BufferView.C index 69c73907d4..09669dc27e 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -44,15 +44,10 @@ extern BufferList bufferlist; -using lyx::pos_type; using namespace lyx::support; -using std::pair; -using std::endl; -using std::ifstream; -using std::vector; using std::find; -using std::count_if; +using std::vector; BufferView::BufferView(LyXView * owner, int xpos, int ypos, diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index abcc8144da..3781ad43e5 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -65,10 +65,6 @@ #include -using std::vector; -using std::find_if; -using std::find; -using std::pair; using std::endl; using std::make_pair; using std::min; diff --git a/src/ChangeLog b/src/ChangeLog index 42703cc226..f35aa151ad 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,38 @@ +2003-09-08 Angus Leeming + + * BranchList.C: + * BufferView.C: + * BufferView_pimpl.C: + * CutAndPaste.C: + * DepTable.C: + * LaTeX.C: + * LaTeXFeatures.C: + * LyXAction.C: + * MenuBackend.C: + * TextCache.C: + * aspell.C: + * buffer.C: + * bufferlist.C: + * changes.C: + * chset.C: + * converter.C: + * counters.C: + * debug.C: + * graph.C: + * ispell.C: + * lyx_cb.C: + * lyxfind.C: + * lyxfunc.C: + * lyxlex_pimpl.C: + * lyxrc.C: + * lyxrow.C: + * paragraph.C: + * rowpainter.C: + * texrow.C: + * text.C: + * text2.C: + * toc.C: remove redundant using directives. + 2003-09-07 Angus Leeming * LaTeXFeatures.h: remove #include "support/types.h". diff --git a/src/Chktex.C b/src/Chktex.C index 0651672ded..94ac719c73 100644 --- a/src/Chktex.C +++ b/src/Chktex.C @@ -25,8 +25,8 @@ using namespace lyx::support; -using std::ifstream; using std::getline; +using std::ifstream; Chktex::Chktex(string const & chktex, string const & f, string const & p) diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index f03569133d..579bc0dc11 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -29,10 +29,9 @@ #include "support/LAssert.h" #include "support/lstrings.h" -using std::endl; -using std::pair; -using std::make_pair; using std::for_each; +using std::make_pair; +using std::pair; using std::vector; using namespace lyx::support; diff --git a/src/DepTable.C b/src/DepTable.C index adbf627e1f..7326cd6455 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -30,13 +30,12 @@ using std::time; using namespace lyx::support; -using std::make_pair; -using std::ofstream; -using std::ifstream; -using std::flush; using std::endl; +using std::flush; using std::getline; +using std::ofstream; +using std::ifstream; inline bool DepTable::dep_info::changed() const diff --git a/src/InsetList.C b/src/InsetList.C index 0ab77397e2..b1efab3835 100644 --- a/src/InsetList.C +++ b/src/InsetList.C @@ -18,12 +18,12 @@ #include "insets/insetbranch.h" - using lyx::pos_type; +using std::endl; using std::lower_bound; using std::upper_bound; -using std::endl; + namespace { diff --git a/src/LaTeX.C b/src/LaTeX.C index 09137f2276..8f35c72b1f 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -37,13 +37,13 @@ using namespace lyx::support; using std::sscanf; #endif -using std::ifstream; -using std::getline; using std::endl; -using std::vector; +using std::getline; +using std::ifstream; using std::set; +using std::vector; + using boost::regex; -using boost::regex_match; #ifndef USE_INCLUDED_STRING using boost::smatch; diff --git a/src/LaTeXFeatures.C b/src/LaTeXFeatures.C index 4238f6a28b..4738c33f57 100644 --- a/src/LaTeXFeatures.C +++ b/src/LaTeXFeatures.C @@ -31,14 +31,13 @@ using namespace lyx::support; -using lyx::textclass_type; - using std::endl; -using std::list; -using std::set; using std::find; + +using std::list; using std::ostream; using std::ostringstream; +using std::set; LaTeXFeatures::LaTeXFeatures(BufferParams const & p) diff --git a/src/LyXAction.C b/src/LyXAction.C index 6d5ffdbf6b..d5ff9ffd3b 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -23,8 +23,6 @@ using namespace lyx::support; using std::ostream; using std::endl; -using std::pair; -using std::make_pair; /* NAMING RULES FOR USER-COMMANDS diff --git a/src/MenuBackend.C b/src/MenuBackend.C index 1a25d7188f..24ba9a8542 100644 --- a/src/MenuBackend.C +++ b/src/MenuBackend.C @@ -48,12 +48,12 @@ extern boost::scoped_ptr toplevel_keymap; using namespace lyx::support; using std::endl; -using std::vector; -using std::max; -using std::pair; using std::find_if; +using std::max; using std::sort; +using std::vector; + // This is the global menu definition MenuBackend menubackend; diff --git a/src/TextCache.C b/src/TextCache.C index b6aac445d1..752f53685a 100644 --- a/src/TextCache.C +++ b/src/TextCache.C @@ -17,13 +17,13 @@ #include -using std::ostream; -using std::for_each; -using std::remove_if; -using std::find_if; using std::endl; +using std::find_if; +using std::for_each; using std::make_pair; +using std::ostream; + extern BufferList bufferlist; namespace { diff --git a/src/Thesaurus.C b/src/Thesaurus.C index 6013a96007..37376bc5b0 100644 --- a/src/Thesaurus.C +++ b/src/Thesaurus.C @@ -18,6 +18,7 @@ using std::sort; + Thesaurus::Thesaurus() { aik_ = new Aiksaurus; diff --git a/src/ToolbarBackend.C b/src/ToolbarBackend.C index 4fc07de1fb..82a08673df 100644 --- a/src/ToolbarBackend.C +++ b/src/ToolbarBackend.C @@ -23,13 +23,14 @@ #include "frontends/controllers/ControlMath.h" - using namespace lyx::support; using std::endl; -using std::vector; using std::make_pair; +using std::vector; + + ToolbarBackend toolbarbackend; namespace { diff --git a/src/aspell.C b/src/aspell.C index a16b7025e4..6d7a2fa278 100644 --- a/src/aspell.C +++ b/src/aspell.C @@ -24,7 +24,6 @@ using namespace lyx::support; -using std::endl; ASpell::ASpell(BufferParams const &, string const & lang) : els(0), spell_error_object(0) diff --git a/src/buffer.C b/src/buffer.C index c6d0bdea26..cde8351c37 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -68,28 +68,22 @@ using namespace lyx::support; -#ifndef CXX_GLOBAL_CSTD -using std::pow; -#endif +using std::endl; +using std::for_each; +using std::make_pair; +using std::ifstream; +using std::list; +using std::ios; using std::ostream; using std::ostringstream; using std::ofstream; -using std::ifstream; -using std::fstream; -using std::ios; -using std::setw; -using std::endl; using std::pair; -using std::make_pair; -using std::vector; -using std::map; using std::stack; -using std::list; -using std::for_each; +using std::vector; using lyx::pos_type; -using lyx::textclass_type; + // all these externs should eventually be removed. extern BufferList bufferlist; diff --git a/src/bufferlist.C b/src/bufferlist.C index bde19e7383..44e948c6a2 100644 --- a/src/bufferlist.C +++ b/src/bufferlist.C @@ -31,12 +31,12 @@ using namespace lyx::support; -using std::vector; -using std::find; using std::endl; +using std::find; using std::find_if; using std::for_each; -using std::mem_fun; + +using std::vector; BufferList::BufferList() diff --git a/src/changes.C b/src/changes.C index e7a82c8658..f27207aa98 100644 --- a/src/changes.C +++ b/src/changes.C @@ -19,7 +19,6 @@ using namespace lyx::support; -using std::vector; using std::endl; using lyx::pos_type; diff --git a/src/chset.C b/src/chset.C index 33b94c895e..3c783e09df 100644 --- a/src/chset.C +++ b/src/chset.C @@ -22,13 +22,14 @@ using namespace lyx::support; -using std::ifstream; +using std::endl; using std::getline; -using std::pair; using std::make_pair; -using std::endl; + +using std::ifstream; +using std::pair; + using boost::regex; -using boost::regex_match; #ifndef USE_INCLUDED_STRING using boost::smatch; @@ -37,7 +38,6 @@ using boost::cmatch; #endif - bool CharacterSet::loadFile(string const & fname) { map_.clear(); diff --git a/src/converter.C b/src/converter.C index 7da9ed0a86..03b8fc0ea4 100644 --- a/src/converter.C +++ b/src/converter.C @@ -25,18 +25,14 @@ #include "support/path.h" #include "support/systemcall.h" - - using namespace lyx::support; -#ifndef CXX_GLOBAL_CSTD -using std::isdigit; -#endif - -using std::vector; using std::endl; using std::find_if; +using std::vector; + + namespace { string const token_from("$$i"); diff --git a/src/counters.C b/src/counters.C index 6e7c5f1608..b1ae79a1d9 100644 --- a/src/counters.C +++ b/src/counters.C @@ -22,7 +22,6 @@ using namespace lyx::support; using std::endl; using std::ostringstream; -using std::vector; Counter::Counter() diff --git a/src/debug.C b/src/debug.C index 478fe99a7b..f89120ee0a 100644 --- a/src/debug.C +++ b/src/debug.C @@ -21,7 +21,6 @@ using namespace lyx::support; using std::ostream; using std::setw; -using std::endl; namespace { diff --git a/src/exporter.C b/src/exporter.C index 6ca03d3335..63af5855fc 100644 --- a/src/exporter.C +++ b/src/exporter.C @@ -32,9 +32,10 @@ using namespace lyx::support; -using std::vector; using std::find; +using std::vector; + namespace { diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 4d66f650f5..c79de908df 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,11 @@ +2003-09-08 Angus Leeming + + * ControlCommandBuffer.C: + * ControlDocument.C: + * ControlPrefs.C: + * helper_funcs.C: + * tex_helpers.C: remove redundant using directives. + 2003-09-07 Angus Leeming * ButtonController.h: diff --git a/src/frontends/controllers/ControlCommandBuffer.C b/src/frontends/controllers/ControlCommandBuffer.C index e2c348c347..60dc596bf2 100644 --- a/src/frontends/controllers/ControlCommandBuffer.C +++ b/src/frontends/controllers/ControlCommandBuffer.C @@ -22,12 +22,14 @@ using namespace lyx::support; -using std::vector; using std::back_inserter; using std::transform; -using std::endl; + +using std::vector; + using namespace bv_funcs; + namespace { struct prefix_p { diff --git a/src/frontends/controllers/ControlDocument.C b/src/frontends/controllers/ControlDocument.C index 54939b63f5..40a7b6d88a 100644 --- a/src/frontends/controllers/ControlDocument.C +++ b/src/frontends/controllers/ControlDocument.C @@ -33,8 +33,6 @@ using namespace lyx::support; -using std::endl; - ControlDocument::ControlDocument(LyXView & lv, Dialogs & d) : ControlDialogBD(lv, d), bp_(0) diff --git a/src/frontends/controllers/ControlGraphics.C b/src/frontends/controllers/ControlGraphics.C index 52d19bcdf6..47d1d5f9bb 100644 --- a/src/frontends/controllers/ControlGraphics.C +++ b/src/frontends/controllers/ControlGraphics.C @@ -33,8 +33,9 @@ using namespace lyx::support; -using std::pair; using std::make_pair; + +using std::pair; using std::vector; diff --git a/src/frontends/controllers/ControlPrefs.C b/src/frontends/controllers/ControlPrefs.C index 7c4e4504d5..97447eeced 100644 --- a/src/frontends/controllers/ControlPrefs.C +++ b/src/frontends/controllers/ControlPrefs.C @@ -32,7 +32,6 @@ using namespace lyx::support; -using std::endl; using std::pair; diff --git a/src/frontends/controllers/helper_funcs.C b/src/frontends/controllers/helper_funcs.C index 14b3aa278f..6128056974 100644 --- a/src/frontends/controllers/helper_funcs.C +++ b/src/frontends/controllers/helper_funcs.C @@ -22,7 +22,6 @@ using namespace lyx::support; -using std::make_pair; using std::pair; using std::vector; diff --git a/src/frontends/controllers/tex_helpers.C b/src/frontends/controllers/tex_helpers.C index 78c57e5e9a..d542bbabca 100644 --- a/src/frontends/controllers/tex_helpers.C +++ b/src/frontends/controllers/tex_helpers.C @@ -26,10 +26,7 @@ using namespace lyx::support; -using std::vector; using std::endl; -using std::sort; -using std::unique; // build filelists of all availabe bst/cls/sty-files. done through diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index ad0d92be48..a2c003fef2 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,25 @@ +2003-09-08 Angus Leeming + + * FileDialog.C: + * QCitation.C: + * QCitationDialog.C: + * QCommandBuffer.C: + * QContentPane.C: + * QGraphics.C: + * QLMenubar.C: + * QLPopupMenu.C: + * QLog.C: + * QMathDialog.C: + * QParagraphDialog.C: + * QPrefsDialog.C: + * QRef.C: + * QTexinfo.C: + * QtView.C: + * lyx_gui.C: + * panelstack.C: + * qscreen.C: + * qt_helpers.C: remove redundant using directives. + 2003-09-07 Angus Leeming * BulletsModule.h: remove #include "support/std_string.h", . diff --git a/src/frontends/qt2/FileDialog.C b/src/frontends/qt2/FileDialog.C index 5434d6bae3..f452a3578f 100644 --- a/src/frontends/qt2/FileDialog.C +++ b/src/frontends/qt2/FileDialog.C @@ -17,10 +17,6 @@ #include "qt_helpers.h" #include "gettext.h" -#include - -using std::make_pair; -using std::pair; using std::endl; diff --git a/src/frontends/qt2/QAbout.C b/src/frontends/qt2/QAbout.C index 81ea3d993e..50fc0dd09a 100644 --- a/src/frontends/qt2/QAbout.C +++ b/src/frontends/qt2/QAbout.C @@ -27,6 +27,7 @@ using namespace lyx::support; using std::getline; + using std::istringstream; using std::ostringstream; diff --git a/src/frontends/qt2/QCitation.C b/src/frontends/qt2/QCitation.C index 93030b036f..85183bccf3 100644 --- a/src/frontends/qt2/QCitation.C +++ b/src/frontends/qt2/QCitation.C @@ -31,14 +31,11 @@ using namespace lyx::support; using std::find; -using std::max; -using std::min; -using std::pair; -using std::sort; + using std::vector; -typedef QController > base_class; +typedef QController > base_class; QCitation::QCitation(Dialog & parent) : base_class(parent, _("LyX: Citation Reference")) diff --git a/src/frontends/qt2/QCitationDialog.C b/src/frontends/qt2/QCitationDialog.C index c54e8ef4fa..b55cf0b8b5 100644 --- a/src/frontends/qt2/QCitationDialog.C +++ b/src/frontends/qt2/QCitationDialog.C @@ -24,8 +24,6 @@ #include "QCitation.h" using std::vector; -using std::find; -using std::max; QCitationDialog::QCitationDialog(QCitation * form) diff --git a/src/frontends/qt2/QCommandBuffer.C b/src/frontends/qt2/QCommandBuffer.C index 34d4c9e914..d9658b6c1f 100644 --- a/src/frontends/qt2/QCommandBuffer.C +++ b/src/frontends/qt2/QCommandBuffer.C @@ -10,7 +10,6 @@ #include - #include "support/filetools.h" #include "controllers/ControlCommandBuffer.h" #include "qt_helpers.h" @@ -28,7 +27,6 @@ using namespace lyx::support; using std::vector; -using std::endl; namespace { diff --git a/src/frontends/qt2/QContentPane.C b/src/frontends/qt2/QContentPane.C index 03f0b3cda0..627b62433e 100644 --- a/src/frontends/qt2/QContentPane.C +++ b/src/frontends/qt2/QContentPane.C @@ -20,7 +20,6 @@ #include "funcrequest.h" -using std::endl; namespace { diff --git a/src/frontends/qt2/QGraphics.C b/src/frontends/qt2/QGraphics.C index 80a6f2071b..84b1e90106 100644 --- a/src/frontends/qt2/QGraphics.C +++ b/src/frontends/qt2/QGraphics.C @@ -37,7 +37,6 @@ using namespace lyx::support; using std::vector; -using std::endl; typedef QController > base_class; diff --git a/src/frontends/qt2/QLImage.C b/src/frontends/qt2/QLImage.C index 6d06884df0..dc51677182 100644 --- a/src/frontends/qt2/QLImage.C +++ b/src/frontends/qt2/QLImage.C @@ -27,8 +27,9 @@ using namespace lyx::support; -using std::find_if; using std::endl; +using std::find_if; + namespace lyx { namespace graphics { diff --git a/src/frontends/qt2/QLMenubar.C b/src/frontends/qt2/QLMenubar.C index d9a20ecb77..e21519e4cc 100644 --- a/src/frontends/qt2/QLMenubar.C +++ b/src/frontends/qt2/QLMenubar.C @@ -20,11 +20,6 @@ #include -using std::endl; -using std::vector; -using std::max; -using std::min; -using std::for_each; using std::pair; diff --git a/src/frontends/qt2/QLPainter.C b/src/frontends/qt2/QLPainter.C index 54c9a1305f..2ffc7ddf5e 100644 --- a/src/frontends/qt2/QLPainter.C +++ b/src/frontends/qt2/QLPainter.C @@ -23,7 +23,6 @@ #include - using std::endl; diff --git a/src/frontends/qt2/QLPopupMenu.C b/src/frontends/qt2/QLPopupMenu.C index 5461dfc03a..067281f18a 100644 --- a/src/frontends/qt2/QLPopupMenu.C +++ b/src/frontends/qt2/QLPopupMenu.C @@ -23,7 +23,6 @@ using namespace lyx::support; -using std::endl; using std::pair; using std::make_pair; diff --git a/src/frontends/qt2/QLToolbar.C b/src/frontends/qt2/QLToolbar.C index 8f088fa8ca..30404a2e51 100644 --- a/src/frontends/qt2/QLToolbar.C +++ b/src/frontends/qt2/QLToolbar.C @@ -12,7 +12,6 @@ #include - #include "debug.h" #include "gettext.h" #include "lyxfunc.h" @@ -20,8 +19,6 @@ #include "FuncStatus.h" #include "buffer.h" - - #include "QtView.h" #include "QLToolbar.h" diff --git a/src/frontends/qt2/QLog.C b/src/frontends/qt2/QLog.C index cb03fde8c6..124fbd3cdb 100644 --- a/src/frontends/qt2/QLog.C +++ b/src/frontends/qt2/QLog.C @@ -10,7 +10,6 @@ #include - #include "qt_helpers.h" #include "ControlLog.h" #include "support/std_sstream.h" @@ -25,7 +24,6 @@ #include using std::ifstream; -using std::getline; using std::ostringstream; typedef QController > base_class; diff --git a/src/frontends/qt2/QLyXKeySym.C b/src/frontends/qt2/QLyXKeySym.C index b19a170526..8fa058e9d1 100644 --- a/src/frontends/qt2/QLyXKeySym.C +++ b/src/frontends/qt2/QLyXKeySym.C @@ -11,7 +11,6 @@ #include - #include "QLyXKeySym.h" #include "qlkey.h" #include "debug.h" @@ -23,8 +22,10 @@ #include using std::endl; + using std::map; + namespace { typedef map EncodingMap; diff --git a/src/frontends/qt2/QMathDialog.C b/src/frontends/qt2/QMathDialog.C index db55381b7a..c28c400213 100644 --- a/src/frontends/qt2/QMathDialog.C +++ b/src/frontends/qt2/QMathDialog.C @@ -26,8 +26,6 @@ #include #include -using std::min; -using std::max; class QScrollViewSingle : public QScrollView { diff --git a/src/frontends/qt2/QParagraph.C b/src/frontends/qt2/QParagraph.C index fb1434b82e..45f5ea5ecb 100644 --- a/src/frontends/qt2/QParagraph.C +++ b/src/frontends/qt2/QParagraph.C @@ -35,10 +35,12 @@ using namespace lyx::support; -using std::vector; using std::bind2nd; using std::remove_if; +using std::vector; + + typedef QController > base_class; diff --git a/src/frontends/qt2/QParagraphDialog.C b/src/frontends/qt2/QParagraphDialog.C index fb0e6cf458..e3a8420d3a 100644 --- a/src/frontends/qt2/QParagraphDialog.C +++ b/src/frontends/qt2/QParagraphDialog.C @@ -11,7 +11,6 @@ #include - #include "QParagraphDialog.h" #include "QParagraph.h" @@ -24,9 +23,6 @@ #include "qt_helpers.h" -using std::vector; - - QParagraphDialog::QParagraphDialog(QParagraph * form) : QParagraphDialogBase(0, 0, false, 0), form_(form) diff --git a/src/frontends/qt2/QPrefs.C b/src/frontends/qt2/QPrefs.C index 895dde11cc..2e8d83fa9e 100644 --- a/src/frontends/qt2/QPrefs.C +++ b/src/frontends/qt2/QPrefs.C @@ -51,12 +51,13 @@ using namespace lyx::support; -using std::vector; -using std::pair; -using std::ostringstream; +using std::endl; using std::setfill; using std::setw; -using std::endl; + +using std::ostringstream; +using std::pair; +using std::vector; typedef Qt2CB > base_class; diff --git a/src/frontends/qt2/QPrefsDialog.C b/src/frontends/qt2/QPrefsDialog.C index bee666f740..f1ed5b0914 100644 --- a/src/frontends/qt2/QPrefsDialog.C +++ b/src/frontends/qt2/QPrefsDialog.C @@ -46,7 +46,6 @@ #include "qcoloritem.h" #include "qfontexample.h" -using std::endl; QPrefsDialog::QPrefsDialog(QPrefs * form) : QPrefsDialogBase(0, 0, false, 0), form_(form) diff --git a/src/frontends/qt2/QRef.C b/src/frontends/qt2/QRef.C index 98310bfe55..902b122f55 100644 --- a/src/frontends/qt2/QRef.C +++ b/src/frontends/qt2/QRef.C @@ -27,11 +27,7 @@ #include "qt_helpers.h" -using std::find; -using std::max; -using std::sort; using std::vector; -using std::endl; typedef QController > base_class; diff --git a/src/frontends/qt2/QTexinfo.C b/src/frontends/qt2/QTexinfo.C index 42caeb5671..b021016f04 100644 --- a/src/frontends/qt2/QTexinfo.C +++ b/src/frontends/qt2/QTexinfo.C @@ -24,7 +24,6 @@ using namespace lyx::support; -using std::vector; typedef QController > base_class; diff --git a/src/frontends/qt2/QToc.C b/src/frontends/qt2/QToc.C index 3be90bd239..507bcbaeb8 100644 --- a/src/frontends/qt2/QToc.C +++ b/src/frontends/qt2/QToc.C @@ -10,7 +10,6 @@ #include - #include #include "qt_helpers.h" @@ -25,10 +24,12 @@ #include using std::endl; + using std::pair; using std::stack; using std::vector; + typedef QController > base_class; QToc::QToc(Dialog & parent) diff --git a/src/frontends/qt2/QWorkArea.C b/src/frontends/qt2/QWorkArea.C index 8bfee1c6b3..75f0e06ceb 100644 --- a/src/frontends/qt2/QWorkArea.C +++ b/src/frontends/qt2/QWorkArea.C @@ -10,7 +10,6 @@ #include - #include "QWorkArea.h" #include "debug.h" #include "qt_helpers.h" @@ -28,9 +27,9 @@ #include #endif - using std::endl; + QWorkArea::QWorkArea(int, int, int, int) : WorkArea(), QWidget(qApp->mainWidget()), painter_(*this) { diff --git a/src/frontends/qt2/QtView.C b/src/frontends/qt2/QtView.C index 343614aa69..e165cc3671 100644 --- a/src/frontends/qt2/QtView.C +++ b/src/frontends/qt2/QtView.C @@ -11,14 +11,12 @@ #include - #include "lyx_cb.h" #include "support/filetools.h" #include "MenuBackend.h" #include "lyxfunc.h" #include "BufferView.h" - #include #include "QtView.h" @@ -32,7 +30,6 @@ using namespace lyx::support; -using std::endl; namespace { diff --git a/src/frontends/qt2/iconpalette.C b/src/frontends/qt2/iconpalette.C index 0b4f6b006b..469fa379a2 100644 --- a/src/frontends/qt2/iconpalette.C +++ b/src/frontends/qt2/iconpalette.C @@ -10,7 +10,6 @@ #include - #include "debug.h" #include "iconpalette.h" @@ -22,9 +21,11 @@ using std::endl; using std::make_pair; -using std::vector; using std::max; +using std::vector; + + int const button_size = 40; diff --git a/src/frontends/qt2/lyx_gui.C b/src/frontends/qt2/lyx_gui.C index 79a2abca99..8be032184d 100644 --- a/src/frontends/qt2/lyx_gui.C +++ b/src/frontends/qt2/lyx_gui.C @@ -47,9 +47,9 @@ using namespace lyx::support; using std::exit; #endif -using std::vector; using std::map; -using std::endl; +using std::vector; + extern BufferList bufferlist; diff --git a/src/frontends/qt2/panelstack.C b/src/frontends/qt2/panelstack.C index b205e94a24..26d6d8a83b 100644 --- a/src/frontends/qt2/panelstack.C +++ b/src/frontends/qt2/panelstack.C @@ -22,8 +22,6 @@ using namespace lyx::support; -using std::map; - PanelStack::PanelStack(QWidget * parent, const char * name) : QWidget(parent, name) diff --git a/src/frontends/qt2/qfont_loader.C b/src/frontends/qt2/qfont_loader.C index 5377ff2007..63ea634c71 100644 --- a/src/frontends/qt2/qfont_loader.C +++ b/src/frontends/qt2/qfont_loader.C @@ -32,10 +32,11 @@ using namespace lyx::support; using std::endl; -using std::vector; -using std::pair; using std::make_pair; +using std::pair; +using std::vector; + namespace { void addFontPath() diff --git a/src/frontends/qt2/qscreen.C b/src/frontends/qt2/qscreen.C index d3489afec6..1225a89cfe 100644 --- a/src/frontends/qt2/qscreen.C +++ b/src/frontends/qt2/qscreen.C @@ -10,8 +10,6 @@ #include - - #include "QWorkArea.h" #include "qscreen.h" #include "debug.h" @@ -19,8 +17,7 @@ #include using std::endl; -using std::max; -using std::min; + namespace { diff --git a/src/frontends/qt2/qt_helpers.C b/src/frontends/qt2/qt_helpers.C index 0c0971c4e2..864955d25f 100644 --- a/src/frontends/qt2/qt_helpers.C +++ b/src/frontends/qt2/qt_helpers.C @@ -19,10 +19,10 @@ #include #include +using std::make_pair; using std::pair; -using std::make_pair; -using std::min; + string makeFontName(string const & family, string const & foundry) { diff --git a/src/frontends/xforms/Alert_pimpl.C b/src/frontends/xforms/Alert_pimpl.C index 892bd49560..e25a891d80 100644 --- a/src/frontends/xforms/Alert_pimpl.C +++ b/src/frontends/xforms/Alert_pimpl.C @@ -22,7 +22,6 @@ #include "lyx_forms.h" -using std::endl; using std::make_pair; using std::pair; diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 6da72b2368..67d370a920 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,23 @@ +2003-09-08 Angus Leeming + + * Alert_pimpl.C: + * FileDialog.C: + * FormBibtex.C: + * FormCharacter.C: + * FormCitation.C: + * FormDocument.C: + * FormMathsDelim.C: + * FormNote.C: + * FormPreferences.C: + * FormSpellchecker.C: + * FormToc.C: + * RadioButtonGroup.C: + * XFormsMenubar.C: + * XMiniBuffer.C: + * XPainter.C: + * xforms_helpers.C: + * xscreen.C: remove redundant using directives. + 2003-09-07 Angus Leeming * FormAboutlyx.h: remove #include . diff --git a/src/frontends/xforms/Color.C b/src/frontends/xforms/Color.C index 102bfd8187..edb334378d 100644 --- a/src/frontends/xforms/Color.C +++ b/src/frontends/xforms/Color.C @@ -30,6 +30,7 @@ using std::floor; using std::max; using std::min; using std::setw; + using std::istringstream; using std::ostringstream; diff --git a/src/frontends/xforms/FileDialog.C b/src/frontends/xforms/FileDialog.C index 9e06794288..df848ead72 100644 --- a/src/frontends/xforms/FileDialog.C +++ b/src/frontends/xforms/FileDialog.C @@ -21,8 +21,6 @@ using namespace lyx::support; using std::endl; -using std::make_pair; -using std::pair; FileDialog::FileDialog(string const &t, kb_action s, Button b1, Button b2) diff --git a/src/frontends/xforms/FormBibtex.C b/src/frontends/xforms/FormBibtex.C index be56c77798..54ccab834e 100644 --- a/src/frontends/xforms/FormBibtex.C +++ b/src/frontends/xforms/FormBibtex.C @@ -29,7 +29,6 @@ using namespace lyx::support; -using std::sort; using std::vector; diff --git a/src/frontends/xforms/FormCharacter.C b/src/frontends/xforms/FormCharacter.C index dc457b3041..5669cab9a8 100644 --- a/src/frontends/xforms/FormCharacter.C +++ b/src/frontends/xforms/FormCharacter.C @@ -27,7 +27,6 @@ using namespace lyx::support; -using std::find; using std::vector; diff --git a/src/frontends/xforms/FormCitation.C b/src/frontends/xforms/FormCitation.C index 74b8d18275..14e2cd83ed 100644 --- a/src/frontends/xforms/FormCitation.C +++ b/src/frontends/xforms/FormCitation.C @@ -27,9 +27,7 @@ using namespace lyx::support; using std::find; using std::max; -using std::min; -using std::sort; -using std::pair; + using std::vector; diff --git a/src/frontends/xforms/FormDocument.C b/src/frontends/xforms/FormDocument.C index b99e97b1d0..8bf07f1664 100644 --- a/src/frontends/xforms/FormDocument.C +++ b/src/frontends/xforms/FormDocument.C @@ -48,8 +48,7 @@ using namespace lyx::support; using std::bind2nd; using std::endl; -using std::setw; -using std::setfill; + using std::vector; diff --git a/src/frontends/xforms/FormFiledialog.C b/src/frontends/xforms/FormFiledialog.C index e4f3bf51b8..325b03ab95 100644 --- a/src/frontends/xforms/FormFiledialog.C +++ b/src/frontends/xforms/FormFiledialog.C @@ -55,6 +55,7 @@ using std::max; using std::sort; + using std::map; using namespace lyx::support; diff --git a/src/frontends/xforms/FormForks.C b/src/frontends/xforms/FormForks.C index 81555e5d9f..edf91d8b85 100644 --- a/src/frontends/xforms/FormForks.C +++ b/src/frontends/xforms/FormForks.C @@ -30,6 +30,7 @@ using namespace lyx::support; using std::find; using std::find_if; + using std::vector; diff --git a/src/frontends/xforms/FormMathsDelim.C b/src/frontends/xforms/FormMathsDelim.C index b00040dfbb..4acbbb0511 100644 --- a/src/frontends/xforms/FormMathsDelim.C +++ b/src/frontends/xforms/FormMathsDelim.C @@ -44,7 +44,6 @@ static char const * delim_values[] = { "langle", "rangle", "|", "Vert", ".", 0 }; -using std::endl; typedef FormController > base_class; diff --git a/src/frontends/xforms/FormNote.C b/src/frontends/xforms/FormNote.C index b60e01f6b0..e1a2aac4e6 100644 --- a/src/frontends/xforms/FormNote.C +++ b/src/frontends/xforms/FormNote.C @@ -8,7 +8,6 @@ * Full author contact details are available in file CREDITS. */ - #include #include "FormNote.h" @@ -22,8 +21,6 @@ #include "lyx_forms.h" -using std::vector; - typedef FormController > base_class; diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index bde1a2be7d..8895e22ef1 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -38,6 +38,7 @@ using namespace lyx::support; using std::bind2nd; using std::remove_if; + using std::vector; diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index 231179bf08..f8c5ac63b7 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -41,8 +41,7 @@ using std::endl; using std::make_pair; using std::max; using std::min; -using std::setfill; -using std::setw; + using std::pair; using std::vector; diff --git a/src/frontends/xforms/FormRef.C b/src/frontends/xforms/FormRef.C index ed670c6470..c665d798bd 100644 --- a/src/frontends/xforms/FormRef.C +++ b/src/frontends/xforms/FormRef.C @@ -29,6 +29,7 @@ using namespace lyx::support; using std::find; using std::max; using std::sort; + using std::vector; diff --git a/src/frontends/xforms/FormSpellchecker.C b/src/frontends/xforms/FormSpellchecker.C index 9982b04650..04449d33ca 100644 --- a/src/frontends/xforms/FormSpellchecker.C +++ b/src/frontends/xforms/FormSpellchecker.C @@ -22,8 +22,6 @@ #include "lyx_forms.h" -using std::endl; - typedef FormCB > base_class; diff --git a/src/frontends/xforms/FormThesaurus.C b/src/frontends/xforms/FormThesaurus.C index ed3d23aa36..c9c5785493 100644 --- a/src/frontends/xforms/FormThesaurus.C +++ b/src/frontends/xforms/FormThesaurus.C @@ -24,8 +24,8 @@ using namespace lyx::support; #ifndef CXX_GLOBAL_CSTD -using std::isupper; using std::islower; +using std::isupper; #endif using std::vector; diff --git a/src/frontends/xforms/FormToc.C b/src/frontends/xforms/FormToc.C index 3ec8fcba04..73008402a0 100644 --- a/src/frontends/xforms/FormToc.C +++ b/src/frontends/xforms/FormToc.C @@ -23,7 +23,6 @@ using namespace lyx::support; -using std::endl; using std::vector; diff --git a/src/frontends/xforms/RadioButtonGroup.C b/src/frontends/xforms/RadioButtonGroup.C index d859db950e..51b28c7093 100644 --- a/src/frontends/xforms/RadioButtonGroup.C +++ b/src/frontends/xforms/RadioButtonGroup.C @@ -25,7 +25,6 @@ using namespace lyx::support; using std::endl; -using std::find_if; void RadioButtonGroup::init(FL_OBJECT * ob, size_type value) diff --git a/src/frontends/xforms/XFormsMenubar.C b/src/frontends/xforms/XFormsMenubar.C index 424b855319..6d420f1486 100644 --- a/src/frontends/xforms/XFormsMenubar.C +++ b/src/frontends/xforms/XFormsMenubar.C @@ -30,8 +30,6 @@ using namespace lyx::support; using std::endl; using std::for_each; -using std::max; -using std::min; using std::vector; diff --git a/src/frontends/xforms/XMiniBuffer.C b/src/frontends/xforms/XMiniBuffer.C index ab90cbb966..c29c15f539 100644 --- a/src/frontends/xforms/XMiniBuffer.C +++ b/src/frontends/xforms/XMiniBuffer.C @@ -24,12 +24,6 @@ #include - -#ifndef CXX_GLOBAL_CSTD -using std::isprint; -#endif - -using std::endl; using std::vector; diff --git a/src/frontends/xforms/XPainter.C b/src/frontends/xforms/XPainter.C index a282b83dca..9bf41db58c 100644 --- a/src/frontends/xforms/XPainter.C +++ b/src/frontends/xforms/XPainter.C @@ -29,9 +29,6 @@ using namespace lyx::support; -using std::endl; -using std::max; - XPainter::XPainter(XWorkArea & xwa) : Painter(), owner_(xwa) diff --git a/src/frontends/xforms/XWorkArea.C b/src/frontends/xforms/XWorkArea.C index 770afc278d..501f05e7ab 100644 --- a/src/frontends/xforms/XWorkArea.C +++ b/src/frontends/xforms/XWorkArea.C @@ -11,17 +11,18 @@ #include - #include "XWorkArea.h" + #include "debug.h" #include "XLyXKeySym.h" #include "funcrequest.h" #include "Timeout.h" -using std::endl; using std::abs; -using std::hex; using std::dec; +using std::endl; +using std::hex; + namespace { diff --git a/src/frontends/xforms/xformsImage.C b/src/frontends/xforms/xformsImage.C index ccb6bd5f91..ea97d222b3 100644 --- a/src/frontends/xforms/xformsImage.C +++ b/src/frontends/xforms/xformsImage.C @@ -36,6 +36,7 @@ using namespace lyx::support; using std::find_if; + namespace { void init_graphics(); diff --git a/src/frontends/xforms/xforms_helpers.C b/src/frontends/xforms/xforms_helpers.C index 4eb4b5db74..51107927ce 100644 --- a/src/frontends/xforms/xforms_helpers.C +++ b/src/frontends/xforms/xforms_helpers.C @@ -30,8 +30,8 @@ using namespace lyx::support; using std::make_pair; + using std::ofstream; -using std::pair; using std::vector; diff --git a/src/frontends/xforms/xscreen.C b/src/frontends/xforms/xscreen.C index 7521699b0d..a00b187de0 100644 --- a/src/frontends/xforms/xscreen.C +++ b/src/frontends/xforms/xscreen.C @@ -19,8 +19,6 @@ #include "debug.h" using std::endl; -using std::max; -using std::min; namespace { diff --git a/src/funcrequest.C b/src/funcrequest.C index 6382dc8695..ac5c173bca 100644 --- a/src/funcrequest.C +++ b/src/funcrequest.C @@ -17,11 +17,11 @@ #include "debug.h" #include "support/std_sstream.h" +using std::endl; +using std::getline; using std::istringstream; using std::vector; -using std::getline; -using std::endl; FuncRequest::FuncRequest() diff --git a/src/graph.C b/src/graph.C index 876394da75..6eee7f3a43 100644 --- a/src/graph.C +++ b/src/graph.C @@ -13,7 +13,6 @@ #include -using std::queue; using std::vector; diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index c11e6e45cc..f4bcfece06 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,9 @@ +2003-09-08 Angus Leeming + + * GraphicsImage.C: + * GraphicsParams.C: + * PreviewLoader.C: remove redundant using directives. + 2003-09-07 Angus Leeming * GraphicsTypes.h: diff --git a/src/graphics/GraphicsImage.C b/src/graphics/GraphicsImage.C index 78097751dc..41fac6bb3c 100644 --- a/src/graphics/GraphicsImage.C +++ b/src/graphics/GraphicsImage.C @@ -16,8 +16,6 @@ #include "GraphicsParams.h" #include "debug.h" -using std::endl; -using std::abs; namespace lyx { namespace graphics { diff --git a/src/graphics/GraphicsParams.C b/src/graphics/GraphicsParams.C index 1a13a5bae2..91f54a0916 100644 --- a/src/graphics/GraphicsParams.C +++ b/src/graphics/GraphicsParams.C @@ -17,7 +17,6 @@ #include "support/std_sstream.h" using std::abs; -using std::istringstream; namespace lyx { diff --git a/src/graphics/PreviewLoader.C b/src/graphics/PreviewLoader.C index f2b049853b..3443d64d0d 100644 --- a/src/graphics/PreviewLoader.C +++ b/src/graphics/PreviewLoader.C @@ -37,15 +37,11 @@ namespace support = lyx::support; - using std::endl; using std::find; using std::fill; using std::find_if; -using std::getline; using std::make_pair; -using std::setfill; -using std::setw; using std::ifstream; using std::list; @@ -56,6 +52,7 @@ using std::ostringstream; using std::pair; using std::vector; + namespace { typedef pair StrPair; diff --git a/src/importer.C b/src/importer.C index 02b25500fd..a21fd655bf 100644 --- a/src/importer.C +++ b/src/importer.C @@ -24,11 +24,10 @@ #include "gettext.h" #include "BufferView.h" - using namespace lyx::support; -using std::vector; using std::find; +using std::vector; extern BufferList bufferlist; diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index ce00ea126b..92be93c772 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,15 @@ +2003-09-08 Angus Leeming + + * insetcollapsable.C: + * insetenv.C: + * insetinclude.C: + * insetlabel.C: + * insetoptarg.C: + * insetspecialchar.C: + * insettabular.C: + * insettext.C: + * insettoc.C: remove redundant using directives. + 2003-09-07 Angus Leeming * insetspace.h: diff --git a/src/insets/ExternalTemplate.C b/src/insets/ExternalTemplate.C index 7a89cc1a46..b568448126 100644 --- a/src/insets/ExternalTemplate.C +++ b/src/insets/ExternalTemplate.C @@ -27,6 +27,7 @@ namespace support = lyx::support; using std::endl; using std::for_each; + using std::ostream; diff --git a/src/insets/insetbibtex.C b/src/insets/insetbibtex.C index dc80fab237..3d2f185799 100644 --- a/src/insets/insetbibtex.C +++ b/src/insets/insetbibtex.C @@ -30,6 +30,7 @@ using namespace lyx::support; using std::endl; using std::getline; + using std::ifstream; using std::ostream; using std::pair; diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index 81635a95a9..45ec673270 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -34,7 +34,6 @@ using namespace lyx::graphics; using std::endl; using std::max; -using std::vector; using std::ostream; diff --git a/src/insets/insetenv.C b/src/insets/insetenv.C index 61526c50e8..cb882e511d 100644 --- a/src/insets/insetenv.C +++ b/src/insets/insetenv.C @@ -18,7 +18,6 @@ #include "paragraph_funcs.h" #include "texrow.h" -using std::endl; using std::auto_ptr; using std::ostream; diff --git a/src/insets/insetert.C b/src/insets/insetert.C index 5f52f21c76..1687053804 100644 --- a/src/insets/insetert.C +++ b/src/insets/insetert.C @@ -32,8 +32,9 @@ using namespace lyx::support; using lyx::pos_type; -using std::min; using std::endl; +using std::min; + using std::auto_ptr; using std::ostream; diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index ab646a64bf..6ef23ecfe8 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -42,12 +42,11 @@ using namespace lyx::support; using std::endl; + using std::auto_ptr; using std::istringstream; using std::ostream; using std::ostringstream; -using std::pair; -using std::vector; extern BufferList bufferlist; diff --git a/src/insets/insetlabel.C b/src/insets/insetlabel.C index 923869f571..27c96fc163 100644 --- a/src/insets/insetlabel.C +++ b/src/insets/insetlabel.C @@ -20,8 +20,6 @@ using namespace lyx::support; using std::ostream; -using std::pair; -using std::vector; InsetLabel::InsetLabel(InsetCommandParams const & p) diff --git a/src/insets/insetoptarg.C b/src/insets/insetoptarg.C index 4ea88a012a..3b4fe9809f 100644 --- a/src/insets/insetoptarg.C +++ b/src/insets/insetoptarg.C @@ -18,8 +18,6 @@ using std::auto_ptr; using std::ostream; -using std::pair; -using std::vector; InsetOptArg::InsetOptArg(BufferParams const & ins) diff --git a/src/insets/insetspecialchar.C b/src/insets/insetspecialchar.C index f6aa672987..0271d231b2 100644 --- a/src/insets/insetspecialchar.C +++ b/src/insets/insetspecialchar.C @@ -22,7 +22,6 @@ #include "frontends/font_metrics.h" #include "frontends/Painter.h" -using std::max; using std::auto_ptr; using std::ostream; diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index d790f3f7a7..f13711a794 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -43,12 +43,11 @@ using namespace lyx::graphics; using std::endl; using std::max; using std::swap; + using std::auto_ptr; -using std::ifstream; using std::istringstream; using std::ostream; using std::ostringstream; -using std::vector; namespace { diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 6813ae22f9..be3cc4c17d 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -44,13 +44,10 @@ using std::endl; using std::for_each; -using std::min; using std::max; -using std::make_pair; + using std::auto_ptr; using std::ostream; -using std::ifstream; -using std::pair; using std::vector; using namespace lyx::support; @@ -58,7 +55,6 @@ using namespace lyx::graphics; using namespace bv_funcs; using lyx::pos_type; -using lyx::textclass_type; InsetText::InsetText(BufferParams const & bp) diff --git a/src/insets/insettoc.C b/src/insets/insettoc.C index 666abdbc9d..abd689b255 100644 --- a/src/insets/insettoc.C +++ b/src/insets/insettoc.C @@ -17,7 +17,6 @@ #include "toc.h" using std::ostream; -using std::vector; InsetTOC::InsetTOC(InsetCommandParams const & p) diff --git a/src/ispell.C b/src/ispell.C index 2dae4f04bd..65a51e3c18 100644 --- a/src/ispell.C +++ b/src/ispell.C @@ -36,12 +36,12 @@ using namespace lyx::support; using std::strcpy; using std::strlen; using std::strpbrk; -using std::strstr; #endif using std::endl; using std::max; + namespace { class LaunchIspell : public lyx::support::ForkedProcess { diff --git a/src/lastfiles.C b/src/lastfiles.C index 2c30467384..69b44af7ae 100644 --- a/src/lastfiles.C +++ b/src/lastfiles.C @@ -21,12 +21,13 @@ using namespace lyx::support; -using std::ifstream; -using std::ofstream; -using std::getline; +using std::copy; using std::endl; using std::find; -using std::copy; +using std::getline; + +using std::ifstream; +using std::ofstream; using std::ostream_iterator; diff --git a/src/lyx_cb.C b/src/lyx_cb.C index cd9404bff3..efa81e1e71 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -46,15 +46,14 @@ using namespace lyx::support; -using std::vector; -using std::ifstream; +using std::back_inserter; using std::copy; using std::endl; +using std::make_pair; + +using std::ifstream; using std::ios; -using std::back_inserter; using std::istream_iterator; -using std::pair; -using std::make_pair; extern BufferList bufferlist; // this should be static, but I need it in buffer.C @@ -387,7 +386,7 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap istream_iterator end; #if !defined(USE_INCLUDED_STRING) && !defined(STD_STRING_IS_GOOD) // We use this until the compilers get better... - vector tmp; + std::vector tmp; copy(ii, end, back_inserter(tmp)); string const tmpstr(tmp.begin(), tmp.end()); #else diff --git a/src/lyxfind.C b/src/lyxfind.C index 60e1d4e76d..aa790c6e9b 100644 --- a/src/lyxfind.C +++ b/src/lyxfind.C @@ -23,8 +23,6 @@ using namespace lyx::support; -using lyx::pos_type; -using std::endl; namespace lyx { namespace find { diff --git a/src/lyxfunc.C b/src/lyxfunc.C index d0a60263b3..4532c96581 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -73,14 +73,11 @@ using namespace lyx::support; -using std::pair; -using std::make_pair; using std::endl; -using std::find_if; +using std::make_pair; + using std::istringstream; -using std::vector; -using std::transform; -using std::back_inserter; + using namespace bv_funcs; extern BufferList bufferlist; diff --git a/src/lyxlex_pimpl.C b/src/lyxlex_pimpl.C index 45141c6b3d..4e0eafb0b8 100644 --- a/src/lyxlex_pimpl.C +++ b/src/lyxlex_pimpl.C @@ -22,14 +22,14 @@ using namespace lyx::support; +using std::endl; +using std::getline; +using std::lower_bound; using std::sort; -using std::ostream; + using std::ios; using std::istream; -using std::endl; -using std::lower_bound; -using std::vector; -using std::getline; +using std::ostream; // namespace { struct compare_tags { diff --git a/src/lyxrc.C b/src/lyxrc.C index 320f04b623..7a4f08577a 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -41,7 +41,6 @@ using std::ofstream; using std::cout; using std::ios; using std::endl; -using std::vector; namespace lyx { namespace graphics { diff --git a/src/lyxrow.C b/src/lyxrow.C index a93192a5fb..20a73b5c2d 100644 --- a/src/lyxrow.C +++ b/src/lyxrow.C @@ -21,8 +21,6 @@ using lyx::pos_type; -using std::max; -using std::min; Row::Row() : pos_(0), end_(0), fill_(0), height_(0), width_(0), y_(0), diff --git a/src/lyxtextclass.C b/src/lyxtextclass.C index b7f96056cb..e2a2d4362c 100644 --- a/src/lyxtextclass.C +++ b/src/lyxtextclass.C @@ -31,6 +31,7 @@ using namespace lyx::support; using std::endl; using std::find_if; using std::remove_if; + using std::ostream; namespace { // anon diff --git a/src/lyxtextclasslist.C b/src/lyxtextclasslist.C index 8fb1c10983..45a49ad39c 100644 --- a/src/lyxtextclasslist.C +++ b/src/lyxtextclasslist.C @@ -27,12 +27,14 @@ using std::exit; #endif using lyx::textclass_type; -using std::pair; -using std::make_pair; + using std::endl; using std::find_if; +using std::make_pair; using std::sort; +using std::pair; + // Gets textclass number from name pair const diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 527aa9d5b1..15334dea30 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,15 @@ +2003-09-08 Angus Leeming + + * formulabase.C: + * formulamacro.C: + * math_charinset.C: + * math_cursor.C: + * math_data.C: + * math_diminset.C: + * math_hullinset.C: + * math_support.C: + * math_tabularinset.C: remove redundant using directives. + 2003-09-07 Angus Leeming * formulabase.h: remove #includes "dimension.h", , diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 7a5dcaf42f..caaf250321 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -39,14 +39,12 @@ using namespace lyx::support; -using std::endl; -using std::istringstream; -using std::ostream; -using std::ostringstream; -using std::vector; using std::abs; +using std::endl; using std::max; +using std::istringstream; + MathCursor * mathcursor = 0; diff --git a/src/mathed/formulamacro.C b/src/mathed/formulamacro.C index eb1093b91f..e7b1c57e80 100644 --- a/src/mathed/formulamacro.C +++ b/src/mathed/formulamacro.C @@ -26,9 +26,9 @@ using namespace lyx::support; -using std::istringstream; -using std::ostream; using std::auto_ptr; +using std::ostream; + extern MathCursor * mathcursor; diff --git a/src/mathed/math_arrayinset.C b/src/mathed/math_arrayinset.C index 67b5a5fb63..2f25b6a937 100644 --- a/src/mathed/math_arrayinset.C +++ b/src/mathed/math_arrayinset.C @@ -19,11 +19,12 @@ #include -using std::vector; -using std::istringstream; using std::getline; -using std::istream_iterator; + using std::auto_ptr; +using std::istringstream; +using std::istream_iterator; +using std::vector; MathArrayInset::MathArrayInset(string const & name, int m, int n) diff --git a/src/mathed/math_charinset.C b/src/mathed/math_charinset.C index 47e0d0292d..c1823681e8 100644 --- a/src/mathed/math_charinset.C +++ b/src/mathed/math_charinset.C @@ -13,22 +13,17 @@ #include "math_charinset.h" #include "dimension.h" -#include "support/std_ostream.h" #include "math_support.h" #include "math_mathmlstream.h" #include "textpainter.h" - - -using std::ostream; -using std::endl; using std::auto_ptr; #ifndef CXX_GLOBAL_CSTD using std::strchr; -using std::isalpha; #endif + extern bool has_math_fonts; namespace { diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 96fdc1c7d9..e628f4237c 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -39,12 +39,11 @@ using namespace lyx::support; using std::endl; +using std::isalpha; using std::min; -using std::max; using std::swap; -using std::vector; + using std::ostringstream; -using std::isalpha; // matheds own cut buffer diff --git a/src/mathed/math_data.C b/src/mathed/math_data.C index dfc678f40b..a63c627710 100644 --- a/src/mathed/math_data.C +++ b/src/mathed/math_data.C @@ -23,10 +23,9 @@ using namespace lyx::support; -using std::max; -using std::min; using std::abs; using std::endl; +using std::min; MathArray::MathArray() diff --git a/src/mathed/math_diminset.C b/src/mathed/math_diminset.C index 22921751e0..f1253db192 100644 --- a/src/mathed/math_diminset.C +++ b/src/mathed/math_diminset.C @@ -12,8 +12,6 @@ #include "math_diminset.h" -using std::ostringstream; - void MathDimInset::metricsT(TextMetricsInfo const &) const { diff --git a/src/mathed/math_extern.C b/src/mathed/math_extern.C index f6a4be430a..4ad4ea6527 100644 --- a/src/mathed/math_extern.C +++ b/src/mathed/math_extern.C @@ -40,11 +40,12 @@ using namespace lyx::support; -using std::ostream; +using std::endl; +using std::find_if; + using std::istringstream; +using std::ostream; using std::ostringstream; -using std::find_if; -using std::endl; ostream & operator<<(ostream & os, MathArray const & ar) diff --git a/src/mathed/math_gridinset.C b/src/mathed/math_gridinset.C index 5f61841e33..ade73f9904 100644 --- a/src/mathed/math_gridinset.C +++ b/src/mathed/math_gridinset.C @@ -19,18 +19,18 @@ #include "frontends/Painter.h" #include "support/std_sstream.h" - #include "insets/mailinset.h" -using std::swap; +using std::endl; using std::max; using std::min; -using std::vector; +using std::swap; + +using std::auto_ptr; using std::istream; using std::istringstream; using std::ostringstream; -using std::auto_ptr; -using std::endl; +using std::vector; class GridInsetMailer : public MailInset { diff --git a/src/mathed/math_hullinset.C b/src/mathed/math_hullinset.C index c094677cd8..c392b34d72 100644 --- a/src/mathed/math_hullinset.C +++ b/src/mathed/math_hullinset.C @@ -28,16 +28,16 @@ #include "lyxrc.h" #include "gettext.h" - using namespace lyx::support; +using std::endl; +using std::max; + +using std::auto_ptr; using std::istringstream; using std::ostringstream; -using std::vector; -using std::max; -using std::endl; using std::pair; -using std::auto_ptr; + namespace { diff --git a/src/mathed/math_mathmlstream.C b/src/mathed/math_mathmlstream.C index a12a646abc..88495f63cf 100644 --- a/src/mathed/math_mathmlstream.C +++ b/src/mathed/math_mathmlstream.C @@ -16,9 +16,10 @@ #include "math_extern.h" #include "support/lyxalgo.h" +using std::strlen; using std::ostream; -using std::strlen; + namespace { diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 95b4cb7753..f849d5c22a 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -65,15 +65,15 @@ following hack as starting point to write some macros: #include "support/std_sstream.h" #include "debug.h" +using std::atoi; +using std::endl; +using std::fill; +using std::ios; using std::istream; using std::istringstream; using std::ostream; -using std::ios; -using std::endl; -using std::fill; using std::vector; -using std::atoi; //#define FILEDEBUG diff --git a/src/mathed/math_sizeinset.C b/src/mathed/math_sizeinset.C index 9e9eee1af6..b7cf00fe9f 100644 --- a/src/mathed/math_sizeinset.C +++ b/src/mathed/math_sizeinset.C @@ -18,6 +18,7 @@ #include "support/std_ostream.h" using std::atoi; + using std::auto_ptr; diff --git a/src/mathed/math_support.C b/src/mathed/math_support.C index 3441463bc3..e55c9286f4 100644 --- a/src/mathed/math_support.C +++ b/src/mathed/math_support.C @@ -12,20 +12,23 @@ #include #include "math_support.h" -#include "math_parser.h" + #include "math_data.h" +#include "math_mathmlstream.h" +#include "math_parser.h" + +#include "debug.h" + #include "frontends/Painter.h" #include "frontends/font_metrics.h" #include "frontends/lyx_gui.h" -#include "debug.h" + #include "support/std_sstream.h" -#include "math_mathmlstream.h" #include using std::max; using std::endl; -using std::ostringstream; /// diff --git a/src/mathed/math_tabularinset.C b/src/mathed/math_tabularinset.C index 114fee63c4..7d297507e5 100644 --- a/src/mathed/math_tabularinset.C +++ b/src/mathed/math_tabularinset.C @@ -17,10 +17,6 @@ #include -using std::vector; -using std::istringstream; -using std::getline; -using std::istream_iterator; using std::auto_ptr; diff --git a/src/paragraph.C b/src/paragraph.C index 0eede1c38a..d92231747d 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -44,10 +44,6 @@ using namespace lyx::support; using std::ostream; using std::ostringstream; using std::endl; -using std::fstream; -using std::ios; -using std::lower_bound; -using std::upper_bound; using lyx::pos_type; diff --git a/src/paragraph_pimpl.C b/src/paragraph_pimpl.C index 698a44ac41..4eed72a30f 100644 --- a/src/paragraph_pimpl.C +++ b/src/paragraph_pimpl.C @@ -27,11 +27,14 @@ #include "support/LAssert.h" using namespace lyx::support; + using lyx::pos_type; + using std::endl; -using std::ostream; using std::upper_bound; -using std::lower_bound; + +using std::ostream; + // Initialize static member. ShareContainer Paragraph::Pimpl::FontTable::container; diff --git a/src/rowpainter.C b/src/rowpainter.C index 1bcc643c81..46b2b10d11 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -36,7 +36,6 @@ using namespace lyx::support; using std::max; -using std::endl; using lyx::pos_type; extern int PAPER_MARGIN; diff --git a/src/sgml.C b/src/sgml.C index 238ad2274b..db91894847 100644 --- a/src/sgml.C +++ b/src/sgml.C @@ -16,10 +16,12 @@ #include "paragraph.h" #include "sgml.h" -using std::pair; +using std::endl; using std::make_pair; + using std::ostream; -using std::endl; +using std::pair; + namespace sgml { diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 4ab1d5a335..387fbc98af 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,10 @@ +2003-09-08 Angus Leeming + + * boost-inst.C: + * filetools.C: + * forkedcallqueue.C: + * lstrings.C: + * lyxsum.C: remove redundant using directives. 2003-09-05 Angus Leeming diff --git a/src/support/boost-inst.C b/src/support/boost-inst.C index c58dc7c8dd..a5a290befa 100644 --- a/src/support/boost-inst.C +++ b/src/support/boost-inst.C @@ -17,8 +17,6 @@ namespace boost { -using boost::io::out_of_range_bit; - template class basic_format; template diff --git a/src/support/filetools.C b/src/support/filetools.C index 3503773906..2bf3404076 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -69,17 +69,17 @@ #ifndef CXX_GLOBAL_CSTD using std::fgetc; -using std::isalpha; using std::isalnum; +using std::isalpha; #endif -using std::make_pair; -using std::pair; using std::endl; +using std::getline; +using std::make_pair; + using std::ifstream; using std::ostringstream; using std::vector; -using std::getline; namespace lyx { diff --git a/src/support/forkedcallqueue.C b/src/support/forkedcallqueue.C index 20614d88ab..8ef76ecb4a 100644 --- a/src/support/forkedcallqueue.C +++ b/src/support/forkedcallqueue.C @@ -18,7 +18,7 @@ #include using std::endl; -using std::queue; + namespace lyx { namespace support { diff --git a/src/support/forkedcontr.C b/src/support/forkedcontr.C index e517d6bcf5..741d0ed52d 100644 --- a/src/support/forkedcontr.C +++ b/src/support/forkedcontr.C @@ -28,14 +28,16 @@ #include #include -using std::vector; using std::endl; using std::find_if; +using std::vector; + #ifndef CXX_GLOBAL_CSTD using std::strerror; #endif + namespace lyx { namespace support { diff --git a/src/support/lstrings.C b/src/support/lstrings.C index 17b55e00dc..023484ee23 100644 --- a/src/support/lstrings.C +++ b/src/support/lstrings.C @@ -28,18 +28,18 @@ #include #include -using std::count; using std::transform; + using std::vector; #ifndef CXX_GLOBAL_CSTD using std::atof; using std::isdigit; -using std::strlen; using std::tolower; using std::toupper; #endif + namespace lyx { namespace support { diff --git a/src/support/lyxsum.C b/src/support/lyxsum.C index d378e6a5c2..2c1f0e218e 100644 --- a/src/support/lyxsum.C +++ b/src/support/lyxsum.C @@ -79,7 +79,6 @@ unsigned long lyx::support::sum(string const & file) #include #include -using std::for_each; namespace { @@ -88,7 +87,7 @@ inline unsigned long do_crc(InputIterator first, InputIterator last) { boost::crc_32_type crc; - crc = for_each(first, last, crc); + crc = std::for_each(first, last, crc); return crc.checksum(); } diff --git a/src/tabular.C b/src/tabular.C index c97eba98bb..bbd37b32d9 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -36,12 +36,13 @@ using namespace lyx::support; using std::abs; -using std::ostream; -using std::ostringstream; -using std::istream; +using std::endl; using std::getline; using std::max; -using std::endl; + +using std::istream; +using std::ostream; +using std::ostringstream; using std::vector; #ifndef CXX_GLOBAL_CSTD diff --git a/src/tex2lyx/ChangeLog b/src/tex2lyx/ChangeLog index 052f069e34..29051af599 100644 --- a/src/tex2lyx/ChangeLog +++ b/src/tex2lyx/ChangeLog @@ -1,3 +1,11 @@ +2003-09-08 Angus Leeming + + * math.C: + * preamble.C: + * table.C: + * tex2lyx.C: + * texparser.C: remove redundant using directives. + 2003-08-19 Angus Leeming * most files: add 'standard conformant' header blurb. diff --git a/src/tex2lyx/math.C b/src/tex2lyx/math.C index f70ac09651..3ca609eabd 100644 --- a/src/tex2lyx/math.C +++ b/src/tex2lyx/math.C @@ -15,13 +15,12 @@ #include "tex2lyx.h" #include -#include using std::cerr; using std::endl; + using std::ostream; using std::string; -using std::vector; bool is_math_env(string const & name) diff --git a/src/tex2lyx/preamble.C b/src/tex2lyx/preamble.C index 3d43f8025f..777aec4695 100644 --- a/src/tex2lyx/preamble.C +++ b/src/tex2lyx/preamble.C @@ -26,10 +26,6 @@ #include #include -using std::cerr; -using std::endl; -using std::getline; -using std::istream; using std::istringstream; using std::ostream; using std::ostringstream; diff --git a/src/tex2lyx/table.C b/src/tex2lyx/table.C index 99a311c1c7..7b02cf3d79 100644 --- a/src/tex2lyx/table.C +++ b/src/tex2lyx/table.C @@ -29,7 +29,6 @@ using std::ostream; using std::ostringstream; using std::string; using std::vector; -using std::map; #include "mathed/math_gridinfo.h" diff --git a/src/tex2lyx/tex2lyx.C b/src/tex2lyx/tex2lyx.C index f75001f25e..b357b03be8 100644 --- a/src/tex2lyx/tex2lyx.C +++ b/src/tex2lyx/tex2lyx.C @@ -28,14 +28,13 @@ #include #include +using std::endl; using std::cout; using std::cerr; -using std::endl; using std::getline; -using std::istream; + using std::ifstream; using std::istringstream; -using std::ostream; using std::ostringstream; using std::stringstream; using std::string; diff --git a/src/tex2lyx/texparser.C b/src/tex2lyx/texparser.C index b8469fcc20..e5612667d2 100644 --- a/src/tex2lyx/texparser.C +++ b/src/tex2lyx/texparser.C @@ -18,12 +18,10 @@ using std::cerr; using std::endl; using std::fill; -using std::ios; using std::istream; using std::istringstream; using std::ostream; using std::string; -using std::vector; namespace { diff --git a/src/tex2lyx/text.C b/src/tex2lyx/text.C index 657bd243d8..e194a3edd3 100644 --- a/src/tex2lyx/text.C +++ b/src/tex2lyx/text.C @@ -26,6 +26,7 @@ using std::cerr; using std::endl; + using std::map; using std::ostream; using std::ostringstream; diff --git a/src/texrow.C b/src/texrow.C index de53933d2d..9e1b10e563 100644 --- a/src/texrow.C +++ b/src/texrow.C @@ -18,7 +18,7 @@ #include using std::find_if; -using std::endl; + namespace { diff --git a/src/text.C b/src/text.C index d7993fc610..26a373d9eb 100644 --- a/src/text.C +++ b/src/text.C @@ -48,9 +48,7 @@ using namespace lyx::support; using std::max; -using std::min; using std::endl; -using std::pair; using lyx::pos_type; using lyx::word_location; diff --git a/src/text2.C b/src/text2.C index 0affbe7812..e2fa98fab5 100644 --- a/src/text2.C +++ b/src/text2.C @@ -59,12 +59,10 @@ using namespace lyx::support; -using std::ostringstream; -using std::vector; -using std::copy; using std::endl; -using std::find; -using std::pair; + +using std::ostringstream; + using lyx::pos_type; diff --git a/src/text3.C b/src/text3.C index c2fe35741c..c2f7d884f8 100644 --- a/src/text3.C +++ b/src/text3.C @@ -52,10 +52,13 @@ using namespace bv_funcs; using std::endl; using std::find; + using std::istringstream; using std::vector; + using lyx::pos_type; + extern string current_layout; extern int bibitemMaxWidth(BufferView *, LyXFont const &); diff --git a/src/toc.C b/src/toc.C index 12bf0d9c03..60f75217f8 100644 --- a/src/toc.C +++ b/src/toc.C @@ -28,7 +28,6 @@ using std::vector; using std::max; -using std::endl; using std::ostream; namespace lyx { diff --git a/src/vc-backend.C b/src/vc-backend.C index 9e227b58ce..07a17dc69e 100644 --- a/src/vc-backend.C +++ b/src/vc-backend.C @@ -32,8 +32,10 @@ using std::gmtime; #endif using std::endl; -using std::ifstream; using std::getline; + +using std::ifstream; + using boost::regex; using boost::regex_match;