]> git.lyx.org Git - features.git/commitdiff
A few tweaks (fix new file name, make sstream.h work for gcc 2.8.1)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 15 Sep 2000 21:33:03 +0000 (21:33 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 15 Sep 2000 21:33:03 +0000 (21:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1024 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/lyxfunc.C
src/support/sstream.h
src/text2.C

index 3501ed3f8c45ad1325e796ee2da46a12739843b2..0fbb20e66bf96ac79ddd0ab6b9c02e434c6056ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2000-09-15  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * src/lyxfunc.C: construct correctly the automatic new file
+       names. 
+
+       * src/text2.C (IsStringInText): change type of variable i to shut
+       off a warning.
+
+       * src/support/sstream.h: do not use namespaces if the compiler
+       does not support them.
+
 2000-09-15  Marko Vendelin <markov@ioc.ee>
        * src/frontends/gnome/FormCitation.C
        * src/frontends/gnome/FormCitation.h
index 0fddfde2764151b0afd6cfa9384c69631f620a09..53029a4130ba267857c869dbc85d5d22482eb82e 100644 (file)
@@ -3222,12 +3222,13 @@ void LyXFunc::MenuNew(bool fromTemplate)
                        }
                }
        } else {
-               s = lyxrc.document_path + "newfile" + tostr(++newfile_number);
+               s = AddPath(lyxrc.document_path,
+                           "newfile" + tostr(++newfile_number));
                FileInfo fi(s);
                while (bufferlist.exists(s) || fi.readable()) {
                        ++newfile_number;
-                       s = lyxrc.document_path + "newfile" +
-                               tostr(newfile_number);
+                       s = AddPath(lyxrc.document_path,
+                                   "newfile" + tostr(newfile_number));
                        fi.newFile(s);
                }
        }
index 2d11caad6949c8fbc7ffdba0627929d99e9c2772..5a4d5d68fc444987f12becca97d4f4bdd8f8254e 100644 (file)
@@ -29,8 +29,6 @@ the executable file might be covered by the GNU General Public License. */
    and with lyxstring. Dynamic casts have been replaced by static_casts.
    One fix to avoid unsigned/signed warnings.
 
-   Some further changes might be needed to avoid use of namespaces.
-
    Lars Gullik Bjønnes (larsbj@lyx.org)
 */
 
@@ -41,8 +39,11 @@ the executable file might be covered by the GNU General Public License. */
 #include <iostream>
 #include <streambuf.h>
 
+#ifdef CXX_WORKING_NAMESPACES
 namespace std
 {
+#endif
+       
   class stringbuf : public streambuf
   {
   public:
@@ -167,7 +168,10 @@ namespace std
       stringstreambase(s, which)
     { }
   };
+
+#ifdef CXX_WORKING_NAMESPACES
 }
+#endif
 
 inline int stringbuf::sync()
 {
index a1ca4733e3251a62e5bc7e97add93f9b2267aab4..133f26d4ae56f6b17032a5d8ac21961684fb52c5 100644 (file)
@@ -2434,7 +2434,7 @@ bool LyXText::IsStringInText(LyXParagraph * par,
                             string const & str) const
 {
        if (par) {
-               unsigned int i = 0;
+               LyXParagraph::size_type i = 0;
                while (pos + i < par->Last() && i < str.length()&& 
                       str[i] == par->GetChar(pos + i)) {
                        ++i;