* iterators.[Ch]: add access to topmost ParagraphList
+ * lyxtext.[Ch] (workWidth): add a const
+
2003-05-23 Alfredo Braunstein <abraunst@libero.it>
* texrow.[Ch] (increasePos): remove function
+
+2003-05-23 André Pönitz <poenitz@gmx.net>
+
+ * insetbutton.h: whitespace
+
+ * insettabular.C: more compact code
+
+ * updatableinset.C: remove const_cast
+
+
2003-05-23 Angus Leeming <leeming@lyx.org>
* insetexternal.C (write): check how many lines are output.
#ifndef INSET_BUTTON_H
#define INSET_BUTTON_H
-
#include "inset.h"
#include "LString.h"
#include <boost/weak_ptr.hpp>
ret = the_locking_inset->localDispatch(cmd1);
}
if (cmd.button() == mouse_button::button3 && !ret) {
- InsetTabularMailer mailer(*this);
- mailer.showDialog(cmd.view());
+ InsetTabularMailer(*this).showDialog(cmd.view());
return true;
}
return ret;
int w;
if (owner()) {
- w = static_cast<UpdatableInset*> (owner())->getMaxWidth(bv, this);
+ w = static_cast<UpdatableInset *>(owner())->getMaxWidth(bv, this);
} else {
- w = bv->text->workWidth(const_cast<UpdatableInset *>(this));
+ w = bv->text->workWidth(this);
}
if (w < 0) {
return -1;
}
// check for margins left/right and extra right margin "const 5"
- if ((w - ((2 * TEXT_TO_INSET_OFFSET) + 5)) >= 0)
- w -= (2 * TEXT_TO_INSET_OFFSET) + 5;
+ if ((w - (2 * TEXT_TO_INSET_OFFSET + 5)) >= 0)
+ w -= 2 * TEXT_TO_INSET_OFFSET + 5;
// Deep magic. I don't understand this either.
if (owner() && owner()->owner()) {
void checkParagraph(ParagraphList::iterator pit, lyx::pos_type pos);
///
int workWidth() const;
- ///
- int workWidth(Inset * inset) const;
+ /// returns width of row containing inset
+ int workWidth(Inset const * inset) const;
///
void computeBidiTables(Buffer const *, RowList::iterator row) const;
+
+2003-05-19 André Pönitz <poenitz@gmx.net>
+
+ * formulamacro.C: avoid multiple metrics computation
+
2003-05-23 Angus Leeming <leeming@lyx.org>
* formula.C (latex):
pi.base.style = LM_ST_TEXT;
pi.base.font = font;
+ Dimension dim;
+ dimension(bv, font, dim);
int const x = int(xx);
- int const a = y - ascent(bv, font) + 1;
- int const w = width(bv, font) - 2;
- int const h = ascent(bv, font) + descent(bv, font) - 2;
+ int const a = y - dim.a + 1;
+ int const w = dim.w - 2;
+ int const h = dim.height() - 2;
// LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too
pi.pain.fillRectangle(x, a, w, h, LColor::mathmacrobg);
}
-int LyXText::workWidth(Inset * inset) const
+int LyXText::workWidth(Inset const * inset) const
{
Paragraph * par = inset->parOwner();
lyx::Assert(par);