]> git.lyx.org Git - lyx.git/commitdiff
move things around
authorAndré Pönitz <poenitz@gmx.net>
Thu, 9 Aug 2001 09:19:18 +0000 (09:19 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 9 Aug 2001 09:19:18 +0000 (09:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2460 a592a061-630c-0410-9148-cb99ea01b6c8

20 files changed:
src/mathed/array.C
src/mathed/array.h
src/mathed/math_bigopinset.C
src/mathed/math_bigopinset.h
src/mathed/math_cursor.C
src/mathed/math_funcinset.h
src/mathed/math_funcliminset.C
src/mathed/math_gridinset.h
src/mathed/math_macro.C
src/mathed/math_macro.h
src/mathed/math_macrotemplate.h
src/mathed/math_matrixinset.C
src/mathed/math_nestinset.C
src/mathed/math_nestinset.h
src/mathed/math_parser.C
src/mathed/math_scriptinset.C
src/mathed/math_spaceinset.C
src/mathed/math_symbolinset.C
src/mathed/math_symbolinset.h
src/mathed/xarray.h

index c5552aff4a6c622a0d43eff1e8c68bc1b427bd41..31de4bae0e7ec8af53f19e2e457768733eca0dd0 100644 (file)
@@ -3,10 +3,8 @@
 #endif
 
 #include "math_inset.h"
-#include "math_charinset.h"
 #include "debug.h"
 #include "array.h"
-#include "math_scriptinset.h"
 #include "mathed/support.h"
 
 using std::ostream;
@@ -84,12 +82,6 @@ void MathArray::insert(int pos, MathInset * p)
 }
 
 
-void MathArray::insert(int pos, unsigned char b, MathTextCodes t)
-{
-       bf_.insert(begin() + pos, new MathCharInset(b, t));
-}
-
-
 void MathArray::insert(int pos, MathArray const & array)
 {
        bf_.insert(begin() + pos, array.begin(), array.end());
@@ -103,12 +95,6 @@ void MathArray::push_back(MathInset * p)
 }
 
 
-void MathArray::push_back(unsigned char b, MathTextCodes c)
-{
-       insert(size(), b, c);
-}
-
-
 void MathArray::push_back(MathArray const & array)
 {
        insert(size(), array);
index f37e0c9843912eab04ac8e95346b684ce760b5b8..f5c6d849239672dfd0349a2da685ff73ff14a452 100644 (file)
 #include <vector>
 #include <iosfwd>
 
-#include "mathed/support.h"
-#include "math_defs.h"
-
 class MathInset;
 class MathMacro;
-class Painter;
 class LaTeXFeatures;
 
 #ifdef __GNUG__
@@ -72,8 +68,6 @@ public:
        ///
        void insert(int pos, MathInset * inset);
        ///
-       void insert(int pos, unsigned char, MathTextCodes);
-       ///
        void insert(int pos, MathArray const &);
 
        ///
@@ -89,8 +83,6 @@ public:
        ///
        void push_back(MathInset * inset);
        ///
-       void push_back(unsigned char, MathTextCodes);
-       ///
        void push_back(MathArray const &);
        ///
        void pop_back();
index 232e0d45646c93b4830fec6cd94126d796f0bc45..5426095297453a64c7ea6f2ff22d62e5fddccfed 100644 (file)
@@ -1,5 +1,6 @@
 #include "math_bigopinset.h"
 #include "mathed/math_parser.h"
+#include "mathed/support.h"
 #include "support/LOstream.h"
 
 
index 660ccfe08e57aed16345f46ef242f317f11c4150..896c1969f68b6af06972bcc98fdf4f74d2b1dc07 100644 (file)
@@ -6,6 +6,7 @@
 // larger in displayed formulae and take limits
 
 #include "math_diminset.h"
+#include "LString.h"
 
 struct latexkeys;
 
index 3ec44ee22e18613a166be1283c420419fd6360cc..6f3562a52c17eeb7309d2caeafd0cd27b223f43c 100644 (file)
@@ -31,6 +31,7 @@
 #include "math_cursor.h"
 #include "math_arrayinset.h"
 #include "math_bigopinset.h"
+#include "math_charinset.h"
 #include "math_symbolinset.h"
 #include "math_decorationinset.h"
 #include "math_deliminset.h"
@@ -417,7 +418,7 @@ void MathCursor::insert(char c, MathTextCodes t)
                }
        }
 
