]> git.lyx.org Git - lyx.git/blobdiff - src/support/lyxstring.C
the freespacing patch from Kayvan, draw the math empty delim with onoffdash, asure...
[lyx.git] / src / support / lyxstring.C
index 65ef99a00fc92f681dee3cb5414f61a8591e18e8..3f8deedfb55a18595f9b722aced6ae17ab750b37 100644 (file)
@@ -3,8 +3,8 @@
  * 
  *           LyX, The Document Processor
  *      
- *         Copyright (C) 1995 Matthias Ettrich
- *          Copyright (C) 1995-1999 The LyX Team.
+ *         Copyright 1995 Matthias Ettrich
+ *          Copyright 1995-1999 The LyX Team.
  *
  * ====================================================== */
 
@@ -59,6 +59,7 @@ using std::min;
 
 // Lgb.
 
+
 ///////////////////////////////////////
 // The internal string representation
 ///////////////////////////////////////
@@ -111,10 +112,10 @@ private:
 };
 
 
-inline
 lyxstring::Srep::Srep(lyxstring::size_type nsz, const value_type * p)
 {
-// can be called with p == 0 by lyxstring::assign(const value_type *, size_type)
+       // can be called with p == 0 by
+       // lyxstring::assign(const value_type *, size_type)
 
        sz = nsz;
        ref = 1;
@@ -131,7 +132,6 @@ lyxstring::Srep::Srep(lyxstring::size_type nsz, const value_type * p)
 }
 
 
-inline
 lyxstring::Srep::Srep(lyxstring::size_type nsz, value_type ch)
 {
        sz = nsz;
@@ -147,10 +147,10 @@ lyxstring::Srep::Srep(lyxstring::size_type nsz, value_type ch)
 }
        
 
