mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Add a bunch of c_str() for string stream uses; remove lyxfunc symbol-insert.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1200 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
29f7055e95
commit
acc7e9789e
19
ChangeLog
19
ChangeLog
@ -1,5 +1,24 @@
|
|||||||
2000-11-06 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
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.
|
* lib/configure.m4: == is not a valid operator for command test.
|
||||||
|
|
||||||
* src/lyxrc.C: add using directive.
|
* src/lyxrc.C: add using directive.
|
||||||
|
@ -149,12 +149,12 @@
|
|||||||
# Math menu
|
# Math menu
|
||||||
#
|
#
|
||||||
|
|
||||||
\bind "M-e m" "symbol-insert frac"
|
\bind "M-e m" "math-insert frac"
|
||||||
\bind "M-e n" "symbol-insert sqrt"
|
\bind "M-e n" "math-insert sqrt"
|
||||||
\bind "M-e e" "symbol-insert ^"
|
\bind "M-e e" "math-insert ^"
|
||||||
\bind "M-e a" "symbol-insert _"
|
\bind "M-e a" "math-insert _"
|
||||||
\bind "M-e s" "symbol-insert sum"
|
\bind "M-e s" "math-insert sum"
|
||||||
\bind "M-e i" "symbol-insert int"
|
\bind "M-e i" "math-insert int"
|
||||||
\bind "M-e t" "math-mode"
|
\bind "M-e t" "math-mode"
|
||||||
\bind "M-e k" "math-display"
|
\bind "M-e k" "math-display"
|
||||||
#bind "M-e p" "display-math-panel-or-something" # What function to use?
|
#bind "M-e p" "display-math-panel-or-something" # What function to use?
|
||||||
|
@ -147,7 +147,7 @@
|
|||||||
\bind "C-s e" "math-insert sum"
|
\bind "C-s e" "math-insert sum"
|
||||||
\bind "C-s p" "math-insert prod"
|
\bind "C-s p" "math-insert prod"
|
||||||
\bind "C-s i" "math-insert infty"
|
\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.
|
# My own embellishments for symbols I use often.
|
||||||
|
|
||||||
|
@ -381,7 +381,6 @@ void LyXAction::init()
|
|||||||
{ LFUN_SETXY, "server-set-xy", "", ReadOnly },
|
{ LFUN_SETXY, "server-set-xy", "", ReadOnly },
|
||||||
{ LFUN_SET_COLOR, "set-color", "", Noop },
|
{ LFUN_SET_COLOR, "set-color", "", Noop },
|
||||||
{ LFUN_SPELLCHECK, "spellchecker", "", Noop },
|
{ LFUN_SPELLCHECK, "spellchecker", "", Noop },
|
||||||
{ LFUN_INSERT_MATH, "symbol-insert", "", Noop },
|
|
||||||
{ LFUN_SHIFT_TAB, "tab-backward", "", Noop },
|
{ LFUN_SHIFT_TAB, "tab-backward", "", Noop },
|
||||||
{ LFUN_TAB, "tab-forward", "", Noop },
|
{ LFUN_TAB, "tab-forward", "", Noop },
|
||||||
{ LFUN_TABINSERT, "tab-insert", "", Noop },
|
{ LFUN_TABINSERT, "tab-insert", "", Noop },
|
||||||
|
@ -56,7 +56,7 @@ void Spacing::set(Spacing::Space sp, float val)
|
|||||||
void Spacing::set(Spacing::Space sp, string const & val)
|
void Spacing::set(Spacing::Space sp, string const & val)
|
||||||
{
|
{
|
||||||
float fval;
|
float fval;
|
||||||
istringstream istr(val);
|
istringstream istr(val.c_str());
|
||||||
istr >> fval;
|
istr >> fval;
|
||||||
set(sp, fval);
|
set(sp, fval);
|
||||||
}
|
}
|
||||||
|
@ -1647,7 +1647,7 @@ string const Buffer::asciiParagraph(LyXParagraph const * par,
|
|||||||
if ((inset = par->GetInset(i))) {
|
if ((inset = par->GetInset(i))) {
|
||||||
if (!inset->Ascii(this, buffer)) {
|
if (!inset->Ascii(this, buffer)) {
|
||||||
string dummy;
|
string dummy;
|
||||||
string s = rsplit(buffer.str(),
|
string s = rsplit(buffer.str().c_str(),
|
||||||
dummy, '\n');
|
dummy, '\n');
|
||||||
currlinelen += s.length();
|
currlinelen += s.length();
|
||||||
} else {
|
} else {
|
||||||
@ -1698,7 +1698,7 @@ string const Buffer::asciiParagraph(LyXParagraph const * par,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return buffer.str();
|
return buffer.str().c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ bool FormPreferences::ColoursLoadBrowser(string const & filename)
|
|||||||
RGB col;
|
RGB col;
|
||||||
string name;
|
string name;
|
||||||
|
|
||||||
istringstream iss(line);
|
istringstream iss(line.c_str());
|
||||||
iss >> col.r >> col.g >> col.b;
|
iss >> col.r >> col.g >> col.b;
|
||||||
while (iss.good()) {
|
while (iss.good()) {
|
||||||
string next;
|
string next;
|
||||||
|
@ -1950,7 +1950,7 @@ bool InsetTabular::copySelection(BufferView * bv)
|
|||||||
|
|
||||||
ostringstream sstr;
|
ostringstream sstr;
|
||||||
paste_tabular->Ascii(bv->buffer(), sstr);
|
paste_tabular->Ascii(bv->buffer(), sstr);
|
||||||
bv->stuffClipboard(sstr.str());
|
bv->stuffClipboard(sstr.str().c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2051,7 +2051,7 @@ string const LyXFunc::Dispatch(int ac,
|
|||||||
cur_value = par->spacing.getValue();
|
cur_value = par->spacing.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
istringstream istr(argument);
|
istringstream istr(argument.c_str());
|
||||||
|
|
||||||
string tmp;
|
string tmp;
|
||||||
istr >> tmp;
|
istr >> tmp;
|
||||||
@ -2350,7 +2350,7 @@ string const LyXFunc::Dispatch(int ac,
|
|||||||
|
|
||||||
case LFUN_GOTO_PARAGRAPH:
|
case LFUN_GOTO_PARAGRAPH:
|
||||||
{
|
{
|
||||||
istringstream istr(argument);
|
istringstream istr(argument.c_str());
|
||||||
|
|
||||||
int id;
|
int id;
|
||||||
istr >> id;
|
istr >> id;
|
||||||
|
@ -3935,7 +3935,7 @@ string const LyXParagraph::String(Buffer const * buffer, bool label)
|
|||||||
GetInset(i)->LyxCode() == Inset::MATH_CODE) {
|
GetInset(i)->LyxCode() == Inset::MATH_CODE) {
|
||||||
std::ostringstream ost;
|
std::ostringstream ost;
|
||||||
GetInset(i)->Ascii(buffer, 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) {
|
else if (c == META_INSET) {
|
||||||
std::ostringstream ost;
|
std::ostringstream ost;
|
||||||
GetInset(i)->Ascii(buffer, ost);
|
GetInset(i)->Ascii(buffer, ost);
|
||||||
s += ost.str();
|
s += ost.str().c_str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -746,7 +746,7 @@ string const GetFileContents(string const & fname)
|
|||||||
if (ifs && ofs) {
|
if (ifs && ofs) {
|
||||||
ofs << ifs.rdbuf();
|
ofs << ifs.rdbuf();
|
||||||
ifs.close();
|
ifs.close();
|
||||||
return ofs.str();
|
return ofs.str().c_str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lyxerr << "LyX was not able to read file '" << fname << "'" << endl;
|
lyxerr << "LyX was not able to read file '" << fname << "'" << endl;
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#include "LAssert.h"
|
#include "LAssert.h"
|
||||||
|
|
||||||
using std::min;
|
using std::min;
|
||||||
|
using std::istream;
|
||||||
|
using std::ostream;
|
||||||
|
|
||||||
// This class is supposed to be functionaly equivalent to a
|
// This class is supposed to be functionaly equivalent to a
|
||||||
// standard conformant string. This mean among others that we
|
// standard conformant string. This mean among others that we
|
||||||
|
Loading…
Reference in New Issue
Block a user