]> git.lyx.org Git - lyx.git/commitdiff
getting rid of superfluous std:: statements.
authorAbdelrazak Younes <younes@lyx.org>
Wed, 12 Dec 2007 19:28:07 +0000 (19:28 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 12 Dec 2007 19:28:07 +0000 (19:28 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8

185 files changed:
src/Author.cpp
src/BiblioInfo.cpp
src/Box.cpp
src/BranchList.cpp
src/Buffer.cpp
src/BufferList.cpp
src/BufferParams.cpp
src/BufferView.cpp
src/Changes.cpp
src/Color.cpp
src/Converter.cpp
src/ConverterCache.cpp
src/Cursor.cpp
src/CursorSlice.cpp
src/CutAndPaste.cpp
src/DocIterator.cpp
src/EmbeddedFiles.cpp
src/Encoding.cpp
src/Font.cpp
src/Format.cpp
src/FuncRequest.cpp
src/Graph.cpp
src/ISpell.cpp
src/Lexer.cpp
src/LyX.cpp
src/LyXFunc.cpp
src/LyXRC.cpp
src/MenuBackend.cpp
src/ModuleList.cpp
src/Mover.cpp
src/Paragraph.cpp
src/ParagraphParameters.cpp
src/Server.cpp
src/ServerSocket.cpp
src/Session.cpp
src/TexStream.cpp
src/Text.cpp
src/Text3.cpp
src/TextClass.cpp
src/TextClassList.cpp
src/TextMetrics.cpp
src/TocBackend.cpp
src/Trans.cpp
src/Undo.cpp
src/boost.cpp
src/buffer_funcs.cpp
src/client/Messages.cpp
src/client/boost.cpp
src/client/client.cpp
src/client/debug.cpp
src/factory.cpp
src/frontends/qt4/BulletsModule.cpp
src/frontends/qt4/ButtonPolicy.cpp
src/frontends/qt4/Dialog.cpp
src/frontends/qt4/DialogView.cpp
src/frontends/qt4/GuiAlert.cpp
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiBibtex.cpp
src/frontends/qt4/GuiCharacter.cpp
src/frontends/qt4/GuiCitation.cpp
src/frontends/qt4/GuiCommandBuffer.cpp
src/frontends/qt4/GuiDelimiter.cpp
src/frontends/qt4/GuiDialog.cpp
src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiERT.cpp
src/frontends/qt4/GuiErrorList.cpp
src/frontends/qt4/GuiExternal.cpp
src/frontends/qt4/GuiFontLoader.cpp
src/frontends/qt4/GuiGraphics.cpp
src/frontends/qt4/GuiImage.cpp
src/frontends/qt4/GuiIndex.cpp
src/frontends/qt4/GuiListings.cpp
src/frontends/qt4/GuiLog.cpp
src/frontends/qt4/GuiMath.cpp
src/frontends/qt4/GuiPainter.cpp
src/frontends/qt4/GuiPrefs.cpp
src/frontends/qt4/GuiPrint.cpp
src/frontends/qt4/GuiRef.cpp
src/frontends/qt4/GuiSendto.cpp
src/frontends/qt4/GuiShowFile.cpp
src/frontends/qt4/GuiSpellchecker.cpp
src/frontends/qt4/GuiTexinfo.cpp
src/frontends/qt4/GuiThesaurus.cpp
src/frontends/qt4/GuiToolbar.cpp
src/frontends/qt4/GuiToolbars.cpp
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiViewSource.cpp
src/frontends/qt4/GuiWorkArea.cpp
src/frontends/qt4/TocWidget.cpp
src/frontends/qt4/qt_helpers.cpp
src/frontends/tests/biblio.cpp
src/frontends/tests/boost.cpp
src/graphics/GraphicsCache.cpp
src/graphics/GraphicsConverter.cpp
src/graphics/GraphicsLoader.cpp
src/graphics/GraphicsParams.cpp
src/graphics/PreviewLoader.cpp
src/graphics/Previews.cpp
src/insets/ExternalSupport.cpp
src/insets/ExternalTemplate.cpp
src/insets/ExternalTransforms.cpp
src/insets/Inset.cpp
src/insets/InsetBibitem.cpp
src/insets/InsetBibtex.cpp
src/insets/InsetBox.cpp
src/insets/InsetBranch.cpp
src/insets/InsetCaption.cpp
src/insets/InsetCitation.cpp
src/insets/InsetCollapsable.cpp
src/insets/InsetCommandParams.cpp
src/insets/InsetEnvironment.cpp
src/insets/InsetExternal.cpp
src/insets/InsetFlex.cpp
src/insets/InsetFloatList.cpp
src/insets/InsetFootlike.cpp
src/insets/InsetGraphics.cpp
src/insets/InsetHFill.cpp
src/insets/InsetInclude.cpp
src/insets/InsetIndex.cpp
src/insets/InsetInfo.cpp
src/insets/InsetLabel.cpp
src/insets/InsetListingsParams.cpp
src/insets/InsetNewpage.cpp
src/insets/InsetNomencl.cpp
src/insets/InsetNote.cpp
src/insets/InsetOptArg.cpp
src/insets/InsetRef.cpp
src/insets/InsetTOC.cpp
src/insets/InsetTabular.cpp
src/insets/InsetText.cpp
src/insets/RenderGraphic.cpp
src/lyxfind.cpp
src/main.cpp
src/mathed/InsetFormulaMacro.cpp
src/mathed/InsetMath.cpp
src/mathed/InsetMathBrace.cpp
src/mathed/InsetMathDecoration.cpp
src/mathed/InsetMathFrac.cpp
src/mathed/InsetMathGrid.cpp
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathMBox.cpp
src/mathed/InsetMathNest.cpp
src/mathed/InsetMathOverset.cpp
src/mathed/InsetMathStackrel.cpp
src/mathed/InsetMathSymbol.cpp
src/mathed/InsetMathUnderset.cpp
src/mathed/InsetMathXArrow.cpp
src/mathed/MacroTable.cpp
src/mathed/MathData.cpp
src/mathed/MathExtern.cpp
src/mathed/MathFactory.cpp
src/mathed/MathMacro.cpp
src/mathed/MathMacroTemplate.cpp
src/mathed/MathParser.cpp
src/mathed/MathStream.cpp
src/mathed/MathSupport.cpp
src/output_docbook.cpp
src/output_latex.cpp
src/rowpainter.cpp
src/support/FileFilterList.cpp
src/support/FileName.cpp
src/support/ForkedCalls.cpp
src/support/Messages.cpp
src/support/Package.cpp
src/support/Systemcall.cpp
src/support/Timeout.cpp
src/support/debug.cpp
src/support/docstream.cpp
src/support/docstring.cpp
src/support/environment.cpp
src/support/filetools.cpp
src/support/gzstream.cpp
src/support/lstrings.cpp
src/support/lyxsum.cpp
src/support/os.cpp
src/support/os_win32.cpp
src/support/tests/boost.cpp
src/support/unicode.cpp
src/tex2lyx/Context.cpp
src/tex2lyx/Parser.cpp
src/tex2lyx/boost.cpp
src/tex2lyx/gettext.cpp
src/tex2lyx/preamble.cpp
src/tex2lyx/tex2lyx.cpp
src/tex2lyx/text.cpp

index aa9c970a34d7ada28b95bdf8efe2e1fb3a3860dd..4f2f13f7f93251a9bb6a224566f241aa1d6abd0d 100644 (file)
@@ -30,14 +30,14 @@ bool operator==(Author const & l, Author const & r)
 }
 
 
-std::ostream & operator<<(std::ostream & os, Author const & a)
+ostream & operator<<(ostream & os, Author const & a)
 {
        // FIXME UNICODE
        os << "\"" << to_utf8(a.name()) << "\" " << to_utf8(a.email());
        return os;
 }
 
-std::istream & operator>>(std::istream & is, Author & a)
+istream & operator>>(istream & is, Author & a)
 {
        string s;
        getline(is, s);
index 538922f0a2167ef32c12d781ea61c5a0a0928597..8f9aab0905571d91583a637db6d886263a5162a1 100644 (file)
@@ -202,8 +202,8 @@ docstring const BibTeXInfo::getInfo() const
 //////////////////////////////////////////////////////////////////////
 
 namespace {
-// A functor for use with std::sort, leading to case insensitive sorting
-       class compareNoCase: public std::binary_function<docstring, docstring, bool>
+// A functor for use with sort, leading to case insensitive sorting
+       class compareNoCase: public binary_function<docstring, docstring, bool>
        {
                public:
                        bool operator()(docstring const & s1, docstring const & s2) const {
@@ -219,7 +219,7 @@ vector<docstring> const BiblioInfo::getKeys() const
        BiblioInfo::const_iterator it  = begin();
        for (; it != end(); ++it)
                bibkeys.push_back(it->first);
-       std::sort(bibkeys.begin(), bibkeys.end(), compareNoCase());
+       sort(bibkeys.begin(), bibkeys.end(), compareNoCase());
        return bibkeys;
 }
 
@@ -231,7 +231,7 @@ vector<docstring> const BiblioInfo::getFields() const
        set<docstring>::const_iterator end = fieldNames.end();
        for (; it != end; ++it)
                bibfields.push_back(*it);
-       std::sort(bibfields.begin(), bibfields.end());
+       sort(bibfields.begin(), bibfields.end());
        return bibfields;
 }
 
@@ -243,7 +243,7 @@ vector<docstring> const BiblioInfo::getEntries() const
        set<docstring>::const_iterator end = entryTypes.end();
        for (; it != end; ++it)
                bibentries.push_back(*it);
-       std::sort(bibentries.begin(), bibentries.end());
+       sort(bibentries.begin(), bibentries.end());
        return bibentries;
 }
 
@@ -482,7 +482,7 @@ CitationStyle::CitationStyle(string const & command)
        }
 
        char const * const * const last = citeCommands + nCiteCommands;
-       char const * const * const ptr = std::find(citeCommands, last, cmd);
+       char const * const * const ptr = find(citeCommands, last, cmd);
 
        if (ptr != last) {
                size_t idx = ptr - citeCommands;
@@ -496,13 +496,13 @@ string const CitationStyle::asLatexStr() const
        string cite = citeCommands[style];
        if (full) {
                CiteStyle const * last = citeStylesFull + nCiteStylesFull;
-               if (std::find(citeStylesFull, last, style) != last)
+               if (find(citeStylesFull, last, style) != last)
                        cite += '*';
        }
 
        if (forceUCase) {
                CiteStyle const * last = citeStylesUCase + nCiteStylesUCase;
-               if (std::find(citeStylesUCase, last, style) != last)
+               if (find(citeStylesUCase, last, style) != last)
                        cite[0] = 'C';
        }
 
index d17c458982d6cfc8883e29f78ea6f80580215d3d..a3461ef3ea56baea7109ac16b6b188a549f85724 100644 (file)
@@ -41,7 +41,7 @@ ostream & operator<<(ostream & os, Box const & b)
 {
        return os << "x1,y1: " << b.x1 << ',' << b.y1
                 << " x2,y2: " << b.x2 << ',' << b.y2
-                << std::endl;
+                << endl;
 }
 
 
index 2867f49e4ad436ddaca924c05d748a3835d2fb30..5ca0fd58fc62cba233dbeff99a590c311bb559a2 100644 (file)
@@ -82,7 +82,7 @@ void Branch::setColor(string const & str)
 Branch * BranchList::find(docstring const & name)
 {
        List::iterator it =
-               std::find_if(list.begin(), list.end(), BranchNamesEqual(name));
+               find_if(list.begin(), list.end(), BranchNamesEqual(name));
        return it == list.end() ? 0 : &*it;
 }
 
@@ -90,7 +90,7 @@ Branch * BranchList::find(docstring const & name)
 Branch const * BranchList::find(docstring const & name) const
 {
        List::const_iterator it =
-               std::find_if(list.begin(), list.end(), BranchNamesEqual(name));
+               find_if(list.begin(), list.end(), BranchNamesEqual(name));
        return it == list.end() ? 0 : &*it;
 }
 
@@ -108,7 +108,7 @@ bool BranchList::add(docstring const & s)
                        name = s.substr(i, j - i);
                // Is this name already in the list?
                bool const already =
-                       std::find_if(list.begin(), list.end(),
+                       find_if(list.begin(), list.end(),
                                     BranchNamesEqual(name)) != list.end();
                if (!already) {
                        added = true;
index d9b0acbfb480280ef6a6b5d49b474448e500e9c0..1918850afbe9815fd2ba2c0249e2411ed26d718c 100644 (file)
@@ -121,7 +121,7 @@ int const LYX_FORMAT = 307; // JSpitzm: support for \slash
 } // namespace anon
 
 
-typedef std::map<string, bool> DepClean;
+typedef map<string, bool> DepClean;
 
 class Buffer::Impl
 {
@@ -173,8 +173,8 @@ public:
        mutable TocBackend toc_backend;
 
        /// macro table
-       typedef std::map<unsigned int, MacroData, std::greater<int> > PositionToMacroMap;
-       typedef std::map<docstring, PositionToMacroMap> NameToPositionMacroMap;
+       typedef map<unsigned int, MacroData, greater<int> > PositionToMacroMap;
+       typedef map<docstring, PositionToMacroMap> NameToPositionMacroMap;
        NameToPositionMacroMap macros;
 
        /// Container for all sort of Buffer dependant errors.
@@ -606,14 +606,14 @@ void Buffer::insertStringAsLines(ParagraphList & pars,
 }
 
 
-bool Buffer::readString(std::string const & s)
+bool Buffer::readString(string const & s)
 {
        params().compressed = false;
 
        // remove dummy empty par
        paragraphs().clear();
        Lexer lex(0, 0);
-       std::istringstream is(s);
+       istringstream is(s);
        lex.setStream(is);
        FileName const name(tempName());
        switch (readFile(lex, name, true)) {
@@ -621,7 +621,7 @@ bool Buffer::readString(std::string const & s)
                return false;
        case wrongversion: {
                // We need to call lyx2lyx, so write the input to a file
-               std::ofstream os(name.toFilesystemEncoding().c_str());
+               ofstream os(name.toFilesystemEncoding().c_str());
                os << s;
                os.close();
                return readFile(name);
@@ -905,7 +905,7 @@ bool Buffer::write(ostream & ofs) const
 {
 #ifdef HAVE_LOCALE
        // Use the standard "C" locale for file output.
-       ofs.imbue(std::locale::classic());
+       ofs.imbue(locale::classic());
 #endif
 
        // The top of the file should not be written by params().
@@ -995,7 +995,7 @@ bool Buffer::makeLaTeXFile(FileName const & fname,
                lyxerr << "Caught iconv exception: " << e.what() << endl;
                failed_export = true;
        }
-       catch (std::exception const & e) {
+       catch (exception const & e) {
                lyxerr << "Caught \"normal\" exception: " << e.what() << endl;
                failed_export = true;
        }
@@ -1760,7 +1760,7 @@ void Buffer::updateMacros()
                pars[i].setMacrocontextPosition(i);
 
                //lyxerr << "searching main par " << i
-               //      << " for macro definitions" << std::endl;
+               //      << " for macro definitions" << endl;
                InsetList const & insets = pars[i].insetList();
                InsetList::const_iterator it = insets.begin();
                InsetList::const_iterator end = insets.end();
@@ -1813,7 +1813,7 @@ void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to,
                paramName = "reference";
        }
 
-       if (std::count(labels.begin(), labels.end(), from) > 1)
+       if (count(labels.begin(), labels.end(), from) > 1)
                return;
 
        for (InsetIterator it = inset_iterator_begin(inset()); it; ++it) {
@@ -1876,7 +1876,7 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
 ErrorList & Buffer::errorList(string const & type) const
 {
        static ErrorList emptyErrorList;
-       std::map<string, ErrorList>::iterator I = d->errorLists.find(type);
+       map<string, ErrorList>::iterator I = d->errorLists.find(type);
        if (I == d->errorLists.end())
                return emptyErrorList;
 
@@ -1891,7 +1891,7 @@ void Buffer::structureChanged() const
 }
 
 
-void Buffer::errors(std::string const & err) const
+void Buffer::errors(string const & err) const
 {
        if (gui_)
                gui_->errors(err);
index 8584d46bee315878c954f674400b76bc12366f3a..506c306a4996cfef274554e936eb2d3c01aa4be4 100644 (file)
@@ -310,11 +310,11 @@ void BufferList::setCurrentAuthor(docstring const & name, docstring const & emai
 }
 
 
-int BufferList::bufferNum(std::string const & name) const
+int BufferList::bufferNum(string const & name) const
 {
        vector<string> buffers = getFileNames();
        vector<string>::const_iterator cit =
-               std::find(buffers.begin(), buffers.end(), name);
+               find(buffers.begin(), buffers.end(), name);
        if (cit == buffers.end())
                return 0;
        return int(cit - buffers.begin());
index 3dfe0656f88e6abc859cb390dfb6fa3e8805f6cd..8003c4b729b5d6a3fe440fa69e742100d338039a 100644 (file)
@@ -137,7 +137,7 @@ QuotesLangTranslator const & quoteslangtranslator()
 
 
 // Paper size
-typedef Translator<std::string, PAPER_SIZE> PaperSizeTranslator;
+typedef Translator<string, PAPER_SIZE> PaperSizeTranslator;
 
 
 PaperSizeTranslator const init_papersizetranslator()
@@ -1348,7 +1348,7 @@ void BufferParams::makeTextClass()
 }
 
 
-std::vector<string> const & BufferParams::getModules() const {
+vector<string> const & BufferParams::getModules() const {
        return layoutModules_;
 }
 
@@ -1370,11 +1370,11 @@ bool BufferParams::addLayoutModule(string modName, bool makeClass) {
 }
 
 
-bool BufferParams::addLayoutModules(std::vector<string>modNames)
+bool BufferParams::addLayoutModules(vector<string>modNames)
 {
        bool retval = true;
-       std::vector<string>::const_iterator it = modNames.begin();
-       std::vector<string>::const_iterator end = modNames.end();
+       vector<string>::const_iterator it = modNames.begin();
+       vector<string>::const_iterator end = modNames.end();
        for (; it != end; ++it)
                retval &= addLayoutModule(*it, false);
        makeTextClass();
@@ -1590,7 +1590,7 @@ void BufferParams::writeEncodingPreamble(odocstream & os,
 
                // Create a list with all the input encodings used
                // in the document
-               std::set<string> encodings =
+               set<string> encodings =
                        features.getEncodingSet(doc_encoding);
 
                // When the encodings EUC-JP-plain, JIS-plain, or SJIS-plainare used, the
@@ -1602,8 +1602,8 @@ void BufferParams::writeEncodingPreamble(odocstream & os,
 
                if (!encodings.empty() || package == Encoding::inputenc) {
                        os << "\\usepackage[";
-                       std::set<string>::const_iterator it = encodings.begin();
-                       std::set<string>::const_iterator const end = encodings.end();
+                       set<string>::const_iterator it = encodings.begin();
+                       set<string>::const_iterator const end = encodings.end();
                        if (it != end) {
                                os << from_ascii(*it);
                                ++it;
index 468e0a0a90dca355446099e731fa85d4dab7c404..cb16a948e1164224ed9d18e17ee6999c73c349d6 100644 (file)
@@ -187,7 +187,7 @@ void gotoInset(BufferView * bv, InsetCode code, bool same_content)
 
 
 /// A map from a Text to the associated text metrics
-typedef std::map<Text const *, TextMetrics> TextMetricsCache;
+typedef map<Text const *, TextMetrics> TextMetricsCache;
 
 enum ScreenUpdateStrategy {
        NoScreenUpdate,
@@ -1363,7 +1363,7 @@ void BufferView::scrollDown(int offset)
        TextMetrics & tm = d->text_metrics_[text];
        int ymax = height_ + offset;
        while (true) {
-               std::pair<pit_type, ParagraphMetrics const *> last = tm.last();
+               pair<pit_type, ParagraphMetrics const *> last = tm.last();
                int bottom_pos = last.second->position() + last.second->descent();
                if (last.first + 1 == int(text->paragraphs().size())) {
                        if (bottom_pos <= height_)
@@ -1387,7 +1387,7 @@ void BufferView::scrollUp(int offset)
        TextMetrics & tm = d->text_metrics_[text];
        int ymin = - offset;
        while (true) {
-               std::pair<pit_type, ParagraphMetrics const *> first = tm.first();
+               pair<pit_type, ParagraphMetrics const *> first = tm.first();
                int top_pos = first.second->position() - first.second->ascent();
                if (first.first == 0) {
                        if (top_pos >= 0)
@@ -1425,7 +1425,7 @@ void BufferView::gotoLabel(docstring const & label)
        for (InsetIterator it = inset_iterator_begin(buffer_.inset()); it; ++it) {
                vector<docstring> labels;
                it->getLabelList(buffer_, labels);
-               if (std::find(labels.begin(), labels.end(), label) != labels.end()) {
+               if (find(labels.begin(), labels.end(), label) != labels.end()) {
                        setCursor(it);
                        processUpdateFlags(Update::FitCursor);
                        return;
@@ -1532,7 +1532,7 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select)
        // For an example, see bug 2933:
        // http://bugzilla.lyx.org/show_bug.cgi?id=2933
        // The code below could maybe be moved to a DocIterator method.
-       //lyxerr << "cur before " << cur <<std::endl;
+       //lyxerr << "cur before " << cur <<endl;
        DocIterator dit(cur.inset());
        dit.push_back(cur.bottom());
        size_t i = 1;
@@ -1540,7 +1540,7 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select)
                dit.push_back(cur[i]);
                ++i;
        }
-       //lyxerr << "5 cur after" << dit <<std::endl;
+       //lyxerr << "5 cur after" << dit <<endl;
 
        d->cursor_.setCursor(dit);
        d->cursor_.boundary(cur.boundary());
@@ -1797,7 +1797,7 @@ Point BufferView::coordOffset(DocIterator const & dit, bool boundary) const
                int pos = sl.pos();
                if (pos && boundary)
                        --pos;
-//             lyxerr << "coordOffset: boundary:" << boundary << " depth:" << dit.depth() << " pos:" << pos << " sl.pos:" << sl.pos() << std::endl;
+//             lyxerr << "coordOffset: boundary:" << boundary << " depth:" << dit.depth() << " pos:" << pos << " sl.pos:" << sl.pos() << endl;
                rend = pm.pos2row(pos);
        } else
                rend = pm.pos2row(sl.pos());
@@ -1879,7 +1879,7 @@ void BufferView::draw(frontend::Painter & pain)
                tm.draw(pi, 0, y);
 
                // and possibly grey out below
-               std::pair<pit_type, ParagraphMetrics const *> lastpm = tm.last();
+               pair<pit_type, ParagraphMetrics const *> lastpm = tm.last();
                int const y2 = lastpm.second->position() + lastpm.second->descent();
                if (y2 < height_)
                        pain.fillRectangle(0, y2, width_, height_ - y2, Color_bottomarea);
@@ -1897,22 +1897,22 @@ void BufferView::message(docstring const & msg)
 }
 
 
-void BufferView::showDialog(std::string const & name)
+void BufferView::showDialog(string const & name)
 {
        if (d->gui_)
                d->gui_->showDialog(name, string());
 }
 
 
-void BufferView::showDialog(std::string const & name,
-       std::string const & data, Inset * inset)
+void BufferView::showDialog(string const & name,
+       string const & data, Inset * inset)
 {
        if (d->gui_)
                d->gui_->showDialog(name, data, inset);
 }
 
 
-void BufferView::updateDialog(std::string const & name, std::string const & data)
+void BufferView::updateDialog(string const & name, string const & data)
 {
        if (d->gui_)
                d->gui_->updateDialog(name, data);
index 3486b7c7d723daa83ddbe18f4d5ca00eea3573b1..a6633256a35bd9f3cd7fc083efa6057869400cf9 100644 (file)
@@ -24,6 +24,8 @@
 
 #include <ostream>
 
+using namespace std;
+
 namespace lyx {
 
 /*
@@ -270,7 +272,7 @@ void Changes::merge()
                                << (it + 1)->range.end << ")");
 
                        (it + 1)->range.start = it->range.start;
-                       (it + 1)->change.changetime = std::max(it->change.changetime,
+                       (it + 1)->change.changetime = max(it->change.changetime,
                                                          (it + 1)->change.changetime);
                        table_.erase(it);
                        // start again
@@ -318,7 +320,7 @@ int Changes::latexMarkChange(odocstream & os, BufferParams const & bparams,
 }
 
 
-void Changes::lyxMarkChange(std::ostream & os, int & column,
+void Changes::lyxMarkChange(ostream & os, int & column,
                            Change const & old, Change const & change)
 {
        if (old == change)
index 68b71f37fb8c78fc10f42407f49870e44c9ef532..6752ff8ad3b0da9a25c0add24abbac329458d55f 100644 (file)
@@ -49,7 +49,7 @@ static int hexstrToInt(string const & str)
 {
        int val = 0;
        istringstream is(str);
-       is >> std::setbase(16) >> val;
+       is >> setbase(16) >> val;
        return val;
 }
 
@@ -65,7 +65,7 @@ string const X11hexname(RGBColor const & col)
 {
        ostringstream ostr;
 
-       ostr << '#' << std::setbase(16) << std::setfill('0')
+       ostr << '#' << setbase(16) << setfill('0')
             << setw(2) << col.r
             << setw(2) << col.g
             << setw(2) << col.b;
@@ -220,7 +220,7 @@ bool ColorSet::setColor(ColorCode col, string const & x11name)
        InfoTab::iterator it = infotab.find(col);
        if (it == infotab.end()) {
                lyxerr << "Color " << col << " not found in database."
-                      << std::endl;
+                      << endl;
                return false;
        }
 
index 4f27e8f33f07e7f56ba9b95aaabea7316b6fa842..085ed5fb2f50104a87cd01c08ed8aa6039a8f5ba 100644 (file)
@@ -626,8 +626,8 @@ void Converters::buildGraph()
 }
 
 
-std::vector<Format const *> const
-Converters::intToFormat(std::vector<int> const & input)
+vector<Format const *> const
+Converters::intToFormat(vector<int> const & input)
 {
        vector<Format const *> result(input.size());
 
index d82f939ff2e10bfd6068a6ac48c9e5b33a56162c..ea3bfc70f3f4115bd16ec925f8641f0e45bba8d9 100644 (file)
@@ -45,7 +45,7 @@ namespace {
 unsigned long do_crc(string const & s)
 {
        boost::crc_32_type crc;
-       crc = std::for_each(s.begin(), s.end(), crc);
+       crc = for_each(s.begin(), s.end(), crc);
        return crc.checksum();
 }
 
@@ -60,8 +60,8 @@ public:
                  time_t t, unsigned long c)
                : timestamp(t), checksum(c)
        {
-               std::ostringstream os;
-               os << std::setw(10) << std::setfill('0') << do_crc(orig_from.absFilename())
+               ostringstream os;
+               os << setw(10) << setfill('0') << do_crc(orig_from.absFilename())
                   << '-' << to_format;
                cache_name = FileName(addName(cache_dir.absFilename(), os.str()));
                LYXERR(Debug::FILES, "Add file cache item " << orig_from
@@ -80,7 +80,7 @@ public:
 /** The cache contains one item per orig file and target format, so use a
  *  nested map to find the cache item quickly by filename and format.
  */
-typedef std::map<string, CacheItem> FormatCacheType;
+typedef map<string, CacheItem> FormatCacheType;
 class FormatCache {
 public:
        /// Format of the source file
@@ -88,7 +88,7 @@ public:
        /// Cache target format -> item to quickly find the item by format
        FormatCacheType cache;
 };
-typedef std::map<FileName, FormatCache> CacheType;
+typedef map<FileName, FormatCache> CacheType;
 
 
 class ConverterCache::Impl {
@@ -107,7 +107,7 @@ void ConverterCache::Impl::readIndex()
 {
        time_t const now = current_time();
        FileName const index(addName(cache_dir.absFilename(), "index"));
-       std::ifstream is(index.toFilesystemEncoding().c_str());
+       ifstream is(index.toFilesystemEncoding().c_str());
        Lexer lex(0, 0);
        lex.setStream(is);
        while (lex.isOK()) {
@@ -167,7 +167,7 @@ void ConverterCache::Impl::readIndex()
 void ConverterCache::Impl::writeIndex()
 {
        FileName const index(addName(cache_dir.absFilename(), "index"));
-       std::ofstream os(index.toFilesystemEncoding().c_str());
+       ofstream os(index.toFilesystemEncoding().c_str());
        os.close();
        if (!lyx::support::chmod(index, 0600))
                return;
@@ -242,7 +242,7 @@ void ConverterCache::init()
        if (!cache_dir.exists())
                if (support::mkdir(cache_dir, 0700) != 0) {
                        lyxerr << "Could not create cache directory `"
-                              << cache_dir << "'." << std::endl;
+                              << cache_dir << "'." << endl;
                        exit(EXIT_FAILURE);
                }
        get().pimpl_->readIndex();
index f4489c899cdd668e2be72f9fa3b33d46259bff6a..a1a078df0a5cb342b82ba3f0c3defa65243300e3 100644 (file)
@@ -79,7 +79,7 @@ bool positionable(DocIterator const & cursor, DocIterator const & anchor)
 // Used only in mathed
 DocIterator bruteFind2(Cursor const & c, int x, int y)
 {
-       double best_dist = std::numeric_limits<double>::max();
+       double best_dist = numeric_limits<double>::max();
 
        DocIterator result;
 
@@ -91,9 +91,9 @@ DocIterator bruteFind2(Cursor const & c, int x, int y)
                int xo;
                int yo;
                Inset const * inset = &it.inset();
-               std::map<Inset const *, Geometry> const & data =
+               map<Inset const *, Geometry> const & data =
                        c.bv().coordCache().getInsets().getData();
-               std::map<Inset const *, Geometry>::const_iterator I = data.find(inset);
+               map<Inset const *, Geometry>::const_iterator I = data.find(inset);
 
                // FIXME: in the case where the inset is not in the cache, this
                // means that no part of it is visible on screen. In this case
@@ -150,7 +150,7 @@ bool bruteFind(Cursor & cursor,
        else
                ++et.pit();
 
-       double best_dist = std::numeric_limits<double>::max();;
+       double best_dist = numeric_limits<double>::max();;
        DocIterator best_cursor = et;
 
        for ( ; it != et; it.forwardPos(true)) {
@@ -207,7 +207,7 @@ bool bruteFind3(Cursor & cur, int x, int y, bool up)
        it.pit() = from;
        DocIterator et = doc_iterator_end(inset);
 
-       double best_dist = std::numeric_limits<double>::max();
+       double best_dist = numeric_limits<double>::max();
        DocIterator best_cursor = et;
 
        for ( ; it != et; it.forwardPos()) {
@@ -590,7 +590,7 @@ bool Cursor::selHandle(bool sel)
 }
 
 
-std::ostream & operator<<(std::ostream & os, Cursor const & cur)
+ostream & operator<<(ostream & os, Cursor const & cur)
 {
        os << "\n cursor:                                | anchor:\n";
        for (size_t i = 0, n = cur.depth(); i != n; ++i) {
@@ -1269,18 +1269,18 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
                Cursor old = *this;
                if (up) {
                        if (row > 0) {
-                               top().pos() = std::min(tm.x2pos(pit(), row - 1, xo), top().lastpos());
+                               top().pos() = min(tm.x2pos(pit(), row - 1, xo), top().lastpos());
                        } else if (pit() > 0) {
                                --pit();
                                ParagraphMetrics const & pmcur = bv_->parMetrics(text(), pit());
-                               top().pos() = std::min(tm.x2pos(pit(), pmcur.rows().size() - 1, xo), top().lastpos());
+                               top().pos() = min(tm.x2pos(pit(), pmcur.rows().size() - 1, xo), top().lastpos());
                        }
                } else {
                        if (row + 1 < int(pm.rows().size())) {
-                               top().pos() = std::min(tm.x2pos(pit(), row + 1, xo), top().lastpos());
+                               top().pos() = min(tm.x2pos(pit(), row + 1, xo), top().lastpos());
                        } else if (pit() + 1 < int(text()->paragraphs().size())) {
                                ++pit();
-                               top().pos() = std::min(tm.x2pos(pit(), 0, xo), top().lastpos());
+                               top().pos() = min(tm.x2pos(pit(), 0, xo), top().lastpos());
                        }
                }
 
index 3f52df8b3faabf2c3a21490fd03874d5900401b2..f4319dcf01532da242081211ae6a7a0ad2187f10 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <ostream>
 
+using namespace std;
 
 namespace lyx {
 
@@ -205,7 +206,7 @@ bool operator<=(CursorSlice const & p, CursorSlice const & q)
 }
 
 
-std::ostream & operator<<(std::ostream & os, CursorSlice const & item)
+ostream & operator<<(ostream & os, CursorSlice const & item)
 {
        return os
           << "inset: " << (void *)&item.inset()
index 44f04bf4e29cf8d4789ee6d672d5b939174b018c..d470a294f9cc3b83ae3dcb0168c5045032c0f4d0 100644 (file)
@@ -65,7 +65,7 @@ namespace lyx {
 
 namespace {
 
-typedef std::pair<pit_type, int> PitPosPair;
+typedef pair<pit_type, int> PitPosPair;
 
 typedef limited_stack<pair<ParagraphList, TextClassPtr> > CutStack;
 
@@ -87,11 +87,11 @@ void region(CursorSlice const & i1, CursorSlice const & i2,
        c1 = p.col(i1.idx());
        c2 = p.col(i2.idx());
        if (c1 > c2)
-               std::swap(c1, c2);
+               swap(c1, c2);
        r1 = p.row(i1.idx());
        r2 = p.row(i2.idx());
        if (r1 > r2)
-               std::swap(r1, r2);
+               swap(r1, r2);
 }
 
 
@@ -331,7 +331,7 @@ void putClipboard(ParagraphList const & paragraphs, TextClassPtr textclass,
        buffer.setUnnamed(true);
        buffer.paragraphs() = paragraphs;
        buffer.params().setTextClass(textclass);
-       std::ostringstream lyx;
+       ostringstream lyx;
        if (buffer.write(lyx))
                theClipboard().put(lyx.str(), plaintext);
        else
@@ -462,7 +462,7 @@ void switchBetweenClasses(TextClassPtr const & c1,
 }
 
 
-std::vector<docstring> const availableSelections(Buffer const & buffer)
+vector<docstring> const availableSelections(Buffer const & buffer)
 {
        vector<docstring> selList;
 
@@ -877,7 +877,7 @@ docstring grabSelection(Cursor const & cur)
 
        // FIXME: What is wrong with the following?
 #if 0
-       std::ostringstream os;
+       ostringstream os;
        for (DocIterator dit = cur.selectionBegin();
             dit != cur.selectionEnd(); dit.forwardPos())
                os << asString(dit.cell());
index 174dec29bfd97e1e3543ee9880a3563fea43187d..3d2c18d6347f18310b3ccce42e2e1c1ca56e40b7 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <ostream>
 
+using namespace std;
 
 namespace lyx {
 
@@ -496,9 +497,9 @@ DocIterator::idx_type DocIterator::find(InsetMath const * inset) const
 }
 
 
-void DocIterator::cutOff(DocIterator::idx_type above, std::vector<CursorSlice> & cut)
+void DocIterator::cutOff(DocIterator::idx_type above, vector<CursorSlice> & cut)
 {
-       cut = std::vector<CursorSlice>(slices_.begin() + above + 1, slices_.end());
+       cut = vector<CursorSlice>(slices_.begin() + above + 1, slices_.end());
        slices_.resize(above + 1);
 }
 
@@ -509,7 +510,7 @@ void DocIterator::cutOff(DocIterator::idx_type above)
 }
 
 
-void DocIterator::append(std::vector<CursorSlice> const & x) 
+void DocIterator::append(vector<CursorSlice> const & x) 
 {
        slices_.insert(slices_.end(), x.begin(), x.end());
 }
@@ -523,7 +524,7 @@ void DocIterator::append(DocIterator::idx_type idx, pos_type pos)
 }
 
 
-std::ostream & operator<<(std::ostream & os, DocIterator const & dit)
+ostream & operator<<(ostream & os, DocIterator const & dit)
 {
        for (size_t i = 0, n = dit.depth(); i != n; ++i)
                os << " " << dit[i] << "\n";
@@ -533,7 +534,7 @@ std::ostream & operator<<(std::ostream & os, DocIterator const & dit)
 
 bool operator<(DocIterator const & p, DocIterator const & q)
 {
-       size_t depth = std::min(p.depth(), q.depth());
+       size_t depth = min(p.depth(), q.depth());
        for (size_t i = 0 ; i < depth ; ++i) {
                if (p[i] != q[i])
                        return p[i] < q[i];
@@ -592,7 +593,7 @@ DocIterator StableDocIterator::asDocIterator(Inset * inset) const
 }
 
 
-std::ostream & operator<<(std::ostream & os, StableDocIterator const & dit)
+ostream & operator<<(ostream & os, StableDocIterator const & dit)
 {
        for (size_t i = 0, n = dit.data_.size(); i != n; ++i)
                os << " " << dit.data_[i] << "\n";
index 325ca23362a9feb8b817b03820977e4e49418d04..2e8fc0516f93c6a9a03ce265fa66b1095ce3abb3 100644 (file)
@@ -293,7 +293,7 @@ bool EmbeddedFiles::writeFile(DocFileName const & filename)
 
 
 EmbeddedFiles::EmbeddedFileList::const_iterator
-EmbeddedFiles::find(std::string filename) const
+EmbeddedFiles::find(string filename) const
 {
        EmbeddedFileList::const_iterator it = file_list_.begin();
        EmbeddedFileList::const_iterator it_end = file_list_.end();
index ec06b562d2f3b0061f21b5d05e5b2333cb19f1b2..37e85ccf766c714fd55d66975ca8288a593b10be 100644 (file)
@@ -237,7 +237,7 @@ struct CharInfo {
 };
 
 
-typedef std::map<char_type, CharInfo> CharInfoMap;
+typedef map<char_type, CharInfo> CharInfoMap;
 CharInfoMap unicodesymbols;
 
 
@@ -275,7 +275,7 @@ void Encoding::init() const
                // if we check all 256 code points of this encoding.
                for (unsigned short j = 0; j < 256; ++j) {
                        char const c = char(j);
-                       std::vector<char_type> const ucs4 = eightbit_to_ucs4(&c, 1, iconvName_);
+                       vector<char_type> const ucs4 = eightbit_to_ucs4(&c, 1, iconvName_);
                        if (ucs4.size() == 1) {
                                char_type const c = ucs4[0];
                                CharInfoMap::const_iterator const it = unicodesymbols.find(c);
@@ -289,7 +289,7 @@ void Encoding::init() const
                // therefore we need to check all UCS4 code points.
                // This is expensive!
                for (char_type c = 0; c < max_ucs4; ++c) {
-                       std::vector<char> const eightbit = ucs4_to_eightbit(&c, 1, iconvName_);
+                       vector<char> const eightbit = ucs4_to_eightbit(&c, 1, iconvName_);
                        if (!eightbit.empty()) {
                                CharInfoMap::const_iterator const it = unicodesymbols.find(c);
                                if (it == unicodesymbols.end() || !it->second.force)
@@ -322,7 +322,7 @@ docstring const Encoding::latexChar(char_type c) const
                CharInfoMap::const_iterator const it = unicodesymbols.find(c);
                if (it == unicodesymbols.end())
                        lyxerr << "Could not find LaTeX command for character 0x"
-                              << std::hex << c << std::dec
+                              << hex << c << dec
                               << ".\nLaTeX export will fail."
                               << endl;
                else
@@ -428,7 +428,7 @@ Encoding const * Encodings::getFromLyXName(string const & name) const
 
 Encoding const * Encodings::getFromLaTeXName(string const & name) const
 {
-       // We don't use std::find_if because it makes copies of the pairs in
+       // We don't use find_if because it makes copies of the pairs in
        // the map.
        // This linear search is OK since we don't have many encodings.
        // Users could even optimize it by putting the encodings they use
@@ -458,11 +458,11 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
                string flags;
 
                if (symbolslex.next(true)) {
-                       std::istringstream is(symbolslex.getString());
+                       istringstream is(symbolslex.getString());
                        // reading symbol directly does not work if
-                       // char_type == std::wchar_t.
+                       // char_type == wchar_t.
                        boost::uint32_t tmp;
-                       if(!(is >> std::hex >> tmp))
+                       if(!(is >> hex >> tmp))
                                break;
                        symbol = tmp;
                } else
@@ -493,7 +493,7 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
                        else
                                lyxerr << "Ignoring unknown flag `" << flag
                                       << "' for symbol `0x"
-                                      << std::hex << symbol << std::dec
+                                      << hex << symbol << dec
                                       << "'." << endl;
                }
 
index 03997b2c6f9b5298502bcc7c5def2efd0113e6f5..d3dd3bbc2ab0ed462a6c03b74262d9b3640fad2e 100644 (file)
@@ -639,7 +639,7 @@ int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
 }
 
 
-std::string Font::toString(bool const toggle) const
+string Font::toString(bool const toggle) const
 {
        string lang = "ignore";
        if (language())
@@ -780,7 +780,7 @@ ostream & operator<<(ostream & os, FontState fms)
 }
 
 
-ostream & operator<<(std::ostream & os, FontInfo const & f)
+ostream & operator<<(ostream & os, FontInfo const & f)
 {
        return os << "font:"
                << " family " << f.family()
@@ -797,7 +797,7 @@ ostream & operator<<(std::ostream & os, FontInfo const & f)
 }
 
 
-std::ostream & operator<<(std::ostream & os, Font const & font)
+ostream & operator<<(ostream & os, Font const & font)
 {
        return os << font.bits_
                << " lang: " << (font.lang_ ? font.lang_->lang() : 0);
index 077a33e08ec26462d3549a3030f44ab3847d7759..2ece9f874205208533e91f9f29d56cf480e22a40 100644 (file)
@@ -40,7 +40,7 @@ string const token_path_format("$$p");
 string const token_socket_format("$$a");
 
 
-class FormatNamesEqual : public std::unary_function<Format, bool> {
+class FormatNamesEqual : public unary_function<Format, bool> {
 public:
        FormatNamesEqual(string const & name)
                : name_(name) {}
@@ -53,7 +53,7 @@ private:
 };
 
 
-class FormatExtensionsEqual : public std::unary_function<Format, bool> {
+class FormatExtensionsEqual : public unary_function<Format, bool> {
 public:
        FormatExtensionsEqual(string const & extension)
                : extension_(extension) {}
index af4d97c7d70dd1435fd2333a15f8c19a7b4367ad..9f1405ddc454c2275dc68e3724200ad04814abaf 100644 (file)
@@ -104,7 +104,7 @@ bool operator==(FuncRequest const & lhs, FuncRequest const & rhs)
 }
 
 
-std::ostream & operator<<(std::ostream & os, FuncRequest const & cmd)
+ostream & operator<<(ostream & os, FuncRequest const & cmd)
 {
        return os
                << " action: " << cmd.action
index 1f5c66ed83275d93cb53afe699531ca64e463c82..e15a7d48ef80194ac2cd7f2036e9b9d3202d308b 100644 (file)
@@ -25,7 +25,7 @@ int Graph::bfs_init(int s, bool clear_visited)
        if (s < 0)
                return s;
 
-       Q_ = std::queue<int>();
+       Q_ = queue<int>();
 
        if (clear_visited)
                fill(visited_.begin(), visited_.end(), false);
index 6b7d1324d68c84c3b56041a22da3d3bb93635641..6a74bcb82451fd8b38eaef9d2998b30c67655413 100644 (file)
@@ -184,7 +184,7 @@ int LaunchIspell::generateChild()
 string const to_iconv_encoding(docstring const & s, string const & encoding)
 {
        if (lyxrc.isp_use_input_encoding) {
-               std::vector<char> const encoded =
+               vector<char> const encoded =
                        ucs4_to_eightbit(s.data(), s.length(), encoding);
                return string(encoded.begin(), encoded.end());
        }
@@ -196,7 +196,7 @@ string const to_iconv_encoding(docstring const & s, string const & encoding)
 docstring const from_iconv_encoding(string const & s, string const & encoding)
 {
        if (lyxrc.isp_use_input_encoding) {
-               std::vector<char_type> const ucs4 =
+               vector<char_type> const ucs4 =
                        eightbit_to_ucs4(s.data(), s.length(), encoding);
                return docstring(ucs4.begin(), ucs4.end());
        }
index 781aa52d15c5784e830a7bd4fde90549e0d979da..8a80758874d9ba98c7a24ade44a492126e6bfabb 100644 (file)
@@ -51,13 +51,13 @@ public:
        ///
        Pimpl(keyword_item * tab, int num);
        ///
-       std::string const getString() const;
+       string const getString() const;
        ///
        docstring const getDocString() const;
        ///
-       void printError(std::string const & message) const;
+       void printError(string const & message) const;
        ///
-       void printTable(std::ostream & os);
+       void printTable(ostream & os);
        ///
        void pushTable(keyword_item * tab, int num);
        ///
@@ -65,7 +65,7 @@ public:
        ///
        bool setFile(support::FileName const & filename);
        ///
-       void setStream(std::istream & i);
+       void setStream(istream & i);
        ///
        void setCommentChar(char c);
        ///
@@ -81,29 +81,29 @@ public:
        /// test if there is a pushed token or the stream is ok
        bool inputAvailable();
        ///
-       void pushToken(std::string const &);
+       void pushToken(string const &);
        /// fb_ is only used to open files, the stream is accessed through is.
-       std::filebuf fb_;
+       filebuf fb_;
 
        /// gz_ is only used to open files, the stream is accessed through is.
        gz::gzstreambuf gz_;
 
        /// the stream that we use.
-       std::istream is;
+       istream is;
        ///
-       std::string name;
+       string name;
        ///
        keyword_item * table;
        ///
        int no_items;
        ///
-       std::string buff;
+       string buff;
        ///
        int status;
        ///
        int lineno;
        ///
-       std::string pushTok;
+       string pushTok;
        ///
        char commentChar;
 private:
@@ -124,7 +124,7 @@ private:
                int table_siz;
        };
        ///
-       std::stack<pushed_table> pushed;
+       stack<pushed_table> pushed;
 };
 
 
@@ -132,7 +132,7 @@ private:
 namespace {
 
 class compare_tags
-       : public std::binary_function<keyword_item, keyword_item, bool> {
+       : public binary_function<keyword_item, keyword_item, bool> {
 public:
        // used by lower_bound, sort and sorted
        bool operator()(keyword_item const & a, keyword_item const & b) const
@@ -840,7 +840,7 @@ void Lexer::pushToken(string const & pt)
 
 Lexer::operator void const *() const
 {
-       // This behaviour is NOT the same as the std::streams which would
+       // This behaviour is NOT the same as the streams which would
        // use fail() here. However, our implementation of getString() et al.
        // can cause the eof() and fail() bits to be set, even though we
        // haven't tried to read 'em.
@@ -854,7 +854,7 @@ bool Lexer::operator!() const
 }
 
 
-Lexer & Lexer::operator>>(std::string & s)
+Lexer & Lexer::operator>>(string & s)
 {
        if (isOK()) {
                next();
@@ -929,7 +929,7 @@ Lexer & Lexer::operator>>(bool & s)
 /// quotes a string, e.g. for use in preferences files or as an argument of the "log" dialog
 string const Lexer::quoteString(string const & arg)
 {
-       std::ostringstream os;
+       ostringstream os;
        os << '"' << subst(subst(arg, "\\", "\\\\"), "\"", "\\\"") << '"';
        return os.str();
 }
index f4fdda708ffe9f18e70114f0b51b10696aaa7e7d..1d13df399b104bf3def3b34cacb9f0868b01c21a 100644 (file)
@@ -93,7 +93,7 @@ namespace {
 string cl_system_support;
 string cl_user_support;
 
-std::string geometryArg;
+string geometryArg;
 
 LyX * singleton_ = 0;
 
@@ -166,7 +166,7 @@ struct LyX::Impl
        /// has this user started lyx for the first time?
        bool first_start;
        /// the parsed command line batch command if any
-       std::string batch_command;
+       string batch_command;
 };
 
 ///
@@ -317,15 +317,15 @@ KeyMap const & LyX::topLevelKeymap() const
 }
 
 
-Messages & LyX::getMessages(std::string const & language)
+Messages & LyX::getMessages(string const & language)
 {
        map<string, Messages>::iterator it = pimpl_->messages_.find(language);
 
        if (it != pimpl_->messages_.end())
                return it->second;
 
-       std::pair<map<string, Messages>::iterator, bool> result =
-                       pimpl_->messages_.insert(std::make_pair(language, Messages(language)));
+       pair<map<string, Messages>::iterator, bool> result =
+                       pimpl_->messages_.insert(make_pair(language, Messages(language)));
 
        BOOST_ASSERT(result.second);
        return result.first->second;
@@ -338,7 +338,7 @@ Messages & LyX::getGuiMessages()
 }
 
 
-void LyX::setGuiLanguage(std::string const & language)
+void LyX::setGuiLanguage(string const & language)
 {
        pimpl_->messages_["GUI"] = Messages(language);
 }
@@ -522,7 +522,7 @@ int LyX::init(int & argc, char * argv[])
 
 void LyX::addFileToLoad(FileName const & fname)
 {
-       vector<FileName>::const_iterator cit = std::find(
+       vector<FileName>::const_iterator cit = find(
                pimpl_->files_to_load_.begin(), pimpl_->files_to_load_.end(),
                fname);
 
@@ -740,7 +740,7 @@ void LyX::printError(ErrorItem const & ei)
 {
        docstring tmp = _("LyX: ") + ei.error + char_type(':')
                + ei.description;
-       std::cerr << to_utf8(tmp) << std::endl;
+       cerr << to_utf8(tmp) << endl;
 }
 
 
@@ -1037,10 +1037,10 @@ bool LyX::readUIFile(string const & name, bool include)
        };
 
        // Ensure that a file is read only once (prevents include loops)
-       static std::list<string> uifiles;
-       std::list<string>::const_iterator it  = uifiles.begin();
-       std::list<string>::const_iterator end = uifiles.end();
-       it = std::find(it, end, name);
+       static list<string> uifiles;
+       list<string>::const_iterator it  = uifiles.begin();
+       list<string>::const_iterator end = uifiles.end();
+       it = find(it, end, name);
        if (it != end) {
                LYXERR(Debug::INIT, "UI file '" << name << "' has been read already. "
                                    << "Is this an include loop?");
@@ -1295,7 +1295,7 @@ int parse_geometry(string const & arg1, string const &)
 
 void LyX::easyParse(int & argc, char * argv[])
 {
-       std::map<string, cmd_helper> cmdmap;
+       map<string, cmd_helper> cmdmap;
 
        cmdmap["-dbg"] = parse_dbg;
        cmdmap["-help"] = parse_help;
@@ -1313,7 +1313,7 @@ void LyX::easyParse(int & argc, char * argv[])
        cmdmap["-geometry"] = parse_geometry;
 
        for (int i = 1; i < argc; ++i) {
-               std::map<string, cmd_helper>::const_iterator it
+               map<string, cmd_helper>::const_iterator it
                        = cmdmap.find(argv[i]);
 
                // don't complain if not found - may be parsed later
@@ -1405,13 +1405,13 @@ Movers & theMovers()
 }
 
 
-Mover const & getMover(std::string  const & fmt)
+Mover const & getMover(string  const & fmt)
 {
        return  LyX::ref().pimpl_->movers_(fmt);
 }
 
 
-void setMover(std::string const & fmt, std::string const & command)
+void setMover(string const & fmt, string const & command)
 {
        LyX::ref().pimpl_->movers_.set(fmt, command);
 }
@@ -1423,7 +1423,7 @@ Movers & theSystemMovers()
 }
 
 
-Messages & getMessages(std::string const & language)
+Messages & getMessages(string const & language)
 {
        return LyX::ref().getMessages(language);
 }
index 5da4fd1a573c2de48b149087f7e3c2727d837aa8..66d295e970eec6e907db2ff3f6a37019dd039654 100644 (file)
@@ -622,7 +622,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
 
        case LFUN_CALL: {
                FuncRequest func;
-               std::string name = to_utf8(cmd.argument());
+               string name = to_utf8(cmd.argument());
                if (LyX::ref().topLevelCmdDef().lock(name, func)) {
                        func.origin = cmd.origin;
                        flag = getStatus(func);
@@ -765,13 +765,13 @@ void showPrintError(string const & name)
 
 void loadTextClass(string const & name)
 {
-       std::pair<bool, textclass_type> const tc_pair =
+       pair<bool, textclass_type> const tc_pair =
                textclasslist.numberOfClass(name);
 
        if (!tc_pair.first) {
                lyxerr << "Document class \"" << name
                       << "\" does not exist."
-                      << std::endl;
+                      << endl;
                return;
        }
 
@@ -945,7 +945,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        if (!format) {
                                lyxerr << "Format \"" << format_name
                                       << "\" not recognized!"
-                                      << std::endl;
+                                      << endl;
                                break;
                        }
 
@@ -1331,7 +1331,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        }
                        default:
                                lyxerr << "Inset type '" << name << 
-                                       "' not recognized in LFUN_DIALOG_SHOW_NEW_INSET" << std:: endl;
+                                       "' not recognized in LFUN_DIALOG_SHOW_NEW_INSET" <<  endl;
                                insetCodeOK = false;
                                break;
                        } // end switch(code)
@@ -1672,7 +1672,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                        loadTextClass(argument);
 
-                       std::pair<bool, textclass_type> const tc_pair =
+                       pair<bool, textclass_type> const tc_pair =
                                textclasslist.numberOfClass(argument);
 
                        if (!tc_pair.first)
index 666e63efdc24fd05cfc91166093d3109a152e601..db89b3b2164465369499db56f2a4f1b46eed2f7f 100644 (file)
@@ -304,7 +304,7 @@ int LyXRC::read(FileName const & filename)
 }
 
 
-int LyXRC::read(std::istream & is)
+int LyXRC::read(istream & is)
 {
        Lexer lexrc(lyxrcTags, lyxrcCount);
        if (lyxerr.debugging(Debug::PARSER))
@@ -1193,7 +1193,7 @@ void LyXRC::print() const
 
 class SameMover {
 public:
-       typedef std::pair<std::string, SpecialisedMover> Data;
+       typedef pair<string, SpecialisedMover> Data;
 
        SameMover(Data const & comparison)
                : comparison_(comparison) {}
@@ -2215,7 +2215,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                                   << cit->shortcut() << "\" \""
                                   << cit->viewer() << "\" \""
                                   << cit->editor() << "\" \"";
-                               std::vector<string> flags;
+                               vector<string> flags;
                                if (cit->documentFormat())
                                        flags.push_back("document");
                                if (cit->vectorFormat())
@@ -2281,10 +2281,10 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
 
                for (; it != end; ++it) {
                        Movers::const_iterator const sysit =
-                               std::find_if(sysbegin, sysend, SameMover(*it));
+                               find_if(sysbegin, sysend, SameMover(*it));
                        if (sysit == sysend) {
-                               std::string const & fmt = it->first;
-                               std::string const & command =
+                               string const & fmt = it->first;
+                               string const & command =
                                        it->second.command();
 
                                os << "\\copier " << fmt
index e9b4009fda2e7a72644691d1e995d5f4fa9bc8b8..2e4f4532f2bb7e4bfc8fb2c6c4eb5c90c0496360 100644 (file)
@@ -56,7 +56,7 @@ namespace lyx {
 
 namespace {
 
-class MenuNamesEqual : public std::unary_function<Menu, bool> {
+class MenuNamesEqual : public unary_function<Menu, bool> {
 public:
        MenuNamesEqual(docstring const & name)
                : name_(name) {}
@@ -375,7 +375,7 @@ MenuItem const & Menu::operator[](size_type i) const
 bool Menu::hasFunc(FuncRequest const & func) const
 {
        return find_if(begin(), end(),
-                      bind(std::equal_to<FuncRequest>(),
+                      bind(equal_to<FuncRequest>(),
                            bind(&MenuItem::func, _1),
                            func)) != end();
 }
@@ -630,7 +630,7 @@ void expandFloatInsert(Menu & tomenu, Buffer const * buf)
 }
 
 
-void expandFlexInsert(Menu & tomenu, Buffer const * buf, std::string s)
+void expandFlexInsert(Menu & tomenu, Buffer const * buf, string s)
 {
        if (!buf) {
                tomenu.add(MenuItem(MenuItem::Command,
@@ -664,7 +664,7 @@ void expandToc2(Menu & tomenu,
        // check whether depth is smaller than the smallest depth in toc.
        int min_depth = 1000;
        for (Toc::size_type i = from; i < to; ++i)
-               min_depth = std::min(min_depth, toc_list[i].depth());
+               min_depth = min(min_depth, toc_list[i].depth());
        if (min_depth > depth)
                depth = min_depth;
 
index baa185c1a278d7c272421a869d778ef04f8282a2..b1100929d054debaa71d900eff5040e7556041b5 100644 (file)
@@ -114,7 +114,7 @@ bool ModuleList::load()
        LYXERR(Debug::TCLASS, "End of parsing of lyxmodules.lst");
 
        if (!moduleList.empty())
-               std::sort(moduleList.begin(), moduleList.end(), ModuleSorter());
+               sort(moduleList.begin(), moduleList.end(), ModuleSorter());
        return true;
 }
 
index c188ff95563ded0dd0c31beedc675bf3fb390554..8a54b7a8c821638944ebe909c15ca13fe4f0f06d 100644 (file)
@@ -61,7 +61,7 @@ bool SpecialisedMover::do_copy(support::FileName const & from, support::FileName
                return Mover::do_copy(from, to, latex, mode);
 
        if (mode != (unsigned long int)-1) {
-               std::ofstream ofs(to.toFilesystemEncoding().c_str(), ios::binary | ios::out | ios::trunc);
+               ofstream ofs(to.toFilesystemEncoding().c_str(), ios::binary | ios::out | ios::trunc);
                if (!ofs)
                        return false;
                ofs.close();
index 595d8223ca6a6c1ad9c1671c68d43e3d7bcc0d5c..78b58c51a75980b61003c3b9f310b471c8fbc2c9 100644 (file)
@@ -165,7 +165,7 @@ public:
                      pos_type initial) const;
 
        /// match a string against a particular point in the paragraph
-       bool isTextAt(std::string const & str, pos_type pos) const;
+       bool isTextAt(string const & str, pos_type pos) const;
        
        /// Which Paragraph owns us?
        Paragraph * owner_;
@@ -1164,7 +1164,7 @@ void Paragraph::write(Buffer const & buf, ostream & os,
                        // this check is to amend a bug. LyX sometimes
                        // inserts '\0' this could cause problems.
                        if (c != '\0') {
-                               std::vector<char> tmp = ucs4_to_utf8(c);
+                               vector<char> tmp = ucs4_to_utf8(c);
                                tmp.push_back('\0');
                                os << &tmp[0];
                        } else
@@ -1212,7 +1212,7 @@ void Paragraph::appendString(docstring const & s, Font const & font,
        size_t newsize = oldsize + end;
        size_t capacity = d->text_.capacity();
        if (newsize >= capacity)
-               d->text_.reserve(std::max(capacity + 100, newsize));
+               d->text_.reserve(max(capacity + 100, newsize));
 
        // when appending characters, no need to update tables
        d->text_.append(s);
@@ -1304,11 +1304,11 @@ FontSpan Paragraph::fontSpan(pos_type pos) const
        for (; cit != end; ++cit) {
                if (cit->pos() >= pos) {
                        if (pos >= beginOfBody())
-                               return FontSpan(std::max(start, beginOfBody()),
+                               return FontSpan(max(start, beginOfBody()),
                                                cit->pos());
                        else
                                return FontSpan(start,
-                                               std::min(beginOfBody() - 1,
+                                               min(beginOfBody() - 1,
                                                         cit->pos()));
                }
                start = cit->pos() + 1;
@@ -1960,7 +1960,7 @@ bool Paragraph::latex(Buffer const & buf,
                if (!runparams.verbatim && 
                    runparams.encoding->package() == Encoding::none &&
                    font.language()->encoding()->package() == Encoding::none) {
-                       std::pair<bool, int> const enc_switch = switchEncoding(os, bparams,
+                       pair<bool, int> const enc_switch = switchEncoding(os, bparams,
                                        runparams, *(runparams.encoding),
                                        *(font.language()->encoding()));
                        if (enc_switch.first) {
index 0e2ce0ee8102e7593d189729d926ca96479b63ff..4534ba4c5e3a74541a5342acc567ce6c642c3cff 100644 (file)
@@ -169,9 +169,9 @@ void ParagraphParameters::leftIndent(Length const & li)
 }
 
 
-void ParagraphParameters::read(std::string str, bool merge)
+void ParagraphParameters::read(string str, bool merge)
 {
-       std::istringstream is(str);
+       istringstream is(str);
        Lexer lex(0, 0);
        lex.setStream(is);
        read(lex, merge);
index 286be5d4da9cea891424cd0257d0d686ccb9d71b..7957f02c953dfe5b718d4d069c9d7f7d272db961 100644 (file)
@@ -72,7 +72,7 @@ namespace lyx {
 #if !defined (HAVE_MKFIFO)
 // We provide a stub class that disables the lyxserver.
 
-LyXComm::LyXComm(std::string const &, Server *, ClientCallbackfct)
+LyXComm::LyXComm(string const &, Server *, ClientCallbackfct)
 {}
 
 void LyXComm::openConnection()
@@ -107,7 +107,7 @@ void LyXComm::send(string const & msg)
 #else // defined (HAVE_MKFIFO)
 
 
-LyXComm::LyXComm(std::string const & pip, Server * cli, ClientCallbackfct ccb)
+LyXComm::LyXComm(string const & pip, Server * cli, ClientCallbackfct ccb)
        : pipename_(pip), client_(cli), clientcb_(ccb)
 {
        ready_ = false;
@@ -344,7 +344,7 @@ void ServerCallback(Server * server, string const & msg)
        server->callback(msg);
 }
 
-Server::Server(LyXFunc * f, std::string const & pipes)
+Server::Server(LyXFunc * f, string const & pipes)
        : numclients_(0), func_(f), pipes_(pipes, this, &ServerCallback)
 {}
 
index ba56a7d873687e905f48828663a71bbc73c8819b..063f3471c1afeca6595ee811d6d853032d1f768c 100644 (file)
@@ -190,8 +190,8 @@ void ServerSocket::writeln(string const & line)
 //     lyxerr << "ServerSocket debug dump.\n"
 //          << "fd = " << fd_ << ", address = " << address_.absFilename() << ".\n"
 //          << "Clients: " << clients.size() << ".\n";
-//     std::map<int, shared_ptr<LyXDataSocket> >::const_iterator client = clients.begin();
-//     std::map<int, shared_ptr<LyXDataSocket> >::const_iterator end = clients.end();
+//     map<int, shared_ptr<LyXDataSocket> >::const_iterator client = clients.begin();
+//     map<int, shared_ptr<LyXDataSocket> >::const_iterator end = clients.end();
 //     for (; client != end; ++client)
 //             lyxerr << "fd = " << client->first << '\n';
 // }
index e76a2ec6d2241cfe03aa6d50df644076dd47d14a..7fec7336d8a5332b4bc7ad64cfd775a61bcfe128 100644 (file)
@@ -329,7 +329,7 @@ void ToolbarSection::read(istream & is)
                }
        } while (is.good());
        // sort the toolbars by location, line and position
-       std::sort(toolbars.begin(), toolbars.end());
+       sort(toolbars.begin(), toolbars.end());
 }
 
 
index 2f46270407146663061b43d98d6eea93bf114bb3..1d4206ae272f9f2e7872e614aefab0e2999f162a 100644 (file)
@@ -78,7 +78,7 @@ int TexStreamBuffer::sync()
 ////////////////////////////////////////////////////////////////
 
 TexStream::TexStream(TexStreamBase * sbuf, TexRow * texrow)
-               : std::basic_ostream<char_type>(sbuf_ = new TexStreamBuffer(sbuf, texrow))
+               : basic_ostream<char_type>(sbuf_ = new TexStreamBuffer(sbuf, texrow))
 {}
 
 
@@ -104,13 +104,13 @@ int TexStream::line() const
 
 int main(int argc, char *argv[])
 {
-       TexStream out(std::cout.rdbuf());
+       TexStream out(cout.rdbuf());
        char c;
-       while (std::cin) {
-               if (std::cin.get(c))
+       while (cin) {
+               if (cin.get(c))
                        out.put(c);
        }
-       std::cout << "line count: " << out.line() << std::endl;
+       cout << "line count: " << out.line() << endl;
 
        return 0;
 }
index 70464c10dc42db479238da78c2b59b02faca684b..6146307eba5f96f8a5a3e4b540e89571a15c88cc 100644 (file)
@@ -245,7 +245,7 @@ void readParToken(Buffer const & buf, Paragraph & par, Lexer & lex,
                change = Change(Change::UNCHANGED);
        } else if (token == "\\change_inserted") {
                lex.eatLine();
-               std::istringstream is(lex.getString());
+               istringstream is(lex.getString());
                unsigned int aid;
                time_t ct;
                is >> aid >> ct;
@@ -258,7 +258,7 @@ void readParToken(Buffer const & buf, Paragraph & par, Lexer & lex,
                        change = Change(Change::INSERTED, bp.author_map[aid], ct);
        } else if (token == "\\change_deleted") {
                lex.eatLine();
-               std::istringstream is(lex.getString());
+               istringstream is(lex.getString());
                unsigned int aid;
                time_t ct;
                is >> aid >> ct;
@@ -1064,8 +1064,8 @@ bool Text::dissolveInset(Cursor & cur) {
                pasteParagraphList(cur, plist, b.params().getTextClassPtr(),
                                   b.errorList("Paste"));
                // restore position
-               cur.pit() = std::min(cur.lastpit(), spit);
-               cur.pos() = std::min(cur.lastpos(), spos);
+               cur.pit() = min(cur.lastpit(), spit);
+               cur.pos() = min(cur.lastpos(), spos);
        }
        cur.clearSelection();
        cur.resetAnchor();
@@ -1112,7 +1112,7 @@ void Text::getWord(CursorSlice & from, CursorSlice & to,
 }
 
 
-void Text::write(Buffer const & buf, std::ostream & os) const
+void Text::write(Buffer const & buf, ostream & os) const
 {
        ParagraphList::const_iterator pit = paragraphs().begin();
        ParagraphList::const_iterator end = paragraphs().end();
@@ -1245,7 +1245,7 @@ docstring Text::currentState(Cursor & cur)
        if (!par.empty() && cur.pos() < par.size()) {
                // Force output of code point, not character
                size_t const c = par.getChar(cur.pos());
-               os << _(", Char: 0x") << std::hex << c;
+               os << _(", Char: 0x") << hex << c;
        }
        os << _(", Boundary: ") << cur.boundary();
 //     Row & row = cur.textRow();
index 8490e4491743bf98aa9c053a92178b20426cd8b0..c80886e9b7f914df9bb8eb1485784c3963cd5c87 100644 (file)
@@ -298,8 +298,8 @@ static void outline(OutlineOp mode, Cursor & cur)
                        // Not found; do nothing
                        if (toclevel == Layout::NOT_IN_TOC || toclevel > thistoclevel)
                                break;
-                       pit_type const newpit = std::distance(bgn, dest);
-                       pit_type const len = std::distance(start, finish);
+                       pit_type const newpit = distance(bgn, dest);
+                       pit_type const len = distance(start, finish);
                        pit_type const deletepit = pit + len;
                        buf.undo().recordUndo(cur, ATOMIC_UNDO, newpit, deletepit - 1);
                        pars.insert(dest, start, finish);
@@ -331,8 +331,8 @@ static void outline(OutlineOp mode, Cursor & cur)
                                        break;
                        }
                        // One such was found:
-                       pit_type newpit = std::distance(bgn, dest);
-                       pit_type const len = std::distance(start, finish);
+                       pit_type newpit = distance(bgn, dest);
+                       pit_type const len = distance(start, finish);
                        buf.undo().recordUndo(cur, ATOMIC_UNDO, pit, newpit - 1);
                        pars.insert(dest, start, finish);
                        start = boost::next(bgn, pit);
@@ -413,7 +413,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                pit_type const pit = cur.pit();
                recUndo(cur, pit, pit + 1);
                cur.finishUndo();
-               std::swap(pars_[pit], pars_[pit + 1]);
+               swap(pars_[pit], pars_[pit + 1]);
                updateLabels(cur.buffer());
                needsUpdate = true;
                ++cur.pit();
@@ -424,7 +424,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                pit_type const pit = cur.pit();
                recUndo(cur, pit - 1, pit);
                cur.finishUndo();
-               std::swap(pars_[pit], pars_[pit - 1]);
+               swap(pars_[pit], pars_[pit - 1]);
                updateLabels(cur.buffer());
                --cur.pit();
                needsUpdate = true;
@@ -945,7 +945,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                is >> x >> y;
                if (!is)
                        lyxerr << "SETXY: Could not parse coordinates in '"
-                              << to_utf8(cmd.argument()) << std::endl;
+                              << to_utf8(cmd.argument()) << endl;
                else
                        tm.setCursorFromCoordinates(cur, x, y);
                break;
@@ -1155,7 +1155,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                CursorSlice old = bvcur.top();
 
                int const wh = bv->workHeight();
-               int const y = std::max(0, std::min(wh - 1, cmd.y));
+               int const y = max(0, min(wh - 1, cmd.y));
 
                tm.setCursorFromCoordinates(cur, cmd.x, y);
                cur.setTargetX(cmd.x);
index 7f3772ec95d621e26511cdcd53714a2a54e2ce18..4f97b89a110637e26d0a59be43f59f4e53f1bb26 100644 (file)
@@ -42,7 +42,7 @@ namespace lyx {
 
 namespace {
 
-class LayoutNamesEqual : public std::unary_function<LayoutPtr, bool> {
+class LayoutNamesEqual : public unary_function<LayoutPtr, bool> {
 public:
        LayoutNamesEqual(docstring const & name)
                : name_(name)
@@ -68,7 +68,7 @@ bool layout2layout(FileName const & filename, FileName const & tempfile)
                return false;
        }
 
-       std::ostringstream command;
+       ostringstream command;
        command << support::os::python() << ' ' << quoteName(script.toFilesystemEncoding())
                << ' ' << quoteName(filename.toFilesystemEncoding())
                << ' ' << quoteName(tempfile.toFilesystemEncoding());
@@ -466,9 +466,9 @@ bool TextClass::read(FileName const & filename, ReadType rt)
                                if (min_toclevel_ == Layout::NOT_IN_TOC)
                                        min_toclevel_ = toclevel;
                                else
-                                       min_toclevel_ = std::min(min_toclevel_,
+                                       min_toclevel_ = min(min_toclevel_,
                                                         toclevel);
-                               max_toclevel_ = std::max(max_toclevel_,
+                               max_toclevel_ = max(max_toclevel_,
                                                         toclevel);
                        }
                }
index fec02e520f98c1c18bd2a08ae7acaace3c169c0f..ea0bfbc447fa187b70a5652e8ffbc5d362f199e7 100644 (file)
@@ -63,7 +63,7 @@ TextClassList::operator[](textclass_type textclass) const
 
 // used when sorting the textclass list.
 class less_textclass_avail_desc
-       : public std::binary_function<TextClass, TextClass, int>
+       : public binary_function<TextClass, TextClass, int>
 {
 public:
        int operator()(TextClass const & tc1,
@@ -173,8 +173,8 @@ void TextClassList::reset(textclass_type const textclass) {
 }
 
 
-std::pair<bool, textclass_type> const
-TextClassList::addTextClass(std::string const & textclass, std::string const & path)
+pair<bool, textclass_type> const
+TextClassList::addTextClass(string const & textclass, string const & path)
 {
        // only check for textclass.layout file, .cls can be anywhere in $TEXINPUTS
        // NOTE: latex class name is defined in textclass.layout, which can be different from textclass
index a0ac6afdfabbd759dbcbe848bbfdb708cffabbcb..6ec0ab09cb3a799ea6d248bd16c83dc4c175a01e 100644 (file)
@@ -473,7 +473,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
                first = end;
                ++row_index;
 
-               pm.dim().wid = std::max(pm.dim().wid, dim.wid);
+               pm.dim().wid = max(pm.dim().wid, dim.wid);
                pm.dim().des += dim.height();
        } while (first < par.size());
 
@@ -755,7 +755,7 @@ pit_type TextMetrics::rowBreakPoint(int width, pit_type const pit,
                        if (par.isLineSeparator(i - 1))
                                add -= singleWidth(pit, i - 1);
 
-                       add = std::max(add, label_end - x);
+                       add = max(add, label_end - x);
                        thiswidth += add;
                }
 
@@ -1537,7 +1537,7 @@ int TextMetrics::cursorX(CursorSlice const & sl,
 
 int TextMetrics::cursorY(CursorSlice const & sl, bool boundary) const
 {
-       //lyxerr << "TextMetrics::cursorY: boundary: " << boundary << std::endl;
+       //lyxerr << "TextMetrics::cursorY: boundary: " << boundary << endl;
        ParagraphMetrics const & pm = par_metrics_[sl.pit()];
        if (pm.rows().empty())
                return 0;
@@ -1932,7 +1932,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co
                // 12 lines lower):
                if (lyxerr.debugging(Debug::PAINTING) && inside
                        && (row_selection || pi.full_repaint || row_has_changed)) {
-                               std::string const foreword = text_->isMainText(bv_->buffer()) ?
+                               string const foreword = text_->isMainText(bv_->buffer()) ?
                                        "main text redraw " : "inset text redraw: ";
                        LYXERR(Debug::PAINTING, foreword << "pit=" << pit << " row=" << i
                                << " row_selection="    << row_selection
index daa95283d307312b13d1de5cfb8b55ded5353fae..8646bc504869b86d6148f5111883ad58eff3a294 100644 (file)
@@ -83,7 +83,7 @@ FuncRequest TocItem::action() const
 //
 ///////////////////////////////////////////////////////////////////////////
 
-Toc const & TocBackend::toc(std::string const & type) const
+Toc const & TocBackend::toc(string const & type) const
 {
        // Is the type already supported?
        TocList::const_iterator it = tocs_.find(type);
@@ -189,7 +189,7 @@ void TocBackend::update()
 }
 
 
-TocIterator const TocBackend::item(std::string const & type,
+TocIterator const TocBackend::item(string const & type,
                ParConstIterator const & par_it) const
 {
        TocList::const_iterator toclist_it = tocs_.find(type);
index 8954f1d4c705f79cdc9b6d84b6d0d185cd0cba93..4ba78080e7f850dcbe2cb5a7a0c889114cfdef88 100644 (file)
@@ -114,7 +114,7 @@ static docstring const doAccent(docstring const & s, tex_accent accent)
        if (s.length() > 1) {
                if (accent != TEX_TIE || s.length() > 2)
                        lyxerr << "Warning: Too many characters given for accent "
-                              << lyx_accent_table[accent].name << '.' << std::endl;
+                              << lyx_accent_table[accent].name << '.' << endl;
                os << s.substr(1);
        }
        return normalize_c(os.str());
index 401051e3f58e5ac22d4d94293cfc5e81fd01aabb..11224908ccc8b51deea6b12a78714dae8e72699b 100644 (file)
@@ -146,7 +146,7 @@ bool Undo::hasRedoStack() const
 
 namespace {
 
-std::ostream & operator<<(std::ostream & os, UndoElement const & undo)
+ostream & operator<<(ostream & os, UndoElement const & undo)
 {
        return os << " from: " << undo.from << " end: " << undo.end
                << " cell:\n" << undo.cell
@@ -172,7 +172,7 @@ void Undo::Private::doRecordUndo(UndoKind kind,
        bool isUndoOperation)
 {
        if (first_pit > last_pit)
-               std::swap(first_pit, last_pit);
+               swap(first_pit, last_pit);
        // create the position information of the Undo entry
        UndoElement undo;
        undo.array = 0;
@@ -223,7 +223,7 @@ void Undo::Private::doRecordUndo(UndoKind kind,
 
        // push the undo entry to undo stack
        stack.push(undo);
-       //lyxerr << "undo record: " << stack.top() << std::endl;
+       //lyxerr << "undo record: " << stack.top() << endl;
 
        // next time we'll try again to combine entries if possible
        undo_finished = false;
@@ -243,7 +243,7 @@ void Undo::Private::recordUndo(UndoKind kind, DocIterator & cur,
        redostack.clear();
        //lyxerr << "undostack:\n";
        //for (size_t i = 0, n = buf.undostack().size(); i != n && i < 6; ++i)
-       //      lyxerr << "  " << i << ": " << buf.undostack()[i] << std::endl;
+       //      lyxerr << "  " << i << ": " << buf.undostack()[i] << endl;
 }
 
 
@@ -281,7 +281,7 @@ bool Undo::Private::textUndoOrRedo(DocIterator & cur, bool isUndoOperation)
                // This is a full document
                otherstack.top().bparams = buffer_.params();
                buffer_.params() = undo.bparams;
-               std::swap(buffer_.paragraphs(), *undo.pars);
+               swap(buffer_.paragraphs(), *undo.pars);
                delete undo.pars;
                undo.pars = 0;
        } else if (dit.inMathed()) {
index 768f4117f05b3bb8515be12be39f5c0ff942385d..8b2f8a15b54810c9a2ee9faace04017fb8515044 100644 (file)
@@ -27,7 +27,7 @@ using lyx::LyX;
 namespace boost {
 
 #ifndef BOOST_NO_EXCEPTIONS
-void throw_exception(std::exception const & e)
+void throw_exception(exception const & e)
 {
        lyxerr << "Exception caught:\n" << e.what() << endl;
        BOOST_ASSERT(false);
index 3f031df6be218591a54ca2497ad039525d9e13e4..b9f310cbdecbfddf4d776c5761c97abb0294dc17 100644 (file)
@@ -223,7 +223,7 @@ depth_type getItemDepth(ParIterator const & it)
                        if (prev_depth == min_depth)
                                return prev_par.itemdepth;
                }
-               min_depth = std::min(min_depth, prev_depth);
+               min_depth = min(min_depth, prev_depth);
                // small optimization: if we are at depth 0, we won't
                // find anything else
                if (prev_depth == 0)
index 6a51e171fcdbafb1ff6b4d9629a6ffa9b977f949..e6758fb5851e28d713e3b3d4db9be98e360eecdf 100644 (file)
@@ -34,15 +34,15 @@ namespace lyx {
 // libstdc++ that is distributed with GNU G++.
 class Messages::Pimpl {
 public:
-       typedef std::messages<char>::catalog catalog;
+       typedef messages<char>::catalog catalog;
 
        Pimpl(string const & l)
                : lang_(l),
                  loc_gl(lang_.c_str()),
-                 mssg_gl(std::use_facet<std::messages<char> >(loc_gl))
+                 mssg_gl(use_facet<messages<char> >(loc_gl))
        {
                //lyxerr << "Messages: language(" << l
-               //       << ") in dir(" << dir << ")" << std::endl;
+               //       << ") in dir(" << dir << ")" << endl;
 
                string const locale_dir = package().locale_dir().toFilesystemEncoding();
                cat_gl = mssg_gl.open(PACKAGE, loc_gl, locale_dir.c_str());
@@ -62,9 +62,9 @@ private:
        ///
        string lang_;
        ///
-       std::locale loc_gl;
+       locale loc_gl;
        ///
-       std::messages<char> const & mssg_gl;
+       messages<char> const & mssg_gl;
        ///
        catalog cat_gl;
 };
@@ -87,7 +87,7 @@ public:
                : lang_(l)
        {
                //lyxerr << "Messages: language(" << l
-               //       << ") in dir(" << dir << ")" << std::endl;
+               //       << ") in dir(" << dir << ")" << endl;
 
        }
 
index 0d28e322f2adf4382cac516e98bf7aec227b5ba2..d5b33af3c8f87d8753e5599478614e71b6cdb95e 100644 (file)
 #include <exception>
 #include <ostream>
 
-using std::endl;
+using endl;
 
 namespace boost {
 
-void throw_exception(std::exception const & e)
+void throw_exception(exception const & e)
 {
        lyx::lyxerr << "Exception caught:\n" << e.what() << endl;
        BOOST_ASSERT(false);
index 3c17593935d9485455bf966b84b45a5fa23f834b..441e48c4fe990be18bd736233e9b9e1f0b9798e2 100644 (file)
@@ -341,8 +341,8 @@ void LyXDataSocket::writeln(string const & line)
 class CmdLineParser {
 public:
        typedef int (*optfunc)(vector<docstring> const & args);
-       std::map<string, optfunc> helper;
-       std::map<string, bool> isset;
+       map<string, optfunc> helper;
+       map<string, bool> isset;
        bool parse(int, char * []);
        vector<char *> nonopt;
 };
index d113e8d4058824752dda35a7a949daabccf6ea3c..cf6f5f3ad958dc83845c89fdd81d3ee2f2420f22 100644 (file)
@@ -122,7 +122,7 @@ bool LyXErr::debugging(Debug::Type t) const
 
 void LyXErr::endl()
 {
-       stream() << std::endl;
+       stream() << endl;
 }
 
 
@@ -142,15 +142,15 @@ LyXErr & operator<<(LyXErr & l, unsigned long t)
 { l.stream() << t; return l; }
 LyXErr & operator<<(LyXErr & l, double t)
 { l.stream() << t; return l; }
-LyXErr & operator<<(LyXErr & l, std::string const & t)
+LyXErr & operator<<(LyXErr & l, string const & t)
 { l.stream() << t; return l; }
 LyXErr & operator<<(LyXErr & l, docstring const & t)
 { l.stream() << to_utf8(t); return l; }
 LyXErr & operator<<(LyXErr & l, support::FileName const & t)
 { l.stream() << t; return l; }
-LyXErr & operator<<(LyXErr & l, std::ostream &(*t)(std::ostream &))
+LyXErr & operator<<(LyXErr & l, ostream &(*t)(ostream &))
 { l.stream() << t; return l; }
-LyXErr & operator<<(LyXErr & l, std::ios_base &(*t)(std::ios_base &))
+LyXErr & operator<<(LyXErr & l, ios_base &(*t)(ios_base &))
 { l.stream() << t; return l; }
 
 LyXErr lyxerr;
index 63654d7b9e77ff3671648f7c5ebd27936839a4b7..7eeaa238043bc26300331896390785d24662b5aa 100644 (file)
@@ -185,7 +185,7 @@ Inset * createInset(Buffer & buf, FuncRequest const & cmd)
                case LFUN_TABULAR_INSERT: {
                        if (cmd.argument().empty())
                                return 0;
-                       std::istringstream ss(to_utf8(cmd.argument()));
+                       istringstream ss(to_utf8(cmd.argument()));
                        int r = 0, c = 0;
                        ss >> r >> c;
                        if (r <= 0)
@@ -323,7 +323,7 @@ Inset * createInset(Buffer & buf, FuncRequest const & cmd)
                        
                        default:
                                lyxerr << "Inset '" << name << "' not permitted with LFUN_INSET_INSERT."
-                                               << std::endl;
+                                               << endl;
                                return 0;
                        
                        }
@@ -450,7 +450,7 @@ Inset * readInset(Lexer & lex, Buffer const & buf)
                        case NO_CODE:
                        default:
                                lyxerr << "unknown CommandInset '" << insetType
-                                                       << "'" << std::endl;
+                                                       << "'" << endl;
                                while (lex.isOK() && lex.getString() != "\\end_inset")
                                        lex.next();
                                return 0;
@@ -527,7 +527,7 @@ Inset * readInset(Lexer & lex, Buffer const & buf)
                        inset.reset(new InsetInfo(buf.params()));
                } else {
                        lyxerr << "unknown Inset type '" << tmptok
-                              << "'" << std::endl;
+                              << "'" << endl;
                        while (lex.isOK() && lex.getString() != "\\end_inset")
                                lex.next();
                        return 0;
index 20869f110d6c73f869d2d94dfd8d4d31f8667e60..876fa9d57c6612b9e5e01e0c0a9573060565b178 100644 (file)
@@ -16,6 +16,7 @@
 #include <QPixmap>
 #include <QPainter>
 
+using namespace std;
 
 namespace lyx {
 
@@ -51,7 +52,7 @@ BulletsModule::BulletsModule(QWidget * , char const * , Qt::WFlags)
 
 
 void BulletsModule::setupPanel(QListWidget * lw, QString const & panelname,
-       std::string const & fname)
+       string const & fname)
 {
        connect(lw, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
                this, SLOT(bulletSelected(QListWidgetItem *, QListWidgetItem*)));
index f29e0aad46dadd91fd8da2dcc3e5664102a87bdb..9caab3617eb8798cc87f8f1a2ca723ad7d031a6e 100644 (file)
@@ -15,6 +15,8 @@
 
 #include <iostream>
 
+using namespace std;
+
 namespace lyx {
 namespace frontend {
 
@@ -203,7 +205,7 @@ void ButtonPolicy::nextState(SMInput input)
                       << printInput(input)
                       << " from state "
                       << printState(state_)
-                      << std::endl;
+                      << endl;
        }
 }
 
@@ -566,13 +568,13 @@ void ButtonPolicy::initNoRepeatedApply()
 }
 
 
-std::ostream & operator<<(std::ostream & os, ButtonPolicy::State st)
+ostream & operator<<(ostream & os, ButtonPolicy::State st)
 {
        return os << int(st);
 }
 
 
-std::ostream & operator<<(std::ostream & os, ButtonPolicy::SMInput smi)
+ostream & operator<<(ostream & os, ButtonPolicy::SMInput smi)
 {
        return os << int(smi);
 }
index 7a0bd41fcfeed59acf6f11490b2673c183ad4e7c..205f6ddbfa00ffc491e76052af05c245d1f07ff1 100644 (file)
@@ -34,7 +34,7 @@ namespace lyx {
 namespace frontend {
 
 
-Dialog::Dialog(GuiView & lv, std::string const & name)
+Dialog::Dialog(GuiView & lv, string const & name)
        : name_(name), lyxview_(&lv)
 {}
 
@@ -43,7 +43,7 @@ Dialog::~Dialog()
 {}
 
 
-std::string const & Dialog::name() const
+string const & Dialog::name() const
 {
        return name_;
 }
@@ -89,7 +89,7 @@ bool Dialog::isBufferReadonly() const
 }
 
 
-std::string const Dialog::bufferFilepath() const
+string const Dialog::bufferFilepath() const
 {
        return buffer().filePath();
 }
index a9269da421e6b74304d2ad05ea9b35e8dd98075a..94afd20e0684d7c66c18e28cbea9035711c20f97 100644 (file)
 #include <QCloseEvent>
 #include <QShowEvent>
 
+using namespace std;
 
 namespace lyx {
 namespace frontend {
 
-DialogView::DialogView(GuiView & lv, std::string const & name)
+DialogView::DialogView(GuiView & lv, string const & name)
        : QDialog(&lv), Dialog(lv, name)
 {}
 
index a9cb6d82aea929b2a3dad5e7ec2bc52db85195f7..13a08a8db811f6be3304d164fd3b0c37c4827c2f 100644 (file)
@@ -52,7 +52,7 @@ static docstring const formatted(docstring const & text)
        while (true) {
                size_t const nxtpos1 = text.find(' ',  curpos);
                size_t const nxtpos2 = text.find('\n', curpos);
-               size_t const nxtpos = std::min(nxtpos1, nxtpos2);
+               size_t const nxtpos = min(nxtpos1, nxtpos2);
 
                docstring const word =
                        nxtpos == docstring::npos ?
index a84e5ae3168e42981a67fbf04942de6348070a05..10aeaa62a1e0a07a50949bd9fceb44e3bd6842c5 100644 (file)
@@ -444,7 +444,7 @@ bool GuiApplication::notify(QObject * receiver, QEvent * event)
                        return false;
                }
        }
-       catch (std::exception const & e) {
+       catch (exception const & e) {
                docstring s = _("LyX has caught an exception, it will now "
                        "attempt to save all unsaved documents and exit."
                        "\n\nException: ");
index 6f0602f480dff78ba7e6094a19def8e1e3b3290f..a65b85dc10f276dded0ee14110c097cabd6a108e 100644 (file)
@@ -401,7 +401,7 @@ void GuiBibtex::getBibStyles(vector<string> & data) const
                *it = onlyFilename(*it);
        }
        // sort on filename only (no path)
-       std::sort(data.begin(), data.end());
+       sort(data.begin(), data.end());
 }
 
 
@@ -421,7 +421,7 @@ void GuiBibtex::getBibFiles(vector<string> & data) const
                *it = onlyFilename(*it);
        }
        // sort on filename only (no path)
-       std::sort(data.begin(), data.end());
+       sort(data.begin(), data.end());
 }
 
 
index f547a38b0d82060271f45b61f5d8294bee55b0b9..aafec8693d99e1b7a2080dc1c196221f944f48a4 100644 (file)
@@ -379,9 +379,9 @@ void GuiCharacter::closeEvent(QCloseEvent * e)
 
 
 template<class A, class B>
-static int findPos2nd(vector<std::pair<A, B> > const & vec, B const & val)
+static int findPos2nd(vector<pair<A, B> > const & vec, B const & val)
 {
-       typedef typename vector<std::pair<A, B> >::const_iterator
+       typedef typename vector<pair<A, B> >::const_iterator
                const_iterator;
 
        for (const_iterator cit = vec.begin(); cit != vec.end(); ++cit)
index 51f1afcbea1c205b78d62555a784383bb9c20e43..f0fbc7ccf4f64a46e0c2466cd3703294967564b3 100644 (file)
@@ -125,7 +125,7 @@ void GuiCitation::closeEvent(QCloseEvent * e)
 
 void GuiCitation::applyView()
 {
-       int  const choice = std::max(0, citationStyleCO->currentIndex());
+       int  const choice = max(0, citationStyleCO->currentIndex());
        style_ = choice;
        bool const full  = fulllistCB->isChecked();
        bool const force = forceuppercaseCB->isChecked();
index b2ae0a1f4c714cf6190fda6eb11fffafe4ae7c88..2e38950f7085615bdec169224b7abe7df1dcd752 100644 (file)
@@ -167,7 +167,7 @@ void GuiCommandBuffer::complete()
        list->resize(list->sizeHint());
        QPoint const pos = edit_->mapToGlobal(QPoint(0, 0));
 
-       int const y = std::max(0, pos.y() - list->height());
+       int const y = max(0, pos.y() - list->height());
 
        list->move(pos.x(), y);
 
index 0daa2fdad6d3ee15a43c7fbc2f5f72e5c14d06e6..635319ca9ceac96c766a9366f1266e7676892b29 100644 (file)
@@ -82,7 +82,7 @@ GuiDelimiter::GuiDelimiter(GuiView & lv)
        leftLW->setViewMode(QListView::IconMode);
        rightLW->setViewMode(QListView::IconMode);
 
-       typedef std::map<char_type, QListWidgetItem *> ListItems;
+       typedef map<char_type, QListWidgetItem *> ListItems;
        ListItems list_items;
        // The last element is the empty one.
        int const end = nr_latex_delimiters - 1;
index 31d6806064e9db248fab3ab883e8c29e86848963..a26690bdda3d1646a18862f1e948d4a5909e5cd0 100644 (file)
@@ -26,7 +26,7 @@ using namespace std;
 namespace lyx {
 namespace frontend {
 
-GuiDialog::GuiDialog(GuiView & lv, std::string const & name)
+GuiDialog::GuiDialog(GuiView & lv, string const & name)
        : DialogView(lv, name), is_closing_(false)
 {}
 
index 80e5f50aa2e37bf4c30acaaba27063160c292db7..8a36a89ed96663533d9a78ec46076861bba0b6c5 100644 (file)
@@ -59,11 +59,11 @@ using namespace std;
 
 ///
 template<class Pair>
-std::vector<typename Pair::second_type> const
-getSecond(std::vector<Pair> const & pr)
+vector<typename Pair::second_type> const
+getSecond(vector<Pair> const & pr)
 {
-        std::vector<typename Pair::second_type> tmp(pr.size());
-        std::transform(pr.begin(), pr.end(), tmp.begin(),
+        vector<typename Pair::second_type> tmp(pr.size());
+        transform(pr.begin(), pr.end(), tmp.begin(),
                                         boost::bind(&Pair::second, _1));
         return tmp;
 }
@@ -1294,10 +1294,10 @@ void GuiDocument::apply(BufferParams & params)
     If not found, return 0.
  */
 template<class A>
-static size_t findPos(std::vector<A> const & vec, A const & val)
+static size_t findPos(vector<A> const & vec, A const & val)
 {
-       typename std::vector<A>::const_iterator it =
-               std::find(vec.begin(), vec.end(), val);
+       typename vector<A>::const_iterator it =
+               find(vec.begin(), vec.end(), val);
        if (it == vec.end())
                return 0;
        return distance(vec.begin(), it);
index 9910b47c9f5fcd21abc6a9efca843afc4de0d102..c44795068cf85492a013cd685a54a6b8a2783bec 100644 (file)
@@ -20,6 +20,7 @@
 #include <QPushButton>
 #include <QCloseEvent>
 
+using namespace std;
 
 namespace lyx {
 namespace frontend {
@@ -72,7 +73,7 @@ void GuiERT::updateContents()
 }
 
 
-bool GuiERT::initialiseParams(std::string const & data)
+bool GuiERT::initialiseParams(string const & data)
 {
        InsetERTMailer::string2params(data, status_);
        return true;
index 8af229eb93d046208b013a52a3ec9f933e1a30aa..3aea59daac0e3f87a41387946bc8358844bfef19 100644 (file)
@@ -119,9 +119,9 @@ void GuiErrorList::goTo(int item)
        // Now make the selection.
        // This should be implemented using an LFUN. (Angus)
        // if pos_end is 0, this means it is end-of-paragraph
-       pos_type const end = err.pos_end ? std::min(err.pos_end, pit->size())
+       pos_type const end = err.pos_end ? min(err.pos_end, pit->size())
                                         : pit->size();
-       pos_type const start = std::min(err.pos_start, end);
+       pos_type const start = min(err.pos_start, end);
        pos_type const range = end - start;
        DocIterator const dit = makeDocIterator(pit, start);
        bufferview()->putSelectionAt(dit, range, false);
index 8113f7d137dee2fd22b9cdabb5ae21ec643e1e82..0c0f178ba1ad27b839522a8650cb57d5efbe3d83 100644 (file)
@@ -199,9 +199,9 @@ GuiExternal::GuiExternal(GuiView & lv)
        bc().addCheckedLineEdit(ytED, rtLA);
        bc().addCheckedLineEdit(fileED, fileLA);
 
-       std::vector<string> templates = getTemplates();
+       vector<string> templates = getTemplates();
 
-       for (std::vector<string>::const_iterator cit = templates.begin();
+       for (vector<string>::const_iterator cit = templates.begin();
                cit != templates.end(); ++cit) {
                externalCO->addItem(qt_(*cit));
        }
@@ -286,7 +286,7 @@ void GuiExternal::editClicked()
 
 void GuiExternal::extraChanged(const QString& text)
 {
-       std::string const format = fromqstr(extraFormatCO->currentText());
+       string const format = fromqstr(extraFormatCO->currentText());
        extra_[format] = text;
        changed();
 }
@@ -439,7 +439,7 @@ static void setSize(QLineEdit & widthED, QComboBox & widthUnitCO,
        external::ResizeData const & data)
 {
        bool using_scale = data.usingScale();
-       std::string scale = data.scale;
+       string scale = data.scale;
        if (data.no_resize()) {
                // Everything is zero, so default to this!
                using_scale = true;
index aaa2d59f0dc36a6ea393d5e624b68cdc56115467..5c8f162066e4286af11032aa3f9061df9e48f538 100644 (file)
@@ -27,6 +27,7 @@
 #include <QFontInfo>
 #include <QFontDatabase>
 
+using namespace std;
 
 QString const math_fonts[] = {"cmex10", "cmmi10", "cmr10", "cmsy10",
        "eufm10", "msam10", "msbm10", "wasy10", "esint10"};
@@ -333,8 +334,8 @@ GuiFontInfo::GuiFontInfo(FontInfo const & f)
 
 bool GuiFontLoader::available(FontInfo const & f)
 {
-       static std::vector<int> cache_set(NUM_FAMILIES, false);
-       static std::vector<int> cache(NUM_FAMILIES, false);
+       static vector<int> cache_set(NUM_FAMILIES, false);
+       static vector<int> cache(NUM_FAMILIES, false);
 
        FontFamily family = f.family();
        if (cache_set[family])
index 31d00f63476efe9cfe27032ed859df3e6d820edf..b23ec17fb92368c136d586a17910209dc3b920a9 100644 (file)
@@ -107,10 +107,10 @@ getSecond(vector<Pair> const & pr)
         return tmp;
 }
 
-/// The (tranlated) GUI std::string and it's LaTeX equivalent.
-typedef std::pair<docstring, std::string> RotationOriginPair;
+/// The (tranlated) GUI string and it's LaTeX equivalent.
+typedef pair<docstring, string> RotationOriginPair;
 ///
-std::vector<RotationOriginPair> getRotationOriginData();
+vector<RotationOriginPair> getRotationOriginData();
 
 
 GuiGraphics::GuiGraphics(GuiView & lv)
@@ -672,7 +672,7 @@ void GuiGraphics::applyView()
        igp.rotateAngle = fromqstr(angle->text());
 
        double rotAngle = convert<double>(igp.rotateAngle);
-       if (std::abs(rotAngle) > 360.0) {
+       if (abs(rotAngle) > 360.0) {
                rotAngle -= 360.0 * floor(rotAngle / 360.0);
                igp.rotateAngle = convert<string>(rotAngle);
        }
index 4839cca22e0b0266ee6b7fd39956e20d71e8efb8..2c22d651070fc166e2f9a5758190441a11618d7c 100644 (file)
@@ -26,8 +26,8 @@
 #include <QImage>
 #include <QImageReader>
 
-using lyx::support::ascii_lowercase;
-
+using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 namespace graphics {
@@ -70,7 +70,7 @@ Image::FormatList GuiImage::loadableFormats()
 
                LYXERR(Debug::GRAPHICS, (const char *) *it << ", ");
 
-               std::string ext = ascii_lowercase((const char *) *it);
+               string ext = ascii_lowercase((const char *) *it);
 
                // special case
                if (ext == "jpeg")
index 860055e1b51583bf54c3a8ad13d2c3359e191506..e19041464d9e0173940336a3483b9221449f4ab3 100644 (file)
@@ -32,7 +32,7 @@ namespace frontend {
 /////////////////////////////////////////////////////////////////
 
 GuiIndexDialogBase::GuiIndexDialogBase(GuiView & lv,
-               docstring const & title, QString const & label, std::string const & name)
+               docstring const & title, QString const & label, string const & name)
        : GuiCommand(lv, name)
 {
        label_ = label;
index b8702114d06de3c4317ca1a41a94ed98c0db66f4..8f908e15eacbc15dde79c40efdfd42eb611d6c75 100644 (file)
@@ -433,7 +433,7 @@ void GuiListings::applyView()
 }
 
 
-static string plainParam(std::string const & par)
+static string plainParam(string const & par)
 {
        // remove enclosing braces
        if (prefixIs(par, "{") && suffixIs(par, "}"))
index 8107bb8a6429d82b04f524dfe6101e9c9890842d..713544a02c5e25f81d2dafbcf6120018db354dd5 100644 (file)
@@ -131,7 +131,7 @@ void GuiLog::updateContents()
 {
        setViewTitle(title());
 
-       std::ostringstream ss;
+       ostringstream ss;
        getContents(ss);
 
        logTB->setPlainText(toqstr(ss.str()));
@@ -193,9 +193,9 @@ docstring GuiLog::title() const
 }
 
 
-void GuiLog::getContents(std::ostream & ss) const
+void GuiLog::getContents(ostream & ss) const
 {
-       std::ifstream in(logfile_.toFilesystemEncoding().c_str());
+       ifstream in(logfile_.toFilesystemEncoding().c_str());
 
        bool success = false;
 
index 7ef65f971fc85834e4f96cdd23469d2ba80f148b..c40e91f03b5b4bc1d29e1e77d2498fb718717d57 100644 (file)
@@ -19,7 +19,7 @@ using namespace std;
 namespace lyx {
 namespace frontend {
 
-GuiMath::GuiMath(GuiView & lv, std::string const & name)
+GuiMath::GuiMath(GuiView & lv, string const & name)
        : GuiDialog(lv, name)
 {
        // FIXME: Ideally, those unicode codepoints would be defined
@@ -54,8 +54,8 @@ GuiMath::GuiMath(GuiView & lv, std::string const & name)
        math_symbols_["vert"] = MathSymbol(0x007C, 106, CMSY_FAMILY);
        math_symbols_["Vert"] = MathSymbol(0x2016, 107, CMSY_FAMILY);
 
-       std::map<string, MathSymbol>::const_iterator it = math_symbols_.begin();
-       std::map<string, MathSymbol>::const_iterator end = math_symbols_.end();
+       map<string, MathSymbol>::const_iterator it = math_symbols_.begin();
+       map<string, MathSymbol>::const_iterator end = math_symbols_.end();
        for (; it != end; ++it)
                tex_names_[it->second.unicode] = it->first;
 }
@@ -136,7 +136,7 @@ MathSymbol const & GuiMath::mathSymbol(string tex_name) const
 }
 
 
-std::string const & GuiMath::texName(char_type math_symbol) const
+string const & GuiMath::texName(char_type math_symbol) const
 {
        map<char_type, string>::const_iterator it =
                tex_names_.find(math_symbol);
index a1478d609042cd4a331399487a2b13b5628987b2..25ee10d93a1c253ac9b18f66046d0a7cc56ee0e4 100644 (file)
@@ -370,7 +370,7 @@ int GuiPainter::text(int x, int y, docstring const & s,
                // We need to draw the text as LTR as we use our own bidi code.
                setLayoutDirection(Qt::LeftToRight);
                drawText(x, y, str);
-               //LYXERR(Debug::PAINTING, "draw " << std::string(str.toUtf8())
+               //LYXERR(Debug::PAINTING, "draw " << string(str.toUtf8())
                //      << " at " << x << "," << y);
                return textwidth;
        }
@@ -383,7 +383,7 @@ int GuiPainter::text(int x, int y, docstring const & s,
        // Only the left bearing of the first character is important
        // as we always write from left to right, even for
        // right-to-left languages.
-       int const lb = std::min(fi.metrics.lbearing(s[0]), 0);
+       int const lb = min(fi.metrics.lbearing(s[0]), 0);
        int const mA = fi.metrics.maxAscent();
        if (!QPixmapCache::find(key, pm)) {
                // Only the right bearing of the last character is
index 792506fd380c6dee70baf7ce504f77db3eed61f3..d715513ae7bd2dc3be145cb5ab40a1881e947b04 100644 (file)
@@ -80,21 +80,21 @@ namespace frontend {
 /////////////////////////////////////////////////////////////////////
 
 template<class A>
-static size_t findPos_helper(std::vector<A> const & vec, A const & val)
+static size_t findPos_helper(vector<A> const & vec, A const & val)
 {
-       typedef typename std::vector<A>::const_iterator Cit;
+       typedef typename vector<A>::const_iterator Cit;
 
-       Cit it = std::find(vec.begin(), vec.end(), val);
+       Cit it = find(vec.begin(), vec.end(), val);
        if (it == vec.end())
                return 0;
-       return std::distance(vec.begin(), it);
+       return distance(vec.begin(), it);
 }
 
 
 static void parseFontName(QString const & mangled0,
        string & name, string & foundry)
 {
-       std::string mangled = fromqstr(mangled0);
+       string mangled = fromqstr(mangled0);
        size_t const idx = mangled.find('[');
        if (idx == string::npos || idx == 0) {
                name = mangled;
@@ -579,7 +579,7 @@ PrefColors::PrefColors(GuiPreferences * form, QWidget * parent)
 
                lcolors_.push_back(lc);
        }
-       std::sort(lcolors_.begin(), lcolors_.end(), ColorSorter());
+       sort(lcolors_.begin(), lcolors_.end(), ColorSorter());
        vector<ColorCode>::const_iterator cit = lcolors_.begin();
        vector<ColorCode>::const_iterator const end = lcolors_.end();
        for (; cit != end; ++cit) {
@@ -1030,7 +1030,7 @@ void PrefConverters::updateGui()
        Converters::const_iterator ccit = form_->converters().begin();
        Converters::const_iterator cend = form_->converters().end();
        for (; ccit != cend; ++ccit) {
-               std::string const name =
+               string const name =
                        ccit->From->prettyname() + " -> " + ccit->To->prettyname();
                int type = form_->converters().getNumber(ccit->From->name(), ccit->To->name());
                new QListWidgetItem(toqstr(name), convertersLW, type);
@@ -1204,7 +1204,7 @@ FormatNameValidator::FormatNameValidator(QWidget * parent, Formats const & f)
 {
 }
 
-std::string FormatNameValidator::str(Formats::const_iterator it) const
+string FormatNameValidator::str(Formats::const_iterator it) const
 {
        return it->name();
 }
@@ -1216,7 +1216,7 @@ FormatPrettynameValidator::FormatPrettynameValidator(QWidget * parent, Formats c
 }
 
 
-std::string FormatPrettynameValidator::str(Formats::const_iterator it) const
+string FormatPrettynameValidator::str(Formats::const_iterator it) const
 {
        return it->prettyname();
 }
@@ -1450,9 +1450,9 @@ PrefLanguage::PrefLanguage(QWidget * parent)
        defaultLanguageCO->clear();
 
        // store the lang identifiers for later
-       std::vector<LanguagePair> const langs = getLanguageData(false);
-       std::vector<LanguagePair>::const_iterator lit  = langs.begin();
-       std::vector<LanguagePair>::const_iterator lend = langs.end();
+       vector<LanguagePair> const langs = getLanguageData(false);
+       vector<LanguagePair>::const_iterator lit  = langs.begin();
+       vector<LanguagePair>::const_iterator lend = langs.end();
        lang_.clear();
        for (; lit != lend; ++lit) {
                defaultLanguageCO->addItem(toqstr(lit->first));
@@ -2227,7 +2227,7 @@ void GuiPreferences::updateContents()
 }
 
 
-bool GuiPreferences::initialiseParams(std::string const &)
+bool GuiPreferences::initialiseParams(string const &)
 {
        rc_ = lyxrc;
        formats_ = lyx::formats;
index 1e32a5e0ab05c1adb838d26e95482c7cb1955bd9..7227064ab35a900219df051f3325545d606f0172 100644 (file)
@@ -180,7 +180,7 @@ void GuiPrint::applyView()
 }
 
 
-bool GuiPrint::initialiseParams(std::string const &)
+bool GuiPrint::initialiseParams(string const &)
 {
        /// get global printer parameters
        string const name = support::changeExtension(buffer().absFileName(),
index a976d04eb756c801ab9c3bc623587afb92985924..c696dc16e5a0a7cde39eb9d60f9b9d5e67df6ebc 100644 (file)
@@ -298,7 +298,7 @@ void GuiRef::redoRefs()
        // the first item inserted
        QString const oldSelection(referenceED->text());
 
-       for (std::vector<docstring>::const_iterator iter = refs_.begin();
+       for (vector<docstring>::const_iterator iter = refs_.begin();
                iter != refs_.end(); ++iter) {
                refsLW->addItem(toqstr(*iter));
        }
index afb9dc8a27f87dbc984b7ab6e53a680c9a09a367..42b5e50219056b6ce740ee0c3526fc3001e066ca 100644 (file)
@@ -124,7 +124,7 @@ bool GuiSendTo::isValid()
 }
 
 
-bool GuiSendTo::initialiseParams(std::string const &)
+bool GuiSendTo::initialiseParams(string const &)
 {
        format_ = 0;
        command_ = lyxrc.custom_export_command;
@@ -181,8 +181,8 @@ vector<Format const *> GuiSendTo::allFormats() const
        }
 
        // Remove repeated formats.
-       std::sort(to.begin(), to.end());
-       to.erase(std::unique(to.begin(), to.end()), to.end());
+       sort(to.begin(), to.end());
+       to.erase(unique(to.begin(), to.end()), to.end());
 
        return to;
 }
index 76f273345dfdf09ce4d1445da7d37f8c3eed8e66..c7c4c373191b9c5760ee2aaaad0432a6ddbf21bf 100644 (file)
@@ -20,6 +20,7 @@
 #include <QPushButton>
 #include <QCloseEvent>
 
+using namespace std;
 
 namespace lyx {
 namespace frontend {
@@ -59,7 +60,7 @@ void GuiShowFile::updateContents()
 }
 
 
-bool GuiShowFile::initialiseParams(std::string const & data)
+bool GuiShowFile::initialiseParams(string const & data)
 {
        filename_ = FileName(data);
        return true;
index 6233a3b31be5e3357bb0748d2a970fd2303394b2..1d932ec1b068840cfaa45ec9b4b5b900deaf14d4 100644 (file)
@@ -231,7 +231,7 @@ static SpellBase * getSpeller(BufferParams const & bp)
 }
 
 
-bool GuiSpellchecker::initialiseParams(std::string const &)
+bool GuiSpellchecker::initialiseParams(string const &)
 {
        LYXERR(Debug::GUI, "Spellchecker::initialiseParams");
 
index 083b6dc19b058bb36438f7df0174d56115f68c63..b9e37777ef129ea589b6e824b3916016f69e84f1 100644 (file)
@@ -179,7 +179,7 @@ void GuiTexInfo::updateStyles(TexFileType type)
                *it1 = support::onlyFilename(*it1);
 
        // sort on filename only (no path)
-       std::sort(data.begin(), data.end());
+       sort(data.begin(), data.end());
 
        fileListLW->clear();
        ContentsType::const_iterator it  = data.begin();
@@ -210,7 +210,7 @@ string GuiTexInfo::classOptions(string const & classname) const
        if (filename.empty())
                return string();
        string optionList;
-       std::ifstream is(filename.toFilesystemEncoding().c_str());
+       ifstream is(filename.toFilesystemEncoding().c_str());
        while (is) {
                string s;
                is >> s;
index 347221f0908e4c8bb798c81c4228a69c32e023f8..b36cb3842ff91ec4b2d8c31bff8ddb347081789c 100644 (file)
@@ -121,7 +121,7 @@ void GuiThesaurus::updateLists()
                QTreeWidgetItem * i = new QTreeWidgetItem(meaningsTV);
                i->setText(0, toqstr(cit->first));
                meaningsTV->expandItem(i);
-               for (std::vector<docstring>::const_iterator cit2 = cit->second.begin();
+               for (vector<docstring>::const_iterator cit2 = cit->second.begin();
                        cit2 != cit->second.end(); ++cit2) {
                                QTreeWidgetItem * i2 = new QTreeWidgetItem(i);
                                i2->setText(0, toqstr(*cit2));
index aaed4f2a28ee26f0af7f5186167b5de22521ae1b..9aa758dcbfa58f5ea8fea7c96cfbdab1d698b6e1 100644 (file)
@@ -139,7 +139,7 @@ string const find_png(string const & name)
        PngMap const * const end = begin + nr_sorted_png_map;
        BOOST_ASSERT(sorted(begin, end));
 
-       PngMap const * const it = std::find_if(begin, end, CompareKey(name));
+       PngMap const * const it = find_if(begin, end, CompareKey(name));
 
        string png_name;
        if (it != end)
index 3bc5a4a3f6af3f699e07a38b4a041308590e61a8..adad497065508ed643f83611bba869497abcfb2a 100644 (file)
@@ -90,7 +90,7 @@ void GuiToolbars::initFlags(ToolbarInfo & tbinfo)
                        TurnOnFlag(AUTO);
        }
        /*
-       std::cout << "State " << info.state << " FLAGS: " << flags
+       cout << "State " << info.state << " FLAGS: " << flags
                << " ON:" << (flags & ToolbarBackend::ON)
                << " OFF:" << (flags & ToolbarBackend::OFF)
                << " L:" << (flags & ToolbarBackend::LEFT)
@@ -101,7 +101,7 @@ void GuiToolbars::initFlags(ToolbarInfo & tbinfo)
                << " RE:" << (flags & ToolbarBackend::REVIEW)
                << " TB:" << (flags & ToolbarBackend::TABLE)
                << " AU:" << (flags & ToolbarBackend::AUTO)
-               << std::endl;
+               << endl;
        */
        // now set the flags
        tbinfo.flags = static_cast<lyx::ToolbarInfo::Flags>(flags);
@@ -248,7 +248,7 @@ void GuiToolbars::update(bool in_math, bool in_table, bool review)
 
 bool GuiToolbars::visible(string const & name) const
 {
-       std::map<string, GuiToolbar *>::const_iterator it =
+       map<string, GuiToolbar *>::const_iterator it =
                toolbars_.find(name);
        if (it == toolbars_.end())
                return false;
index 8dfa4ba291c4954879e5e2d0da2fda7cae75c218..21a323efb608c8e30f1a8ddbe6a981e39fecf2b8 100644 (file)
@@ -258,10 +258,10 @@ public:
        GuiLayoutBox * layout_;
 
        ///
-       std::map<std::string, Inset *> open_insets_;
+       map<string, Inset *> open_insets_;
 
        ///
-       std::map<std::string, DialogPtr> dialogs_;
+       map<string, DialogPtr> dialogs_;
 
        unsigned int smallIconSize;
        unsigned int normalIconSize;
@@ -410,7 +410,7 @@ void GuiView::closeEvent(QCloseEvent * close_event)
                settings.setValue(key + "/icon_size", iconSize());
                d.toolbars_->saveToolbarInfo();
                // Now take care of all other dialogs:
-               std::map<string, DialogPtr>::const_iterator it = d.dialogs_.begin();
+               map<string, DialogPtr>::const_iterator it = d.dialogs_.begin();
                for (; it!= d.dialogs_.end(); ++it)
                        it->second->saveSession();
        }
@@ -873,7 +873,7 @@ void GuiView::updateDialog(string const & name, string const & data)
        if (!isDialogVisible(name))
                return;
 
-       std::map<string, DialogPtr>::const_iterator it = d.dialogs_.find(name);
+       map<string, DialogPtr>::const_iterator it = d.dialogs_.find(name);
        if (it == d.dialogs_.end())
                return;
 
@@ -1580,7 +1580,7 @@ private:
 
 bool isValidName(string const & name)
 {
-       return std::find_if(dialognames, end_dialognames,
+       return find_if(dialognames, end_dialognames,
                            cmpCStr(name.c_str())) != end_dialognames;
 }
 
@@ -1606,7 +1606,7 @@ Dialog * GuiView::find_or_build(string const & name)
        if (!isValidName(name))
                return 0;
 
-       std::map<string, DialogPtr>::iterator it = d.dialogs_.find(name);
+       map<string, DialogPtr>::iterator it = d.dialogs_.find(name);
 
        if (it != d.dialogs_.end())
                return it->second.get();
@@ -1638,7 +1638,7 @@ void GuiView::showDialog(string const & name, string const & data,
 
 bool GuiView::isDialogVisible(string const & name) const
 {
-       std::map<string, DialogPtr>::const_iterator it = d.dialogs_.find(name);
+       map<string, DialogPtr>::const_iterator it = d.dialogs_.find(name);
        if (it == d.dialogs_.end())
                return false;
        return it->second.get()->isVisibleView();
@@ -1654,7 +1654,7 @@ void GuiView::hideDialog(string const & name, Inset * inset)
        if (quitting)
                return;
 
-       std::map<string, DialogPtr>::const_iterator it = d.dialogs_.find(name);
+       map<string, DialogPtr>::const_iterator it = d.dialogs_.find(name);
        if (it == d.dialogs_.end())
                return;
 
@@ -1683,15 +1683,15 @@ Inset * GuiView::getOpenInset(string const & name) const
        if (!isValidName(name))
                return 0;
 
-       std::map<string, Inset *>::const_iterator it = d.open_insets_.find(name);
+       map<string, Inset *>::const_iterator it = d.open_insets_.find(name);
        return it == d.open_insets_.end() ? 0 : it->second;
 }
 
 
 void GuiView::hideAll() const
 {
-       std::map<string, DialogPtr>::const_iterator it  = d.dialogs_.begin();
-       std::map<string, DialogPtr>::const_iterator end = d.dialogs_.end();
+       map<string, DialogPtr>::const_iterator it  = d.dialogs_.begin();
+       map<string, DialogPtr>::const_iterator end = d.dialogs_.end();
 
        for(; it != end; ++it)
                it->second->hideView();
@@ -1700,8 +1700,8 @@ void GuiView::hideAll() const
 
 void GuiView::hideBufferDependent() const
 {
-       std::map<string, DialogPtr>::const_iterator it  = d.dialogs_.begin();
-       std::map<string, DialogPtr>::const_iterator end = d.dialogs_.end();
+       map<string, DialogPtr>::const_iterator it  = d.dialogs_.begin();
+       map<string, DialogPtr>::const_iterator end = d.dialogs_.end();
 
        for(; it != end; ++it) {
                Dialog * dialog = it->second.get();
@@ -1713,8 +1713,8 @@ void GuiView::hideBufferDependent() const
 
 void GuiView::updateBufferDependent(bool switched) const
 {
-       std::map<string, DialogPtr>::const_iterator it  = d.dialogs_.begin();
-       std::map<string, DialogPtr>::const_iterator end = d.dialogs_.end();
+       map<string, DialogPtr>::const_iterator it  = d.dialogs_.begin();
+       map<string, DialogPtr>::const_iterator end = d.dialogs_.end();
 
        for(; it != end; ++it) {
                Dialog * dialog = it->second.get();
@@ -1737,8 +1737,8 @@ void GuiView::updateBufferDependent(bool switched) const
 
 void GuiView::checkStatus()
 {
-       std::map<string, DialogPtr>::const_iterator it  = d.dialogs_.begin();
-       std::map<string, DialogPtr>::const_iterator end = d.dialogs_.end();
+       map<string, DialogPtr>::const_iterator it  = d.dialogs_.begin();
+       map<string, DialogPtr>::const_iterator end = d.dialogs_.end();
 
        for(; it != end; ++it) {
                Dialog * const dialog = it->second.get();
index 8f23234c8e2854677a01de4669934ad75a26f2e2..f321d979e5c988bcc5f04d58bb27d521f545941b 100644 (file)
@@ -132,7 +132,7 @@ QString GuiViewSource::getContent(bool fullSource)
                par_end = view->cursor().selectionEnd().bottom().pit();
        }
        if (par_begin > par_end)
-               std::swap(par_begin, par_end);
+               swap(par_begin, par_end);
        odocstringstream ostr;
        view->buffer().getSourceCode(ostr, par_begin, par_end + 1, fullSource);
        return toqstr(ostr.str());
index 2c6acace92bff4a6828c504a91172af65573b917..933a86b485ad5cf2f511e13321e4340c1e4a14f0 100644 (file)
@@ -465,7 +465,7 @@ void GuiWorkArea::updateScrollbar()
 
        // do what cursor movement does (some grey)
        int const h = scroll_.height + viewport()->height() / 4;
-       int scroll_max_ = std::max(0, h - viewport()->height());
+       int scroll_max_ = max(0, h - viewport()->height());
 
        verticalScrollBar()->setRange(0, scroll_max_);
        verticalScrollBar()->setSliderPosition(scroll_.position);
index 6189f0bb3b6ba38dcda2fc57fe6b72c79d7415eb..f88683d1cc23b3a832985cd27da7113a9a391b51 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <vector>
 
+using namespace std;
 
 namespace lyx {
 namespace frontend {
@@ -214,7 +215,7 @@ void TocWidget::updateView()
 
 void TocWidget::updateGui()
 {
-       std::vector<docstring> const & type_names = form_.typeNames();
+       vector<docstring> const & type_names = form_.typeNames();
        if (type_names.empty()) {
                enableControls(false);
                typeCO->clear();
index 28843539adfbf36b461d39a9b2abc785bfe038e8..df7cdd1895c12853e875b60624de2f5ed1fa3336 100644 (file)
@@ -153,7 +153,7 @@ public:
        Sorter() : loc_ok(true)
        {
                try {
-                       loc_ = std::locale("");
+                       loc_ = locale("");
                } catch (...) {
                        loc_ok = false;
                }
@@ -167,7 +167,7 @@ public:
                        return lhs.first < rhs.first;
        }
 private:
-       std::locale loc_;
+       locale loc_;
        bool loc_ok;
 #endif
 };
@@ -201,7 +201,7 @@ vector<LanguagePair> const getLanguageData(bool character_dlg)
        vector<LanguagePair>::iterator begin = character_dlg ?
                langs.begin() + 2 : langs.begin();
 
-       std::sort(begin, langs.end(), Sorter());
+       sort(begin, langs.end(), Sorter());
 
        return langs;
 }
@@ -320,7 +320,7 @@ void rescanTexStyles()
 }
 
 
-void getTexFileList(string const & filename, std::vector<string> & list)
+void getTexFileList(string const & filename, vector<string> & list)
 {
        list.clear();
        FileName const file = libFileSearch("", filename);
@@ -328,18 +328,18 @@ void getTexFileList(string const & filename, std::vector<string> & list)
                return;
 
        // FIXME Unicode.
-       std::vector<docstring> doclist = 
+       vector<docstring> doclist = 
                getVectorFromString(file.fileContents("UTF-8"), from_ascii("\n"));
 
        // Normalise paths like /foo//bar ==> /foo/bar
        boost::RegEx regex("/{2,}");
-       std::vector<docstring>::iterator it  = doclist.begin();
-       std::vector<docstring>::iterator end = doclist.end();
+       vector<docstring>::iterator it  = doclist.begin();
+       vector<docstring>::iterator end = doclist.end();
        for (; it != end; ++it)
                list.push_back(regex.Merge(to_utf8(*it), "/"));
 
        // remove empty items and duplicates
-       list.erase(std::remove(list.begin(), list.end(), ""), list.end());
+       list.erase(remove(list.begin(), list.end(), ""), list.end());
        eliminate_duplicates(list);
 }
 
index 2d6d05720aa2daeb5682e14604978be1ec944adf..e17c0c24a55dc08e037a3c754518c99e3c0533a7 100644 (file)
@@ -28,13 +28,13 @@ string const escape_special_chars(string const & expr)
 }
 
 
-typedef std::map<string, string> InfoMap;
+typedef map<string, string> InfoMap;
 
-// A functor for use with std::find_if, used to ascertain whether a
+// A functor for use with find_if, used to ascertain whether a
 // data entry matches the required regex_
 // This class is unfortunately copied from ../frontend_helpers.cpp, so we should
 // try to make sure to keep the two in sync.
-class RegexMatch : public std::unary_function<string, bool>
+class RegexMatch : public unary_function<string, bool>
 {
 public:
        // re and icase are used to construct an instance of boost::RegEx.
index 975f48c0793c94b1c5da1c7d6291b366c6ad507e..da848fa8b4ff732bebdb68ef8a0b188dbf6bb619 100644 (file)
@@ -18,7 +18,7 @@
 
 namespace boost {
 
-void throw_exception(std::exception const & /*e*/)
+void throw_exception(exception const & /*e*/)
 {
        BOOST_ASSERT(false);
 }
index ce5a0882491d229d026e0aac3ddcfd8669c67eda..f38188a566a3c649a1981d200ef7f98d22fcdd9c 100644 (file)
@@ -31,7 +31,7 @@ namespace graphics {
 /** The cache contains one item per file, so use a map to find the
  *  cache item quickly by filename.
  */
-typedef std::map<FileName, Cache::ItemPtr> CacheType;
+typedef map<FileName, Cache::ItemPtr> CacheType;
 
 class Cache::Impl {
 public:
@@ -59,7 +59,7 @@ Cache::~Cache()
 }
 
 
-std::vector<string> Cache::loadableFormats() const
+vector<string> Cache::loadableFormats() const
 {
        return Image::loadableFormats();
 }
index e0f5fda88357d6b8b10fb2474948d51adf3ad65c..817768e489f21d5686ae0578f018a985dbabca50 100644 (file)
@@ -143,12 +143,12 @@ Converter::Impl::Impl(FileName const & from_file, string const & to_file_base,
        script_file_ = FileName(onlyPath(to_file_base) + "lyxconvert" +
                convert<string>(counter++) + ".py");
 
-       std::ofstream fs(script_file_.toFilesystemEncoding().c_str());
+       ofstream fs(script_file_.toFilesystemEncoding().c_str());
        if (!fs.good()) {
                lyxerr << "Unable to write the conversion script to \""
                       << script_file_ << '\n'
                       << "Please check your directory permissions."
-                      << std::endl;
+                      << endl;
                return;
        }
 
index 76dbbb8a63603c37ccc8e60fd50e9b5b6872f414..b25d2d1c013e17e7137252604a745c9c0a979b43 100644 (file)
@@ -50,11 +50,11 @@ private:
        /// This class is a singleton class... use LoaderQueue::get() instead
        LoaderQueue();
        /// The in-progress loading queue (elements are unique here).
-       std::list<Cache::ItemPtr> cache_queue_;
+       list<Cache::ItemPtr> cache_queue_;
        /// Used to make the insertion of new elements faster.
-       std::set<Cache::ItemPtr> cache_set_;
+       set<Cache::ItemPtr> cache_set_;
        /// Newly touched elements go here. loadNext moves them to cache_queue_
-       std::queue<Cache::ItemPtr> bucket_;
+       queue<Cache::ItemPtr> bucket_;
        ///
        Timeout timer;
        ///
@@ -142,7 +142,7 @@ void LoaderQueue::touch(Cache::ItemPtr const & item)
                list<Cache::ItemPtr>::iterator
                        end = cache_queue_.end();
 
-               it = std::find(it, end, item);
+               it = find(it, end, item);
                if (it != end)
                        cache_queue_.erase(it);
        }
index c5274f6552701f338f26d0343e829c74468f7013..a88d6dc5c0c3b5b5bbc660611418e38658daa3e4 100644 (file)
@@ -44,7 +44,7 @@ bool operator!=(Params const & a, Params const & b)
 }
 
 
-std::ostream & operator<<(std::ostream & os, BoundingBox const & bb)
+ostream & operator<<(ostream & os, BoundingBox const & bb)
 {
        os << bb.xl << ' ' << bb.yb << ' ' << bb.xr << ' ' << bb.yt;
        return os;
@@ -62,7 +62,7 @@ BoundingBox::BoundingBox(string const & bb)
        if (bb.empty())
                return;
 
-       std::istringstream is(bb.c_str());
+       istringstream is(bb.c_str());
        string a, b, c, d;
        is >> a >> b >> c >> d;
 
index 7900234c2bfcbd953d6a2ad4454d060f353f35cf..4c668120ebcf57fe69e769c3906fa202559b8cc7 100644 (file)
@@ -361,7 +361,7 @@ InProgress::InProgress(string const & filename_base,
        PendingSnippets::const_iterator pend = pending.end();
        BitmapFile::iterator sit = snippets.begin();
 
-       std::transform(pit, pend, sit,
+       transform(pit, pend, sit,
                       IncrementedFileName(to_format, filename_base));
 }
 
@@ -516,7 +516,7 @@ void PreviewLoader::Impl::remove(string const & latex_snippet)
        InProgressProcesses::iterator ipit  = in_progress_.begin();
        InProgressProcesses::iterator ipend = in_progress_.end();
 
-       std::for_each(ipit, ipend, EraseSnippet(latex_snippet));
+       for_each(ipit, ipend, EraseSnippet(latex_snippet));
 
        while (ipit != ipend) {
                InProgressProcesses::iterator curr = ipit++;
@@ -639,7 +639,7 @@ void PreviewLoader::Impl::finishedGenerating(pid_t pid, int retval)
        BitmapFile::const_iterator it  = git->second.snippets.begin();
        BitmapFile::const_iterator end = git->second.snippets.end();
 
-       std::list<PreviewImagePtr> newimages;
+       list<PreviewImagePtr> newimages;
 
        int metrics_counter = 0;
        for (; it != end; ++it, ++metrics_counter) {
@@ -657,9 +657,9 @@ void PreviewLoader::Impl::finishedGenerating(pid_t pid, int retval)
        in_progress_.erase(git);
 
        // Tell the outside world
-       std::list<PreviewImagePtr>::const_reverse_iterator
+       list<PreviewImagePtr>::const_reverse_iterator
                nit  = newimages.rbegin();
-       std::list<PreviewImagePtr>::const_reverse_iterator
+       list<PreviewImagePtr>::const_reverse_iterator
                nend = newimages.rend();
        for (; nit != nend; ++nit) {
                imageReady(*nit->get());
index 5a6772e3dcd0997363d83cbcd6c055ae097c9017..c513d58e59d59d3ecaa5d1107b88825f89bdfb7d 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "insets/Inset.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -42,7 +43,7 @@ public:
        ///
        typedef boost::shared_ptr<PreviewLoader> PreviewLoaderPtr;
        ///
-       typedef std::map<Buffer const *, PreviewLoaderPtr> CacheType;
+       typedef map<Buffer const *, PreviewLoaderPtr> CacheType;
        ///
        CacheType cache;
 };
index b3f6a98015bc4747b28a492109412063d87af55b..7831f76bc44e60a7f77fe2da2d7f0d063e58cadc 100644 (file)
@@ -373,7 +373,7 @@ int writeExternal(InsetExternalParams const & params,
        str = substituteOptions(params, str, format);
        // FIXME UNICODE
        os << from_utf8(str);
-       return int(std::count(str.begin(), str.end(),'\n'));
+       return int(count(str.begin(), str.end(),'\n'));
 }
 
 namespace {
@@ -394,7 +394,7 @@ string const substituteIt<TransformCommand>(string const & input,
                                            Template::Format const & format,
                                            InsetExternalParams const & params)
 {
-       typedef std::map<TransformID, TransformStore> Transformers;
+       typedef map<TransformID, TransformStore> Transformers;
        Transformers::const_iterator it = format.command_transformers.find(id);
        if (it == format.command_transformers.end())
                return input;
@@ -423,7 +423,7 @@ string const substituteIt<TransformOption>(string const & input,
                                           Template::Format const & format,
                                           InsetExternalParams const & params)
 {
-       typedef std::map<TransformID, TransformStore> Transformers;
+       typedef map<TransformID, TransformStore> Transformers;
        Transformers::const_iterator it = format.option_transformers.find(id);
        if (it == format.option_transformers.end())
                return input;
index 9f6ba3ce5d2aeca0605bf83f4b96db5e4e7cec53..efc9b8c4f94a73fc812ad349383d86165f2c3e47 100644 (file)
@@ -136,7 +136,7 @@ public:
                vector<string>::const_iterator qit = ft.requirements.begin();
                vector<string>::const_iterator qend = ft.requirements.end();
                for (; qit != qend; ++qit) {
-                       lyxerr << "req:" << *qit << std::endl;
+                       lyxerr << "req:" << *qit << endl;
                        ost << "\t\tRequirement " << *qit << '\n';
                }
 
@@ -299,7 +299,7 @@ void add(vector<TransformID> & ids, string const & name)
        if (int(id) == -1) {
                lyxerr << "external::Template::readTemplate\n"
                       << "Transform " << name << " is not recognized"
-                      << std::endl;
+                      << endl;
        } else {
                ids.push_back(id);
        }
@@ -385,17 +385,17 @@ void Template::readTemplate(Lexer & lex)
 
 namespace {
 
-void transform_not_found(std::ostream & os, string const & transform)
+void transform_not_found(ostream & os, string const & transform)
 {
        os << "external::Format::readFormat. Transformation \""
-          << transform << "\" is unrecognized." << std::endl;
+          << transform << "\" is unrecognized." << endl;
 }
 
 
-void transform_class_not_found(std::ostream & os, string const & tclass)
+void transform_class_not_found(ostream & os, string const & tclass)
 {
        os << "external::Format::readFormat. Transformation class \""
-          << tclass << "\" is unrecognized." << std::endl;
+          << tclass << "\" is unrecognized." << endl;
 }
 
 
index bad7b38d6b4236c5193890a82ca68ecef3cefd24..2ca1fceda3c50be6365d50e83a0d88a863358639 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <boost/regex.hpp>
 
-#include <cmath> // std::abs
+#include <cmath> // abs
 #include <sstream>
 
 using namespace std;
@@ -33,7 +33,7 @@ namespace external {
 
 string const ExtraData::get(string const & id) const
 {
-       std::map<string, string>::const_iterator it = data_.find(id);
+       map<string, string>::const_iterator it = data_.find(id);
        return it == data_.end() ? string() : it->second;
 }
 
@@ -58,7 +58,7 @@ bool ResizeData::usingScale() const
 
 bool RotationData::no_rotation() const
 {
-       return (angle.empty() || std::abs(convert<double>(angle)) < 0.1);
+       return (angle.empty() || abs(convert<double>(angle)) < 0.1);
 }
 
 
@@ -66,7 +66,7 @@ string const RotationData::adjAngle() const
 {
        // Ensure that angle lies in the range -360 < angle < 360
        double rotAngle = convert<double>(angle);
-       if (std::abs(rotAngle) > 360.0) {
+       if (abs(rotAngle) > 360.0) {
                rotAngle -= 360.0 * floor(rotAngle / 360.0);
                return convert<string>(rotAngle);
        }
@@ -99,7 +99,7 @@ string const ResizeLatexCommand::front_impl() const
        if (data.no_resize())
                return string();
 
-       std::ostringstream os;
+       ostringstream os;
        if (data.usingScale()) {
                double const scl = convert<double>(data.scale) / 100.0;
                os << "\\scalebox{" << scl << "}[" << scl << "]{";
@@ -137,7 +137,7 @@ string const ResizeLatexCommand::back_impl() const
 
 namespace {
 
-std::ostream & operator<<(std::ostream & os, RotationData::OriginType type)
+ostream & operator<<(ostream & os, RotationData::OriginType type)
 {
        switch (type) {
        case RotationData::DEFAULT:
@@ -192,7 +192,7 @@ string const RotationLatexCommand::front_impl() const
        if (data.no_rotation())
                return string();
 
-       std::ostringstream os;
+       ostringstream os;
        os << "\\rotatebox";
 
        if (data.origin() != RotationData::DEFAULT)
@@ -217,7 +217,7 @@ string const  ClipLatexOption::option_impl() const
        if (!data.clip || data.bbox.empty())
                return string();
 
-       std::ostringstream os;
+       ostringstream os;
        if (!data.bbox.empty())
                os << "bb=" << data.bbox << ',';
        if (data.clip)
@@ -231,7 +231,7 @@ string const ResizeLatexOption::option_impl() const
        if (data.no_resize())
                return string();
 
-       std::ostringstream os;
+       ostringstream os;
        if (data.usingScale()) {
                double const scl = convert<double>(data.scale);
                if (!float_equal(scl, 100.0, 0.05))
@@ -255,7 +255,7 @@ string const RotationLatexOption ::option_impl() const
        if (data.no_rotation())
                return string();
 
-       std::ostringstream os;
+       ostringstream os;
        os << "angle=" << data.angle << ',';
 
        if (data.origin() != RotationData::DEFAULT)
index 58e9aa1ce2b25016bf147371c068f01982e72369..112fb6d9f7c9b3dc6ace3e3eabda5385fbb438d2 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <map>
 
+using namespace std;
 
 namespace lyx {
 
@@ -46,13 +47,13 @@ extern bool quitting;
 
 class InsetName {
 public:
-       InsetName(std::string const & n, InsetCode c) : name(n), code(c) {}
-       std::string name;
+       InsetName(string const & n, InsetCode c) : name(n), code(c) {}
+       string name;
        InsetCode code;
 };
 
 
-typedef std::map<std::string, InsetCode> TranslatorMap;
+typedef map<string, InsetCode> TranslatorMap;
 
 
 static TranslatorMap const build_translator()
@@ -108,7 +109,7 @@ static TranslatorMap const build_translator()
        size_t const insetnames_size =
                sizeof(insetnames) / sizeof(insetnames[0]);
 
-       std::map<std::string, InsetCode> data;
+       map<string, InsetCode> data;
        for (size_t i = 0; i != insetnames_size; ++i) {
                InsetName const & var = insetnames[i];
                data[var.name] = var.code;
@@ -130,7 +131,7 @@ Dimension const Inset::dimension(BufferView const & bv) const
 }
 
 
-InsetCode insetCode(std::string const & name)
+InsetCode insetCode(string const & name)
 {
        static TranslatorMap const translator = build_translator();
 
@@ -139,7 +140,7 @@ InsetCode insetCode(std::string const & name)
 }
 
 
-std::string insetName(InsetCode c) 
+string insetName(InsetCode c) 
 {
        static TranslatorMap const translator = build_translator();
 
@@ -149,7 +150,7 @@ std::string insetName(InsetCode c)
                if (it->second == c)
                        return it->first;
        }
-       return std::string();
+       return string();
 }
 
 
index 535b8660b9c7a83f977b0e22e1dd9261afd8241d..c8b11cd3b4ec77fa115d6b58bddc3d7780a57b9c 100644 (file)
@@ -31,6 +31,8 @@
 
 #include <ostream>
 
+using namespace std;
+
 namespace lyx {
 
 
@@ -48,7 +50,7 @@ InsetBibitem::InsetBibitem(InsetCommandParams const & p)
 }
 
 
-CommandInfo const * InsetBibitem::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetBibitem::findInfo(string const & /* cmdName */)
 {
        static const char * const paramnames[] = {"label", "key", ""};
        static const bool isoptional[] = {true, false};
@@ -95,7 +97,7 @@ void InsetBibitem::read(Buffer const & buf, Lexer & lex)
 
        if (support::prefixIs(getParam("key"), key_prefix)) {
                int const key = convert<int>(getParam("key").substr(key_prefix.length()));
-               key_counter = std::max(key_counter, key);
+               key_counter = max(key_counter, key);
        }
 }
 
index 3000eb722f16e5ae836a45974f2e132cec3e3497..434bb0b0a4168146c8eef399699436dd21045ba1 100644 (file)
@@ -53,7 +53,7 @@ InsetBibtex::InsetBibtex(InsetCommandParams const & p)
 {}
 
 
-CommandInfo const * InsetBibtex::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetBibtex::findInfo(string const & /* cmdName */)
 {
        static const char * const paramnames[] = 
                {"options", "btprint", "bibfiles", ""};
@@ -597,7 +597,7 @@ void InsetBibtex::fillWithBibKeys(Buffer const & buffer,
                // 8bit clean bibtex forks exist.
                
                idocfstream ifs(it->toFilesystemEncoding().c_str(),
-                       std::ios_base::in,
+                       ios_base::in,
                        buffer.params().encoding().iconvName());
 
                char_type ch;
@@ -620,7 +620,7 @@ void InsetBibtex::fillWithBibKeys(Buffer const & buffer,
 
                        if (entryType == from_ascii("comment")) {
 
-                               ifs.ignore(std::numeric_limits<int>::max(), '\n');
+                               ifs.ignore(numeric_limits<int>::max(), '\n');
                                continue;
                        }
 
index f6d6f6abbf09c5b8e18124930852ae1c7ef37658..91619aa2ab0df0d94b8c65d0b7bc43abaf4f84f1 100644 (file)
@@ -36,7 +36,7 @@ namespace lyx {
 
 namespace {
 
-typedef Translator<std::string, InsetBox::BoxType> BoxTranslator;
+typedef Translator<string, InsetBox::BoxType> BoxTranslator;
 typedef Translator<docstring, InsetBox::BoxType> BoxTranslatorLoc;
 
 BoxTranslator const init_boxtranslator()
index 8b9d8726627b324c390462e38ace82d5d17f7473..b272647b83d08c3717a2ee7f9ea27bb449c63da2 100644 (file)
@@ -206,7 +206,7 @@ bool InsetBranch::isBranchSelected(Buffer const & buffer) const
        BranchList const & branchlist = realbuffer.params().branchlist();
        BranchList::const_iterator const end = branchlist.end();
        BranchList::const_iterator it =
-               std::find_if(branchlist.begin(), end,
+               find_if(branchlist.begin(), end,
                             BranchNamesEqual(params_.branch));
        if (it == end)
                return false;
index 6a67075e99894ad05420fd11b3b014afbe04f572..b50d89356bbd7b4c067a2832616ab4747e287050 100644 (file)
@@ -137,7 +137,7 @@ void InsetCaption::metrics(MetricsInfo & mi, Dimension & dim) const
        InsetText::metrics(mi, textdim);
        mi.base.font = tmpfont;
        mi.base.textwidth += dim.wid;
-       dim.des = std::max(dim.des - textdim.asc + dim.asc, textdim.des);
+       dim.des = max(dim.des - textdim.asc + dim.asc, textdim.des);
        dim.asc = textdim.asc;
        dim.wid += textdim.wid;
 }
index 09e2de0df44a8a5076bf6f1b51466d04834851e0..8a87042fa1b5878fb02263f136183eda937b6fab 100644 (file)
@@ -135,11 +135,11 @@ docstring const getNatbibLabel(Buffer const & buffer,
                return docstring();
 
        // Cache the labels
-       typedef std::map<Buffer const *, BiblioInfo> CachedMap;
+       typedef map<Buffer const *, BiblioInfo> CachedMap;
        static CachedMap cached_keys;
 
        // and cache the timestamp of the bibliography files.
-       static std::map<FileName, time_t> bibfileStatus;
+       static map<FileName, time_t> bibfileStatus;
 
        BiblioInfo biblist;
 
@@ -149,7 +149,7 @@ docstring const getNatbibLabel(Buffer const & buffer,
        for (FileNameList::const_iterator it = bibfilesCache.begin();
                        it != bibfilesCache.end(); ++ it) {
                FileName const f = *it;
-               std::time_t lastw = f.lastModified();
+               time_t lastw = f.lastModified();
                if (lastw != bibfileStatus[f]) {
                        changed = true;
                        bibfileStatus[f] = lastw;
@@ -363,7 +363,7 @@ InsetCitation::InsetCitation(InsetCommandParams const & p)
 {}
 
 
-CommandInfo const * InsetCitation::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetCitation::findInfo(string const & /* cmdName */)
 {
        // standard cite does only take one argument if jurabib is
        // not used, but jurabib extends this to two arguments, so
@@ -377,11 +377,11 @@ CommandInfo const * InsetCitation::findInfo(std::string const & /* cmdName */)
 }
 
 
-bool InsetCitation::isCompatibleCommand(std::string const & cmd)
+bool InsetCitation::isCompatibleCommand(string const & cmd)
 {
        vector<string> const & possibles = possible_cite_commands();
        vector<string>::const_iterator const end = possibles.end();
-       return std::find(possibles.begin(), end, cmd) != end;
+       return find(possibles.begin(), end, cmd) != end;
 }
 
 
index a74072f25b8546e28c3d696934c5349419b9dd36..c6ae5a5eee210c5918ee470c045a4f70716483f0 100644 (file)
@@ -426,7 +426,7 @@ docstring const InsetCollapsable::getNewLabel(docstring const & l) const
        docstring label;
        pos_type const max_length = 15;
        pos_type const p_siz = paragraphs().begin()->size();
-       pos_type const n = std::min(max_length, p_siz);
+       pos_type const n = min(max_length, p_siz);
        pos_type i = 0;
        pos_type j = 0;
        for (; i < n && j < p_siz; ++j) {
index 80a0ae035e8041225fa864c2de6a074f46541206..90fe6cca8ad813cd38ac067f29b1e13ee25610ff 100644 (file)
@@ -64,7 +64,7 @@ InsetCommandParams::InsetCommandParams(InsetCode code,
 
 
 CommandInfo const * InsetCommandParams::findInfo(
-       InsetCode code, std::string const & cmdName)
+       InsetCode code, string const & cmdName)
 {
        switch (code) {
        case BIBITEM_CODE:
@@ -100,7 +100,7 @@ CommandInfo const * InsetCommandParams::findInfo(
 }
 
 
-std::string InsetCommandParams::getDefaultCmd(InsetCode code) {
+string InsetCommandParams::getDefaultCmd(InsetCode code) {
        switch (code) {
                case BIBITEM_CODE: 
                        return InsetBibitem::defaultCommand();
@@ -136,7 +136,7 @@ std::string InsetCommandParams::getDefaultCmd(InsetCode code) {
 
 
 bool InsetCommandParams::isCompatibleCommand(
-               InsetCode code, std::string const & s)
+               InsetCode code, string const & s)
 {
        switch (code) {
                case BIBITEM_CODE: 
@@ -196,7 +196,7 @@ void InsetCommandParams::setCmdName(string const & name)
                        params[j] = params_[i];
        }
        info_ = info;
-       std::swap(params, params_);
+       swap(params, params_);
 }
 
 
@@ -269,7 +269,7 @@ void InsetCommandParams::read(Lexer & lex)
 }
 
 
-void InsetCommandParams::write(std::ostream & os) const
+void InsetCommandParams::write(ostream & os) const
 {
        os << "CommandInset " << insetType() << '\n';
        os << "LatexCommand " << cmdName_ << '\n';
index 70e214fa623ce069d1916f06c7ff226872246ff4..0d263810879872c0d93c123f2bcc221d5ef8ad09 100644 (file)
@@ -20,6 +20,7 @@
 #include "TexRow.h"
 #include "TextClass.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -44,7 +45,7 @@ Inset * InsetEnvironment::clone() const
 }
 
 
-void InsetEnvironment::write(Buffer const & buf, std::ostream & os) const
+void InsetEnvironment::write(Buffer const & buf, ostream & os) const
 {
        os << "Environment " << to_utf8(name()) << "\n";
        InsetText::write(buf, os);
index 38b0d6b079320b1c7d4ac4a86afef2ba27452674..ff4e19c9906643a6dc151d7be05d66e2146b0ddd 100644 (file)
@@ -148,7 +148,7 @@ void clearIfNotFound(T & data, external::TransformID value,
 
        const_iterator it  = ids.begin();
        const_iterator end = ids.end();
-       it = std::find(it, end, value);
+       it = find(it, end, value);
        if (it == end)
                data = T();
 }
index cf499e9862d5681cce769966dcbdc0fb25790cbd..605d93db1d69582d7683c31659bd8989359775ad 100644 (file)
@@ -120,7 +120,7 @@ int InsetFlex::docbook(Buffer const & buf, odocstream & os,
 
        for (; par != end; ++par) {
                par->simpleDocBookOnePar(buf, os, runparams,
-                                        outerFont(std::distance(beg, par),
+                                        outerFont(distance(beg, par),
                                                   paragraphs()));
        }
 
index ed18d6f2f9c05ac8a4c6ed91d75753b3a466a598..642ef7e3ef79423c2d296edf35c9ca3facb5ca9b 100644 (file)
@@ -48,7 +48,7 @@ InsetFloatList::InsetFloatList(string const & type)
 }
 
 
-CommandInfo const * InsetFloatList::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetFloatList::findInfo(string const & /* cmdName */)
 {
        static const char * const paramnames[] = {"type", ""};
        static const bool isoptional[] = {false};
@@ -58,9 +58,9 @@ CommandInfo const * InsetFloatList::findInfo(std::string const & /* cmdName */)
 
 
 //HACK
-bool InsetFloatList::isCompatibleCommand(std::string const & s)
+bool InsetFloatList::isCompatibleCommand(string const & s)
 {
-       std::string str = s.substr(0, 6);
+       string str = s.substr(0, 6);
        return str == "listof";
 }
 
@@ -76,7 +76,7 @@ docstring const InsetFloatList::getScreenLabel(Buffer const & buf) const
 }
 
 
-void InsetFloatList::write(Buffer const &, std::ostream & os) const
+void InsetFloatList::write(Buffer const &, ostream & os) const
 {
        os << "FloatList " << to_ascii(getParam("type")) << "\n";
 }
index c0647b0824f99b6bafcbabc9ef4c1f0f9d137df1..9d0b69040394c299aa2c37399d9284f2a40138ed 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <iostream>
 
+using namespace std;
+
 namespace lyx {
 
 
@@ -50,7 +52,7 @@ void InsetFootlike::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetFootlike::write(Buffer const & buf, std::ostream & os) const
+void InsetFootlike::write(Buffer const & buf, ostream & os) const
 {
        os << to_utf8(name()) << "\n";
        InsetCollapsable::write(buf, os);
index 26e8be32c80e023c6a7513d841101bdf2d553bbf..7e98a60109642c139270289c7f005cb7ab249e1e 100644 (file)
@@ -298,7 +298,7 @@ void InsetGraphics::readInsetGraphics(Lexer & lex, string const & bufpath)
                } else {
                        if (!params_.Read(lex, token, bufpath))
                                lyxerr << "Unknown token, " << token << ", skipping."
-                                       << std::endl;
+                                       << endl;
                }
        }
 }
@@ -468,7 +468,7 @@ enum GraphicsCopyStatus {
 };
 
 
-std::pair<GraphicsCopyStatus, FileName> const
+pair<GraphicsCopyStatus, FileName> const
 copyFileIfNeeded(FileName const & file_in, FileName const & file_out)
 {
        LYXERR(Debug::FILES, "Comparing " << file_in << " and " << file_out);
@@ -477,7 +477,7 @@ copyFileIfNeeded(FileName const & file_in, FileName const & file_out)
 
        if (checksum_in == checksum_out)
                // Nothing to do...
-               return std::make_pair(IDENTICAL_CONTENTS, file_out);
+               return make_pair(IDENTICAL_CONTENTS, file_out);
 
        Mover const & mover = getMover(formats.getFormatFromFile(file_in));
        bool const success = mover.copy(file_in, file_out);
@@ -490,11 +490,11 @@ copyFileIfNeeded(FileName const & file_in, FileName const & file_out)
        }
 
        GraphicsCopyStatus status = success ? SUCCESS : FAILURE;
-       return std::make_pair(status, file_out);
+       return make_pair(status, file_out);
 }
 
 
-std::pair<GraphicsCopyStatus, FileName> const
+pair<GraphicsCopyStatus, FileName> const
 copyToDirIfNeeded(DocFileName const & file, string const & dir)
 {
        using support::rtrim;
@@ -502,7 +502,7 @@ copyToDirIfNeeded(DocFileName const & file, string const & dir)
        string const file_in = file.absFilename();
        string const only_path = support::onlyPath(file_in);
        if (rtrim(support::onlyPath(file_in) , "/") == rtrim(dir, "/"))
-               return std::make_pair(IDENTICAL_PATHS, file_in);
+               return make_pair(IDENTICAL_PATHS, file_in);
 
        string mangled = file.mangledFilename();
        if (file.isZipped()) {
@@ -809,7 +809,7 @@ int InsetGraphics::latex(Buffer const & buf, odocstream & os,
 
        LYXERR(Debug::GRAPHICS, "InsetGraphics::latex outputting:\n" << latex_str);
        // Return how many newlines we issued.
-       return int(std::count(latex_str.begin(), latex_str.end(),'\n'));
+       return int(count(latex_str.begin(), latex_str.end(),'\n'));
 }
 
 
@@ -838,7 +838,7 @@ static int writeImageObject(char const * format, odocstream & os,
 {
        if (runparams.flavor != OutputParams::XML)
                os << "<![ %output.print." << format
-                        << "; [" << std::endl;
+                        << "; [" << endl;
 
        os <<"<imageobject><imagedata fileref=\"&"
                 << graphic_label
@@ -855,7 +855,7 @@ static int writeImageObject(char const * format, odocstream & os,
        os << "</imageobject>";
 
        if (runparams.flavor != OutputParams::XML)
-               os << std::endl << "]]>" ;
+               os << endl << "]]>" ;
 
        return runparams.flavor == OutputParams::XML ? 0 : 2;
 }
index d5e39ce3c51237c738e399aacaca93778ef5f083..76af40d23f839be8b0dcc6e3162db23d927afde1 100644 (file)
 
 #include <ostream>
 
+using namespace std;
 
 namespace lyx {
 
 
 InsetHFill::InsetHFill()
-       : InsetCommand(InsetCommandParams(HFILL_CODE), std::string())
+       : InsetCommand(InsetCommandParams(HFILL_CODE), string())
 {}
 
 
-CommandInfo const * InsetHFill::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetHFill::findInfo(string const & /* cmdName */)
 {
        static const char * const paramnames[] = {""};
        static const CommandInfo info = {0, paramnames, 0};
@@ -88,7 +89,7 @@ int InsetHFill::docbook(Buffer const &, odocstream & os,
 }
 
 
-void InsetHFill::write(Buffer const &, std::ostream & os) const
+void InsetHFill::write(Buffer const &, ostream & os) const
 {
        os << "\n\\hfill\n";
 }
index 43dea4d33bfb6055465e1c201847443e5cf1acfc..6faf674efa510a058e7af681a8bf5f79e4551dae 100644 (file)
@@ -76,7 +76,7 @@ enum Types {
 };
 
 
-Types type(std::string const & s)
+Types type(string const & s)
 {
        if (s == "input")
                return INPUT;
@@ -136,7 +136,7 @@ InsetInclude::InsetInclude(InsetInclude const & other)
 }
 
 
-CommandInfo const * InsetInclude::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetInclude::findInfo(string const & /* cmdName */)
 {
        // FIXME
        // This is only correct for the case of listings, but it'll do for now.
@@ -148,7 +148,7 @@ CommandInfo const * InsetInclude::findInfo(std::string const & /* cmdName */)
 }
 
 
-bool InsetInclude::isCompatibleCommand(std::string const & s)
+bool InsetInclude::isCompatibleCommand(string const & s)
 {
        return type(s) != NONE;
 }
@@ -660,7 +660,7 @@ void InsetInclude::validate(LaTeXFeatures & features) const
 
 
 void InsetInclude::getLabelList(Buffer const & buffer,
-                               std::vector<docstring> & list) const
+                               vector<docstring> & list) const
 {
        if (isListings(params())) {
                InsetListingsParams p(to_utf8(params()["lstparams"]));
index 35c09245bf3f415a3f7709794b168f7346eded84..9a41978d9b31f476794af4f91a83d99d221306f4 100644 (file)
@@ -52,7 +52,7 @@ Inset * InsetIndex::clone() const
 }
 
 
-void InsetIndex::write(Buffer const & buf, std::ostream & os) const
+void InsetIndex::write(Buffer const & buf, ostream & os) const
 {
        os << to_utf8(name()) << "\n";
        InsetCollapsable::write(buf, os);
@@ -64,7 +64,7 @@ InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
 {}
 
 
-CommandInfo const * InsetPrintIndex::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetPrintIndex::findInfo(string const & /* cmdName */)
 {
        static const char * const paramnames[] = {"name", ""};
        static const bool isoptional[] = {false};
index 2ec19155d2cac913d561f25f2fa7b6cde4e039d9..8e3db38aa9cd8315e6d94f3b3f4bc630befc5683 100644 (file)
@@ -86,7 +86,7 @@ Translator<InsetInfo::info_type, string> const initTranslator()
 
 } // namespace anon
 
-Translator<InsetInfo::info_type, std::string> const & InsetInfo::nameTranslator() const
+Translator<InsetInfo::info_type, string> const & InsetInfo::nameTranslator() const
 {
        static Translator<info_type, string> const translator =
                initTranslator();
@@ -121,7 +121,7 @@ void InsetInfo::read(Buffer const &, Lexer & lex)
 }
 
 
-void InsetInfo::write(Buffer const &, std::ostream & os) const
+void InsetInfo::write(Buffer const &, ostream & os) const
 {
        os << "Info\ntype  \""
           << nameTranslator().find(type_)
index c15beea4db82da2316a719abfe6243d907110f41..07488dfa6a5c5a9f74a9fecbfd08bf46930daba6 100644 (file)
@@ -22,6 +22,7 @@
 #include "support/lstrings.h"
 #include "support/lyxalgo.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -31,7 +32,7 @@ InsetLabel::InsetLabel(InsetCommandParams const & p)
 {}
 
 
-CommandInfo const * InsetLabel::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetLabel::findInfo(string const & /* cmdName */)
 {
        static const char * const paramnames[] = {"name", ""};
        static const bool isoptional[] = {false};
@@ -46,7 +47,7 @@ Inset * InsetLabel::clone() const
 }
 
 
-void InsetLabel::getLabelList(Buffer const &, std::vector<docstring> & list) const
+void InsetLabel::getLabelList(Buffer const &, vector<docstring> & list) const
 {
        list.push_back(getParam("name"));
 }
index ebe6b27c2c7b5751239f9c536f11eb36b609a554..5b744063343f1a715a53db51f456ed6467a8205f 100644 (file)
@@ -180,7 +180,7 @@ docstring ListingsParam::validate(string const & par) const
                        lists.push_back(v);
 
                // good, find the string
-               if (std::find(lists.begin(), lists.end(), par2) != lists.end()) {
+               if (find(lists.begin(), lists.end(), par2) != lists.end()) {
                        if (unclosed)
                                return _("Unbalanced braces!");
                        return docstring();
index 1afdf5c2b6b6c62e6d583a607493adf850a028b7..e26d2f21aa6e606c0dcb5f4cbb49eed1636f62cc 100644 (file)
@@ -25,6 +25,7 @@
 #include "support/docstring.h"
 #include "support/docstream.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -34,7 +35,7 @@ void InsetNewpage::read(Buffer const &, Lexer &)
 }
 
 
-void InsetNewpage::write(Buffer const &, std::ostream & os) const
+void InsetNewpage::write(Buffer const &, ostream & os) const
 {
        os << "\n" << getCmdName() << '\n';
 }
index 5dd474cbfa2e7ffa9a5c771e1e4abc996cbfd250..ac61c7a0c5e9ae5cc1893e687013eadb22502921 100644 (file)
@@ -35,7 +35,7 @@ InsetNomencl::InsetNomencl(InsetCommandParams const & p)
 {}
 
 
-CommandInfo const * InsetNomencl::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetNomencl::findInfo(string const & /* cmdName */)
 {
        static const char * const paramnames[] = {"prefix", "symbol", "description", ""};
        static const bool isoptional[] = {true, false, false};
@@ -85,7 +85,7 @@ InsetPrintNomencl::InsetPrintNomencl(InsetCommandParams const & p)
 {}
 
 
-CommandInfo const * InsetPrintNomencl::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetPrintNomencl::findInfo(string const & /* cmdName */)
 {
                static const char * const paramnames[] = {"labelwidth", ""};
                static const bool isoptional[] = {true};
index 62c8915b6feb5b81daef8dab3c9567be2c69be02..9aa037dba3187f6e12337fd100e24e8fc2e37f03 100644 (file)
@@ -44,7 +44,7 @@ namespace lyx {
 
 namespace {
 
-typedef Translator<std::string, InsetNoteParams::Type> NoteTranslator;
+typedef Translator<string, InsetNoteParams::Type> NoteTranslator;
 typedef Translator<docstring, InsetNoteParams::Type> NoteTranslatorLoc;
 
 NoteTranslator const init_notetranslator()
@@ -251,7 +251,7 @@ int InsetNote::latex(Buffer const & buf, odocstream & os,
        os << str;
        runparams_in.encoding = runparams.encoding;
        // Return how many newlines we issued.
-       return int(std::count(str.begin(), str.end(), '\n'));
+       return int(count(str.begin(), str.end(), '\n'));
 }
 
 
index a51b77ee0fd111fa8dfdc709bd938215d3903bd6..d7e29176fe8cbec568b5cee1a6674db9ad9748ca 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "support/docstream.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -43,7 +44,7 @@ docstring const InsetOptArg::editMessage() const
 }
 
 
-void InsetOptArg::write(Buffer const & buf, std::ostream & os) const
+void InsetOptArg::write(Buffer const & buf, ostream & os) const
 {
        os << "OptArg" << "\n";
        InsetCollapsable::write(buf, os);
index c1edce515603faa02b9d57fcf6f4adad5d1d7af0..ec38a13e10b0433f202909bf1f2e0fa60e612419 100644 (file)
@@ -40,7 +40,7 @@ InsetRef::InsetRef(InsetRef const & ir)
 {}
 
 
-bool InsetRef::isCompatibleCommand(std::string const & s) {
+bool InsetRef::isCompatibleCommand(string const & s) {
        //FIXME This is likely not the best way to handle this.
        //But this stuff is hardcoded elsewhere already.
        return s == "ref" 
@@ -52,7 +52,7 @@ bool InsetRef::isCompatibleCommand(std::string const & s) {
 }
 
 
-CommandInfo const * InsetRef::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetRef::findInfo(string const & /* cmdName */)
 {
        static const char * const paramnames[] = {"name", "reference", ""};
        static const bool isoptional[] = {true, false};
index dc4bb4f360a2b40c5d0c10b8d2ce5c2905041c9b..d1d0e8b5489534dcae4745340b64ab88029df22d 100644 (file)
@@ -32,7 +32,7 @@ InsetTOC::InsetTOC(InsetCommandParams const & p)
 {}
 
 
-CommandInfo const * InsetTOC::findInfo(std::string const & /* cmdName */)
+CommandInfo const * InsetTOC::findInfo(string const & /* cmdName */)
 {
        static const char * const paramnames[] = {"type", ""};
        static const bool isoptional[] = {false};
index dabb855dd5c6d920e2418c41db037e80166ff892..fb0dc7b48295ecc86f1ac98fbebeaecaa0ff4877 100644 (file)
@@ -162,7 +162,7 @@ TabularFeature tabularFeature[] =
 };
 
 
-class FeatureEqual : public std::unary_function<TabularFeature, bool> {
+class FeatureEqual : public unary_function<TabularFeature, bool> {
 public:
        FeatureEqual(Tabular::Feature feature)
                : feature_(feature) {}
@@ -456,7 +456,7 @@ string const featureAsString(Tabular::Feature feature)
 {
        TabularFeature * end = tabularFeature +
                sizeof(tabularFeature) / sizeof(TabularFeature);
-       TabularFeature * it = std::find_if(tabularFeature, end,
+       TabularFeature * it = find_if(tabularFeature, end,
                                           FeatureEqual(feature));
        return (it == end) ? string() : it->feature;
 }
@@ -3940,7 +3940,7 @@ void InsetTabular::setCursorFromCoordinates(Cursor & cur, int x, int y) const
 InsetTabular::idx_type InsetTabular::getNearestCell(BufferView & bv, int x, int y) const
 {
        idx_type idx_min = 0;
-       int dist_min = std::numeric_limits<int>::max();
+       int dist_min = numeric_limits<int>::max();
        for (idx_type i = 0, n = nargs(); i != n; ++i) {
                if (bv.coordCache().getInsets().has(tabular.getCellInset(i).get())) {
                        int const d = dist(bv, i, x, y);
index 1377bb8d734ee9982c66e6797ea67926fd087053..9369555c58ea3769342aeb09f148f5999eebffc1 100644 (file)
@@ -380,7 +380,7 @@ void InsetText::appendParagraphs(Buffer * buffer, ParagraphList & plist)
        ParagraphList::iterator ins = pl.insert(pl.end(), *pit);
        ++pit;
        mergeParagraph(buffer->params(), pl,
-                      std::distance(pl.begin(), ins) - 1);
+                      distance(pl.begin(), ins) - 1);
 
        for_each(pit, plist.end(),
                 bind(&ParagraphList::push_back, ref(pl), _1));
index bb3cebf0a0908c21d888e43d4c86ece96c9ea694..05ce78a93814935e442846d8b379d9a651988665 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <boost/bind.hpp>
 
+using namespace std;
 
 namespace lyx {
 
@@ -153,11 +154,11 @@ void RenderGraphic::metrics(MetricsInfo & mi, Dimension & dim) const
                docstring const msg = statusMessage(params_, loader_.status());
                if (!msg.empty()) {
                        msgFont.setSize(FONT_SIZE_TINY);
-                       font_width = std::max(font_width,
+                       font_width = max(font_width,
                                theFontMetrics(msgFont).width(msg));
                }
 
-               dim.wid = std::max(50, font_width + 15);
+               dim.wid = max(50, font_width + 15);
        }
 
        dim_ = dim;
@@ -193,7 +194,7 @@ void RenderGraphic::draw(PainterInfo & pi, int x, int y) const
                // Print the file name.
                FontInfo msgFont = pi.base.font;
                msgFont.setFamily(SANS_FAMILY);
-               std::string const justname = params_.filename.onlyFileName();
+               string const justname = params_.filename.onlyFileName();
 
                if (!justname.empty()) {
                        msgFont.setSize(FONT_SIZE_FOOTNOTE);
index 514ee4595adc0018d29ed170145b94b7bfa3ff4f..34ecff40a15f207f63412901c2ccf7273587b46f 100644 (file)
@@ -52,7 +52,7 @@ bool parse_bool(docstring & howto)
 }
 
 
-class MatchString : public std::binary_function<Paragraph, pos_type, bool>
+class MatchString : public binary_function<Paragraph, pos_type, bool>
 {
 public:
        MatchString(docstring const & str, bool cs, bool mw)
@@ -248,7 +248,7 @@ void find(BufferView * bv, FuncRequest const & ev)
        if (!bv || ev.action != LFUN_WORD_FIND)
                return;
 
-       //lyxerr << "find called, cmd: " << ev << std::endl;
+       //lyxerr << "find called, cmd: " << ev << endl;
 
        // data is of the form
        // "<search>
index 384724aecbe232c41131905314aadfd20137ee6a..659c9e074b6a59f00858cac4fe8c07d4be4b131f 100644 (file)
 #include <ios>
 #endif
 
+using namespace std;
+
+
 int main(int argc, char * argv[])
 {
 #ifdef HAVE_IOS
-       std::ios_base::sync_with_stdio(false);
+       ios_base::sync_with_stdio(false);
 #endif
 
        // To avoid ordering of global object problems with some
        // stdlibs we do the initialization here, but still as
        // early as possible.
-       lyx::lyxerr.setStream(std::cerr);
+       lyx::lyxerr.setStream(cerr);
 
        LYXERR0("acssdc");
 
index a97eec6b7acdeea27d8873829b5e8419113e841b..7676aa982349fc69a9baa21c9343be3dac866d56 100644 (file)
@@ -51,7 +51,7 @@ InsetFormulaMacro::InsetFormulaMacro
 InsetFormulaMacro::InsetFormulaMacro(string const & s)
        : InsetMathNest(2), name_("unknownB")
 {
-       std::istringstream is(s);
+       istringstream is(s);
        read(is);
 }
 
@@ -106,7 +106,7 @@ void InsetFormulaMacro::read(Buffer const &, Lexer & lex)
 }
 
 
-void InsetFormulaMacro::read(std::istream & is)
+void InsetFormulaMacro::read(istream & is)
 {
        auto_ptr<MathMacroTemplate> p(new MathMacroTemplate(is));
        name_ = p->name();
index b7c7d5761962a822e790d9ab9ccc10fe90fa228f..a056f27bfee3f02072751a6c83d0cb5a54105f6d 100644 (file)
@@ -133,7 +133,7 @@ HullType InsetMath::getType() const
 }
 
 
-std::ostream & operator<<(std::ostream & os, MathAtom const & at)
+ostream & operator<<(ostream & os, MathAtom const & at)
 {
        odocstringstream oss;
        WriteStream wi(oss, false, false);
index 82797359feb79d93efb4c0ddc1215c3db488de2b..fa50c461e2797d8b3fd5463aae32293eac55da93 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <ostream>
 
+using namespace std;
 
 namespace lyx {
 
@@ -48,8 +49,8 @@ void InsetMathBrace::metrics(MetricsInfo & mi, Dimension & dim) const
        Dimension dim0;
        cell(0).metrics(mi, dim0);
        Dimension t = theFontMetrics(mi.base.font).dimension('{');
-       dim.asc = std::max(dim0.asc, t.asc);
-       dim.des = std::max(dim0.des, t.des);
+       dim.asc = max(dim0.asc, t.asc);
+       dim.des = max(dim0.des, t.des);
        dim.wid = dim0.width() + 2 * t.wid;
        metricsMarkers(dim);
        // Cache the inset dimension. 
index 5ac5c340dd53cd285dca2bb95124c13e015accc3..ecf5f58c2bf56ab2c97d0ec02e9042fc9dc723c0 100644 (file)
@@ -31,7 +31,7 @@ namespace lyx {
 InsetMathDecoration::InsetMathDecoration(latexkeys const * key)
        : InsetMathNest(1), key_(key)
 {
-//     lyxerr << " creating deco " << key->name << std::endl;
+//     lyxerr << " creating deco " << key->name << endl;
 }
 
 
index 5f4fc29ce4596090b8419b50506371aee7f4c1af..ff0596250abf6a75b1730272a8fa1ddc6b4f1519 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "frontends/Painter.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -132,8 +133,8 @@ void InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const
                        ShapeChanger dummy2(mi.base.font, UP_SHAPE);
                        cell(1).metrics(mi, dim1);
                        dim.wid = dim0.width() + dim1.wid + 5;
-                       dim.asc = std::max(dim0.asc, dim1.asc);
-                       dim.des = std::max(dim0.des, dim1.des);
+                       dim.asc = max(dim0.asc, dim1.asc);
+                       dim.des = max(dim0.des, dim1.des);
                } else {
                        cell(2).metrics(mi, dim2);
                        ShapeChanger dummy2(mi.base.font, UP_SHAPE);
@@ -141,8 +142,8 @@ void InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const
                        cell(0).metrics(mi, dim0);
                        cell(1).metrics(mi, dim1);
                        dim.wid = dim0.width() + dim1.wid + dim2.wid + 10;
-                       dim.asc = std::max(dim2.asc, dim0.height() + 5);
-                       dim.des = std::max(dim2.des, dim1.height() - 5);
+                       dim.asc = max(dim2.asc, dim0.height() + 5);
+                       dim.des = max(dim2.des, dim1.height() - 5);
                }
        } else {
                FracChanger dummy(mi.base);
@@ -161,7 +162,7 @@ void InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const
                        dim.asc = dim0.height() + 5;
                        dim.des = dim1.height() - 5;
                } else {
-                       dim.wid = std::max(dim0.width(), dim1.wid) + 2;
+                       dim.wid = max(dim0.width(), dim1.wid) + 2;
                        dim.asc = dim0.height() + 2 + 5;
                        dim.des = dim1.height() + 2 - 5;
                }
@@ -243,7 +244,7 @@ void InsetMathFrac::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
        Dimension dim0, dim1;
        cell(0).metricsT(mi, dim0);
        cell(1).metricsT(mi, dim1);
-       dim.wid = std::max(dim0.width(), dim1.wid);
+       dim.wid = max(dim0.width(), dim1.wid);
        dim.asc = dim0.height() + 1;
        dim.des = dim1.height();
 }
@@ -369,7 +370,7 @@ void InsetMathDFrac::metrics(MetricsInfo & mi, Dimension & dim) const
        Dimension dim0, dim1;
        cell(0).metrics(mi, dim0);
        cell(1).metrics(mi, dim1);
-       dim.wid = std::max(dim0.wid, dim1.wid) + 2;
+       dim.wid = max(dim0.wid, dim1.wid) + 2;
        dim.asc = dim0.height() + 2 + 5;
        dim.des = dim1.height() + 2 - 5;
        // Cache the inset dimension. 
@@ -429,7 +430,7 @@ void InsetMathTFrac::metrics(MetricsInfo & mi, Dimension & dim) const
        cell(0).metrics(mi, dim0);
        Dimension dim1;
        cell(1).metrics(mi, dim1);
-       dim.wid = std::max(dim0.width(), dim1.width()) + 2;
+       dim.wid = max(dim0.width(), dim1.width()) + 2;
        dim.asc = dim0.height() + 2 + 5;
        dim.des = dim1.height() + 2 - 5;
        // Cache the inset dimension. 
@@ -507,7 +508,7 @@ void InsetMathBinom::metrics(MetricsInfo & mi, Dimension & dim) const
        cell(1).metrics(mi, dim1);
        dim.asc = dim0.height() + 4 + 5;
        dim.des = dim1.height() + 4 - 5;
-       dim.wid = std::max(dim0.width(), dim1.wid) + 2 * dw(dim.height()) + 4;
+       dim.wid = max(dim0.width(), dim1.wid) + 2 * dw(dim.height()) + 4;
        metricsMarkers2(dim);
        // Cache the inset dimension. 
        setDimCache(mi, dim);
@@ -581,7 +582,7 @@ void InsetMathDBinom::metrics(MetricsInfo & mi, Dimension & dim) const
        cell(1).metrics(mi, dim1);
        dim.asc = dim0.height() + 4 + 5;
        dim.des = dim1.height() + 4 - 5;
-       dim.wid = std::max(dim0.width(), dim1.wid) + 2 * dw(dim.height()) + 4;
+       dim.wid = max(dim0.width(), dim1.wid) + 2 * dw(dim.height()) + 4;
        metricsMarkers2(dim);
        // Cache the inset dimension. 
        setDimCache(mi, dim);
@@ -651,7 +652,7 @@ void InsetMathTBinom::metrics(MetricsInfo & mi, Dimension & dim) const
        cell(1).metrics(mi, dim1);
        dim.asc = dim0.height() + 4 + 5;
        dim.des = dim1.height() + 4 - 5;
-       dim.wid = std::max(dim0.width(), dim1.wid) + 2 * dw(dim.height()) + 4;
+       dim.wid = max(dim0.width(), dim1.wid) + 2 * dw(dim.height()) + 4;
        metricsMarkers2(dim);
        // Cache the inset dimension. 
        setDimCache(mi, dim);
index 09df2b4973a93d2f029b45c6c2c67889e15093ac..e83eaeb9a7f75e499a69092740c1b64304836d8f 100644 (file)
@@ -214,7 +214,7 @@ void InsetMathGrid::halign(docstring const & hh)
                        }
                        --it;
                        if (newcolumn) {
-                               colinfo_[col].lines_ = std::count(
+                               colinfo_[col].lines_ = count(
                                        colinfo_[col].special_.begin(),
                                        colinfo_[col].special_.end(), '|');
                                LYXERR(Debug::MATHED, "special column separator: `"
@@ -231,7 +231,7 @@ void InsetMathGrid::halign(docstring const & hh)
                        colinfo_[col].align_ = static_cast<char>(c);
                        if (!colinfo_[col].special_.empty()) {
                                colinfo_[col].special_ += c;
-                               colinfo_[col].lines_ = std::count(
+                               colinfo_[col].lines_ = count(
                                                colinfo_[col].special_.begin(),
                                                colinfo_[col].special_.end(), '|');
                                LYXERR(Debug::MATHED, "special column separator: `"
index dd650971b5faf97c045bfddc90bcea2092d9cc50..5a15104f83f7e2ad6e0802ba3c1bd05ff2425cdb 100644 (file)
@@ -951,7 +951,7 @@ void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
        iss >> dlang >> extra;
        if (extra.empty())
                extra = from_ascii("noextra");
-       std::string const lang = to_ascii(dlang);
+       string const lang = to_ascii(dlang);
 
        // FIXME: temporarily disabled
        //if (cur.selection()) {
@@ -1085,7 +1085,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
 
                InsetCommandParams p(LABEL_CODE);
                p["name"] = cmd.argument().empty() ? old_label : cmd.argument();
-               std::string const data = InsetCommandMailer::params2string("label", p);
+               string const data = InsetCommandMailer::params2string("label", p);
 
                if (cmd.argument().empty())
                        cur.bv().showDialog("label", data);
@@ -1098,7 +1098,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_INSET_INSERT: {
                //lyxerr << "arg: " << to_utf8(cmd.argument()) << endl;
-               std::string const name = cmd.getArg(0);
+               string const name = cmd.getArg(0);
                if (name == "label") {
                        InsetCommandParams p(LABEL_CODE);
                        InsetCommandMailer::string2params(name, to_utf8(cmd.argument()), p);
@@ -1187,7 +1187,7 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                return InsetMathGrid::getStatus(cur, cmd, status);
        case LFUN_TABULAR_FEATURE: {
                istringstream is(to_utf8(cmd.argument()));
-               std::string s;
+               string s;
                is >> s;
                if (!rowChangeOK()
                    && (s == "append-row"
@@ -1400,7 +1400,7 @@ bool InsetMathHull::searchForward(BufferView * bv, string const & str,
 #endif
 
 
-void InsetMathHull::write(Buffer const &, std::ostream & os) const
+void InsetMathHull::write(Buffer const &, ostream & os) const
 {
        odocstringstream oss;
        WriteStream wi(oss, false, false);
index 4fc4ffd95e3406661b26aac9d8b8ca5ff6db54e4..65c398b58e28b988e355283554987a3fd5d4f04b 100644 (file)
@@ -78,7 +78,7 @@ void InsetMathMBox::write(Buffer const & buf, WriteStream & ws) const
                ws << "}";
        } else {
                ws << "\\mbox{\n";
-               std::ostringstream os;
+               ostringstream os;
                text_.write(buf, os);
                ws.os() << from_utf8(os.str());
                ws << "}";
index c23be25152653cb47cf0f6d9de1c058dae6d8cd9..c1f9c7032c206f869b447cede95ca8c79ce23ccf 100644 (file)
@@ -129,7 +129,7 @@ void InsetMathNest::cursorPos(BufferView const & bv,
        }
        Point const pt2 = coord_cache.getInsets().xy(this);
        //lyxerr << "retrieving position cache for MathData "
-       //      << pt.x_ << ' ' << pt.y_ << std::endl;
+       //      << pt.x_ << ' ' << pt.y_ << endl;
        x = pt.x_ - pt2.x_ + ar.pos2x(sl.pos());
        y = pt.y_ - pt2.y_;
 //     lyxerr << "pt.y_ : " << pt.y_ << " pt2_.y_ : " << pt2.y_
@@ -439,7 +439,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
 
 void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       //lyxerr << "InsetMathNest: request: " << cmd << std::endl;
+       //lyxerr << "InsetMathNest: request: " << cmd << endl;
        //CursorSlice sl = cur.current();
 
        switch (cmd.action) {
index 318e634a3afb57a5b5c62ec99bcfc1e685a51abc..bd56bff79fa457820c43bbbec306b239e0c249f0 100644 (file)
@@ -17,6 +17,7 @@
 #include "Cursor.h"
 #include "LaTeXFeatures.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -33,7 +34,7 @@ void InsetMathOverset::metrics(MetricsInfo & mi, Dimension & dim) const
        FracChanger dummy(mi.base);
        Dimension dim0;
        cell(0).metrics(mi, dim0);
-       dim.wid = std::max(dim0.width(), dim1.wid) + 4;
+       dim.wid = max(dim0.width(), dim1.wid) + 4;
        dim.asc = dim1.asc + dim0.height() + 4;
        dim.des = dim1.des;
        metricsMarkers(dim);
index 0655f39b5d17a8d323e7ad68e8e105d23f3fbb98..1618de2cc1abc65f688218a47b8a2e86b1d4e764 100644 (file)
@@ -14,6 +14,7 @@
 #include "MathData.h"
 #include "MathStream.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -34,7 +35,7 @@ void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & dim) const
        FracChanger dummy(mi.base);
        Dimension dim0;
        cell(0).metrics(mi, dim0);
-       dim.wid = std::max(dim0.width(), dim1.width()) + 4;
+       dim.wid = max(dim0.width(), dim1.width()) + 4;
        dim.asc = dim1.ascent() + dim0.height() + 4;
        dim.des = dim1.descent();
        metricsMarkers(dim);
index 44c5fae69f6c32895b0fba9cb59ea25189e0b090..33a22f9b283531d243389109b4aead7a6497f802 100644 (file)
@@ -58,7 +58,7 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
        //lyxerr << "metrics: symbol: '" << sym_->name
        //      << "' in font: '" << sym_->inset
        //      << "' drawn as: '" << sym_->draw
-       //      << "'" << std::endl;
+       //      << "'" << endl;
 
        int const em = mathed_char_width(mi.base.font, 'M');
        FontSetChanger dummy(mi.base, sym_->inset);
@@ -93,7 +93,7 @@ void InsetMathSymbol::draw(PainterInfo & pi, int x, int y) const
        //lyxerr << "metrics: symbol: '" << sym_->name
        //      << "' in font: '" << sym_->inset
        //      << "' drawn as: '" << sym_->draw
-       //      << "'" << std::endl;
+       //      << "'" << endl;
        int const em = mathed_char_width(pi.base.font, 'M');
        if (isRelOp())
                x += static_cast<int>(0.25*em+0.5);
index 7fd57abee36492cd206e283cb4fc225bc2adab79..d34260451ea640c508c8aa75a1964fbe085da652 100644 (file)
@@ -17,6 +17,7 @@
 #include "Cursor.h"
 #include "LaTeXFeatures.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -33,7 +34,7 @@ void InsetMathUnderset::metrics(MetricsInfo & mi, Dimension & dim) const
        FracChanger dummy(mi.base);
        Dimension dim0;
        cell(0).metrics(mi, dim0);
-       dim.wid = std::max(dim0.width(), dim1.width()) + 4;
+       dim.wid = max(dim0.width(), dim1.width()) + 4;
        dim.asc = dim1.ascent();
        dim.des = dim1.descent() + dim0.height() + 4;
        metricsMarkers(dim);
index a2aef402d28beb7e7fa7db60c370041985059ed9..407b5f5d56e5127a31b1e0f4522b984e76f84170 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "LaTeXFeatures.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -40,7 +41,7 @@ void InsetMathXArrow::metrics(MetricsInfo & mi, Dimension & dim) const
        cell(0).metrics(mi, dim0);
        Dimension dim1;
        cell(1).metrics(mi, dim1);
-       dim.wid = std::max(dim0.width(), dim1.width()) + 10;
+       dim.wid = max(dim0.width(), dim1.width()) + 10;
        dim.asc = dim0.height() + 10;
        dim.des = dim1.height();
        metricsMarkers(dim);
index 3b163db43a66ea3b3dde27a326f316c6733fb9af..7dea5f93413dec02a11f085e437594d96c8b30a5 100644 (file)
@@ -43,7 +43,7 @@ MacroData::MacroData()
 
 
 MacroData::MacroData(docstring const & definition,
-               std::vector<docstring> const & defaults, 
+               vector<docstring> const & defaults, 
                int numargs, int optionals, docstring const & display,
                string const & requires)
        : definition_(definition), numargs_(numargs), display_(display),
@@ -85,7 +85,7 @@ size_t MacroData::optionals() const
 }
 
 
-std::vector<docstring> const &  MacroData::defaults() const
+vector<docstring> const &  MacroData::defaults() const
 {
        return defaults_;
 }
index 5cb566d8ca4cd4244fefd1e7728ec589c8899186..ff0cff0340ee169fdbd63c71beb8e16519ae5722 100644 (file)
@@ -411,7 +411,7 @@ void MathData::detachMacroParameters(Cursor & cur, const size_type macroPos)
        MathMacro * macroInset = operator[](macroPos).nucleus()->asMacro();
        
        // detach all arguments
-       std::vector<MathData> detachedArgs;
+       vector<MathData> detachedArgs;
        if (macroPos + 1 == size())
                                // strip arguments if we are at the MathData end
                                macroInset->detachArguments(detachedArgs, true);
@@ -422,7 +422,7 @@ void MathData::detachMacroParameters(Cursor & cur, const size_type macroPos)
        int curMacroSlice = cur.find(macroInset);
        idx_type curMacroIdx = -1;
        pos_type curMacroPos = -1;
-       std::vector<CursorSlice> argSlices;
+       vector<CursorSlice> argSlices;
        if (curMacroSlice != -1) {
                                curMacroPos = cur[curMacroSlice].pos();
                                curMacroIdx = cur[curMacroSlice].idx();
@@ -536,7 +536,7 @@ void MathData::attachMacroParameters(Cursor & cur,
        // start at atom behind the macro again, maybe with some new arguments 
        // from the detach phase above, to add them back into the macro inset
        size_t p = macroPos + 1;
-       std::vector<MathData> detachedArgs;
+       vector<MathData> detachedArgs;
        MathAtom scriptToPutAround;
        
        // find cursor slice again of this MathData
@@ -600,7 +600,7 @@ void MathData::attachMacroParameters(Cursor & cur,
 
 
 void MathData::collectOptionalParameters(Cursor & cur, 
-       const size_type numOptionalParams, std::vector<MathData> & params, 
+       const size_type numOptionalParams, vector<MathData> & params, 
        size_t & pos, const pos_type macroPos, const int thisPos, const int thisSlice)
 {
        // insert optional arguments?
@@ -637,8 +637,8 @@ void MathData::collectOptionalParameters(Cursor & cur,
                // place cursor in optional argument of macro
                if (thisSlice != -1
                                && thisPos >= int(pos) && thisPos <= int(right)) {
-                       int paramPos = std::max(0, thisPos - int(pos) - 1);
-                       std::vector<CursorSlice> x;
+                       int paramPos = max(0, thisPos - int(pos) - 1);
+                       vector<CursorSlice> x;
                        cur.cutOff(thisSlice, x);
                        cur[thisSlice].pos() = macroPos;
                        if (brace) {
@@ -659,7 +659,7 @@ void MathData::collectOptionalParameters(Cursor & cur,
 
 
 void MathData::collectParameters(Cursor & cur, 
-       const size_type numParams, std::vector<MathData> & params, 
+       const size_type numParams, vector<MathData> & params, 
        size_t & pos, MathAtom & scriptToPutAround,
        const pos_type macroPos, const int thisPos, const int thisSlice) 
 {
@@ -668,7 +668,7 @@ void MathData::collectParameters(Cursor & cur,
                MathAtom & cell = operator[](pos);
                
                // fix cursor
-               std::vector<CursorSlice> argSlices;
+               vector<CursorSlice> argSlices;
                int argPos = 0;
                if (thisSlice != -1 && thisPos == int(pos)) {
                        cur.cutOff(thisSlice, argSlices);
@@ -737,7 +737,7 @@ int MathData::pos2x(size_type pos, int glue) const
                if ((*it)->getChar() == ' ')
                        x += glue;
                //lyxerr << "char: " << (*it)->getChar()
-               //      << "width: " << (*it)->width() << std::endl;
+               //      << "width: " << (*it)->width() << endl;
                x += atom_dims_[i].wid;
        }
        return x;
@@ -791,7 +791,7 @@ int MathData::dist(BufferView const & bv, int x, int y) const
 
 void MathData::setXY(BufferView & bv, int x, int y) const
 {
-       //lyxerr << "setting position cache for MathData " << this << std::endl;
+       //lyxerr << "setting position cache for MathData " << this << endl;
        bv.coordCache().arrays().add(this, x, y);
 }
 
@@ -830,7 +830,7 @@ int MathData::yo(BufferView const & bv) const
 }
 
 
-std::ostream & operator<<(std::ostream & os, MathData const & ar)
+ostream & operator<<(ostream & os, MathData const & ar)
 {
        odocstringstream oss;
        NormalStream ns(oss);
index 6985f80aadf8ae951716f6fddada9f51453b6d98..94e5c330a3a165b7e3f6f2ce7ed91662ac5d173a 100644 (file)
@@ -353,7 +353,7 @@ void splitScripts(MathData & ar)
 
                // create extra script inset and move superscript over
                InsetMathScript * p = ar[i].nucleus()->asScriptInset();
-               std::auto_ptr<InsetMathScript> q(new InsetMathScript(true));
+               auto_ptr<InsetMathScript> q(new InsetMathScript(true));
                swap(q->up(), p->up());
                p->removeScript(true);
 
@@ -555,7 +555,7 @@ void extractFunctions(MathData & ar)
                extractScript(exp, jt, ar.end(), true);
 
                // create a proper inset as replacement
-               std::auto_ptr<InsetMathExFunc> p(new InsetMathExFunc(name));
+               auto_ptr<InsetMathExFunc> p(new InsetMathExFunc(name));
 
                // jt points to the "argument". Get hold of this.
                MathData::iterator st = extractArgument(p->cell(0), jt, ar.end(), true);
@@ -807,7 +807,7 @@ void extractDiff(MathData & ar)
                }
 
                // create a proper diff inset
-               std::auto_ptr<InsetMathDiff> diff(new InsetMathDiff);
+               auto_ptr<InsetMathDiff> diff(new InsetMathDiff);
 
                // collect function, let jt point behind last used item
                MathData::iterator jt = it + 1;
@@ -1016,7 +1016,7 @@ void mathmlize(MathData const & dat, MathStream & os)
 
 namespace {
 
-       std::string captureOutput(std::string const & cmd, std::string const & data)
+       string captureOutput(string const & cmd, string const & data)
        {
                // In order to avoid parsing problems with command interpreters
                // we pass input data through a file
@@ -1024,12 +1024,12 @@ namespace {
                if (cas_tmpfile.empty()) {
                        lyxerr << "Warning: cannot create temporary file."
                               << endl;
-                       return std::string();
+                       return string();
                }
-               std::ofstream os(cas_tmpfile.toFilesystemEncoding().c_str());
+               ofstream os(cas_tmpfile.toFilesystemEncoding().c_str());
                os << data << endl;
                os.close();
-               std::string command =  cmd + " < "
+               string command =  cmd + " < "
                        + quoteName(cas_tmpfile.toFilesystemEncoding());
                lyxerr << "calling: " << cmd
                       << "\ninput: '" << data << "'" << endl;
@@ -1038,7 +1038,7 @@ namespace {
                return ret.second;
        }
 
-       size_t get_matching_brace(std::string const & str, size_t i)
+       size_t get_matching_brace(string const & str, size_t i)
        {
                int count = 1;
                size_t n = str.size();
@@ -1056,7 +1056,7 @@ namespace {
                return npos;
        }
 
-       size_t get_matching_brace_back(std::string const & str, size_t i)
+       size_t get_matching_brace_back(string const & str, size_t i)
        {
                int count = 1;
                while (i > 0) {
@@ -1081,7 +1081,7 @@ namespace {
                docstring expr = os.str();
                docstring const header = from_ascii("simpsum:true;");
 
-               std::string out;
+               string out;
                for (int i = 0; i < 100; ++i) { // at most 100 attempts
                        // try to fix missing '*' the hard way
                        //
@@ -1101,7 +1101,7 @@ namespace {
 
                        // search line with "Incorrect syntax"
                        istringstream is(out);
-                       std::string line;
+                       string line;
                        while (is) {
                                getline(is, line);
                                if (line.find("Incorrect syntax") != npos)
@@ -1121,11 +1121,11 @@ namespace {
                        expr.insert(pos, from_ascii("*"));
                }
 
-               vector<std::string> tmp = getVectorFromString(out, "$$");
+               vector<string> tmp = getVectorFromString(out, "$$");
                if (tmp.size() < 2)
                        return MathData();
 
-               out = subst(tmp[1], "\\>", std::string());
+               out = subst(tmp[1], "\\>", string());
                lyxerr << "output: '" << out << "'" << endl;
 
                // Ugly code that tries to make the result prettier
@@ -1135,7 +1135,7 @@ namespace {
                        size_t k = get_matching_brace(out, j + 1);
                        k = get_matching_brace(out, k + 1);
                        k = get_matching_brace(out, k + 1);
-                       std::string mid = out.substr(i + 13, j - i - 13);
+                       string mid = out.substr(i + 13, j - i - 13);
                        if (mid.find("\\over") != npos)
                                mid = '{' + mid + '}';
                        out = out.substr(0,i)
@@ -1170,7 +1170,7 @@ namespace {
 
        MathData pipeThroughMaple(docstring const & extra, MathData const & ar)
        {
-               std::string header = "readlib(latex):\n";
+               string header = "readlib(latex):\n";
 
                // remove the \\it for variable names
                //"#`latex/csname_font` := `\\it `:"
@@ -1198,11 +1198,11 @@ namespace {
                //"#`latex/latex/symbol` "
                //      " := subs((\\'_\\' = \\'`\\_`\\',eval(`latex/latex/symbol`)): ";
 
-               std::string trailer = "quit;";
+               string trailer = "quit;";
                odocstringstream os;
                MapleStream ms(os);
                ms << ar;
-               std::string expr = to_utf8(os.str());
+               string expr = to_utf8(os.str());
                lyxerr << "ar: '" << ar << "'\n"
                       << "ms: '" << expr << "'" << endl;
 
index 2cd60f055a93e8ffcd5a90ffc9dc2fa4201d74da..2025bd46c8d4feb1b26398f21bf93f87d753bf71 100644 (file)
@@ -68,7 +68,7 @@ bool has_math_fonts;
 namespace {
 
 // file scope
-typedef std::map<docstring, latexkeys> WordList;
+typedef map<docstring, latexkeys> WordList;
 
 WordList theWordList;
 
@@ -103,7 +103,7 @@ void initSymbols()
                return;
        }
 
-       std::ifstream fs(filename.toFilesystemEncoding().c_str());
+       ifstream fs(filename.toFilesystemEncoding().c_str());
        string line;
        bool skip = false;
        while (getline(fs, line)) {
index b3cc80ae72be76cd212376a013b0abf66f47525c..27904af557c76a0ffbd4990fe5aa3a02eddaf2ff 100644 (file)
@@ -172,8 +172,8 @@ void MathMacro::metrics(MetricsInfo & mi, Dimension & dim) const
                Dimension bsdim;
                mathed_string_dim(mi.base.font, from_ascii("\\"), bsdim);
                dim.wid += bsdim.width() + 1;
-               dim.asc = std::max(bsdim.ascent(), dim.ascent());
-               dim.des = std::max(bsdim.descent(), dim.descent());
+               dim.asc = max(bsdim.ascent(), dim.ascent());
+               dim.des = max(bsdim.descent(), dim.descent());
                metricsMarkers(dim);
        } else {
                BOOST_ASSERT(macro_ != 0);
@@ -191,10 +191,10 @@ void MathMacro::metrics(MetricsInfo & mi, Dimension & dim) const
                        mathed_string_dim(font, name(), namedim);
 #if 0
                        dim.wid += 2 + namedim.wid + 2 + 2;
-                       dim.asc = std::max(dim.asc, namedim.asc) + 2;
-                       dim.des = std::max(dim.des, namedim.des) + 2;
+                       dim.asc = max(dim.asc, namedim.asc) + 2;
+                       dim.des = max(dim.des, namedim.des) + 2;
 #endif
-                       dim.wid = std::max(1 + namedim.wid + 1, 2 + dim.wid + 2);
+                       dim.wid = max(1 + namedim.wid + 1, 2 + dim.wid + 2);
                        dim.asc += 1 + namedim.height() + 1;
                        dim.des += 2;
                }
@@ -252,10 +252,10 @@ void MathMacro::updateRepresentation(MetricsInfo & mi)
                                needsUpdate_ = false;
 
                                // get default values of macro
-                               std::vector<docstring> const & defaults = macro_->defaults();
+                               vector<docstring> const & defaults = macro_->defaults();
 
                                // create MathMacroArgumentValue objects pointing to the cells of the macro
-                               std::vector<MathData> values(nargs());
+                               vector<MathData> values(nargs());
                                for (size_t i = 0; i < nargs(); ++i) {
                                        if (!cell(i).empty() || i >= defaults.size() || 
                                                        defaults[i].empty() || curIdx == (int)i)
@@ -450,7 +450,7 @@ void MathMacro::insertArgument(Inset::pos_type pos) {
 }
 
 
-void MathMacro::detachArguments(std::vector<MathData> & args, bool strip)
+void MathMacro::detachArguments(vector<MathData> & args, bool strip)
 {
        BOOST_ASSERT(displayMode_ == DISPLAY_NORMAL);   
        args = cells_;
@@ -471,7 +471,7 @@ void MathMacro::detachArguments(std::vector<MathData> & args, bool strip)
 }
 
 
-void MathMacro::attachArguments(std::vector<MathData> const & args, size_t arity, int optionals)
+void MathMacro::attachArguments(vector<MathData> const & args, size_t arity, int optionals)
 {
        BOOST_ASSERT(displayMode_ == DISPLAY_NORMAL);
        cells_ = args;
@@ -541,7 +541,7 @@ void MathMacro::write(WriteStream & os) const
                // Use macroBackup_ instead of macro_ here, because
                // this is outside the metrics/draw calls, hence the macro_
                // variable can point to a MacroData which was freed already.
-               std::vector<docstring> const & defaults = macroBackup_.defaults();
+               vector<docstring> const & defaults = macroBackup_.defaults();
 
                // Optional argument
                if (os.latex()) {
index 9e92ba97861020a8a6e2ebbe0903e73be5be223c..704c05f55c99ffb44e493ce981b98516e969134a 100644 (file)
@@ -98,7 +98,7 @@ MathMacroTemplate::MathMacroTemplate()
 
 MathMacroTemplate::MathMacroTemplate(docstring const & name, int numargs,
        int optionals, docstring const & type, 
-       std::vector<MathData> const & optionalValues, 
+       vector<MathData> const & optionalValues, 
        MathData const & def, MathData const & display)
 : InsetMathNest(optionals + 3), numargs_(numargs), 
        optionals_(optionals), optionalValues_(optionalValues), type_(type)
@@ -107,7 +107,7 @@ MathMacroTemplate::MathMacroTemplate(docstring const & name, int numargs,
 
        if (numargs_ > 9)
                lyxerr << "MathMacroTemplate::MathMacroTemplate: wrong # of arguments: "
-                       << numargs_ << std::endl;
+                       << numargs_ << endl;
        
        asArray(name, cell(0));
        optionalValues_.resize(9);
@@ -201,20 +201,20 @@ void MathMacroTemplate::metrics(MetricsInfo & mi, Dimension & dim) const
                defdim.width() + 16 + dspdim.width() + 2;       
 
        dim.asc = dim0.ascent();
-       dim.asc = std::max(dim.asc, labeldim.ascent());
-       dim.asc = std::max(dim.asc, defdim.ascent());
-       dim.asc = std::max(dim.asc, dspdim.ascent());
+       dim.asc = max(dim.asc, labeldim.ascent());
+       dim.asc = max(dim.asc, defdim.ascent());
+       dim.asc = max(dim.asc, dspdim.ascent());
 
        dim.des = dim0.descent();
-       dim.des = std::max(dim.des, labeldim.descent());
-       dim.des = std::max(dim.des, defdim.descent());
-       dim.des = std::max(dim.des, dspdim.descent());
+       dim.des = max(dim.des, labeldim.descent());
+       dim.des = max(dim.des, defdim.descent());
+       dim.des = max(dim.des, dspdim.descent());
 
        // make the name cell vertically centered, and 5 pixel lines margin
        int real_asc = dim.asc - dim0.ascent() / 2;
        int real_des = dim.des + dim0.ascent() / 2;
-       dim.asc = std::max(real_asc, real_des) + dim0.ascent() / 2 + 5;
-       dim.des = std::max(real_asc, real_des) - dim0.ascent() / 2 + 5;
+       dim.asc = max(real_asc, real_des) + dim0.ascent() / 2 + 5;
+       dim.des = max(real_asc, real_des) - dim0.ascent() / 2 + 5;
        
        setDimCache(mi, dim);
 }
@@ -506,7 +506,7 @@ void MathMacroTemplate::makeNonOptional(Cursor & cur) {
 
 void MathMacroTemplate::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       std::string const arg = to_utf8(cmd.argument());
+       string const arg = to_utf8(cmd.argument());
        switch (cmd.action) {
 
        case LFUN_MATH_MACRO_ADD_PARAM: 
@@ -587,7 +587,7 @@ bool MathMacroTemplate::getStatus(Cursor & /*cur*/, FuncRequest const & cmd,
        FuncStatus & flag) const
 {
        bool ret = true;
-       std::string const arg = to_utf8(cmd.argument());
+       string const arg = to_utf8(cmd.argument());
        switch (cmd.action) {
                case LFUN_MATH_MACRO_ADD_PARAM: {
                        int num = numargs_ + 1;
@@ -651,7 +651,7 @@ void MathMacroTemplate::read(Buffer const &, Lexer & lex)
 }
 
 
-void MathMacroTemplate::write(Buffer const &, std::ostream & os) const
+void MathMacroTemplate::write(Buffer const &, ostream & os) const
 {
        odocstringstream oss;
        WriteStream wi(oss, false, false);
@@ -751,11 +751,11 @@ bool MathMacroTemplate::validMacro() const
 
 MacroData MathMacroTemplate::asMacroData() const
 {
-       std::vector<docstring> defaults(numargs_);
+       vector<docstring> defaults(numargs_);
        for (int i = 0; i < optionals_; ++i)
                defaults[i] = asString(cell(optIdx(i)));
        return MacroData(asString(cell(defIdx())), defaults,
-               numargs_, optionals_, asString(cell(displayIdx())), std::string());
+               numargs_, optionals_, asString(cell(displayIdx())), string());
 }
 
 
index 84069deb2b2841827b01bdb9b0f4b7a3fb5610b9..d2c4d762edfd0bed9e35f47e86a55b22abe2b3d3 100644 (file)
@@ -307,7 +307,7 @@ public:
        ///
        Parser(Lexer & lex);
        /// Only use this for reading from .lyx file format, for the reason
-       /// see Parser::tokenize(std::istream &).
+       /// see Parser::tokenize(istream &).
        Parser(istream & is);
        ///
        Parser(docstring const & str);
@@ -900,7 +900,7 @@ void Parser::parse1(InsetMathGrid & grid, unsigned flags,
                        docstring name;
                        int nargs = 0;
                        int optionals = 0;
-                       std::vector<MathData> optionalValues;
+                       vector<MathData> optionalValues;
                        if (t.cs() == "def") {
                                // get name
                                name = getToken().cs();
index c30da8240ab018150a9e2a45a80f34d409cd9099..b0a842f209fdfe140be456ec97ebecde3b057438 100644 (file)
@@ -51,7 +51,7 @@ NormalStream & operator<<(NormalStream & ns, docstring const & s)
 }
 
 
-NormalStream & operator<<(NormalStream & ns, const std::string & s)
+NormalStream & operator<<(NormalStream & ns, const string & s)
 {
        ns.os() << from_utf8(s);
        return ns;
@@ -155,7 +155,7 @@ WriteStream & operator<<(WriteStream & ws, char const * s)
                ws.pendingSpace(false);
        }
        ws.os() << s;
-       ws.addlines(int(std::count(s, s + strlen(s), '\n')));
+       ws.addlines(int(count(s, s + strlen(s), '\n')));
        return ws;
 }
 
@@ -465,7 +465,7 @@ OctaveStream & operator<<(OctaveStream & ns, char_type c)
 }
 
 
-OctaveStream & operator<<(OctaveStream & os, std::string const & s)
+OctaveStream & operator<<(OctaveStream & os, string const & s)
 {
        os.os() << from_utf8(s);
        return os;
index aa3a627addc7ad3734d7045ebc8e94c780540c46..b930d1f5660c041b608bd776bd8932caaff92825 100644 (file)
@@ -339,7 +339,7 @@ named_deco_struct deco_table[] = {
 };
 
 
-std::map<docstring, deco_struct> deco_list;
+map<docstring, deco_struct> deco_list;
 
 // sort the table on startup
 class init_deco_table {
@@ -360,7 +360,7 @@ static init_deco_table dummy;
 
 deco_struct const * search_deco(docstring const & name)
 {
-       std::map<docstring, deco_struct>::const_iterator p = deco_list.find(name);
+       map<docstring, deco_struct>::const_iterator p = deco_list.find(name);
        return p == deco_list.end() ? 0 : &(p->second);
 }
 
@@ -499,7 +499,7 @@ void math_font_max_dim(FontInfo const & font, int & asc, int & des)
 
 
 struct fontinfo {
-       std::string cmd_;
+       string cmd_;
        FontFamily family_;
        FontSeries series_;
        FontShape  shape_;
@@ -605,7 +605,7 @@ fontinfo * lookupFont(docstring const & name0)
 {
        //lyxerr << "searching font '" << name << "'" << endl;
        int const n = sizeof(fontinfos) / sizeof(fontinfo);
-       std::string name = to_utf8(name0);
+       string name = to_utf8(name0);
        for (int i = 0; i < n; ++i)
                if (fontinfos[i].cmd_ == name) {
                        //lyxerr << "found '" << i << "'" << endl;
index 1244da6edb547d90144ba72545fbc28a25a3bf5b..59489591d987cb3a9be1ace997e4fc992ee6cbdb 100644 (file)
@@ -109,10 +109,10 @@ ParagraphList::const_iterator makeParagraph(Buffer const & buf,
                if (par != pbegin)
                        os << '\n';
                if (par->layout() == defaultstyle && par->emptyTag()) {
-                       par->simpleDocBookOnePar(buf, os, runparams, outerFont(std::distance(paragraphs.begin(), par), paragraphs));
+                       par->simpleDocBookOnePar(buf, os, runparams, outerFont(distance(paragraphs.begin(), par), paragraphs));
                } else {
                        sgml::openTag(buf, os, runparams, *par);
-                       par->simpleDocBookOnePar(buf, os, runparams, outerFont(std::distance(paragraphs.begin(), par), paragraphs));
+                       par->simpleDocBookOnePar(buf, os, runparams, outerFont(distance(paragraphs.begin(), par), paragraphs));
                        sgml::closeTag(os, *par);
                }
        }
@@ -177,7 +177,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
                case LATEX_ITEM_ENVIRONMENT: {
                        if (par->params().depth() == pbegin->params().depth()) {
                                sgml::openTag(os, wrapper);
-                               par->simpleDocBookOnePar(buf, os, runparams, outerFont(std::distance(paragraphs.begin(), par), paragraphs), sep);
+                               par->simpleDocBookOnePar(buf, os, runparams, outerFont(distance(paragraphs.begin(), par), paragraphs), sep);
                                sgml::closeTag(os, wrapper);
                                ++par;
                        }
@@ -257,7 +257,7 @@ ParagraphList::const_iterator makeCommand(Buffer const & buf,
 
        // Opend inner tag and  close inner tags
        sgml::openTag(os, bstyle->innertag());
-       par->simpleDocBookOnePar(buf, os, runparams,  outerFont(std::distance(paragraphs.begin(), par), paragraphs));
+       par->simpleDocBookOnePar(buf, os, runparams,  outerFont(distance(paragraphs.begin(), par), paragraphs));
        sgml::closeTag(os, bstyle->innertag());
        os << '\n';
 
@@ -339,7 +339,7 @@ void docbookParagraphs(ParagraphList const & paragraphs,
                        break;
                }
                // makeEnvironment may process more than one paragraphs and bypass pend
-               if (std::distance(lastpar, par) >= std::distance(lastpar, pend))
+               if (distance(lastpar, par) >= distance(lastpar, pend))
                        break;
        }
 }
index 95714af9cdf617d021294da994e3a895a58e416f..7407fc4834852ee69aa86c338eba51f79c65d4ba 100644 (file)
@@ -283,7 +283,7 @@ TeXOnePar(Buffer const & buf,
        LayoutPtr style;
 
        if (runparams_in.verbatim) {
-               int const dist = std::distance(paragraphs.begin(), pit);
+               int const dist = distance(paragraphs.begin(), pit);
                Font const outerfont = outerFont(dist, paragraphs);
 
                // No newline if only one paragraph in this lyxtext
@@ -540,7 +540,7 @@ TeXOnePar(Buffer const & buf,
        }
 
        Font const outerfont =
-               outerFont(std::distance(paragraphs.begin(), pit),
+               outerFont(distance(paragraphs.begin(), pit),
                          paragraphs);
 
        // FIXME UNICODE
@@ -834,7 +834,7 @@ void latexParagraphs(Buffer const & buf,
                        par = TeXOnePar(buf, paragraphs, par, os, texrow,
                                        runparams, everypar);
                }
-               if (std::distance(lastpar, par) >= std::distance(lastpar, endpar))
+               if (distance(lastpar, par) >= distance(lastpar, endpar))
                        break;
        }
        // It might be that we only have a title in this document
index a95870bdf5c9711f0f33861df71e2aca351d4e7a..cd19b72389b3d7903cb01be77046c11e6ed2422c 100644 (file)
@@ -125,15 +125,15 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos)
        if (dim.wid != dim2.wid)
                lyxerr << "Error: inset " << to_ascii(inset->getInsetName())
                       << " draw width " << dim.width()
-                      << "> metrics width " << dim2.wid << "." << std::endl;
+                      << "> metrics width " << dim2.wid << "." << endl;
        if (dim->asc != dim2.asc)
                lyxerr << "Error: inset " << to_ascii(inset->getInsetName())
                       << " draw ascent " << dim.ascent()
-                      << "> metrics ascent " << dim2.asc << "." << std::endl;
+                      << "> metrics ascent " << dim2.asc << "." << endl;
        if (dim2.descent() != dim.des)
                lyxerr << "Error: inset " << to_ascii(inset->getInsetName())
                       << " draw ascent " << dim.descent()
-                      << "> metrics descent " << dim2.des << "." << std::endl;
+                      << "> metrics descent " << dim2.des << "." << endl;
        BOOST_ASSERT(dim2.wid == dim.wid);
        BOOST_ASSERT(dim2.asc == dim.asc);
        BOOST_ASSERT(dim2.des == dim.des);
@@ -222,7 +222,7 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
        Change::Type const prev_change = par_.lookupChange(pos).type;
 
        // first character
-       std::vector<char_type> str;
+       vector<char_type> str;
        str.reserve(100);
        str.push_back(par_.getChar(pos));
 
@@ -329,7 +329,7 @@ void RowPainter::paintFromPos(pos_type & vpos)
        char_type const c = par_.getChar(pos);
 
        // special case languages
-       std::string const & lang = orig_font.language()->lang();
+       string const & lang = orig_font.language()->lang();
        bool const hebrew = lang == "hebrew";
        bool const arabic = lang == "arabic_arabtex" || lang == "arabic_arabi" || 
                                                lang == "farsi";
@@ -487,7 +487,7 @@ void RowPainter::paintFirst()
 
        bool const is_rtl = text_.isRTL(buffer, par_);
        bool const is_seq = isFirstInSequence(pit_, text_.paragraphs());
-       //lyxerr << "paintFirst: " << par_.id() << " is_seq: " << is_seq << std::endl;
+       //lyxerr << "paintFirst: " << par_.id() << " is_seq: " << is_seq << endl;
 
        // should we print a label?
        if (layout->labeltype >= LABEL_STATIC
index e4e79c721fb66e1d0ab6356081f5220df25eefc3..e960502a170dc7df9aba410a1e7d512b8c7ae7b5 100644 (file)
@@ -77,7 +77,7 @@ namespace lyx {
 namespace support {
 
 FileFilterList::Filter::Filter(docstring const & description,
-                              std::string const & globs)
+                              string const & globs)
        : desc_(description)
 {
        typedef boost::tokenizer<boost::char_separator<char> > Tokenizer;
index 40e717516c971614267e9dab8f06f3678b205061..be33fe0f060a2057d3e16ec998e34103f30bb245 100644 (file)
@@ -189,7 +189,7 @@ bool FileName::isReadableDirectory() const
 }
 
 
-std::string FileName::onlyFileName() const
+string FileName::onlyFileName() const
 {
        return support::onlyFilename(absFilename());
 }
@@ -227,7 +227,7 @@ bool FileName::isDirWritable() const
 }
 
 
-FileNameList FileName::dirList(std::string const & ext) const
+FileNameList FileName::dirList(string const & ext) const
 {
        FileNameList dirlist;
        if (!isDirectory()) {
@@ -260,13 +260,13 @@ FileNameList FileName::dirList(std::string const & ext) const
 }
 
 
-FileName FileName::tempName(FileName const & dir, std::string const & mask)
+FileName FileName::tempName(FileName const & dir, string const & mask)
 {
        return support::tempName(dir, mask);
 }
 
 
-std::time_t FileName::lastModified() const
+time_t FileName::lastModified() const
 {
        return d->fi.lastModified().toTime_t();
 }
@@ -410,7 +410,7 @@ docstring FileName::fileContents(string const & encoding) const
 }
 
 
-void FileName::changeExtension(std::string const & extension)
+void FileName::changeExtension(string const & extension)
 {
        // FIXME: use Qt native methods...
        string const oldname = absFilename();
@@ -643,7 +643,7 @@ bool operator>(FileName const & lhs, FileName const & rhs)
 }
 
 
-std::ostream & operator<<(std::ostream & os, FileName const & filename)
+ostream & operator<<(ostream & os, FileName const & filename)
 {
        return os << filename.absFilename();
 }
@@ -699,7 +699,7 @@ string DocFileName::outputFilename(string const & path) const
 }
 
 
-string DocFileName::mangledFilename(std::string const & dir) const
+string DocFileName::mangledFilename(string const & dir) const
 {
        // We need to make sure that every DocFileName instance for a given
        // filename returns the same mangled name.
@@ -733,7 +733,7 @@ string DocFileName::mangledFilename(std::string const & dir) const
        // Prepend a counter to the filename. This is necessary to make
        // the mangled name unique.
        static int counter = 0;
-       std::ostringstream s;
+       ostringstream s;
        s << counter++ << mname;
        mname = s.str();
 
@@ -743,7 +743,7 @@ string DocFileName::mangledFilename(std::string const & dir) const
        // If dir.size() > max length, all bets are off for YAP. We truncate
        // the filename nevertheless, keeping a minimum of 10 chars.
 
-       string::size_type max_length = std::max(100 - ((int)dir.size() + 1), 10);
+       string::size_type max_length = max(100 - ((int)dir.size() + 1), 10);
 
        // If the mangled file name is too long, hack it to fit.
        // We know we're guaranteed to have a unique file name because
index 545ebeac983ae75eb723b65e590fc6c889d5e5d6..dcc2c3dd3428cdf975cfe87e9f4e9a36d59e3678 100644 (file)
@@ -44,8 +44,8 @@
 # include <sys/wait.h>
 #endif
 
-using namespace std;\r
-\r
+using namespace std;
+
 using boost::bind;
 
 namespace lyx {
@@ -75,7 +75,7 @@ public:
        {
                if (pid_ != 0)
                        support::kill(pid_, SIGKILL);
-               lyxerr << "Killed " << pid_ << std::endl;
+               lyxerr << "Killed " << pid_ << endl;
                delete this;
        }
 
@@ -168,7 +168,7 @@ void ForkedProcess::kill(int tol)
                return;
        }
 
-       int const tolerance = std::max(0, tol);
+       int const tolerance = max(0, tol);
        if (tolerance == 0) {
                // Kill it dead NOW!
                Murder::killItDead(0, pid());
@@ -200,14 +200,14 @@ int ForkedProcess::waitForChild()
                DWORD exit_code = 0;
                if (!GetExitCodeProcess(hProcess, &exit_code)) {
                        lyxerr << "GetExitCodeProcess failed waiting for child\n"
-                              << getChildErrorMessage() << std::endl;
+                              << getChildErrorMessage() << endl;
                } else
                        retval_ = exit_code;
                break;
        }
        case WAIT_FAILED:
                lyxerr << "WaitForSingleObject failed waiting for child\n"
-                      << getChildErrorMessage() << std::endl;
+                      << getChildErrorMessage() << endl;
                break;
        }
 
@@ -348,7 +348,7 @@ int ForkedCall::generateChild()
                for (; ait != aend; ++ait)
                        if (*ait)
                                lyxerr << '\t'<< *ait << '\n';
-               lyxerr << "</command>" << std::endl;
+               lyxerr << "</command>" << endl;
        }
 
 #ifdef _WIN32
@@ -384,16 +384,16 @@ int ForkedCall::generateChild()
 namespace ForkedCallQueue {
 
 /// A process in the queue
-typedef std::pair<std::string, ForkedCall::SignalTypePtr> Process;
+typedef pair<string, ForkedCall::SignalTypePtr> Process;
 /** Add a process to the queue. Processes are forked sequentially
  *  only one is running at a time.
  *  Connect to the returned signal and you'll be informed when
  *  the process has ended.
  */
-ForkedCall::SignalTypePtr add(std::string const & process);
+ForkedCall::SignalTypePtr add(string const & process);
 
 /// in-progress queue
-static std::queue<Process> callQueue_;
+static queue<Process> callQueue_;
 
 /// flag whether queue is running
 static bool running_ = 0;
@@ -485,7 +485,7 @@ string const getChildErrorMessage()
                (LPTSTR) &t_message, 0, 0
                ) != 0;
 
-       std::ostringstream ss;
+       ostringstream ss;
        ss << "LyX: Error waiting for child: " << error_code;
 
        if (ok) {
@@ -502,7 +502,7 @@ string const getChildErrorMessage()
 namespace ForkedCallsController {
 
 typedef boost::shared_ptr<ForkedProcess> ForkedProcessPtr;
-typedef std::list<ForkedProcessPtr> ListType;
+typedef list<ForkedProcessPtr> ListType;
 typedef ListType::iterator iterator;
 
 
@@ -546,7 +546,7 @@ void handleCompletedProcesses()
                        DWORD exit_code = 0;
                        if (!GetExitCodeProcess(hProcess, &exit_code)) {
                                lyxerr << "GetExitCodeProcess failed waiting for child\n"
-                                      << getChildErrorMessage() << std::endl;
+                                      << getChildErrorMessage() << endl;
                                // Child died, so pretend it returned 1
                                actCall->setRetValue(1);
                        } else {
@@ -557,7 +557,7 @@ void handleCompletedProcesses()
                }
                case WAIT_FAILED:
                        lyxerr << "WaitForSingleObject failed waiting for child\n"
-                              << getChildErrorMessage() << std::endl;
+                              << getChildErrorMessage() << endl;
                        actCall->setRetValue(1);
                        remove_it = true;
                        break;
index b8ae5a0ac3fb6b924ba6760cf0c0138ec8bb29be..5d2a554d83917cc0ae1b8a226e28d98e9acc2fc2 100644 (file)
@@ -155,8 +155,8 @@ docstring const Messages::get(string const & m) const
 #endif
        }
 
-       std::pair<TranslationCache::iterator, bool> result =
-               cache_.insert(std::make_pair(m, trans));
+       pair<TranslationCache::iterator, bool> result =
+               cache_.insert(make_pair(m, trans));
 
        BOOST_ASSERT(result.second);
 
@@ -198,12 +198,12 @@ namespace lyx {
 // libstdc++ that is distributed with GNU G++.
 class Messages::Pimpl {
 public:
-       typedef std::messages<char>::catalog catalog;
+       typedef messages<char>::catalog catalog;
 
        Pimpl(string const & l)
                : lang_(l),
                  loc_gl(lang_.c_str()),
-                 mssg_gl(std::use_facet<std::messages<char> >(loc_gl))
+                 mssg_gl(use_facet<messages<char> >(loc_gl))
        {
                //LYXERR("Messages: language(" << l << ") in dir(" << dir << ")");
 
@@ -225,9 +225,9 @@ private:
        ///
        string lang_;
        ///
-       std::locale loc_gl;
+       locale loc_gl;
        ///
-       std::messages<char> const & mssg_gl;
+       messages<char> const & mssg_gl;
        ///
        catalog cat_gl;
 };
index 9ffc8dc3f8ed24279bfc0d445ad556080f8599dd..4c886029a50af679b1d2c4b23560e1923c7d4549 100644 (file)
@@ -412,9 +412,9 @@ FileName const get_binary_path(string const & exe)
        if (exe_name != exe_path)
                return FileName();
 
-       std::vector<string> const path = getEnvPath("PATH");
-       std::vector<string>::const_iterator it = path.begin();
-       std::vector<string>::const_iterator const end = path.end();
+       vector<string> const path = getEnvPath("PATH");
+       vector<string>::const_iterator it = path.begin();
+       vector<string>::const_iterator const end = path.end();
        for (; it != end; ++it) {
                // This will do nothing if *it is already absolute.
                string const exe_dir = makeAbsPath(*it).absFilename();
@@ -455,7 +455,7 @@ get_system_support_dir(FileName const & abs_binary,
 
        // searched_dirs is used for diagnostic purposes only in the case
        // that "chkconfig.ltx" is not found.
-       std::list<FileName> searched_dirs;
+       list<FileName> searched_dirs;
 
        // 1. Use the -sysdir command line parameter.
        FileName path = abs_path_from_command_line(command_line_system_support_dir);
@@ -545,7 +545,7 @@ get_system_support_dir(FileName const & abs_binary,
        // Everything has failed :-(
        // So inform the user and exit.
        string searched_dirs_str;
-       typedef std::list<FileName>::const_iterator iterator;
+       typedef list<FileName>::const_iterator iterator;
        iterator const begin = searched_dirs.begin();
        iterator const end = searched_dirs.end();
        for (iterator it = begin; it != end; ++it) {
index e8fbd6404e4206d91cb1e8600622184d27099e43..bfdf0690b313f410665f2c2b9a6d8e804c022d43 100644 (file)
 
 #include <cstdlib>
 
-using std::string;
-
-#ifndef CXX_GLOBAL_CSTD
-using std::system;
-#endif
+using namespace std;
 
 namespace lyx {
 namespace support {
index a736a89278cbfcd8930d1ffc0ef70af889c373c8..31f1aeb231d59ac263112d257c7c6f84c311d432 100644 (file)
@@ -16,6 +16,8 @@
 #include <QObject>
 #include <QTimerEvent>
 
+using namespace std;
+
 namespace lyx {
 
 /**
@@ -60,7 +62,7 @@ void Timeout::Impl::reset()
 void Timeout::Impl::start()
 {
        if (running())
-               lyxerr << "Timeout::start: already running!" << std::endl;
+               lyxerr << "Timeout::start: already running!" << endl;
        timeout_id = startTimer(timeout_ms());
 }
 
index ab3b6eee754cddf1d7cb3bc5c2363df5ae29138f..ddf90ccebde42b69de573caf488d7a5f0a498b95 100644 (file)
@@ -168,15 +168,15 @@ LyXErr & operator<<(LyXErr & l, unsigned long t)
 { if (l.enabled()) l.stream() << t; return l; }
 LyXErr & operator<<(LyXErr & l, double t)
 { if (l.enabled()) l.stream() << t; return l; }
-LyXErr & operator<<(LyXErr & l, std::string const & t)
+LyXErr & operator<<(LyXErr & l, string const & t)
 { if (l.enabled()) l.stream() << t; return l; }
 LyXErr & operator<<(LyXErr & l, docstring const & t)
 { if (l.enabled()) l.stream() << to_utf8(t); return l; }
 LyXErr & operator<<(LyXErr & l, support::FileName const & t)
 { if (l.enabled()) l.stream() << t; return l; }
-LyXErr & operator<<(LyXErr & l, std::ostream &(*t)(std::ostream &))
+LyXErr & operator<<(LyXErr & l, ostream &(*t)(ostream &))
 { if (l.enabled()) l.stream() << t; return l; }
-LyXErr & operator<<(LyXErr & l, std::ios_base &(*t)(std::ios_base &))
+LyXErr & operator<<(LyXErr & l, ios_base &(*t)(ios_base &))
 { if (l.enabled()) l.stream() << t; return l; }
 
 
index 3dad26c329ecc72ad03ce46c1b5660eedfd90064..4f390dedc0d8d40bab517c0fa6a6f579b0b3122e 100644 (file)
@@ -30,18 +30,18 @@ namespace {
 
 /// codecvt facet for conversion of UCS4 (internal representation) to UTF8
 /// (external representation) or vice versa
-class iconv_codecvt_facet : public std::codecvt<lyx::char_type, char, std::mbstate_t>
+class iconv_codecvt_facet : public codecvt<lyx::char_type, char, mbstate_t>
 {
-       typedef std::codecvt<lyx::char_type, char, std::mbstate_t> base;
+       typedef codecvt<lyx::char_type, char, mbstate_t> base;
 public:
        /// Constructor. You have to specify with \p inout whether you want
        /// to use this facet only for input, only for output or for both.
        explicit iconv_codecvt_facet(string const & encoding = "UTF-8",
-                       std::ios_base::openmode inout = std::ios_base::in | std::ios_base::out,
+                       ios_base::openmode inout = ios_base::in | ios_base::out,
                        size_t refs = 0)
                : base(refs), encoding_(encoding)
        {
-               if (inout & std::ios_base::in) {
+               if (inout & ios_base::in) {
                        in_cd_ = iconv_open(ucs4_codeset, encoding.c_str());
                        if (in_cd_ == (iconv_t)(-1)) {
                                fprintf(stderr, "Error %d returned from iconv_open(in_cd_): %s\n",
@@ -51,7 +51,7 @@ public:
                        }
                } else
                        in_cd_ = (iconv_t)(-1);
-               if (inout & std::ios_base::out) {
+               if (inout & ios_base::out) {
                        out_cd_ = iconv_open(encoding.c_str(), ucs4_codeset);
                        if (out_cd_ == (iconv_t)(-1)) {
                                fprintf(stderr, "Error %d returned from iconv_open(out_cd_): %s\n",
@@ -199,7 +199,7 @@ protected:
                return to_next - to;
 #else
                size_t const length = end - from;
-               return std::min(length, max);
+               return min(length, max);
 #endif
        }
        virtual int do_max_length() const throw()
@@ -257,7 +257,7 @@ private:
        iconv_t in_cd_;
        iconv_t out_cd_;
        /// The narrow encoding
-       std::string encoding_;
+       string encoding_;
 };
 
 } // namespace anon
@@ -266,11 +266,11 @@ private:
 namespace lyx {
 
 template<class Ios>
-void setEncoding(Ios & ios, string const & encoding, std::ios_base::openmode mode)
+void setEncoding(Ios & ios, string const & encoding, ios_base::openmode mode)
 {
        // We must imbue the stream before openening the file
-       std::locale global;
-       std::locale locale(global, new iconv_codecvt_facet(encoding, mode));
+       locale global;
+       locale locale(global, new iconv_codecvt_facet(encoding, mode));
        ios.imbue(locale);
 }
 
@@ -287,7 +287,7 @@ idocfstream::idocfstream(string const & encoding) : base()
 }
 
 
-idocfstream::idocfstream(const char* s, std::ios_base::openmode mode,
+idocfstream::idocfstream(const char* s, ios_base::openmode mode,
                         string const & encoding)
        : base()
 {
@@ -307,7 +307,7 @@ odocfstream::odocfstream(string const & encoding) : base()
 }
 
 
-odocfstream::odocfstream(const char* s, std::ios_base::openmode mode,
+odocfstream::odocfstream(const char* s, ios_base::openmode mode,
                         string const & encoding)
        : base()
 {
@@ -331,14 +331,14 @@ SetEnc setEncoding(string const & encoding)
 
 odocstream & operator<<(odocstream & os, SetEnc e)
 {
-       if (std::has_facet<iconv_codecvt_facet>(os.rdbuf()->getloc())) {
+       if (has_facet<iconv_codecvt_facet>(os.rdbuf()->getloc())) {
                // This stream must be a file stream, since we never imbue
                // any other stream with a locale having a iconv_codecvt_facet.
                // Flush the stream so that all pending output is written
                // with the old encoding.
                os.flush();
-               std::locale locale(os.rdbuf()->getloc(),
-                       new iconv_codecvt_facet(e.encoding, std::ios_base::out));
+               locale locale(os.rdbuf()->getloc(),
+                       new iconv_codecvt_facet(e.encoding, ios_base::out));
                // FIXME Does changing the codecvt facet of an open file
                // stream always work? It does with gcc 4.1, but I have read
                // somewhere that it does not with MSVC.
index 88b790207e21de6fb74830f21ccecbfd2c139bcc..4d39b22efe60816db0bfa59e808ad6acf15e9f7b 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <boost/assert.hpp>
 
+using namespace std;
 
 namespace lyx {
 
@@ -38,7 +39,7 @@ docstring const from_ascii(char const * ascii)
 }
 
 
-docstring const from_ascii(std::string const & ascii)
+docstring const from_ascii(string const & ascii)
 {
        int const len = ascii.length();
        for (int i = 0; i < len; ++i)
@@ -47,10 +48,10 @@ docstring const from_ascii(std::string const & ascii)
 }
 
 
-std::string const to_ascii(docstring const & ucs4)
+string const to_ascii(docstring const & ucs4)
 {
        int const len = ucs4.length();
-       std::string ascii;
+       string ascii;
        ascii.resize(len);
        for (int i = 0; i < len; ++i) {
                BOOST_ASSERT(ucs4[i] < 0x80);
@@ -68,7 +69,7 @@ IconvProcessor & utf8ToUcs4()
 
 
 
-void utf8_to_ucs4(std::string const & utf8, docstring & ucs4)
+void utf8_to_ucs4(string const & utf8, docstring & ucs4)
 {
        size_t n = utf8.size();
        // as utf8 is a multi-byte encoding, there would be at most
@@ -88,7 +89,7 @@ void utf8_to_ucs4(std::string const & utf8, docstring & ucs4)
 }
 
 
-docstring const from_utf8(std::string const & utf8)
+docstring const from_utf8(string const & utf8)
 {
        docstring ucs4;
        utf8_to_ucs4(utf8, ucs4);
@@ -96,24 +97,24 @@ docstring const from_utf8(std::string const & utf8)
 }
 
 
-std::string const to_utf8(docstring const & ucs4)
+string const to_utf8(docstring const & ucs4)
 {
-       std::vector<char> const utf8 =
+       vector<char> const utf8 =
                ucs4_to_utf8(ucs4.data(), ucs4.size());
-       return std::string(utf8.begin(), utf8.end());
+       return string(utf8.begin(), utf8.end());
 }
 
 
-docstring const from_local8bit(std::string const & s)
+docstring const from_local8bit(string const & s)
 {
        return qstring_to_ucs4(QString::fromLocal8Bit(s.data(), s.length()));
 }
 
 
 /// Exception thrown by to_local8bit if the string could not be converted
-class to_local8bit_failure : public std::bad_cast {
+class to_local8bit_failure : public bad_cast {
 public:
-       to_local8bit_failure() throw() : std::bad_cast() {}
+       to_local8bit_failure() throw() : bad_cast() {}
        virtual ~to_local8bit_failure() throw() {}
        virtual const char* what() const throw()
        {
@@ -122,29 +123,29 @@ public:
 };
 
 
-std::string const to_local8bit(docstring const & s)
+string const to_local8bit(docstring const & s)
 {
        // This conversion can fail, depending on input.
        if (s.empty())
-               return std::string();
+               return string();
        QByteArray const local = toqstr(s).toLocal8Bit();
        if (local.size() == 0)
                throw to_local8bit_failure();
-       return std::string(local.begin(), local.end());
+       return string(local.begin(), local.end());
 }
 
 
-docstring const from_filesystem8bit(std::string const & s)
+docstring const from_filesystem8bit(string const & s)
 {
        QByteArray const encoded(s.c_str(), s.length());
        return qstring_to_ucs4(QFile::decodeName(encoded));
 }
 
 
-std::string const to_filesystem8bit(docstring const & s)
+string const to_filesystem8bit(docstring const & s)
 {
        QByteArray const encoded = QFile::encodeName(toqstr(s));
-       return std::string(encoded.begin(), encoded.end());
+       return string(encoded.begin(), encoded.end());
 }
 
 
@@ -262,9 +263,9 @@ ctype<lyx::char_type>::do_narrow(const lyx::char_type *, const lyx::char_type *,
 
 namespace lyx {
 
-class ctype_failure : public std::bad_cast {
+class ctype_failure : public bad_cast {
 public:
-       ctype_failure() throw() : std::bad_cast() {}
+       ctype_failure() throw() : bad_cast() {}
        virtual ~ctype_failure() throw() {}
        virtual const char* what() const throw()
        {
@@ -273,9 +274,9 @@ public:
 };
 
 
-class num_put_failure : public std::bad_cast {
+class num_put_failure : public bad_cast {
 public:
-       num_put_failure() throw() : std::bad_cast() {}
+       num_put_failure() throw() : bad_cast() {}
        virtual ~num_put_failure() throw() {}
        virtual const char* what() const throw()
        {
@@ -286,13 +287,13 @@ public:
 
 /// ctype facet for UCS4 characters. The implementation does only support pure
 /// ASCII, since we do not need anything else for now.
-/// The code is partly stolen from std::ctype<wchar_t> from gcc.
-class ascii_ctype_facet : public std::ctype<lyx::char_type>
+/// The code is partly stolen from ctype<wchar_t> from gcc.
+class ascii_ctype_facet : public ctype<lyx::char_type>
 {
 public:
        typedef lyx::char_type char_type;
        typedef wctype_t wmask_type;
-       explicit ascii_ctype_facet(size_t refs = 0) : std::ctype<char_type>(refs)
+       explicit ascii_ctype_facet(size_t refs = 0) : ctype<char_type>(refs)
        {
                M_initialize_ctype();
        }
@@ -466,66 +467,66 @@ protected:
 
 /// Facet for outputting numbers to odocstreams as ascii.
 /// Here we simply need defining the virtual do_put functions.
-class ascii_num_put_facet : public std::num_put<lyx::char_type, std::ostreambuf_iterator<lyx::char_type, std::char_traits<lyx::char_type> > >
+class ascii_num_put_facet : public num_put<lyx::char_type, ostreambuf_iterator<lyx::char_type, char_traits<lyx::char_type> > >
 {
-       typedef std::ostreambuf_iterator<lyx::char_type, std::char_traits<lyx::char_type> > iter_type;
+       typedef ostreambuf_iterator<lyx::char_type, char_traits<lyx::char_type> > iter_type;
 public:
-       ascii_num_put_facet(size_t refs = 0) : std::num_put<lyx::char_type, iter_type>(refs) {}
+       ascii_num_put_facet(size_t refs = 0) : num_put<lyx::char_type, iter_type>(refs) {}
 
        /// Facet for converting numbers to ascii strings.
-       class string_num_put_facet : public std::num_put<char, std::basic_string<char>::iterator>
+       class string_num_put_facet : public num_put<char, basic_string<char>::iterator>
        {
        public:
-               string_num_put_facet() : std::num_put<char, std::basic_string<char>::iterator>(1) {}
+               string_num_put_facet() : num_put<char, basic_string<char>::iterator>(1) {}
        };
 
 protected:
        iter_type
-       do_put(iter_type oit, std::ios_base & b, char_type fill, bool v) const
+       do_put(iter_type oit, ios_base & b, char_type fill, bool v) const
        {
                return do_put_helper(oit, b, fill, v);
        }
 
        iter_type
-       do_put(iter_type oit, std::ios_base & b, char_type fill, long v) const
+       do_put(iter_type oit, ios_base & b, char_type fill, long v) const
        {
                return do_put_helper(oit, b, fill, v);
        }
 
        iter_type
-       do_put(iter_type oit, std::ios_base & b, char_type fill, unsigned long v) const
+       do_put(iter_type oit, ios_base & b, char_type fill, unsigned long v) const
        {
                return do_put_helper(oit, b, fill, v);
        }
 
 #ifdef _GLIBCXX_USE_LONG_LONG
        iter_type
-       do_put(iter_type oit, std::ios_base & b, char_type fill, long long v) const
+       do_put(iter_type oit, ios_base & b, char_type fill, long long v) const
        {
                return do_put_helper(oit, b, fill, v);
        }
 
        iter_type
-       do_put(iter_type oit, std::ios_base & b, char_type fill, unsigned long long v) const
+       do_put(iter_type oit, ios_base & b, char_type fill, unsigned long long v) const
        {
                return do_put_helper(oit, b, fill, v);
        }
 #endif
 
        iter_type
-       do_put(iter_type oit, std::ios_base & b, char_type fill, double v) const
+       do_put(iter_type oit, ios_base & b, char_type fill, double v) const
        {
                return do_put_helper(oit, b, fill, v);
        }
 
        iter_type
-       do_put(iter_type oit, std::ios_base & b, char_type fill, long double v) const
+       do_put(iter_type oit, ios_base & b, char_type fill, long double v) const
        {
                return do_put_helper(oit, b, fill, v);
        }
 
        iter_type
-       do_put(iter_type oit, std::ios_base & b, char_type fill, void const * v) const
+       do_put(iter_type oit, ios_base & b, char_type fill, void const * v) const
        {
                return do_put_helper(oit, b, fill, v);
        }
@@ -533,19 +534,19 @@ protected:
 private:
        template <typename ValueType>
        iter_type
-       do_put_helper(iter_type oit, std::ios_base & b, char_type fill, ValueType v) const
+       do_put_helper(iter_type oit, ios_base & b, char_type fill, ValueType v) const
        {
                if (fill >= 0x80)
                        throw num_put_failure();
 
-               std::streamsize const sz = b.width() > b.precision() ?
+               streamsize const sz = b.width() > b.precision() ?
                                           b.width() : b.precision();
                // 64 is large enough, unless width or precision are bigger
-               std::streamsize const wd = (sz > 56 ? sz : 56) + 8;
-               std::string s(wd, '\0');
+               streamsize const wd = (sz > 56 ? sz : 56) + 8;
+               string s(wd, '\0');
                string_num_put_facet f;
-               std::string::const_iterator cit = s.begin();
-               std::string::const_iterator end =
+               string::const_iterator cit = s.begin();
+               string::const_iterator end =
                        f.put(s.begin(), b, fill, v);
                for (; cit != end; ++cit, ++oit)
                        *oit = *cit;
@@ -557,32 +558,32 @@ private:
 
 /// Facet for inputting ascii representations of numbers from idocstreams.
 /// Here we simply need defining the virtual do_get functions.
-class ascii_num_get_facet : public std::num_get<lyx::char_type, std::istreambuf_iterator<lyx::char_type, std::char_traits<lyx::char_type> > >
+class ascii_num_get_facet : public num_get<lyx::char_type, istreambuf_iterator<lyx::char_type, char_traits<lyx::char_type> > >
 {
-       typedef std::istreambuf_iterator<lyx::char_type, std::char_traits<lyx::char_type> > iter_type;
+       typedef istreambuf_iterator<lyx::char_type, char_traits<lyx::char_type> > iter_type;
 public:
-       ascii_num_get_facet(size_t refs = 0) : std::num_get<lyx::char_type, iter_type>(refs) {}
+       ascii_num_get_facet(size_t refs = 0) : num_get<lyx::char_type, iter_type>(refs) {}
 
        /// Facet for converting ascii representation of numbers to a value.
-       class string_num_get_facet : public std::num_get<char, std::basic_string<char>::iterator>
+       class string_num_get_facet : public num_get<char, basic_string<char>::iterator>
        {
        public:
-               string_num_get_facet() : std::num_get<char, std::basic_string<char>::iterator>(1) {}
+               string_num_get_facet() : num_get<char, basic_string<char>::iterator>(1) {}
        };
 
        /// Numpunct facet defining the I/O format.
-       class numpunct_facet : public std::numpunct<char>
+       class numpunct_facet : public numpunct<char>
        {
        public:
-               numpunct_facet() : std::numpunct<char>(1) {}
+               numpunct_facet() : numpunct<char>(1) {}
        };
 
 protected:
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, bool & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, bool & v) const
        {
-               if (b.flags() & std::ios_base::boolalpha) {
+               if (b.flags() & ios_base::boolalpha) {
                        numpunct_facet p;
                        lyx::docstring const truename = from_local8bit(p.truename());
                        lyx::docstring const falsename = from_local8bit(p.falsename());
@@ -609,100 +610,100 @@ protected:
                                }
                        }
                        if (ok) {
-                               err = std::ios_base::goodbit;
+                               err = ios_base::goodbit;
                                v = truename == s ? true : false;
                        } else
-                               err = std::ios_base::failbit;
+                               err = ios_base::failbit;
                        if (iit == eit)
-                               err |= std::ios_base::eofbit;
+                               err |= ios_base::eofbit;
                        return iit;
                } else {
                        long l;
                        iter_type end = this->do_get(iit, eit, b, err, l);
-                       if (!(err & std::ios_base::failbit)) {
+                       if (!(err & ios_base::failbit)) {
                                if (l == 0)
                                        v = false;
                                else if (l == 1)
                                        v = true;
                                else
-                                       err |= std::ios_base::failbit;
+                                       err |= ios_base::failbit;
                        }
                        return end;
                }
        }
 
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, long & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, long & v) const
        {
                return do_get_integer(iit, eit, b, err, v);
        }
 
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, unsigned short & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, unsigned short & v) const
        {
                return do_get_integer(iit, eit, b, err, v);
        }
 
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, unsigned int & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, unsigned int & v) const
        {
                return do_get_integer(iit, eit, b, err, v);
        }
 
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, unsigned long & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, unsigned long & v) const
        {
                return do_get_integer(iit, eit, b, err, v);
        }
 
 #ifdef _GLIBCXX_USE_LONG_LONG
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, long long & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, long long & v) const
        {
                return do_get_integer(iit, eit, b, err, v);
        }
 
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, unsigned long long & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, unsigned long long & v) const
        {
                return do_get_integer(iit, eit, b, err, v);
        }
 #endif
 
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, float & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, float & v) const
        {
                return do_get_float(iit, eit, b, err, v);
        }
 
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, double & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, double & v) const
        {
                return do_get_float(iit, eit, b, err, v);
        }
 
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, long double & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, long double & v) const
        {
                return do_get_float(iit, eit, b, err, v);
        }
 
        iter_type
-       do_get(iter_type iit, iter_type eit, std::ios_base & b,
-               std::ios_base::iostate & err, void * & v) const
+       do_get(iter_type iit, iter_type eit, ios_base & b,
+               ios_base::iostate & err, void * & v) const
        {
                unsigned long val;
                iter_type end = do_get_integer(iit, eit, b, err, val);
-               if (!(err & std::ios_base::failbit))
+               if (!(err & ios_base::failbit))
                        v = reinterpret_cast<void *>(val);
                return end;
        }
@@ -710,10 +711,10 @@ protected:
 private:
        template <typename ValueType>
        iter_type
-       do_get_integer(iter_type iit, iter_type eit, std::ios_base & b,
-                       std::ios_base::iostate & err, ValueType & v) const
+       do_get_integer(iter_type iit, iter_type eit, ios_base & b,
+                       ios_base::iostate & err, ValueType & v) const
        {
-               std::string s;
+               string s;
                s.reserve(64);
                for (; iit != eit && isNumpunct(*iit); ++iit)
                        s += static_cast<char>(*iit);
@@ -725,7 +726,7 @@ private:
                string_num_get_facet f;
                f.get(s.begin(), s.end(), b, err, v);
                if (iit == eit)
-                   err |= std::ios_base::eofbit;
+                   err |= ios_base::eofbit;
 
                return iit;
        }
@@ -740,12 +741,12 @@ private:
 
        template <typename ValueType>
        iter_type
-       do_get_float(iter_type iit, iter_type eit, std::ios_base & b,
-                       std::ios_base::iostate & err, ValueType & v) const
+       do_get_float(iter_type iit, iter_type eit, ios_base & b,
+                       ios_base::iostate & err, ValueType & v) const
        {
                // Gather a string of the form
                // [+-]? [0-9]* .? [0-9]* ([eE] [+-]? [0-9]+)?
-               std::string s;
+               string s;
                s.reserve(64);
                char c;
                numpunct_facet p;
@@ -774,7 +775,7 @@ private:
                string_num_get_facet f;
                f.get(s.begin(), s.end(), b, err, v);
                if (iit == eit)
-                   err |= std::ios_base::eofbit;
+                   err |= ios_base::eofbit;
 
                return iit;
        }
@@ -791,11 +792,11 @@ class locale_initializer {
 public:
        locale_initializer()
        {
-               std::locale global;
-               std::locale const loc1(global, new ascii_ctype_facet);
-               std::locale const loc2(loc1, new ascii_num_put_facet);
-               std::locale const loc3(loc2, new ascii_num_get_facet);
-               std::locale::global(loc3);
+               locale global;
+               locale const loc1(global, new ascii_ctype_facet);
+               locale const loc2(loc1, new ascii_num_put_facet);
+               locale const loc3(loc2, new ascii_num_get_facet);
+               locale::global(loc3);
        }
 };
 
index e1bbaccc0618ed8b385dc462559d6d9cc1b804ca..3c856d068b7b2b122ad83f752d9e3bba41877331 100644 (file)
@@ -47,7 +47,7 @@ vector<string> const getEnvPath(string const & name)
        Tokenizer::const_iterator it = tokens.begin();
        Tokenizer::const_iterator const end = tokens.end();
 
-       std::vector<string> vars;
+       vector<string> vars;
        for (; it != end; ++it)
                vars.push_back(os::internal_path(*it));
 
@@ -64,7 +64,7 @@ bool setEnv(string const & name, string const & value)
 #if defined (HAVE_SETENV)
        return ::setenv(name.c_str(), encoded.c_str(), true);
 #elif defined (HAVE_PUTENV)
-       static std::map<string, string> varmap;
+       static map<string, string> varmap;
        varmap[name] = name + '=' + encoded;
        return ::putenv(const_cast<char*>(varmap[name].c_str())) == 0;
 #else
@@ -77,7 +77,7 @@ bool setEnv(string const & name, string const & value)
 void setEnvPath(string const & name, vector<string> const & env)
 {
        char const separator(os::path_separator());
-       std::ostringstream ss;
+       ostringstream ss;
        vector<string>::const_iterator const begin = env.begin();
        vector<string>::const_iterator const end = env.end();
        vector<string>::const_iterator it = begin;
@@ -109,7 +109,7 @@ void prependEnvPath(string const & name, string const & prefix)
        token_iterator const end = reversed_tokens.rend();
        for (; it != end; ++it) {
                vector<string>::iterator remove_it =
-                       std::remove(env_var.begin(), env_var.end(), *it);
+                       remove(env_var.begin(), env_var.end(), *it);
                env_var.erase(remove_it, env_var.end());
                env_var.insert(env_var.begin(), *it);
        }
index feb90e752c928795ed58d2e151782f3025274416..65cc5ef29234e6e3f8e496e9734f0e69885531e0 100644 (file)
@@ -887,7 +887,7 @@ string const readBB_from_PSFile(FileName const & file)
 
        static boost::regex bbox_re(
                "^%%BoundingBox:\\s*([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)");
-       std::ifstream is(file_.toFilesystemEncoding().c_str());
+       ifstream is(file_.toFilesystemEncoding().c_str());
        while (is) {
                string s;
                getline(is,s);
index fe521f3087066708e8d63a647bba143d973ea004..521458eab35ee53b255e11760723458a6320a104 100644 (file)
@@ -35,6 +35,8 @@
 # include <string.h> // for memcpy
 #endif
 
+using namespace std;
+
 #ifdef GZSTREAM_NAMESPACE
 namespace GZSTREAM_NAMESPACE {
 #endif
@@ -52,14 +54,14 @@ gzstreambuf* gzstreambuf::open( const char* name, int open_mode) {
         return (gzstreambuf*)0;
     mode = open_mode;
     // no append nor read/write mode
-    if ((mode & std::ios::ate) || (mode & std::ios::app)
-        || ((mode & std::ios::in) && (mode & std::ios::out)))
+    if ((mode & ios::ate) || (mode & ios::app)
+        || ((mode & ios::in) && (mode & ios::out)))
         return (gzstreambuf*)0;
     char  fmode[10];
     char* fmodeptr = fmode;
-    if ( mode & std::ios::in)
+    if ( mode & ios::in)
         *fmodeptr++ = 'r';
-    else if ( mode & std::ios::out)
+    else if ( mode & ios::out)
         *fmodeptr++ = 'w';
     *fmodeptr++ = 'b';
     *fmodeptr = '\0';
@@ -84,7 +86,7 @@ int gzstreambuf::underflow() { // used for input buffer only
     if ( gptr() && ( gptr() < egptr()))
         return * reinterpret_cast<unsigned char *>( gptr());
 
-    if ( ! (mode & std::ios::in) || ! opened)
+    if ( ! (mode & ios::in) || ! opened)
         return EOF;
     // Josuttis' implementation of inbuf
     int n_putback = gptr() - eback();
@@ -116,7 +118,7 @@ int gzstreambuf::flush_buffer() {
 }
 
 int gzstreambuf::overflow( int c) { // used for output buffer only
-    if ( ! ( mode & std::ios::out) || ! opened)
+    if ( ! ( mode & ios::out) || ! opened)
         return EOF;
     if (c != EOF) {
         *pptr() = c;
@@ -129,7 +131,7 @@ int gzstreambuf::overflow( int c) { // used for output buffer only
 
 int gzstreambuf::sync() {
     // Changed to use flush_buffer() instead of overflow( EOF)
-    // which caused improper behavior with std::endl and flush(),
+    // which caused improper behavior with endl and flush(),
     // bug reported by Vincent Ricard.
     if ( pptr() && pptr() > pbase()) {
         if ( flush_buffer() == EOF)
@@ -153,13 +155,13 @@ gzstreambase::~gzstreambase() {
 
 void gzstreambase::open( const char* name, int open_mode) {
     if ( ! buf.open( name, open_mode))
-        clear( rdstate() | std::ios::badbit);
+        clear( rdstate() | ios::badbit);
 }
 
 void gzstreambase::close() {
     if ( buf.is_open())
         if ( ! buf.close())
-            clear( rdstate() | std::ios::badbit);
+            clear( rdstate() | ios::badbit);
 }
 
 #ifdef GZSTREAM_NAMESPACE
index aa5bbc6cbc024c565be155da640614ddaae2ce67..0666daaf8c3daf5f47849cf58d01d556de821d92 100644 (file)
@@ -40,11 +40,11 @@ docstring const & empty_docstring()
        return s;
 }
 
-// Using this allows us to have std::string default arguments in headers
+// Using this allows us to have string default arguments in headers
 // without #include <string>
-std::string const & empty_string()
+string const & empty_string()
 {
-       static std::string s;
+       static string s;
        return s;
 }
 
@@ -410,8 +410,8 @@ char_type uppercase(char_type c)
 
 namespace {
 
-// since we cannot use std::tolower and std::toupper directly in the
-// calls to std::transform yet, we use these helper clases. (Lgb)
+// since we cannot use tolower and toupper directly in the
+// calls to transform yet, we use these helper clases. (Lgb)
 
 struct local_lowercase {
        char_type operator()(char_type c) const {
@@ -622,10 +622,10 @@ namespace {
 
 /// Substitute all \a oldchar with \a newchar
 template<typename Ch> inline
-std::basic_string<Ch> const subst_char(std::basic_string<Ch> const & a,
+basic_string<Ch> const subst_char(basic_string<Ch> const & a,
                Ch oldchar, Ch newchar)
 {
-       typedef std::basic_string<Ch> String;
+       typedef basic_string<Ch> String;
        String tmp(a);
        typename String::iterator lit = tmp.begin();
        typename String::iterator end = tmp.end();
index 781ca7f5591b1d8cfb9f8385f9201a425dee270c..a8ff0ec742ec9567adcbbfd44c41c67dd7bbeb48 100644 (file)
@@ -98,7 +98,7 @@ inline
 unsigned long do_crc(InputIterator first, InputIterator last)
 {
        boost::crc_32_type crc;
-       crc = std::for_each(first, last, crc);
+       crc = for_each(first, last, crc);
        return crc.checksum();
 }
 
index 4d2c55ed378e3862c0d4ce7c520f07e13a1bdcd4..6984d2c7480fbfd43fe0079716d7eab4252a370d 100644 (file)
@@ -22,11 +22,11 @@ namespace lyx {
 namespace support {
 namespace os {
 
-std::string const python()
+string const python()
 {
        // Use the -tt switch so that mixed tab/whitespace indentation is
        // an error
-       static std::string const command("python -tt");
+       static string const command("python -tt");
        return command;
 }
 
index 4beaaa16e446c46e2e41f9c72bf3ff37666fa1f1..cddb497c5f529139166f1410dacfee5a1b3cd762 100644 (file)
@@ -201,7 +201,7 @@ static string const get_long_path(string const & short_path)
        // GetLongPathName needs the path in file system encoding.
        // We can use to_local8bit, since file system encoding and the
        // local 8 bit encoding are identical on windows.
-       std::vector<char> long_path(MAX_PATH);
+       vector<char> long_path(MAX_PATH);
        DWORD result = GetLongPathName(to_local8bit(from_utf8(short_path)).c_str(),
                                       &long_path[0], long_path.size());
 
index d8f4a9492b33c52678800899eaf5cd0c985335de..204898567e953f8cf6e1ae90e0dde26af5e756f5 100644 (file)
@@ -18,7 +18,7 @@
 
 namespace boost {
 
-void throw_exception(std::exception const & /*e*/)
+void throw_exception(exception const & /*e*/)
 {
        BOOST_ASSERT(false);
 }
index d9bdc872f6d65d3dd2fc9d70d66c1c0ad7b3b724..3270e7bb1880d7da01dfb5c0d89e60ec4eb52312 100644 (file)
@@ -51,7 +51,7 @@ static const iconv_t invalid_cd = (iconv_t)(-1);
 
 struct IconvProcessor::Impl
 {
-       Impl(std::string const & to, std::string const & from)
+       Impl(string const & to, string const & from)
                : cd(invalid_cd), tocode_(to), fromcode_(from)
        {}
 
@@ -62,8 +62,8 @@ struct IconvProcessor::Impl
        }
 
        iconv_t cd;
-       std::string tocode_;
-       std::string fromcode_;
+       string tocode_;
+       string fromcode_;
 };
 
 
@@ -134,7 +134,7 @@ int IconvProcessor::convert(char const * buf, size_t buflen,
 
        int res = iconv(pimpl_->cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
 
-       //lyxerr << std::dec;
+       //lyxerr << dec;
        //lyxerr << "Inbytesleft: " << inbytesleft << endl;
        //lyxerr << "Outbytesleft: " << outbytesleft << endl;
 
@@ -153,7 +153,7 @@ int IconvProcessor::convert(char const * buf, size_t buflen,
                                << " has been encountered in the input.\n"
                                << "When converting from " << pimpl_->fromcode_
                                << " to " << pimpl_->tocode_ << ".\n";
-                       lyxerr << "Input:" << std::hex;
+                       lyxerr << "Input:" << hex;
                        for (size_t i = 0; i < buflen; ++i) {
                                // char may be signed, avoid output of
                                // something like 0xffffffc2
@@ -161,14 +161,14 @@ int IconvProcessor::convert(char const * buf, size_t buflen,
                                        *reinterpret_cast<unsigned char const *>(buf + i);
                                lyxerr << " 0x" << (unsigned int)b;
                        }
-                       lyxerr << std::dec << endl;
+                       lyxerr << dec << endl;
                        break;
                case EINVAL:
                        lyxerr << "EINVAL An incomplete multibyte sequence"
                                << " has been encountered in the input.\n"
                                << "When converting from " << pimpl_->fromcode_
                                << " to " << pimpl_->tocode_ << ".\n";
-                       lyxerr << "Input:" << std::hex;
+                       lyxerr << "Input:" << hex;
                        for (size_t i = 0; i < buflen; ++i) {
                                // char may be signed, avoid output of
                                // something like 0xffffffc2
@@ -176,7 +176,7 @@ int IconvProcessor::convert(char const * buf, size_t buflen,
                                        *reinterpret_cast<unsigned char const *>(buf + i);
                                lyxerr << " 0x" << (unsigned int)b;
                        }
-                       lyxerr << std::dec << endl;
+                       lyxerr << dec << endl;
                        break;
                default:
                        lyxerr << "\tSome other error: " << errno << endl;
index a587401907a474a35c9b75ba732d1ed123da3b1d..ff3c85d114a7b1892311b3cc6a59db2caa22c6d4 100644 (file)
@@ -102,8 +102,8 @@ Context::Context(bool need_layout_,
 Context::~Context()
 {
        if (!extra_stuff.empty())
-               std::cerr << "Bug: Ignoring extra stuff '" << extra_stuff
-                         << '\'' << std::endl;
+               cerr << "Bug: Ignoring extra stuff '" << extra_stuff
+                         << '\'' << endl;
 }
 
 
@@ -204,7 +204,7 @@ void Context::new_paragraph(ostream & os)
 }
 
 
-void Context::add_extra_stuff(std::string const & stuff)
+void Context::add_extra_stuff(string const & stuff)
 {
        if (!lyx::support::contains(extra_stuff, stuff))
                extra_stuff += stuff;
index 2c826fed4aec579698464544f5876977173c52f9..323667f1157cf4c9072900161d7d7262707d7d20 100644 (file)
@@ -273,14 +273,14 @@ Parser::Arg Parser::getFullArg(char left, char right)
        // This is needed if a partial file ends with a command without arguments,
        // e. g. \medskip
        if (! good())
-               return std::make_pair(false, string());
+               return make_pair(false, string());
 
        string result;
        char c = getChar();
 
        if (c != left) {
                putback();
-               return std::make_pair(false, string());
+               return make_pair(false, string());
        } else
                while ((c = getChar()) != right && good()) {
                        // Ignore comments
@@ -292,7 +292,7 @@ Parser::Arg Parser::getFullArg(char left, char right)
                                result += curr_token().asInput();
                }
 
-       return std::make_pair(true, result);
+       return make_pair(true, result);
 }
 
 
index 49db80c9d948a15dd377489c15869b92be92caf0..7efe686a4925492547f61f4d50a0c5cf74874ce3 100644 (file)
@@ -22,7 +22,7 @@ using namespace std;
 
 namespace boost {
 
-void throw_exception(std::exception const & e)
+void throw_exception(exception const & e)
 {
        lyx::lyxerr << "Exception caught:\n"
               << e.what() << endl;
index c49bb929b0ad3d2c7115246c6622af8fd145a81f..55e50ec39af1a41ed64cba5ccd681fc7c188fde9 100644 (file)
 #include "support/gettext.h"
 #include "../support/docstring.h"
 
+using namespace std;
 
 namespace lyx {
 
 
-docstring const _(std::string const & str)
+docstring const _(string const & str)
 {
        return from_ascii(str);
 }
index 9e88c2b5e4c2aeae4a63454fb467dc4bbe91e50e..86a57087b27b1114d7d1bd39b8619c7671c0b4cc 100644 (file)
@@ -35,9 +35,9 @@ using namespace lyx::support;
 namespace lyx {
 
 // special columntypes
-extern std::map<char, int> special_columns;
+extern map<char, int> special_columns;
 
-std::map<string, vector<string> > used_packages;
+map<string, vector<string> > used_packages;
 
 // needed to handle encodings with babel
 bool one_language = true;
index 5f4767efb8d27b1186e2659e0437a8e574a6057d..2f26838adff01d67086170b1851927a128d2abe6 100644 (file)
@@ -341,7 +341,7 @@ void easyParse(int & argc, char * argv[])
        cmdmap["-userdir"] = parse_userdir;
 
        for (int i = 1; i < argc; ++i) {
-               std::map<string, cmd_helper>::const_iterator it
+               map<string, cmd_helper>::const_iterator it
                        = cmdmap.find(argv[i]);
 
                // don't complain if not found - may be parsed later
@@ -393,7 +393,7 @@ namespace {
  *  You must ensure that \p parentFilePath is properly set before calling
  *  this function!
  */
-void tex2lyx(std::istream & is, std::ostream & os)
+void tex2lyx(istream & is, ostream & os)
 {
        Parser p(is);
        //p.dump();
@@ -424,7 +424,7 @@ void tex2lyx(std::istream & is, std::ostream & os)
 
 
 /// convert TeX from \p infilename to LyX and write it to \p os
-bool tex2lyx(FileName const & infilename, std::ostream & os)
+bool tex2lyx(FileName const & infilename, ostream & os)
 {
        ifstream is(infilename.toFilesystemEncoding().c_str());
        if (!is.good()) {
@@ -476,7 +476,7 @@ int main(int argc, char * argv[])
 {
        using namespace lyx;
 
-       lyxerr.setStream(std::cerr);
+       lyxerr.setStream(cerr);
 
        easyParse(argc, argv);
 
index 523c02296c5893da441069df821dc3de7fe7d9dd..e1559f031df5c4552d09dac2a1f7b3a0f3d7f7cb 100644 (file)
@@ -420,7 +420,7 @@ void handle_comment(ostream & os, string const & s, Context & context)
 }
 
 
-class isLayout : public std::unary_function<LayoutPtr, bool> {
+class isLayout : public unary_function<LayoutPtr, bool> {
 public:
        isLayout(string const name) : name_(name) {}
        bool operator()(LayoutPtr const & ptr) const {
@@ -438,7 +438,7 @@ LayoutPtr findLayout(TextClass const & textclass,
        TextClass::const_iterator end = textclass.end();
 
        TextClass::const_iterator
-               it = std::find_if(beg, end, isLayout(name));
+               it = find_if(beg, end, isLayout(name));
 
        return (it == end) ? LayoutPtr() : *it;
 }
@@ -995,7 +995,7 @@ void get_cite_arguments(Parser & p, bool natbibOrder,
        if (!after.empty()) {
                before = p.getFullOpt();
                if (natbibOrder && !before.empty())
-                       std::swap(before, after);
+                       swap(before, after);
        }
 }
 
@@ -1913,10 +1913,10 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        string const command = '\\' + t.cs();
                        char argumentOrder = '\0';
                        vector<string> const & options = used_packages["jurabib"];
-                       if (std::find(options.begin(), options.end(),
+                       if (find(options.begin(), options.end(),
                                      "natbiborder") != options.end())
                                argumentOrder = 'n';
-                       else if (std::find(options.begin(), options.end(),
+                       else if (find(options.begin(), options.end(),
                                           "jurabiborder") != options.end())
                                argumentOrder = 'j';