-       array().insert(pos(), c, t);
+       array().insert(pos(), new MathCharInset(c, t));
        posRight();
 }
 
index ad6a9791ff3e0080824ad028cb28fdbde6c6aed0..3a773df15f1acde56b06431d22918da3549bed2d 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "math_diminset.h"
 #include "math_defs.h"
+#include "LString.h"
 
 #ifdef __GNUG__
 #pragma interface
index 4ceeaaddbe402941cec0a58c190fe47d3a43fa3e..b527af5fa2dde66e6a45fda5d31609f59f131f6d 100644 (file)
@@ -1,5 +1,6 @@
 #include "math_funcliminset.h"
 #include "mathed/math_parser.h"
+#include "mathed/support.h"
 #include "support/LOstream.h"
 
 
index 885ae2b1dfcc97a81d529d59b1d7d58c26827788..101d506fc3cf8618f4e37afa20ea31b01e75ee06 100644 (file)
@@ -3,6 +3,7 @@
 #define MATH_GRID_H
 
 #include "math_nestinset.h"
+#include "LString.h"
 
 #ifdef __GNUG__
 #pragma interface
index 12738d6d4890d1938c9ecdf9d9b5c6850f807afc..933237605a03d7575b1deb76b6d1f4aa84103983 100644 (file)
@@ -48,11 +48,13 @@ MathInset * MathMacro::clone() const
        return new MathMacro(*this);
 }
 
-string const & MathMacro::name() const
+
+const char * MathMacro::name() const
 {
-       return tmplate_->name();
+       return tmplate_->name().c_str();
 }
 
