]> git.lyx.org Git - features.git/commitdiff
Martin's space patch.
authorAndré Pönitz <poenitz@gmx.net>
Fri, 20 Sep 2002 12:36:36 +0000 (12:36 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 20 Sep 2002 12:36:36 +0000 (12:36 +0000)
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
src/mathed/math_factory.C
src/mathed/math_spaceinset.C
src/mathed/math_spaceinset.h

index c2bab3f875fa245e87524f9eb5b2e22850589084..e233c693ed4d6afc6cee8fccc62251b0a26aeb31 100644 (file)
@@ -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");
index 0795f1411bc77461c05085aee0085848ba64a9ca..ed156a2be477fb58ecbd1fe0fe332ee68a844c5a 100644 (file)
@@ -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;
index db2afe0d42cfff630db02037c60330d153f74440..84a438855cebf7f41a736ae63dae73c5419b3c92 100644 (file)
@@ -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
 {
index cf6ccab02cd0ebf143571bcdebc9e7e454f97d31..ab3011bbb088284ed860df70a575027178fae957 100644 (file)
@@ -31,6 +31,8 @@ public:
        ///
        void normalize(NormalStream &) const;
        ///
+       void validate(LaTeXFeatures & features) const;
+       ///
        void maplize(MapleStream &) const;
        ///
        void mathematicize(MathematicaStream &) const;