mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 16:31:13 +00:00
small stuff, perhaps you should have a look at the change in math_parser, Andre
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3230 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
12d3ca2886
commit
f70513fe19
@ -1,3 +1,21 @@
|
|||||||
|
2001-12-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||||
|
|
||||||
|
* math_atom.C:
|
||||||
|
* math_binaryopinset.C:
|
||||||
|
* math_binominset.C:
|
||||||
|
* math_casesinset.C:
|
||||||
|
* math_charinset.C:
|
||||||
|
* math_data.C:
|
||||||
|
* math_diminset.C:add missing config.h
|
||||||
|
|
||||||
|
* math_cursor.C:
|
||||||
|
* math_parser.C: move inludes around a bit.
|
||||||
|
|
||||||
|
* math_extinset.C: user boost::scoped_ptr
|
||||||
|
|
||||||
|
* math_parser.C: user std::fill to fill the catcodes. (please
|
||||||
|
check this one...), and some consts.
|
||||||
|
|
||||||
2001-12-11 André Pönitz <poenitz@gmx.net>
|
2001-12-11 André Pönitz <poenitz@gmx.net>
|
||||||
|
|
||||||
* math_cursor.C: allow cut&paste of rectangular regions of cells
|
* math_cursor.C: allow cut&paste of rectangular regions of cells
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
* the GNU General Public Licence version 2 or later.
|
* the GNU General Public Licence version 2 or later.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
@ -15,25 +15,18 @@
|
|||||||
* the GNU General Public Licence version 2 or later.
|
* the GNU General Public Licence version 2 or later.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <config.h>
|
#include "math_cursor.h"
|
||||||
#include <algorithm>
|
|
||||||
#include <cctype>
|
|
||||||
|
|
||||||
#include "support/lstrings.h"
|
|
||||||
#include "support/LAssert.h"
|
|
||||||
#include "debug.h"
|
|
||||||
#include "LColor.h"
|
|
||||||
#include "Painter.h"
|
|
||||||
#include "formulabase.h"
|
#include "formulabase.h"
|
||||||
#include "math_arrayinset.h"
|
#include "math_arrayinset.h"
|
||||||
#include "math_braceinset.h"
|
#include "math_braceinset.h"
|
||||||
#include "math_casesinset.h"
|
#include "math_casesinset.h"
|
||||||
#include "math_charinset.h"
|
#include "math_charinset.h"
|
||||||
#include "math_cursor.h"
|
|
||||||
#include "math_deliminset.h"
|
#include "math_deliminset.h"
|
||||||
#include "math_factory.h"
|
#include "math_factory.h"
|
||||||
#include "math_hullinset.h"
|
#include "math_hullinset.h"
|
||||||
@ -46,6 +39,16 @@
|
|||||||
#include "math_specialcharinset.h"
|
#include "math_specialcharinset.h"
|
||||||
#include "math_support.h"
|
#include "math_support.h"
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
#include "LColor.h"
|
||||||
|
#include "Painter.h"
|
||||||
|
|
||||||
|
#include "support/lstrings.h"
|
||||||
|
#include "support/LAssert.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cctype>
|
||||||
|
|
||||||
#define FILEDEBUG 0
|
#define FILEDEBUG 0
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
@ -1244,7 +1247,7 @@ bool MathCursor::interpret(string const & s)
|
|||||||
|
|
||||||
if (s == "\\over" || s == "\\choose" || s == "\\atop") {
|
if (s == "\\over" || s == "\\choose" || s == "\\atop") {
|
||||||
MathArray ar = array();
|
MathArray ar = array();
|
||||||
MathAtom t = createMathInset(s.substr(1));
|
MathAtom t(createMathInset(s.substr(1)));
|
||||||
t->asNestInset()->cell(0).swap(array());
|
t->asNestInset()->cell(0).swap(array());
|
||||||
pos() = 0;
|
pos() = 0;
|
||||||
niceInsert(t);
|
niceInsert(t);
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "math_diminset.h"
|
#include "math_diminset.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#include "math_symbolinset.h"
|
#include "math_symbolinset.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
#include <boost/smart_ptr.hpp>
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
|
|
||||||
@ -75,12 +77,11 @@ void MathExIntInset::maplize(MapleStream & os) const
|
|||||||
|
|
||||||
void MathExIntInset::mathmlize(MathMLStream & os) const
|
void MathExIntInset::mathmlize(MathMLStream & os) const
|
||||||
{
|
{
|
||||||
MathSymbolInset * sym = new MathSymbolInset(symbol_);
|
boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
|
||||||
//if (hasScripts())
|
//if (hasScripts())
|
||||||
// mathmlize(sym, os);
|
// mathmlize(sym, os);
|
||||||
//else
|
//else
|
||||||
sym->mathmlize(os);
|
sym->mathmlize(os);
|
||||||
delete sym;
|
|
||||||
os << cell(0) << "<mo> ⁢ </mo>"
|
os << cell(0) << "<mo> ⁢ </mo>"
|
||||||
<< MTag("mrow") << "<mo> ⅆ </mo>"
|
<< MTag("mrow") << "<mo> ⅆ </mo>"
|
||||||
<< cell(1) << ETag("mrow");
|
<< cell(1) << ETag("mrow");
|
||||||
|
@ -45,9 +45,6 @@ point to write some macros:
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <cctype>
|
|
||||||
#include <stack>
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
@ -73,22 +70,29 @@ point to write some macros:
|
|||||||
#include "math_splitinset.h"
|
#include "math_splitinset.h"
|
||||||
#include "math_sqrtinset.h"
|
#include "math_sqrtinset.h"
|
||||||
#include "math_support.h"
|
#include "math_support.h"
|
||||||
|
|
||||||
#include "lyxlex.h"
|
#include "lyxlex.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
|
|
||||||
|
#include <cctype>
|
||||||
|
#include <stack>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
using std::istream;
|
using std::istream;
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
using std::ios;
|
using std::ios;
|
||||||
using std::endl;
|
using std::endl;
|
||||||
using std::stack;
|
using std::stack;
|
||||||
|
using std::fill;
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
bool stared(string const & s)
|
bool stared(string const & s)
|
||||||
{
|
{
|
||||||
unsigned n = s.size();
|
unsigned const n = s.size();
|
||||||
return n && s[n - 1] == '*';
|
return n && s[n - 1] == '*';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,12 +145,16 @@ enum {
|
|||||||
|
|
||||||
void catInit()
|
void catInit()
|
||||||
{
|
{
|
||||||
for (int i = 0; i <= 255; ++i)
|
fill(theCatcode, theCatcode + 256, catOther);
|
||||||
theCatcode[i] = catOther;
|
fill(theCatcode + 'a', theCatcode + 'z' + 1, catLetter);
|
||||||
for (int i = 'a'; i <= 'z'; ++i)
|
fill(theCatcode + 'A', theCatcode + 'Z' + 1, catLetter);
|
||||||
theCatcode[i] = catLetter;
|
|
||||||
for (int i = 'A'; i <= 'Z'; ++i)
|
// for (int i = 0; i <= 255; ++i)
|
||||||
theCatcode[i] = catLetter;
|
// theCatcode[i] = catOther;
|
||||||
|
// for (int i = 'a'; i <= 'z'; ++i)
|
||||||
|
// theCatcode[i] = catLetter;
|
||||||
|
// for (int i = 'A'; i <= 'Z'; ++i)
|
||||||
|
// theCatcode[i] = catLetter;
|
||||||
|
|
||||||
theCatcode['\\'] = catEscape;
|
theCatcode['\\'] = catEscape;
|
||||||
theCatcode['{'] = catBegin;
|
theCatcode['{'] = catBegin;
|
||||||
@ -178,7 +186,7 @@ public:
|
|||||||
///
|
///
|
||||||
Token(char c, CatCode cat) : cs_(), char_(c), cat_(cat) {}
|
Token(char c, CatCode cat) : cs_(), char_(c), cat_(cat) {}
|
||||||
///
|
///
|
||||||
Token(const string & cs) : cs_(cs), char_(0), cat_(catIgnore) {}
|
Token(string const & cs) : cs_(cs), char_(0), cat_(catIgnore) {}
|
||||||
|
|
||||||
///
|
///
|
||||||
string const & cs() const { return cs_; }
|
string const & cs() const { return cs_; }
|
||||||
@ -500,7 +508,7 @@ bool Parser::parse_lines(MathAtom & t, bool numbered, bool outmost)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int cols = p->ncols();
|
int const cols = p->ncols();
|
||||||
|
|
||||||
// save global variables
|
// save global variables
|
||||||
bool const saved_num = curr_num_;
|
bool const saved_num = curr_num_;
|
||||||
|
Loading…
Reference in New Issue
Block a user