-inline
 void lyxstring::Srep::assign(lyxstring::size_type nsz, const value_type * p)
 {
-// can be called with p == 0 by lyxstring::assign(const value_type *, size_type)
+       // can be called with p == 0
+       // by lyxstring::assign(const value_type *, size_type)
 
        if (res < nsz) {
                delete[] s;
@@ -171,7 +171,6 @@ void lyxstring::Srep::assign(lyxstring::size_type nsz, const value_type * p)
 }
 
 
-inline
 void lyxstring::Srep::assign(lyxstring::size_type nsz, value_type ch)
 {
        sz = nsz;
@@ -189,7 +188,6 @@ void lyxstring::Srep::assign(lyxstring::size_type nsz, value_type ch)
 }
 
 
-inline
 void lyxstring::Srep::append(lyxstring::size_type asz, const value_type * p)
 {
        register unsigned int const len = sz + asz;
@@ -210,7 +208,6 @@ void lyxstring::Srep::append(lyxstring::size_type asz, const value_type * p)
 }
 
 
-inline
 void lyxstring::Srep::push_back(value_type c)
 {
        s[sz] = c; // it is always room to put a value_type at the end
@@ -227,9 +224,8 @@ void lyxstring::Srep::push_back(value_type c)
 }
 
 
-inline
 void lyxstring::Srep::insert(lyxstring::size_type pos, const value_type * p,
-                          lyxstring::size_type n)
+                            lyxstring::size_type n)
 {
        if (res < n + sz) {
                do {
@@ -250,7 +246,6 @@ void lyxstring::Srep::insert(lyxstring::size_type pos, const value_type * p,
 }
 
 
-inline
 void lyxstring::Srep::resize(size_type n, value_type c)
 {
        // This resets sz to res_arg
@@ -265,7 +260,6 @@ void lyxstring::Srep::resize(size_type n, value_type c)
 }
 
 
-inline
 void lyxstring::Srep::reserve(lyxstring::size_type res_arg)
 {
        // This keeps the old sz, but
@@ -278,9 +272,8 @@ void lyxstring::Srep::reserve(lyxstring::size_type res_arg)
 }
 
 
-inline
 void lyxstring::Srep::replace(lyxstring::size_type i, lyxstring::size_type n,
-                           value_type const * p, size_type n2)
+                             value_type const * p, size_type n2)
 {
 // can be called with p= 0 and n2= 0
        n = min(sz - i, n);
@@ -307,7 +300,7 @@ void lyxstring::Srep::replace(lyxstring::size_type i, lyxstring::size_type n,
 ///////////////////////////////////////
 // The lyxstring Invariant tester
 ///////////////////////////////////////
-#ifdef DEVEL_VERSION
+#ifdef ENABLE_ASSERTIONS
 
 /** Testing of the lyxstring invariant
  * By creating an object that tests the lyxstring invariant during its
@@ -351,7 +344,6 @@ private:
 // NOTE: The easiest way to catch this snippet of the output is to wait for
 //       the splash screen to disappear and then open and close Help->Credits
 //
-inline
 lyxstringInvariant::lyxstringInvariant(lyxstring const * ls) : object(ls)
 {
        // printf("lyxstringInvariant constructor\n");
@@ -359,7 +351,6 @@ lyxstringInvariant::lyxstringInvariant(lyxstring const * ls) : object(ls)
 }
 
 
-inline
 lyxstringInvariant::~lyxstringInvariant()
 {
        helper();
@@ -367,7 +358,6 @@ lyxstringInvariant::~lyxstringInvariant()
 }
 
 
-inline
 void lyxstringInvariant::helper() const
 {
        // Some of these tests might look pointless but they are
@@ -389,7 +379,7 @@ void lyxstringInvariant::helper() const
 #define TestlyxstringInvariant(s) lyxstringInvariant lyxstring_invariant(s);
 #else
 #define TestlyxstringInvariant(s)
-#endif //DEVEL_VERSION
+#endif /* ENABLE_ASSERTIONS */
 
 
 ///////////////////////////////////////
@@ -400,7 +390,6 @@ lyxstring::size_type const lyxstring::npos =
 static_cast<lyxstring::size_type>(-1);
 
 
-inline
 lyxstring::lyxstring()
 {
        static Srep empty_rep(0, "");
@@ -409,7 +398,6 @@ lyxstring::lyxstring()
 }
 
 
-inline
 lyxstring::lyxstring(lyxstring const & x, size_type pos, size_type n)
 {
        Assert(pos <= x.rep->sz); // STD!
@@ -422,7 +410,6 @@ lyxstring::lyxstring(lyxstring const & x, size_type pos, size_type n)
 }
 
 
-inline
 lyxstring::lyxstring(value_type const * s, size_type n)
 {
        Assert(s && n < npos); // STD!
@@ -436,7 +423,6 @@ lyxstring::lyxstring(value_type const * s, size_type n)
 }
 
 
-inline
 lyxstring::lyxstring(value_type const * s)
 {
        Assert(s); // STD!
@@ -450,7 +436,6 @@ lyxstring::lyxstring(value_type const * s)
 }
 
 
-inline
 lyxstring::lyxstring(size_type n, value_type c)
 {
        Assert(n < npos); // STD!
@@ -458,14 +443,12 @@ lyxstring::lyxstring(size_type n, value_type c)
 }
 
 
-inline
 lyxstring::lyxstring(const_iterator first, const_iterator last)
 {
        rep = new Srep(last - first, first);
 }
 
 
-inline
 lyxstring::~lyxstring()
 {
        if (--rep->ref == 0) delete rep;
@@ -475,56 +458,48 @@ lyxstring::~lyxstring()
 // Iterators
 ///////////////////////
 
-inline
 lyxstring::iterator lyxstring::begin()
 {
        return rep->s;
 }
 
 
-inline
 lyxstring::const_iterator lyxstring::begin() const
 {
        return rep->s;
 }
 
 
-inline
 lyxstring::iterator lyxstring::end()
 {
        return rep->s + rep->sz;
 }
 
 
-inline
 lyxstring::const_iterator lyxstring::end() const
 {
        return rep->s + rep->sz;
 }
 
 #if 0
-inline
 reverse_iterator lyxstring::rbegin()
 {
        return reverse_iterator( end() );
 }
 
 
-inline
 const_reverse_iterator lyxstring::rbegin() const
 {
        return const_reverse_iterator( end() );
 }
 
 
-inline
 reverse_iterator lyxstring::rend()
 {
        return reverse_iterator( begin() );
 }
 
 
-inline
 const_reverse_iterator lyxstring::rend() const
 {
        return const_reverse_iterator( begin() );
@@ -536,14 +511,12 @@ const_reverse_iterator lyxstring::rend() const
 // Size and Capacity
 ///////////////////////
 
-inline
 lyxstring::size_type lyxstring::size() const
 { 
        return rep->sz;
 }
 
 
-inline
 void lyxstring::resize(size_type n, value_type c)
 {
        Assert(n <= npos); // STD!
@@ -555,14 +528,12 @@ void lyxstring::resize(size_type n, value_type c)
 }
 
 
-inline
 lyxstring::size_type lyxstring::capacity() const
 {
        return rep->res;
 }
 
 
-inline
 void lyxstring::reserve(size_type res_arg)
 {
        TestlyxstringInvariant(this);
@@ -576,7 +547,6 @@ void lyxstring::reserve(size_type res_arg)
 // Assignment
 ////////////////
 
-inline
 lyxstring & lyxstring::operator= (lyxstring const & x)
 {
        TestlyxstringInvariant(this);
@@ -585,7 +555,6 @@ lyxstring & lyxstring::operator= (lyxstring const & x)
 }
 
 
-inline
 lyxstring & lyxstring::operator= (value_type const * s)
 {
        Assert(s); // OURS!
@@ -596,7 +565,6 @@ lyxstring & lyxstring::operator= (value_type const * s)
 }
 
 
-inline
 lyxstring & lyxstring::operator=(value_type c)
 {
        TestlyxstringInvariant(this);
@@ -613,7 +581,6 @@ lyxstring & lyxstring::operator=(value_type c)
 }
 
 
-inline
 lyxstring & lyxstring::assign(lyxstring const & x)
 {
        TestlyxstringInvariant(this);
@@ -625,7 +592,6 @@ lyxstring & lyxstring::assign(lyxstring const & x)
 }
        
 
-inline
 lyxstring & lyxstring::assign(lyxstring const & x, size_type pos, size_type n)
 {
        Assert(pos <= x.rep->sz); // STD!
@@ -635,7 +601,6 @@ lyxstring & lyxstring::assign(lyxstring const & x, size_type pos, size_type n)
 }
        
 
-inline
 lyxstring & lyxstring::assign(value_type const * s, size_type n)
 {
        Assert(s); // OURS!
@@ -652,7 +617,6 @@ lyxstring & lyxstring::assign(value_type const * s, size_type n)
 }
        
 
-inline
 lyxstring & lyxstring::assign(value_type const * s)
 {
        Assert(s); // OURS!
@@ -662,7 +626,6 @@ lyxstring & lyxstring::assign(value_type const * s)
 }
 
 
-inline
 lyxstring & lyxstring::assign(size_type n, value_type ch)
 {
        TestlyxstringInvariant(this);
@@ -673,7 +636,6 @@ lyxstring & lyxstring::assign(size_type n, value_type ch)
 }
 
 
-inline
 lyxstring & lyxstring::assign(const_iterator first, const_iterator last)
 {
        TestlyxstringInvariant(this);
@@ -688,7 +650,6 @@ lyxstring & lyxstring::assign(const_iterator first, const_iterator last)
 // Element Access
 ////////////////////
 
-inline
 lyxstring::const_reference lyxstring::operator[](size_type pos) const
 {
        Assert(pos <= rep->sz); // OURS!
@@ -697,7 +658,6 @@ lyxstring::const_reference lyxstring::operator[](size_type pos) const
 }
 
 
-inline
 lyxstring::reference lyxstring::operator[](size_type pos)
 {
        Assert(pos < rep->sz); // OURS!
@@ -708,7 +668,6 @@ lyxstring::reference lyxstring::operator[](size_type pos)
 }
 
 
-inline
 lyxstring::const_reference lyxstring::at(size_type n) const
 {
        Assert(n < rep->sz); // STD!
@@ -716,7 +675,6 @@ lyxstring::const_reference lyxstring::at(size_type n) const
 }
 
 
-inline
 lyxstring::reference lyxstring::at(size_type n)
 {
        Assert(n < rep->sz); // STD!
@@ -731,7 +689,6 @@ lyxstring::reference lyxstring::at(size_type n)
 // Insert
 /////////////
 
-inline
 lyxstring & lyxstring::operator+=(lyxstring const & x)
 {
        TestlyxstringInvariant(this);
@@ -740,7 +697,6 @@ lyxstring & lyxstring::operator+=(lyxstring const & x)
 }
 
 
-inline
 lyxstring & lyxstring::operator+=(value_type const * x)
 {
        Assert(x); // OURS!
@@ -750,7 +706,6 @@ lyxstring & lyxstring::operator+=(value_type const * x)
 }
 
 
-inline
 lyxstring & lyxstring::operator+=(value_type c)
 {
        TestlyxstringInvariant(this);
@@ -760,7 +715,6 @@ lyxstring & lyxstring::operator+=(value_type c)
 }
 
 
-inline
 void lyxstring::push_back(value_type c)
 {
        TestlyxstringInvariant(this);
@@ -770,7 +724,6 @@ void lyxstring::push_back(value_type c)
 }
 
 
-inline
 lyxstring & lyxstring::append(lyxstring const & x)
 {
        TestlyxstringInvariant(this);
@@ -782,7 +735,6 @@ lyxstring & lyxstring::append(lyxstring const & x)
 }
 
 
-inline
 lyxstring & lyxstring::append(lyxstring const & x, size_type pos, size_type n)
 {
        Assert(pos <= x.rep->sz); // STD!
@@ -792,7 +744,6 @@ lyxstring & lyxstring::append(lyxstring const & x, size_type pos, size_type n)
 }
 
 
-inline
 lyxstring & lyxstring::append(value_type const * p, size_type n)
 {
        Assert(p); // OURS!
@@ -805,7 +756,6 @@ lyxstring & lyxstring::append(value_type const * p, size_type n)
 }
 
 
-inline
 lyxstring & lyxstring::append(value_type const * p)
 {
        Assert(p); // OURS!
@@ -818,7 +768,6 @@ lyxstring & lyxstring::append(value_type const * p)
 }
 
 
-inline
 lyxstring & lyxstring::append(size_type n, value_type c)
 {
        TestlyxstringInvariant(this);
@@ -832,7 +781,6 @@ lyxstring & lyxstring::append(size_type n, value_type c)
 }
 
 
-inline
 lyxstring & lyxstring::append(iterator first, iterator last)
 {
        TestlyxstringInvariant(this);
@@ -844,7 +792,6 @@ lyxstring & lyxstring::append(iterator first, iterator last)
 
 // insert value_typeacters before (*this)[pos]
 
-inline
 lyxstring & lyxstring::insert(size_type pos, lyxstring const & x)
 {
        TestlyxstringInvariant(this);
@@ -853,9 +800,8 @@ lyxstring & lyxstring::insert(size_type pos, lyxstring const & x)
 }
 
 
-inline
 lyxstring & lyxstring::insert(size_type pos, lyxstring const & x,
-                         size_type pos2, size_type n)
+                             size_type pos2, size_type n)
 {
        Assert(pos <= rep->sz && pos2 <= x.rep->sz); // STD!
        TestlyxstringInvariant(this);
@@ -866,7 +812,6 @@ lyxstring & lyxstring::insert(size_type pos, lyxstring const & x,
 }
 
 
-inline
 lyxstring & lyxstring::insert(size_type pos, value_type const * p, size_type n)
 {
        Assert(p); // OURS!
@@ -881,7 +826,6 @@ lyxstring & lyxstring::insert(size_type pos, value_type const * p, size_type n)
 }
 
 
-inline
 lyxstring & lyxstring::insert(size_type pos, value_type const * p)
 {
        Assert(p); // OURS!
@@ -896,7 +840,6 @@ lyxstring & lyxstring::insert(size_type pos, value_type const * p)
 }
 
 
-inline
 lyxstring & lyxstring::insert(size_type pos, size_type n, value_type c)
 {
        TestlyxstringInvariant(this);
@@ -910,7 +853,6 @@ lyxstring & lyxstring::insert(size_type pos, size_type n, value_type c)
 }
 
 
-inline
 lyxstring::iterator lyxstring::insert(iterator p, value_type c)
 {
        TestlyxstringInvariant(this);
@@ -922,7 +864,6 @@ lyxstring::iterator lyxstring::insert(iterator p, value_type c)
 }
 
 
-inline
 void lyxstring::insert(iterator p, size_type n , value_type c)
 {
        TestlyxstringInvariant(this);
@@ -931,7 +872,6 @@ void lyxstring::insert(iterator p, size_type n , value_type c)
 }
 
 
-inline
 void lyxstring::insert(iterator p, iterator first, iterator last)
 {
        TestlyxstringInvariant(this);
@@ -949,7 +889,6 @@ void lyxstring::insert(iterator p, iterator first, iterator last)
          // some of the parameters wrong, also some of the funcs can surely
          // be written more effectively.
 
-inline
 lyxstring::size_type lyxstring::find(lyxstring const & a, size_type i) const
 {
        if (!rep->sz || i >= rep->sz) return npos;
@@ -974,9 +913,8 @@ lyxstring::size_type lyxstring::find(lyxstring const & a, size_type i) const
 }
 
 
-inline
 lyxstring::size_type lyxstring::find(value_type const * ptr, size_type i,
-                                size_type n) const
+                                    size_type n) const
 {
        Assert(ptr); // OURS!
        if (!rep->sz || !*ptr || i >= rep->sz) return npos;
@@ -1006,7 +944,6 @@ lyxstring::size_type lyxstring::find(value_type const * ptr, size_type i,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find(value_type const * s, size_type i) const
 {
        Assert(s); // OURS!
@@ -1019,7 +956,6 @@ lyxstring::size_type lyxstring::find(value_type const * s, size_type i) const
 }
 
 
-inline
 lyxstring::size_type lyxstring::find(value_type c, size_type i) const
 {
        if (!rep->sz || i >= rep->sz) return npos;
@@ -1033,7 +969,6 @@ lyxstring::size_type lyxstring::find(value_type c, size_type i) const
 }
 
 
-inline
 lyxstring::size_type lyxstring::rfind(lyxstring const & a, size_type i) const
 {
        TestlyxstringInvariant(this);
@@ -1053,9 +988,8 @@ lyxstring::size_type lyxstring::rfind(lyxstring const & a, size_type i) const
 }
 
 
-inline
 lyxstring::size_type lyxstring::rfind(value_type const * ptr, size_type i,
-                                 size_type n) const
+                                     size_type n) const
 {
        Assert(ptr); // OURS!
        TestlyxstringInvariant(this);
@@ -1076,7 +1010,6 @@ lyxstring::size_type lyxstring::rfind(value_type const * ptr, size_type i,
 }
 
 
-inline
 lyxstring::size_type lyxstring::rfind(value_type const * ptr,
                                      size_type i) const
 {
@@ -1099,7 +1032,6 @@ lyxstring::size_type lyxstring::rfind(value_type const * ptr,
 }
 
 
-inline
 lyxstring::size_type lyxstring::rfind(value_type c, size_type i) const
 {
        TestlyxstringInvariant(this);
@@ -1112,7 +1044,6 @@ lyxstring::size_type lyxstring::rfind(value_type c, size_type i) const
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_first_of(lyxstring const & a,
                                              size_type i) const
 {
@@ -1126,7 +1057,6 @@ lyxstring::size_type lyxstring::find_first_of(lyxstring const & a,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_first_of(value_type const * ptr,
                                              size_type i,
                                              size_type n) const
@@ -1142,7 +1072,6 @@ lyxstring::size_type lyxstring::find_first_of(value_type const * ptr,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_first_of(value_type const * ptr,
                                              size_type i) const
 {
@@ -1156,7 +1085,6 @@ lyxstring::size_type lyxstring::find_first_of(value_type const * ptr,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_first_of(value_type c, size_type i) const
 {
        Assert(i < rep->sz); // OURS!
@@ -1169,7 +1097,6 @@ lyxstring::size_type lyxstring::find_first_of(value_type c, size_type i) const
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_last_of(lyxstring const & a,
                                             size_type i) const
 {
@@ -1183,7 +1110,6 @@ lyxstring::size_type lyxstring::find_last_of(lyxstring const & a,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_last_of(value_type const * ptr,
                                             size_type i,
                                             size_type n) const
@@ -1200,7 +1126,6 @@ lyxstring::size_type lyxstring::find_last_of(value_type const * ptr,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_last_of(value_type const * ptr,
                                             size_type i) const
 {
@@ -1215,7 +1140,6 @@ lyxstring::size_type lyxstring::find_last_of(value_type const * ptr,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_last_of(value_type c, size_type i) const
 {
        TestlyxstringInvariant(this);
@@ -1229,7 +1153,6 @@ lyxstring::size_type lyxstring::find_last_of(value_type c, size_type i) const
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_first_not_of(lyxstring const & a,
                                                  size_type i) const
 {
@@ -1244,7 +1167,6 @@ lyxstring::size_type lyxstring::find_first_not_of(lyxstring const & a,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
                                                  size_type i,
                                                  size_type n) const
@@ -1260,7 +1182,6 @@ lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
                                                  size_type i) const
 {
@@ -1274,7 +1195,6 @@ lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_first_not_of(value_type c,
                                                  size_type i) const
 {
@@ -1289,7 +1209,6 @@ lyxstring::size_type lyxstring::find_first_not_of(value_type c,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_last_not_of(lyxstring const & a,
                                                 size_type i) const
 {
@@ -1303,7 +1222,6 @@ lyxstring::size_type lyxstring::find_last_not_of(lyxstring const & a,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
                                                 size_type i,
                                                 size_type n) const
@@ -1321,7 +1239,6 @@ lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
                                                 size_type i) const
 {
@@ -1336,7 +1253,6 @@ lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
 }
 
 
-inline
 lyxstring::size_type lyxstring::find_last_not_of(value_type c,
                                                 size_type i) const
 {
@@ -1354,7 +1270,6 @@ lyxstring::size_type lyxstring::find_last_not_of(value_type c,
 // Replace
 /////////////////
 
-inline
 lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x)
 {
        Assert(i <= rep->sz); // OURS!
@@ -1364,7 +1279,6 @@ lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x)
 }
 
 
-inline
 lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x,
                               size_type i2, size_type n2)
 {
@@ -1377,7 +1291,6 @@ lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x,
 }
 
 
-inline
 lyxstring & lyxstring::replace(size_type i, size_type n,
                               value_type const * p, size_type n2)
 {
@@ -1390,7 +1303,6 @@ lyxstring & lyxstring::replace(size_type i, size_type n,
 }
 
 
-inline
 lyxstring & lyxstring::replace(size_type i, size_type n, value_type const * p)
 {
        Assert(p && i < rep->sz); // OURS!
@@ -1400,7 +1312,6 @@ lyxstring & lyxstring::replace(size_type i, size_type n, value_type const * p)
 }
 
 
-inline
 lyxstring & lyxstring::replace(size_type i, size_type n,
                               size_type n2, value_type c)
 {
@@ -1416,7 +1327,6 @@ lyxstring & lyxstring::replace(size_type i, size_type n,
 }
 
 
-inline
 lyxstring & lyxstring::replace(iterator i, iterator i2, const lyxstring & str)
 {
        TestlyxstringInvariant(this);
@@ -1425,7 +1335,6 @@ lyxstring & lyxstring::replace(iterator i, iterator i2, const lyxstring & str)
 }
 
 
-inline
 lyxstring & lyxstring::replace(iterator i, iterator i2,
                               value_type const * p, size_type n)
 {
@@ -1436,7 +1345,6 @@ lyxstring & lyxstring::replace(iterator i, iterator i2,
 }
 
 
-inline
 lyxstring & lyxstring::replace(iterator i, iterator i2, value_type const * p)
 {
        Assert(p); // OURS!
@@ -1446,7 +1354,6 @@ lyxstring & lyxstring::replace(iterator i, iterator i2, value_type const * p)
 }
 
 
-inline
 lyxstring & lyxstring::replace(iterator i, iterator i2,
                               size_type n , value_type c)
 {
@@ -1456,7 +1363,6 @@ lyxstring & lyxstring::replace(iterator i, iterator i2,
 }
        
 
-inline
 lyxstring & lyxstring::replace(iterator i, iterator i2,
                               iterator j, iterator j2)
 {
@@ -1466,7 +1372,6 @@ lyxstring & lyxstring::replace(iterator i, iterator i2,
 }
 
 
-inline
 void lyxstring::swap(lyxstring & str)
 {
        if (rep == str.rep) return;
@@ -1476,7 +1381,6 @@ void lyxstring::swap(lyxstring & str)
 }
 
 
-inline
 lyxstring & lyxstring::erase(size_type i, size_type n)
 {
        Assert(i <= rep->sz); // STD!
@@ -1494,7 +1398,6 @@ lyxstring & lyxstring::erase(size_type i, size_type n)
 }
 
 
-inline
 lyxstring::iterator lyxstring::erase(iterator i)
 {
        TestlyxstringInvariant(this);
@@ -1506,7 +1409,6 @@ lyxstring::iterator lyxstring::erase(iterator i)
 }
 
 
-inline
 lyxstring::iterator lyxstring::erase(iterator first, iterator last)
 {
        TestlyxstringInvariant(this);
@@ -1520,7 +1422,6 @@ lyxstring::iterator lyxstring::erase(iterator first, iterator last)
 // Conversion to C-style Strings
 /////////////////////////////////////
 
-inline
 lyxstring::value_type const * lyxstring::c_str() const
 {
        rep->s[length()] = '\0';
@@ -1528,14 +1429,12 @@ lyxstring::value_type const * lyxstring::c_str() const
 }
 
 
-inline
 lyxstring::value_type const * lyxstring::data() const
 {
        return rep->s;
 }
 
 
-inline
 lyxstring::size_type lyxstring::copy(value_type * buf, size_type len,
                                     size_type pos) const
 {
@@ -1555,7 +1454,6 @@ lyxstring::size_type lyxstring::copy(value_type * buf, size_type len,
 
 // Compare funcs should be verified.
 
-inline
 int lyxstring::internal_compare(size_type pos, size_type n,
                                value_type const * s,
                                size_type slen, size_type n2) const
@@ -1579,7 +1477,6 @@ int lyxstring::internal_compare(size_type pos, size_type n,
 }
 
 
-inline
 int lyxstring::compare(lyxstring const & str) const
 {
        TestlyxstringInvariant(this);
@@ -1588,7 +1485,6 @@ int lyxstring::compare(lyxstring const & str) const
 }
 
 
-inline
 int lyxstring::compare(value_type const * s) const
 {
        Assert(s); //OURS!
@@ -1598,7 +1494,6 @@ int lyxstring::compare(value_type const * s) const
 }
 
 
-inline
 int lyxstring::compare(size_type pos, size_type n,
                       lyxstring const & str) const
 {
@@ -1608,7 +1503,6 @@ int lyxstring::compare(size_type pos, size_type n,
 }
 
 
-inline
 int lyxstring::compare(size_type pos, size_type n, lyxstring const & str,
                       size_type pos2, size_type n2) const
 {
@@ -1621,7 +1515,6 @@ int lyxstring::compare(size_type pos, size_type n, lyxstring const & str,
 }
 
 
-inline
 int lyxstring::compare(size_type pos, size_type n, value_type const * s,
                       size_type n2) const
 {
@@ -1636,7 +1529,6 @@ int lyxstring::compare(size_type pos, size_type n, value_type const * s,
 /////////////////
 
 // i = index, n = length
-inline
 lyxstring lyxstring::substr(size_type i, size_type n) const
 {
        Assert(i <= rep->sz); // STD!