]> git.lyx.org Git - features.git/commitdiff
Add a bunch of c_str() for string stream uses; remove lyxfunc symbol-insert.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 6 Nov 2000 15:47:22 +0000 (15:47 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 6 Nov 2000 15:47:22 +0000 (15:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1200 a592a061-630c-0410-9148-cb99ea01b6c8

12 files changed:
ChangeLog
lib/bind/fi_menus.bind
lib/bind/sciword.bind
src/LyXAction.C
src/Spacing.C
src/buffer.C
src/frontends/xforms/FormPreferences.C
src/insets/insettabular.C
src/lyxfunc.C
src/paragraph.C
src/support/filetools.C
src/support/lyxstring.C

index a11c45e67475b0f6cbe3ea32531f1344cf5faa19..ba2bae0ad64bc0cd2297b8976ec03dbfed93a183 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,24 @@
 2000-11-06  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
+       * src/support/lyxstring.C: add a couple "using" directives.
+
+       * src/frontends/xforms/FormPreferences.C (ColoursLoadBrowser): add
+       a .c_str() here too for good measure.
+       * src/Spacing.C (set): ditto.
+       * src/lyxfunc.C (Dispatch): ditto.
+
+       * src/insets/insettabular.C (copySelection): change .str() to
+       .str().c_str() to fix problems with lyxstring.
+       * src/support/filetools.C (GetFileContents): ditto.
+       * src/buffer.C (asciiParagraph): ditto.
+       * src/paragraph.C (String): ditto.
+
+       * lib/bind/fi_menus.bind: change symbol-insert to math-insert.
+       * lib/bind/sciword.bind: ditto.
+
+       * src/LyXAction.C (init): remove "symbol-insert" function, which
+       shared LFUN_INSERT_MATH with "math-insert".
+
        * lib/configure.m4: == is not a valid operator for command test.
 
        * src/lyxrc.C: add using directive.
index 03c257047b0f27b973fd6bc187717c2c86b25a5c..1ba86c0cbabf90b1ad3f1adabdf08399fe131787 100644 (file)
 # Math menu
 #
 
-\bind "M-e m"                   "symbol-insert frac"
-\bind "M-e n"                   "symbol-insert sqrt"
-\bind "M-e e"                   "symbol-insert ^"
-\bind "M-e a"                   "symbol-insert _"
-\bind "M-e s"                   "symbol-insert sum"
-\bind "M-e i"                   "symbol-insert int"
+\bind "M-e m"                   "math-insert frac"
+\bind "M-e n"                   "math-insert sqrt"
+\bind "M-e e"                   "math-insert ^"
+\bind "M-e a"                   "math-insert _"
+\bind "M-e s"                   "math-insert sum"
+\bind "M-e i"                   "math-insert int"
 \bind "M-e t"                   "math-mode"
 \bind "M-e k"                   "math-display"
 #bind "M-e p"                  "display-math-panel-or-something" # What function to use?
index 577d71d7697c730ad6f5d2872ccf0c38adaafbb6..cd13a48e8a402c02598648242e9cc400888e866e 100644 (file)
 \bind "C-s e"          "math-insert sum"
 \bind "C-s p"          "math-insert prod"
 \bind "C-s i"          "math-insert infty"
-\bind "C-s x"          "symbol-insert times"
+\bind "C-s x"          "math-insert times"
 
 # My own embellishments for symbols I use often.
 
index d46ffab334c9c573390c8af8e0b4e35367c5f0bb..83db2268812101477cc0227e7b7d60096215ea45 100644 (file)
@@ -381,7 +381,6 @@ void LyXAction::init()
                { LFUN_SETXY, "server-set-xy", "", ReadOnly },
                { LFUN_SET_COLOR, "set-color", "", Noop },
                { LFUN_SPELLCHECK, "spellchecker", "", Noop },
-               { LFUN_INSERT_MATH, "symbol-insert", "", Noop },
                { LFUN_SHIFT_TAB, "tab-backward", "", Noop },
                { LFUN_TAB, "tab-forward", "", Noop },
                { LFUN_TABINSERT, "tab-insert", "", Noop },
index b80f55ffb13c554ac0c93cb5d9cb57fe198d2f47..3d39cf4e326ec75538fb0f59e830edee3782d019 100644 (file)
@@ -56,7 +56,7 @@ void Spacing::set(Spacing::Space sp, float val)
 void Spacing::set(Spacing::Space sp, string const & val)
 {
        float fval;
-       istringstream istr(val);
+       istringstream istr(val.c_str());
        istr >> fval;
        set(sp, fval);
 }
index 152f7de180b9a29babbcf5eaaa0ab1dc60c33e76..74c7d6eb5842e4bd6ba3726bd62cb4c4bbda1fcf 100644 (file)
@@ -1647,7 +1647,7 @@ string const Buffer::asciiParagraph(LyXParagraph const * par,
                        if ((inset = par->GetInset(i))) {
                                if (!inset->Ascii(this, buffer)) {
                                        string dummy;
-                                       string s = rsplit(buffer.str(),
+                                       string s = rsplit(buffer.str().c_str(),
                                                          dummy, '\n');
                                        currlinelen += s.length();
                                } else {
@@ -1698,7 +1698,7 @@ string const Buffer::asciiParagraph(LyXParagraph const * par,
                        break;
                }
        }
-       return buffer.str();
+       return buffer.str().c_str();
 }
 
 
index 3724c564b05b93f19a880afd19c4f67eeeb5de49..cc6d19333ef63cefcaa19d922d450782c6116f68 100644 (file)
@@ -438,7 +438,7 @@ bool FormPreferences::ColoursLoadBrowser(string const & filename)
                        RGB col;
                        string name;
                        
-                       istringstream iss(line);
+                       istringstream iss(line.c_str());
                        iss >> col.r >> col.g >> col.b;
                        while (iss.good()) {
                                string next;
index f97392473b2c2fedd11b7e238a3bd4b9fb6bbd91..88b234dfc42a84e634d8466ed807dc43355db574 100644 (file)
@@ -1950,7 +1950,7 @@ bool InsetTabular::copySelection(BufferView * bv)
 
     ostringstream sstr;
     paste_tabular->Ascii(bv->buffer(), sstr);
-    bv->stuffClipboard(sstr.str());
+    bv->stuffClipboard(sstr.str().c_str());
     return true;
 }
 
index 1e4c7d1d64057af9d40f76061f92eaf6b710a7e3..9a78e888604732f03d25e223304cf6a4d5372a8c 100644 (file)
@@ -2051,7 +2051,7 @@ string const LyXFunc::Dispatch(int ac,
                        cur_value = par->spacing.getValue();
                }
                
-               istringstream istr(argument);
+               istringstream istr(argument.c_str());
 
                string tmp;
                istr >> tmp;
@@ -2350,7 +2350,7 @@ string const LyXFunc::Dispatch(int ac,
 
        case LFUN_GOTO_PARAGRAPH:
        {
-                istringstream istr(argument);
+                istringstream istr(argument.c_str());
 
                int id;
                istr >> id;
index d3e63a193bedfd955a5f3c2fbb18fd5cfb715b1e..ffdb776e7f071d692abd3b1ec7935c9049e60f4a 100644 (file)
@@ -3935,7 +3935,7 @@ string const LyXParagraph::String(Buffer const * buffer, bool label)
                         GetInset(i)->LyxCode() == Inset::MATH_CODE) {
                        std::ostringstream ost;
                        GetInset(i)->Ascii(buffer, ost);
-                       s += subst(ost.str(),'\n',' ');
+                       s += subst(ost.str().c_str(),'\n',' ');
                }
        }
 
@@ -3975,7 +3975,7 @@ string const LyXParagraph::String(Buffer const * buffer,
                else if (c == META_INSET) {
                        std::ostringstream ost;
                        GetInset(i)->Ascii(buffer, ost);
-                       s += ost.str();
+                       s += ost.str().c_str();
                }
        }
 
index c1052a180a7b40891cb2ecce89d15de0b465475e..c9605aa7f8f87dd153982a1565b8ca1601130828 100644 (file)
@@ -746,7 +746,7 @@ string const GetFileContents(string const & fname)
                if (ifs && ofs) {
                        ofs << ifs.rdbuf();
                        ifs.close();
-                       return ofs.str();
+                       return ofs.str().c_str();
                }
        }
        lyxerr << "LyX was not able to read file '" << fname << "'" << endl;
index 7bd6d90f2f2e392515e9f8fb2fdb1aeafd85af76..e3fd5d3e60c5323cde4724bfc569fc412e0cb6cd 100644 (file)
@@ -24,6 +24,8 @@
 #include "LAssert.h"
 
 using std::min;
+using std::istream;
+using std::ostream;
 
 // This class is supposed to be functionaly equivalent to a
 // standard conformant string. This mean among others that we