remove unneeded BufferView * param from two functions

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7402 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-07-27 22:46:33 +00:00
parent d977917213
commit 4c64013208
2 changed files with 17 additions and 16 deletions

View File

@ -333,7 +333,7 @@ void InsetText::draw(PainterInfo & pi, int x, int baseline) const
} }
if (the_locking_inset && cpar() == inset_par && cpos() == inset_pos) { if (the_locking_inset && cpar() == inset_par && cpos() == inset_pos) {
inset_x = cix(bv) - x + drawTextXOffset; inset_x = cix() - x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset; inset_y = ciy() + drawTextYOffset;
} }
@ -518,7 +518,7 @@ void InsetText::lockInset(BufferView * bv)
void InsetText::lockInset(BufferView * bv, UpdatableInset * inset) void InsetText::lockInset(BufferView * bv, UpdatableInset * inset)
{ {
the_locking_inset = inset; the_locking_inset = inset;
inset_x = cix(bv) - top_x + drawTextXOffset; inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset; inset_y = ciy() + drawTextYOffset;
inset_pos = cpos(); inset_pos = cpos();
inset_par = cpar(); inset_par = cpar();
@ -571,7 +571,7 @@ bool InsetText::lockInsetInInset(BufferView * bv, UpdatableInset * inset)
if (the_locking_inset && the_locking_inset == inset) { if (the_locking_inset && the_locking_inset == inset) {
if (cpar() == inset_par && cpos() == inset_pos) { if (cpar() == inset_par && cpos() == inset_pos) {
lyxerr[Debug::INSETS] << "OK" << endl; lyxerr[Debug::INSETS] << "OK" << endl;
inset_x = cix(bv) - top_x + drawTextXOffset; inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset; inset_y = ciy() + drawTextYOffset;
} else { } else {
lyxerr[Debug::INSETS] << "cursor.pos != inset_pos" << endl; lyxerr[Debug::INSETS] << "cursor.pos != inset_pos" << endl;
@ -641,7 +641,7 @@ bool InsetText::updateInsetInInset(BufferView * bv, InsetOld * inset)
if (the_locking_inset && if (the_locking_inset &&
cpar() == inset_par && cpos() == inset_pos) cpar() == inset_par && cpos() == inset_pos)
{ {
inset_x = cix(bv) - top_x + drawTextXOffset; inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset; inset_y = ciy() + drawTextYOffset;
} }
} }
@ -1498,7 +1498,7 @@ void InsetText::getCursor(BufferView & bv, int & x, int & y) const
the_locking_inset->getCursor(bv, x, y); the_locking_inset->getCursor(bv, x, y);
return; return;
} }
x = cx(&bv); x = cx();
y = cy() + InsetText::y(); y = cy() + InsetText::y();
} }
@ -1509,7 +1509,7 @@ void InsetText::getCursorPos(BufferView * bv, int & x, int & y) const
the_locking_inset->getCursorPos(bv, x, y); the_locking_inset->getCursorPos(bv, x, y);
return; return;
} }
x = cx(bv) - top_x - TEXT_TO_INSET_OFFSET; x = cx() - top_x - TEXT_TO_INSET_OFFSET;
y = cy() - TEXT_TO_INSET_OFFSET; y = cy() - TEXT_TO_INSET_OFFSET;
} }
@ -1535,7 +1535,7 @@ void InsetText::fitInsetCursor(BufferView * bv) const
int const asc = font_metrics::maxAscent(font); int const asc = font_metrics::maxAscent(font);
int const desc = font_metrics::maxDescent(font); int const desc = font_metrics::maxDescent(font);
if (bv->fitLockedInsetCursor(cx(bv), cy(), asc, desc)) if (bv->fitLockedInsetCursor(cx(), cy(), asc, desc))
need_update |= FULL; need_update |= FULL;
} }
@ -1760,7 +1760,7 @@ bool InsetText::checkAndActivateInset(BufferView * bv, int x, int y,
x = dim_.wid; x = dim_.wid;
if (y < 0) if (y < 0)
y = dim_.des; y = dim_.des;
inset_x = cix(bv) - top_x + drawTextXOffset; inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset; inset_y = ciy() + drawTextYOffset;
FuncRequest cmd(bv, LFUN_INSET_EDIT, x - inset_x, y - inset_y, button); FuncRequest cmd(bv, LFUN_INSET_EDIT, x - inset_x, y - inset_y, button);
inset->localDispatch(cmd); inset->localDispatch(cmd);
@ -1848,7 +1848,7 @@ void InsetText::setFrameColor(BufferView * bv, LColor::color col)
} }
int InsetText::cx(BufferView *) const int InsetText::cx() const
{ {
int x = text_.cursor.x() + top_x + TEXT_TO_INSET_OFFSET; int x = text_.cursor.x() + top_x + TEXT_TO_INSET_OFFSET;
if (the_locking_inset) { if (the_locking_inset) {
@ -1860,7 +1860,7 @@ int InsetText::cx(BufferView *) const
} }
int InsetText::cix(BufferView *) const int InsetText::cix() const
{ {
int x = text_.cursor.ix() + top_x + TEXT_TO_INSET_OFFSET; int x = text_.cursor.ix() + top_x + TEXT_TO_INSET_OFFSET;
if (the_locking_inset) { if (the_locking_inset) {
@ -1965,7 +1965,7 @@ void InsetText::resizeLyXText(BufferView * bv, bool /*force*/) const
// seems to be unneeded // seems to be unneeded
#if 1 #if 1
if (the_locking_inset) { if (the_locking_inset) {
inset_x = cix(bv) - top_x + drawTextXOffset; inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset; inset_y = ciy() + drawTextYOffset;
} }
@ -1997,7 +1997,7 @@ void InsetText::reinitLyXText() const
text_.init(bv); text_.init(bv);
restoreLyXTextState(); restoreLyXTextState();
if (the_locking_inset) { if (the_locking_inset) {
inset_x = cix(bv) - top_x + drawTextXOffset; inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset; inset_y = ciy() + drawTextYOffset;
} }
text_.top_y(bv->screen().topCursorVisible(&text_)); text_.top_y(bv->screen().topCursorVisible(&text_));
@ -2211,9 +2211,10 @@ bool InsetText::searchForward(BufferView * bv, string const & str,
text_.setSelectionRange(str.length()); text_.setSelectionRange(str.length());
updateLocal(bv, SELECTION, false); updateLocal(bv, SELECTION, false);
} }
return (result != lyx::find::SR_NOT_FOUND); return result != lyx::find::SR_NOT_FOUND;
} }
bool InsetText::searchBackward(BufferView * bv, string const & str, bool InsetText::searchBackward(BufferView * bv, string const & str,
bool cs, bool mw) bool cs, bool mw)
{ {
@ -2242,7 +2243,7 @@ bool InsetText::searchBackward(BufferView * bv, string const & str,
text_.setSelectionRange(str.length()); text_.setSelectionRange(str.length());
updateLocal(bv, SELECTION, false); updateLocal(bv, SELECTION, false);
} }
return (result != lyx::find::SR_NOT_FOUND); return result != lyx::find::SR_NOT_FOUND;
} }

View File

@ -296,9 +296,9 @@ private:
/// ///
void removeNewlines(); void removeNewlines();
/// ///
int cx(BufferView *) const; int cx() const;
/// ///
int cix(BufferView *) const; int cix() const;
/// ///
int cy() const; int cy() const;
/// ///