mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
small stuff (white space, const, remove a const_cast...)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7033 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b257853f8d
commit
ec96a1e117
@ -33,6 +33,8 @@
|
||||
|
||||
* 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
|
||||
|
@ -1,3 +1,13 @@
|
||||
|
||||
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.
|
||||
|
@ -14,7 +14,6 @@
|
||||
#ifndef INSET_BUTTON_H
|
||||
#define INSET_BUTTON_H
|
||||
|
||||
|
||||
#include "inset.h"
|
||||
#include "LString.h"
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
@ -681,8 +681,7 @@ bool InsetTabular::lfunMouseRelease(FuncRequest const & cmd)
|
||||
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;
|
||||
|
@ -142,16 +142,16 @@ int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const
|
||||
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()) {
|
||||
|
@ -471,8 +471,8 @@ public:
|
||||
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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
|
||||
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):
|
||||
|
@ -175,10 +175,12 @@ void InsetFormulaMacro::draw(BufferView * bv, LyXFont const & f,
|
||||
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);
|
||||
|
@ -145,7 +145,7 @@ int LyXText::workWidth() const
|
||||
}
|
||||
|
||||
|
||||
int LyXText::workWidth(Inset * inset) const
|
||||
int LyXText::workWidth(Inset const * inset) const
|
||||
{
|
||||
Paragraph * par = inset->parOwner();
|
||||
lyx::Assert(par);
|
||||
|
Loading…
Reference in New Issue
Block a user