From de3cf8c89c9735f2299c9e9da86b2bdd16afbe1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 20 Sep 2002 12:36:36 +0000 Subject: [PATCH] Martin's space patch. Add a std:: to getline. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5324 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/formulabase.C | 5 ++++- src/mathed/math_factory.C | 2 +- src/mathed/math_spaceinset.C | 10 ++++++++++ src/mathed/math_spaceinset.h | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index c2bab3f875..e233c693ed 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -391,6 +391,9 @@ Inset::RESULT InsetFormulaBase::localDispatch(FuncRequest const & cmd) return lfunMouseMotion(cmd); case LFUN_MOUSE_RELEASE: return lfunMouseRelease(cmd); + case LFUN_MOUSE_DOUBLE: + //lyxerr << "Mouse double\n"; + return localDispatch(FuncRequest(LFUN_WORDSEL)); default: break; } @@ -591,8 +594,8 @@ Inset::RESULT InsetFormulaBase::localDispatch(FuncRequest const & cmd) case LFUN_FRAK: handleFont(bv, cmd.argument, "mathfrak"); break; case LFUN_ITAL: handleFont(bv, cmd.argument, "mathit"); break; case LFUN_NOUN: handleFont(bv, cmd.argument, "mathbb"); break; - case LFUN_DEFAULT: handleFont(bv, cmd.argument, "textnormal"); break; case LFUN_FREE: handleFont(bv, cmd.argument, "textrm"); break; + case LFUN_DEFAULT: handleFont(bv, cmd.argument, "textnormal"); break; case LFUN_GREEK: handleFont(bv, cmd.argument, "lyxgreek1"); diff --git a/src/mathed/math_factory.C b/src/mathed/math_factory.C index 0795f1411b..ed156a2be4 100644 --- a/src/mathed/math_factory.C +++ b/src/mathed/math_factory.C @@ -94,7 +94,7 @@ void initSymbols() std::ifstream fs(filename.c_str()); string line; - while (getline(fs, line)) { + while (std::getline(fs, line)) { int charid = 0; int fallbackid = 0; latexkeys tmp; diff --git a/src/mathed/math_spaceinset.C b/src/mathed/math_spaceinset.C index db2afe0d42..84a438855c 100644 --- a/src/mathed/math_spaceinset.C +++ b/src/mathed/math_spaceinset.C @@ -7,6 +7,7 @@ #include "LColor.h" #include "frontends/Painter.h" #include "math_mathmlstream.h" +#include "LaTeXFeatures.h" #include "debug.h" @@ -85,6 +86,15 @@ void MathSpaceInset::incSpace() space_ = (space_ + 1) % (nSpace - 2); } +void MathSpaceInset::validate(LaTeXFeatures & features) const +{ + if (space_ >= 0 && space_< nSpace) { + if ((latex_mathspace[space_] == "negmedspace") + || (latex_mathspace[space_] == "negthickspace")) + features.require("amsmath"); + } +} + void MathSpaceInset::maplize(MapleStream & os) const { diff --git a/src/mathed/math_spaceinset.h b/src/mathed/math_spaceinset.h index cf6ccab02c..ab3011bbb0 100644 --- a/src/mathed/math_spaceinset.h +++ b/src/mathed/math_spaceinset.h @@ -31,6 +31,8 @@ public: /// void normalize(NormalStream &) const; /// + void validate(LaTeXFeatures & features) const; + /// void maplize(MapleStream &) const; /// void mathematicize(MathematicaStream &) const;