]> git.lyx.org Git - features.git/commitdiff
clear()->erase() ; lots of using directives for cxx
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 4 May 2000 10:57:00 +0000 (10:57 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 4 May 2000 10:57:00 +0000 (10:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@712 a592a061-630c-0410-9148-cb99ea01b6c8

36 files changed:
ChangeLog
src/Bullet.h
src/Chktex.C
src/ImportNoweb.C
src/LaTeX.C
src/Literate.C
src/Spacing.C
src/WorkArea.C
src/buffer.C
src/buffer.h
src/cheaders/cmath
src/chset.C
src/filedlg.C
src/insets/figinset.C
src/insets/insetbib.C
src/insets/insetfoot.C
src/insets/insettext.C
src/lastfiles.C
src/lyx_main.C
src/lyxfunc.C
src/lyxserver.C
src/mathed/formula.C
src/mathed/math_symbols.C
src/minibuffer.C
src/paragraph.C
src/spellchecker.C
src/support/filetools.C
src/support/lstrings.C
src/table.C
src/table.h
src/tabular.C
src/text.C
src/text2.C
src/trans.C
src/trans_mgr.C
src/vc-backend.C

index 179ff7afd7ece2bdc539411890c7602c53479cc7..1644c8770facf1bc3b57591fd9c5e7189c2795a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-05-04  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * (various *.C files): add using std::foo directives to please dec
+       cxx.
+
+       * replace calls to string::clear() to string::erase() (Angus)
+
+       * src/cheaders/cmath: modified to provide std::abs.
+
 2000-05-04  Juergen Vigna  <jug@sad.it>
 
        * src/insets/insettext.C: Prepared all for inserting of multiple
index c4c8203f8bb423c61d4c7a8f618fd2234457da33..142de8bd9b2ffdc0bb3dc5e0a8089a16a03e4e63 100644 (file)
@@ -27,7 +27,7 @@
 class Bullet {
 public:
        ///
-       Bullet(int f = -1, int c = -1, int s = -1);
+       Bullet(const int f = -1, const int c = -1, const int s = -1);
 
        ///
        explicit Bullet(string const &);
index 7779e14e2f2b352bf2953b02bf56554d5ccb54a6..0dab6668c32616ce5fe90c9c08b7d61a3ec34d95 100644 (file)
@@ -32,6 +32,7 @@
 #include "gettext.h"
 
 using std::ifstream;
+using std::getline;
 
 /*
  * CLASS Chktex
index dfee627f82aba564c3d9678e91e22ca6d373f541..450336d4909ed5f2c14fae4a187f47b33fe80f2b 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <fstream>
 using std::ifstream;
+using std::getline;
 
 #include "ImportNoweb.h"
 #include "lyxrc.h"
index eb552063a915630e3f8ece988d6dce8bc7ba3314..951e5c91e0e6dba997e6533d3bf5491842408235 100644 (file)
@@ -33,6 +33,7 @@
 #include "gettext.h"
 
 using std::ifstream;
+using std::getline;
 using std::endl;
 
 // TODO: in no particular order
index e66097f35c9dd1515b3feb78c4f39b7de7a6d4d2..7443d01cfd1ad6d78464dcc0ede39a3c7c32d462 100644 (file)
@@ -29,6 +29,7 @@
 #include "gettext.h"
 
 using std::ifstream;
+using std::getline;
 using std::endl;
 
 extern BufferList bufferlist;
index 746ee33f43838c5d42e5b6c2ae57014935c586c8..14261b665ddd646bb5270eddcabc116fc3e21ee0 100644 (file)
@@ -83,13 +83,10 @@ string Spacing::writeEnvirBegin() const
        case Default: break; // do nothing
        case Single:
                return "\\begin{singlespace}";
-               break;
        case Onehalf:
                return "\\begin{onehalfspace}";
-               break;
        case Double:
                return "\\begin{doublespace}";
-               break;
        case Other:
 #ifdef HAVE_SSTREAM
                ostringstream ost;
@@ -105,7 +102,6 @@ string Spacing::writeEnvirBegin() const
                        return ost.str();
                }
 #endif
-               break;
        }
        return string();
 }
@@ -117,16 +113,12 @@ string Spacing::writeEnvirEnd() const
        case Default: break; // do nothing
        case Single:
                return "\\end{singlespace}";
-               break;
        case Onehalf:
                return "\\end{onehalfspace}";
-               break;
        case Double:
                return "\\end{doublespace}";
-               break;
        case Other:
                return "\\end{spacing}";
-               break;
        }
        return string();
 }
index f93ca8c8abfc3529c4aba6226cb76f05c6491194..1fd3006829c4d4b47ca143769155c0d1029fa56d 100644 (file)
@@ -24,7 +24,7 @@ using std::endl;
 
 FL_OBJECT * figinset_canvas;
 
-// need to make the c++ compiler fint the correct version of abs.
+// need to make the c++ compiler find the correct version of abs.
 // This is at least true for g++.
 using std::abs;
 
@@ -65,7 +65,7 @@ WorkArea::WorkArea(BufferView * o, int xpos, int ypos, int width, int height)
                       << width << 'x' << height << endl;
        //
        FL_OBJECT * obj;
-       const int bw = int(abs(float(fl_get_border_width())));
+       const int bw = int(std::abs(float(fl_get_border_width())));
 
        // We really want to get rid of figinset_canvas.
        ::figinset_canvas = figinset_canvas = obj =
@@ -162,7 +162,7 @@ void WorkArea::resize(int xpos, int ypos, int width, int height)
 {
        fl_freeze_all_forms();
        
-       const int bw = int(abs(float(fl_get_border_width())));
+       const int bw = int(std::abs(float(fl_get_border_width())));
 
        // a box
        fl_set_object_geometry(backgroundbox, xpos, ypos, width - 15, height);
index ff33b4b0b3a9a5386d6066f16ab2c8116ea59492..c589a1fa4c2b7a6cfa709504bbb4d23edb65bb96 100644 (file)
@@ -125,7 +125,7 @@ Buffer::Buffer(string const & file, bool ronly)
        lyxvc.buffer(this);
        if (read_only || (lyxrc.use_tempdir)) {
                tmppath = CreateBufferTmpDir();
-       } else tmppath.clear();
+       } else tmppath.erase();
 }
 
 
@@ -2278,7 +2278,7 @@ void Buffer::makeLinuxDocFile(string const & fname, int column)
                // environment tag closing
                for( ; depth > par->depth; --depth) {
                        sgmlCloseTag(ofs, depth, environment_stack[depth]);
-                       environment_stack[depth].clear();
+                       environment_stack[depth].erase();
                }
 
                // write opening SGML tags
@@ -2287,7 +2287,7 @@ void Buffer::makeLinuxDocFile(string const & fname, int column)
                        if(depth == par->depth 
                           && !environment_stack[depth].empty()) {
                                sgmlCloseTag(ofs, depth, environment_stack[depth]);
-                               environment_stack[depth].clear();
+                               environment_stack[depth].erase();
                                if(depth) 
                                        --depth;
                                else
@@ -2308,7 +2308,7 @@ void Buffer::makeLinuxDocFile(string const & fname, int column)
                                ofs << "</p>";
                        }
 
-                       environment_stack[depth].clear();
+                       environment_stack[depth].erase();
                        sgmlOpenTag(ofs, depth, style.latexname());
                        break;
 
@@ -2320,11 +2320,11 @@ void Buffer::makeLinuxDocFile(string const & fname, int column)
 
                                sgmlCloseTag(ofs, depth,
                                             environment_stack[depth]);
-                               environment_stack[depth].clear();
+                               environment_stack[depth].erase();
                        }
                        if (depth < par->depth) {
                               depth = par->depth;
-                              environment_stack[depth].clear();
+                              environment_stack[depth].erase();
                        }
                        if (environment_stack[depth] != style.latexname()) {
                                if(depth == 0) {
@@ -2448,7 +2448,7 @@ void Buffer::DocBookHandleFootnote(ostream & os, LyXParagraph * & par,
                        if(inner_span) {
                                if(!tmp_par.empty()) {
                                        os << tmp_par;
-                                       tmp_par.clear();
+                                       tmp_par.erase();
                                        sgmlCloseTag(os, depth + 1, inner_tag);
                                        sgmlOpenTag(os, depth + 1, inner_tag);
                                }
@@ -2461,7 +2461,7 @@ void Buffer::DocBookHandleFootnote(ostream & os, LyXParagraph * & par,
                                                            inner_tag);
                        if(!extra_par.empty()) os << extra_par;
                        if(!tag.empty()) sgmlCloseTag(os, depth, tag);
-                       extra_par.clear();
+                       extra_par.erase();
 
                        switch (par->footnotekind) {
                        case LyXParagraph::FOOTNOTE:
@@ -2496,7 +2496,7 @@ void Buffer::DocBookHandleFootnote(ostream & os, LyXParagraph * & par,
                        if ((present == TAB_LIKE) || (present == FIG_LIKE)) {
                                DocBookHandleCaption(os, inner_tag, depth,
                                                     desc_on, par);
-                               inner_tag.clear();
+                               inner_tag.erase();
                        } else {
                                sgmlOpenTag(os, depth + 1, inner_tag);
                        }
@@ -2873,8 +2873,8 @@ void Buffer::makeDocBookFile(string const & fname, int column)
                        }
                        sgmlCloseTag(ofs, depth + command_depth,
                                     environment_stack[depth]);
-                       environment_stack[depth].clear();
-                       environment_inner[depth].clear();
+                       environment_stack[depth].erase();
+                       environment_inner[depth].erase();
                }
 
                if(depth == par->depth
@@ -2893,8 +2893,8 @@ void Buffer::makeDocBookFile(string const & fname, int column)
                        sgmlCloseTag(ofs, depth + command_depth,
                                     environment_stack[depth]);
                        
-                       environment_stack[depth].clear();
-                       environment_inner[depth].clear();
+                       environment_stack[depth].erase();
+                       environment_inner[depth].erase();
                 }
 
                // Write opening SGML tags.
@@ -2965,7 +2965,7 @@ void Buffer::makeDocBookFile(string const & fname, int column)
                case LATEX_ITEM_ENVIRONMENT:
                        if (depth < par->depth) {
                                depth = par->depth;
-                               environment_stack[depth].clear();
+                               environment_stack[depth].erase();
                        }
 
                        if (environment_stack[depth] != style.latexname()) {
index 991d166c78246b07f0d3f12f62bbc09a4462463e..8cfa12ad98bd6ea0e8aac9130bdc82653a93fc26 100644 (file)
@@ -157,7 +157,7 @@ public:
        // LaTeX all paragraphs from par to endpar,
        // if endpar == 0 then to the end
        //
-       void latexParagraphs(ostream & os, LyXParagraph *par,
+       void latexParagraphs(std::ostream & os, LyXParagraph *par,
                             LyXParagraph *endpar, TexRow & texrow);
 
        ///
index 21b276c6197bdb57985bc0da157afa71eae7f2be..465bbe3fab8c11a222c371ec84ff59bac545db78 100644 (file)
@@ -1,80 +1,19 @@
 // The -*- C++ -*- math functions header.
 // This file is part of the GNU ANSI C++ Library.
+// Modified for use with LyX.
 
 #ifndef __CMATH__
 #define __CMATH__
 
-#ifdef __GNUG__
-#include <_G_config.h>
-#endif
-
 #include <math.h>
 
 #ifdef __GNUG__
 #pragma interface "cmath"
 #endif
 
-extern "C++" {
-#if 0
-float acos (float);
-float asin (float);
-float atan (float);
-float atan2(float, float);
-float ceil (float);
-float cos  (float);
-float cosh (float);
-float exp  (float);
-float fabs (float);
-float floor(float);
-float fmod (float, float);
-float frexp(float, int*);
-float modf (float, float*);
-float ldexp(float, int);
-float log  (float);
-float log10(float);
-float pow  (float, float);
-float pow  (float, int);
-float sin  (float);
-float sinh (float);
-float sqrt (float);
-float tan  (float);
-float tanh (float);
-#endif
-
-inline float  abs (float  x) { return fabs (x); }
-#if ! _G_MATH_H_INLINES /* hpux and SCO define this in math.h */
-inline double abs (double x) { return fabs (x); }
-#endif
-
-#if 0
-double pow(double, int);
-
-long double acos (long double);
-long double asin (long double);
-long double atan (long double);
-long double atan2(long double, long double);
-long double ceil (long double);
-long double cos  (long double);
-long double cosh (long double);
-long double exp  (long double);
-long double fabs (long double);
-long double floor(long double);
-long double frexp(long double, int*);
-long double fmod (long double, long double);
-long double frexp(long double, int*);
-long double log  (long double);
-long double log10(long double);
-long double modf (long double, long double*);
-long double pow  (long double, long double);
-long double pow  (long double, int);
-long double sin  (long double);
-long double sinh (long double);
-long double sqrt (long double);
-long double tan  (long double);
-long double tanh (long double);
-#endif
-inline long double abs (long double x) { return fabs (x); }
-
-} // extern "C++"
+namespace std {
+       inline float  abs (float  x) { return fabs (x); }
+       inline double abs (double x) { return fabs (x); }
+}
 
 #endif
index b2b6a5ebe02757300af8c65f57d422823e55b044..31d3f162438af65112fb5fd49a53e76dbabec324 100644 (file)
@@ -13,6 +13,7 @@
 #include "debug.h"
 
 using std::ifstream;
+using std::getline;
 using std::pair;
 using std::make_pair;
 using std::endl;
@@ -20,7 +21,7 @@ using std::endl;
 bool CharacterSet::loadFile(string const & fname)
 {
        map_.clear();
-       name_.clear();
+       name_.erase();
        
        if (fname.empty() || fname == "ascii") 
                return true;    // ascii 7-bit
index 7c2650bf71221431f8ccbe574aef5c03b13f958b..d1294f705b0f00ddec73de9ee1b8ebde8811a8f9 100644 (file)
@@ -421,7 +421,7 @@ void LyXFileDlg::SetButton(int iIndex, string const & pszName,
                *pTemp = pszPath;
        } else {
                fl_hide_object(pObject);
-               (*pTemp).clear();
+               (*pTemp).erase();
        }
 }
 
@@ -579,7 +579,7 @@ bool LyXFileDlg::HandleDoubleClick()
                        Temp += pszTemp;
                } else {
                        // Directory higher up
-                       Temp.clear();
+                       Temp.erase();
                        for (int i = 0; i < iSelect; ++i) {
                                string piece = fl_get_browser_line(pFileDlgForm->List, i+1);
                                // The '+2' is here to count the '@b' (JMarc)
index c892ac2007af9f868b0b3ed86b681b9f58d79a24..e39691c7d8349d694a374407e8916a30360e3428 100644 (file)
@@ -1768,7 +1768,7 @@ void InsetFig::CallbackFig(long arg)
                        } else {
                                if (!fname.empty()) {
                                        changedfname = true;
-                                       fname.clear();
+                                       fname.erase();
                                }
                        }
                        subcaption = fl_get_input(form->Subcaption);
index 467f0bb718cc392a8727b70243cc21633ca05f33..7bebfb9d1fba3028f8881902b815f4a3227d342d 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <fstream>
 using std::ifstream;
+using std::getline;
 
 #include <cstdlib>
 
index 07c8335353ed9a3ccf279eb9d32eb0bb2f5aa869..50f6af9a849ed9d3a094ead3b62193f8bab41b26 100644 (file)
@@ -21,6 +21,7 @@
 #include "support/LOstream.h"
 
 using std::ostream;
+using std::endl;
 
 InsetFoot::InsetFoot(Buffer * bf)
                : InsetCollapsable(bf)
index b648a2407c4637408c1e859d2a9111ac1c31085a..e0b8f1f5b35ef77a7f2bdc85ec5bb3384fbc66f5 100644 (file)
@@ -792,7 +792,7 @@ InsetText::LocalDispatch(BufferView * bv,
        // and current buffer's textclass (number). */    
        LyXTextClassList::ClassList::size_type tclass =
            buffer->params.textclass;
-       pair <bool, LyXTextClass::size_type> layout = 
+       std::pair <bool, LyXTextClass::size_type> layout = 
            textclasslist.NumberOfLayout(tclass, arg);
 
        // If the entry is obsolete, use the new one instead.
index 775ec1550019a069fd37ceac983c6e1476a85903..b132255bc66fe5aaabfce40a865e77da453b399a 100644 (file)
@@ -23,6 +23,7 @@
 #include "debug.h"
 
 using std::ifstream;
+using std::getline;
 using std::ofstream;
 using std::copy;
 using std::ostream_iterator;
index 37a7e05dc217c838f552df71c635fcd6a0ff1f67..4f69d52ebe1a05af8aaf101f34baf3eb52031cf8 100644 (file)
@@ -248,7 +248,7 @@ void LyX::init(int */*argc*/, char **argv, bool gui)
                lyxerr[Debug::INIT]
                        << "Checking whether LyX is run in place... no"
                        << endl;
-               build_lyxdir.clear();
+               build_lyxdir.erase();
        }
 
         bool FollowLink;
index c572813b645a03ff646f7e7ad39fdb9c08b5e273..f287f9b2ace11d30c79434613838f027c288132f 100644 (file)
@@ -457,7 +457,7 @@ string LyXFunc::Dispatch(int ac,
         
         // we have not done anything wrong yet.
         errorstat = false;
-       dispatch_buffer.clear();
+       dispatch_buffer.erase();
        
        // if action is a pseudo-action, we need the real action
        if (lyxaction.isPseudoAction(ac)) {
@@ -481,7 +481,7 @@ string LyXFunc::Dispatch(int ac,
        if (getStatus(action) & Disabled)
                goto exit_with_message;
 
-       commandshortcut.clear();
+       commandshortcut.erase();
        
        if (lyxrc.display_shortcuts && show_sc) {
                if (action != LFUN_SELFINSERT) {
index c271a8af8041f2a6f84b6909793bf753cb2fd2d6..d0ad5c7ce2e9734c4a0349da9492f97bcc6b94a3 100644 (file)
@@ -120,7 +120,7 @@ void LyXComm::openConnection() {
                lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
                       << "If no other LyX program is active, please delete"
                        " the pipe by hand and try again." << endl;
-               pipename.clear();
+               pipename.erase();
                return;
        }
 #ifndef __EMX__
@@ -171,7 +171,7 @@ void LyXComm::openConnection() {
                lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
                       << "If no other LyX program is active, please delete"
                        " the pipe by hand and try again." << endl;
-               pipename.clear();
+               pipename.erase();
                return;
        }
 #ifndef __EMX__
@@ -343,7 +343,7 @@ void LyXComm::callback(int fd, void *v)
                        {
                                lyxerr << "LyxComm: truncated command: " 
                                       << lsbuf << endl;
-                               lsbuf.clear();
+                               lsbuf.erase();
                        }
                        break; // reset connection
                }
@@ -498,7 +498,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
                                }
                                if (i < serv->numclients) {
                                        serv->numclients--;
-                                       serv->clients[i].clear();
+                                       serv->clients[i].erase();
                                        lyxerr[Debug::LYXSERVER]
                                                << "LyXServer: Client "
                                                << client << " said goodbye"
index 5737a6ab015a4634fd078959fb86d6acb8759905..ebe09988608ef03120d6113cc54e8ab5cecf9373 100644 (file)
@@ -588,7 +588,7 @@ void InsetFormula::display(bool dspf)
         par->SetType(LM_OT_MIN);
         par->SetStyle(LM_ST_TEXT);
         if (!label.empty() && par->GetType() != LM_OT_MPARN) {
-                label.clear();
+                label.erase();
         }
       }
       disp_flag = dspf;
@@ -904,7 +904,7 @@ InsetFormula::LocalDispatch(BufferView * bv,
          if (oldf) {
             --type;
             if (!label.empty()) {
-                    label.clear();
+                    label.erase();
             }
             bv->owner()->getMiniBuffer()->Set(_("No number"));  
          } else {
@@ -1058,7 +1058,7 @@ InsetFormula::LocalDispatch(BufferView * bv,
          }
          UpdateLocal(bv);
        } else
-              label.clear();
+              label.erase();
        break;
     }
     
index 76d709bbd20311bca62373d2e9034d040873c4a4..0fe7451ce7abab29e6970bf0894bb125c1c031ab 100644 (file)
@@ -41,6 +41,7 @@
 
 using std::max;
 using std::endl;
+using std::ostream;
 
 extern short greek_kb_flag;
 
index cb53315dafe11fd7ffefb7025de309ee9fa6c141..1b417b813063b53fe4f53be5885c62395360e58a 100644 (file)
@@ -140,7 +140,7 @@ extern "C" int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event,
 
 void MiniBuffer::ExecCommand()
 {
-       text.clear();
+       text.erase();
        fl_set_input(the_buffer, "");
        fl_set_focus_object(owner->getForm(), the_buffer);
 }
@@ -253,7 +253,7 @@ void MiniBuffer::Reset()
 {
        if (!text_stored.empty()){
                Set(text_stored);
-               text_stored.clear();
+               text_stored.erase();
        }
 }
 
index f7c4994512bc5ffa032f05e4f66047c632d3d114..e1833d2248a9bcd40869a11219ffa0441ec264f3 100644 (file)
@@ -38,6 +38,8 @@ using std::ostream;
 using std::endl;
 using std::fstream;
 using std::ios;
+using std::lower_bound;
+using std::upper_bound;
 
 int tex_code_break_column = 72;  // needs non-zero initialization. set later.
 // this is a bad idea, but how can LyXParagraph find its buffer to get
@@ -479,14 +481,14 @@ void LyXParagraph::Clear()
        noindent = false;
 
         pextra_type = PEXTRA_NONE;
-        pextra_width.clear();
-        pextra_widthp.clear();
+        pextra_width.erase();
+        pextra_widthp.erase();
         pextra_alignment = MINIPAGE_ALIGN_TOP;
         pextra_hfill = false;
         pextra_start_minipage = false;
 
-        labelstring.clear();
-       labelwidthstring.clear();
+        labelstring.erase();
+       labelwidthstring.erase();
        layout = 0;
        bibkey = 0;
        
@@ -1770,7 +1772,7 @@ void LyXParagraph::SetLayout(LyXTextClass::size_type new_layout)
                * npar = 0;
 
         par->layout = new_layout;
-       par->labelwidthstring.clear();
+       par->labelwidthstring.erase();
        par->align = LYX_ALIGN_LAYOUT;
        par->added_space_top = VSpace(VSpace::NONE);
        par->added_space_bottom = VSpace(VSpace::NONE);
@@ -2683,7 +2685,7 @@ bool LyXParagraph::linuxDocConvertChar(char c, string & sgml_string)
        bool retval = false;
        switch (c) {
        case LyXParagraph::META_HFILL:
-               sgml_string.clear();
+               sgml_string.erase();
                break;
        case LyXParagraph::META_NEWLINE:
                sgml_string = '\n';
@@ -2732,7 +2734,7 @@ bool LyXParagraph::linuxDocConvertChar(char c, string & sgml_string)
                sgml_string = ' ';
                break;
        case '\0': // Ignore :-)
-               sgml_string.clear();
+               sgml_string.erase();
                break;
        default:
                sgml_string = c;
@@ -4086,8 +4088,8 @@ void LyXParagraph::UnsetPExtraType()
                return;
     
        pextra_type = PEXTRA_NONE;
-       pextra_width.clear();
-       pextra_widthp.clear();
+       pextra_width.erase();
+       pextra_widthp.erase();
 
        if (textclasslist.Style(current_view->buffer()->params.textclass, 
                                layout).isEnvironment()) {
@@ -4111,8 +4113,8 @@ void LyXParagraph::UnsetPExtraType()
                while (par && (par->layout == layout)
                       && (par->depth == depth)) {
                        par->pextra_type = PEXTRA_NONE;
-                       par->pextra_width.clear();
-                       par->pextra_widthp.clear();
+                       par->pextra_width.erase();
+                       par->pextra_widthp.erase();
                        par = par->NextAfterFootnote();
                        if (par && (par->depth > depth))
                                par->UnsetPExtraType();
index 623668c5f456237f815ea5ddb93cc0c1ae2aca60..f7536cb74953051a861d64fb70f4eaacde9e8b5a 100644 (file)
@@ -51,7 +51,7 @@
 #include "debug.h"
 #include "support/lstrings.h"
 
-
+using std::reverse;
 using std::endl;
 
 // Spellchecker status
index d478c4b74a81ef5e137f34cf05983b7371e1bcd9..1b2af682fa582bdec9ee10ee3ef773334dff217e 100644 (file)
@@ -748,7 +748,7 @@ string ReplaceEnvironmentPath(string const & path)
                if (!regexMatch(copy1, RegExp)) {
                        // No EndChar inside. So we are finished
                        result1 += CompareString + result0;
-                       result0.clear();
+                       result0.erase();
                        continue;
                }
 
index efc8df4165953f2767c41a304fd70f3031589673..2d53a5ca5a6eb2a4cb7e85e98a1253fdcc12e25b 100644 (file)
@@ -289,7 +289,7 @@ string strip(string const & a, char const c)
        if (i != string::npos) 
                tmp.erase(i + 1, string::npos);
        else
-               tmp.clear(); // only c in the whole string
+               tmp.erase(); // only c in the whole string
        return tmp;
 }
 
@@ -326,7 +326,7 @@ string split(string const & a, string & piece, char delim)
                piece = a.substr(0, i);
                tmp = a.substr(i + 1);
        } else if (i == 0) {
-               piece.clear();
+               piece.erase();
                tmp = a.substr(i + 1);
        } else {
                piece = a;
@@ -354,7 +354,7 @@ string rsplit(string const & a, string & piece, char delim)
                piece = a.substr(0, i);
                tmp = a.substr(i + 1);
        } else { // delimter was not found
-               piece.clear();
+               piece.erase();
        }
        return tmp;
 }
index 54812b0306859c1516938f6d15034c6e08adf637..ceed03eddf231d2ae1e44b70769388a892688280 100644 (file)
@@ -29,6 +29,7 @@
 
 using std::ostream;
 using std::istream;
+using std::getline;
 using std::max;
 using std::endl;
 
index e83e3e2e6fed26279918d5a3bdc6279afd6b8e74..607ff908b4e236657088f6561be137e25e664667 100644 (file)
@@ -284,6 +284,8 @@ private: //////////////////////////////////////////////////////////////////
        ///
         cellstruct & operator=(cellstruct const &);
        ///
+       void setBuffer(Buffer * buf);
+       ///
        int cellno;
        ///
        int width_of_cell;
index fc6620344dc97fb22aa97ee5dbf6d5fa82d7ce09..16fb29af4e579d86bad47c6e617b33a435f651f9 100644 (file)
@@ -28,6 +28,7 @@
 
 using std::ostream;
 using std::istream;
+using std::getline;
 using std::max;
 using std::endl;
 
@@ -963,7 +964,7 @@ static bool getTokenValue(string const str, const char * token, string & ret)
 
     if ((pos < 0) || (ch != '='))
        return false;
-    ret.clear();
+    ret.erase();
     pos += strlen(token)+1;
     ch = str[pos];
     if ((ch != '"') && (ch != '\'')) { // only read till next space
@@ -984,7 +985,7 @@ static bool getTokenValue(string const str, const char * token, int & num)
 
     if ((pos < 0) || (ch != '='))
        return false;
-    ret.clear();
+    ret.erase();
     pos += strlen(token)+1;
     ch = str[pos];
     if ((ch != '"') && (ch != '\'')) { // only read till next space
@@ -1008,7 +1009,7 @@ static bool getTokenValue(string const str, const char * token, bool & flag)
 
     if ((pos < 0) || (ch != '='))
        return false;
-    ret.clear();
+    ret.erase();
     pos += strlen(token)+1;
     ch = str[pos];
     if ((ch != '"') && (ch != '\'')) { // only read till next space
index 56817185053e034f3ed63de679c36606978aed49..923b5f90395f1c3ea7c346f97a766c97c6fa344b 100644 (file)
@@ -571,7 +571,7 @@ int LyXText::LeftMargin(Row const * row) const
        
        /* table stuff -- begin */ 
        if (row->par->table)
-               parindent.clear();
+               parindent.erase();
        /* table stuff -- end */
        
        int x = LYX_PAPER_MARGIN;
@@ -603,7 +603,7 @@ int LyXText::LeftMargin(Row const * row) const
                                    textclasslist.Style(buffer->params.textclass,
                                                        newpar->GetLayout())
                                    .nextnoindent)
-                                       parindent.clear();
+                                       parindent.erase();
                        }
                }
        } else {
@@ -632,7 +632,7 @@ int LyXText::LeftMargin(Row const * row) const
                
                if (newpar && !row->par->GetLayout()) {
                        if (newpar->FirstPhysicalPar()->noindent)
-                               parindent.clear();
+                               parindent.erase();
                        else
                                parindent = textclasslist
                                        .Style(buffer->params.textclass, 
index 4cee34067b3539cad7291bb6fdb57b8af0712715..16ac40d0a53f0100b8de8bcfbe9bcfd09c278c98 100644 (file)
@@ -1575,7 +1575,7 @@ void LyXText::SetCounter(LyXParagraph * par) const
        }
    
        if (!par->labelstring.empty()) {
-               par->labelstring.clear();
+               par->labelstring.erase();
        }
    
        if (layout.margintype == MARGIN_MANUAL) {
@@ -1598,12 +1598,12 @@ void LyXText::SetCounter(LyXParagraph * par) const
                                if (!layout.labelstring().empty())
                                        par->labelstring = layout.labelstring();
                                else
-                                       par->labelstring.clear();
+                                       par->labelstring.erase();
                         } else {
                                if (!layout.labelstring_appendix().empty())
                                        par->labelstring = layout.labelstring_appendix();
                                else
-                                       par->labelstring.clear();
+                                       par->labelstring.erase();
                        }
 
 #ifdef HAVE_SSTREAM
index 122e7f3cf033b8bf8072169db3f952a974e1bc87..fd777ac4ae76f8fba7271f0f0a3da50eda2cecb6 100644 (file)
@@ -371,7 +371,7 @@ int Trans::Load(string const & language)
        if (res == 0) {
                name_ = language;
        } else
-               name_.clear();
+               name_.erase();
 
        return res;
 }
index 327f771feb67c917c55e3d14ce22ce00618359af..62b192207773ef61b130afc1ce454dbd8fca8a21 100644 (file)
@@ -340,7 +340,7 @@ void TransManager::deadkey(char c, tex_accent accent, LyXText * t)
                KmodInfo i;
                i.accent = accent;
                i.allowed = lyx_accent_table[accent].native;
-               i.data.clear();
+               i.data.erase();
                i.exception_list = 0;
                
                string res = trans_fsm_.currentState->deadkey(c, i);
index 46fc8b1e2a509b8490c7a33b46b8459d36305746..6e8a8b751e6026b3c16b3ff47a87459d0a29997b 100644 (file)
@@ -18,6 +18,7 @@
 
 using std::endl;
 using std::ifstream;
+using std::getline;
 
 int VCS::doVCCommand(string const & cmd, string const & path)
 {