+
 void MathMacro::metrics(MathStyles st) const
 {
        if (mathcursor && mathcursor->isInside(this)) {
index d54f064acb54fdaa59bdfd8ebe7fccb7ad4c1a96..a3d124ebd5cae238b43a10e7d8150de79db914df 100644 (file)
@@ -69,7 +69,7 @@ private:
        ///
        void operator=(MathMacro const &);
        ///
-       string const & name() const;
+       char const * name() const;
 
        ///
        MathMacroTemplate const * const tmplate_;
index a8c028cac5807f5e0c1bd78ccd539ea529cc3aec..628a9bee68bfeb7bf5e879280262625d9703b837 100644 (file)
@@ -3,6 +3,7 @@
 #define MATH_MACROTEMPLATE_H
 
 #include "math_nestinset.h"
+#include "LString.h"
 
 #ifdef __GNUG__
 #pragma interface
index 8508b4a57245f1b5833cfa88ff29fc9a1de2b7d4..c521e819b06731b889f326dac0b1e1be75f9f29a 100644 (file)
@@ -5,6 +5,7 @@
 #include <vector>
 
 #include "math_matrixinset.h"
+#include "support.h"
 #include "debug.h"
 #include "support/LOstream.h"
 #include "Painter.h"
index 32ab637300641da3bf61a9dc9b4aefed833db9dc..ebe624c0447830962a2ce9e4a4532726961ccbb6 100644 (file)
@@ -148,15 +148,6 @@ void MathNestInset::dump() const
 }
 
 
-void MathNestInset::push_back(unsigned char ch, MathTextCodes fcode)
-{
-       if (nargs())
-               cells_.back().data_.push_back(ch, fcode);
-       else
-               lyxerr << "can't push without a cell\n";
-}
-
-
 void MathNestInset::push_back(MathInset * p)
 {
        if (nargs())
index 97569f452644306f66fd456caf206df89542aadc..068fbad16531d239bd1aaa3bafc3c97f772bf431 100644 (file)
@@ -62,8 +62,6 @@ public:
        ///
        void push_back(MathInset *);
        ///
-       void push_back(unsigned char ch, MathTextCodes fcode);
-       ///
        void dump() const;
 
        ///
index df7ee5ceb79673f775a4585c0ad22400ea1ae517..b5338a4be99486c1bc73c45d04499995612b09bb 100644 (file)
@@ -30,6 +30,7 @@
 #include "math_inset.h"
 #include "math_arrayinset.h"
 #include "math_bigopinset.h"
+#include "math_charinset.h"
 #include "math_dotsinset.h"
 #include "math_decorationinset.h"
 #include "math_deliminset.h"
@@ -553,7 +554,7 @@ void mathed_parse_into(MathArray & array, unsigned flags)
                        
                case LM_TK_ALPHA:
                        if (!isspace(yylval.i) || yyvarcode == LM_TC_TEXTRM)
-                               array.push_back(yylval.i, yyvarcode);
+                               array.push_back(new MathCharInset(yylval.i, yyvarcode));
                        break;
 
                case LM_TK_ARGUMENT: {
@@ -564,11 +565,11 @@ void mathed_parse_into(MathArray & array, unsigned flags)
                }
 
                case LM_TK_SPECIAL:
-                       array.push_back(yylval.i, LM_TC_SPECIAL);
+                       array.push_back(new MathCharInset(yylval.i, LM_TC_SPECIAL));
                        break;
 
                case LM_TK_STR:
-                       array.push_back(yylval.i, LM_TC_CONST);
+                       array.push_back(new MathCharInset(yylval.i, LM_TC_CONST));
                        break;
 
                case LM_TK_OPEN:
@@ -576,7 +577,7 @@ void mathed_parse_into(MathArray & array, unsigned flags)
                        if (flags & FLAG_BRACE)
                                flags &= ~FLAG_BRACE;
                        else 
-                               array.push_back('{', LM_TC_TEX);
+                               array.push_back(new MathCharInset('{', LM_TC_TEX));
                        break;
 
                case LM_TK_CLOSE:
@@ -594,18 +595,18 @@ void mathed_parse_into(MathArray & array, unsigned flags)
                        if (brace == 0 && (flags & FLAG_BRACE_LAST))
                                flags |= FLAG_LEAVE;
                        else
-                               array.push_back('}', LM_TC_TEX);
+                               array.push_back(new MathCharInset('}', LM_TC_TEX));
                        break;
                
                case '[':
-                       array.push_back('[', LM_TC_CONST);
+                       array.push_back(new MathCharInset('[', LM_TC_CONST));
                        break;
 
                case ']':
                        if (flags & FLAG_BRACK_END)
                                flags |= FLAG_LEAVE;
                        else 
-                               array.push_back(']', LM_TC_CONST);
+                               array.push_back(new MathCharInset(']', LM_TC_CONST));
                        break;
                
                case '^':
@@ -662,7 +663,7 @@ void mathed_parse_into(MathArray & array, unsigned flags)
                        break;
 
                case LM_TK_BOP:
-                       array.push_back(yylval.i, LM_TC_BOP);
+                       array.push_back(new MathCharInset(yylval.i, LM_TC_BOP));
                        break;
 
                case LM_TK_SPACE:
index a22a88296a6ff846912926e9e0b6c4fccad02787..158c2b91c42e838f4ce635f3de9b2b38ab038668 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "math_scriptinset.h"
 #include "support/LOstream.h"
+#include "support.h"
 
 
 MathScriptInset::MathScriptInset()
@@ -239,8 +240,8 @@ void MathScriptInset::metrics(MathStyles st) const
                dx0_   = (width_ - xcell(0).width()) / 2;
                dx1_   = (width_ - xcell(1).width()) / 2;
        } else {
-               int asc;
-               int des;
+               int asc = 0;
+               int des = 0;
                int wid = 0;
                mathed_char_height(LM_TC_VAR, st, 'I', asc, des);
                if (symbol_) {
index aacab30ca4cd5ff2b9e57ac4089f4ae9ed5dfeb1..764a324bfc9a045054066e019eccf1df9d8cb8ca 100644 (file)
@@ -3,6 +3,7 @@
 #endif
 
 #include "math_spaceinset.h"
+#include "support.h"
 #include "LColor.h"
 #include "Painter.h"
 #include "support/LOstream.h"
index ea1efff9b069556d46081cf2c86c4ef3d1a52c76..d93776f05ab395623503e31db8496c944c23ce61 100644 (file)
@@ -1,5 +1,6 @@
 #include "math_symbolinset.h"
-#include "mathed/math_parser.h"
+#include "math_parser.h"
+#include "support.h"
 #include "support/LOstream.h"
 
 
index ac54572ddeaab64d40f262f62235ccd87537b8fe..679d2efb825f7b03d5d618a5da34b17cc2533e10 100644 (file)
@@ -3,6 +3,7 @@
 #define MATH_SYMBOLINSET_H
 
 #include "math_diminset.h"
+#include "LString.h"
 
 struct latexkeys;
 
index 06cbececc42b17e96fdab7e5431783117dfe3f64..0dc4ddcee95f6a7d4326e1d39337234d05d89d80 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <iosfwd>
 #include "array.h"
+#include "math_defs.h"
 
 #ifdef __GNUG__
 #pragma interface