Changed functioncall to MathedCursor::SelGetArea as we always returned the

NULL pointer with the new Painter-stuff.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@559 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2000-02-17 15:24:43 +00:00
parent 9397ff934b
commit 17818a9141
5 changed files with 21 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2000-02-17 Juergen Vigna <jug@sad.it>
* src/mathed/math_cursor.[Ch] (SelGetArea): Changed form int * to
int ** as we have to return the pointer, otherwise we have only
NULL pointers in the returning function.
2000-02-16 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/LaTeX.C (operator()): quote file name when running latex.

View File

@ -75,6 +75,7 @@ src/mathed/math_panel.C
src/menus.C
src/minibuffer.C
src/minibuffer.h
src/newinsets/newinset.h
src/Painter.C
src/PaperLayout.C
src/paragraph.C

View File

@ -496,7 +496,7 @@ void InsetFormula::draw(Painter & pain, LyXFont const &,
int n;
int * xp = 0;
int * yp = 0;
mathcursor->SelGetArea(xp, yp, n);
mathcursor->SelGetArea(&xp, &yp, n);
pain.fillPolygon(xp, yp, n, LColor::selection);
}
mathcursor->draw(pain, int(x), baseline);

View File

@ -961,15 +961,19 @@ void MathedCursor::SelBalance()
#ifdef USE_PAINTER
void MathedCursor::SelGetArea(int * xp, int * yp, int & np)
void MathedCursor::SelGetArea(int ** xp, int ** yp, int & np)
{
if (!selection) {
np = 0;
return;
}
static int xpoint[10];
static int ypoint[10];
if (!selection) {
np = 0;
xpoint[0] = 0;
ypoint[0] = 0;
*xp = &xpoint[0];
*yp = &ypoint[0];
return;
}
// single row selection
int i = 0, x, y, a, d, xo, yo, x1, y1, a1, d1;
@ -1015,8 +1019,8 @@ void MathedCursor::SelGetArea(int * xp, int * yp, int & np)
xpoint[i] = xpoint[0];
ypoint[i++] = ypoint[0];
xp = &xpoint[0];
yp = &ypoint[0];
*xp = &xpoint[0];
*yp = &ypoint[0];
np = i;
// lyxerr << "AN[" << x << " " << y << " " << x1 << " " << y1 << "] ";
// lyxerr << "MT[" << a << " " << d << " " << a1 << " " << d1 << "] ";

View File

@ -124,7 +124,7 @@ class MathedCursor {
///
void SelBalance();
#ifdef USE_PAINTER
void SelGetArea(int * xp, int * yp, int & n);
void SelGetArea(int ** xp, int ** yp, int & n);
#else
///
XPoint * SelGetArea(int &);