From: André Pönitz Date: Fri, 21 Nov 2003 14:59:24 +0000 (+0000) Subject: Michael Schmitt's patch to remove unused arguments X-Git-Tag: 1.6.10~15770 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a976dd9104d87f1ada119314e0a69b419fa1a3bf;p=features.git Michael Schmitt's patch to remove unused arguments git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8114 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/cursor.C b/src/cursor.C index 88c47b2c6b..709ac106c4 100644 --- a/src/cursor.C +++ b/src/cursor.C @@ -180,7 +180,7 @@ void LCursor::getDim(int & asc, int & desc) const asc = row.baseline(); desc = row.height() - asc; } else - innerInset()->getCursorDim(bv_, asc, desc); + innerInset()->getCursorDim(asc, desc); } @@ -202,7 +202,7 @@ void LCursor::getPos(int & x, int & y) const // Ugly as you like. //inset->getCursorPos(bv_, x, y); //y = inset->insetInInsetY() + bv_->text->cursor.y(); - inset->getCursorPos(bv_, x, y); + inset->getCursorPos(x, y); x += inset->x(); y += cached_y_; } diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index ab6a38e7b4..943f852436 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,10 @@ + +2003-11-21 Michael Schmitt + + * insetcollapsable.[Ch]: + * insettabular.[Ch]: + * insettext.[Ch] (getCursorDim): squash unused variable + 2003-11-21 Alfredo Braunstein * insettext.C (edit): x0_,y0_ -> xo_,yo_ diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index 84e4e4a285..46ae13c37d 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -330,9 +330,9 @@ void InsetCollapsable::validate(LaTeXFeatures & features) const } -void InsetCollapsable::getCursorPos(BufferView * bv, int & x, int & y) const +void InsetCollapsable::getCursorPos(int & x, int & y) const { - inset.getCursorPos(bv, x , y); + inset.getCursorPos(x , y); y += - ascent() + height_collapsed() + inset.ascent(); } diff --git a/src/insets/insetcollapsable.h b/src/insets/insetcollapsable.h index 6885681c40..a5a96a8651 100644 --- a/src/insets/insetcollapsable.h +++ b/src/insets/insetcollapsable.h @@ -77,7 +77,7 @@ public: /// void validate(LaTeXFeatures & features) const; /// get the screen x,y of the cursor - void getCursorPos(BufferView *, int & x, int & y) const; + void getCursorPos(int & x, int & y) const; /// void setFont(BufferView *, LyXFont const &, bool toggleall = false, bool selectall = false); diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 7349c6af05..4bf5e49ea8 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -970,7 +970,7 @@ void InsetTabular::calculate_dimensions_of_cells(MetricsInfo & mi) const } -void InsetTabular::getCursorPos(BufferView *, int & x, int & y) const +void InsetTabular::getCursorPos(int & x, int & y) const { x = TEXT_TO_INSET_OFFSET + cursorx_ - xo_; y = TEXT_TO_INSET_OFFSET + cursory_; diff --git a/src/insets/insettabular.h b/src/insets/insettabular.h index a13b2ec7cb..a342374341 100644 --- a/src/insets/insettabular.h +++ b/src/insets/insettabular.h @@ -110,7 +110,7 @@ public: /// InsetOld::Code lyxCode() const { return InsetOld::TABULAR_CODE; } /// get the absolute screen x,y of the cursor - void getCursorPos(BufferView *, int & x, int & y) const; + void getCursorPos(int & x, int & y) const; /// bool tabularFeatures(BufferView * bv, std::string const & what); /// diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 5235866cab..728a10e35b 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -438,7 +438,7 @@ void InsetText::validate(LaTeXFeatures & features) const } -void InsetText::getCursorPos(BufferView *, int & x, int & y) const +void InsetText::getCursorPos(int & x, int & y) const { x = text_.cursor.x() + TEXT_TO_INSET_OFFSET; y = text_.cursor.y() - dim_.asc + TEXT_TO_INSET_OFFSET; diff --git a/src/insets/insettext.h b/src/insets/insettext.h index c2584e5c40..a8b5199406 100644 --- a/src/insets/insettext.h +++ b/src/insets/insettext.h @@ -89,7 +89,7 @@ public: /// InsetOld::Code lyxCode() const { return InsetOld::TEXT_CODE; } /// FIXME, document - void getCursorPos(BufferView *, int & x, int & y) const; + void getCursorPos(int & x, int & y) const; /// int insetInInsetY() const; /// diff --git a/src/insets/updatableinset.C b/src/insets/updatableinset.C index 7ab4647b43..a0cc5e25cb 100644 --- a/src/insets/updatableinset.C +++ b/src/insets/updatableinset.C @@ -107,7 +107,7 @@ UpdatableInset::priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &) } -void UpdatableInset::getCursorDim(BufferView *, int &, int &) const +void UpdatableInset::getCursorDim(int &, int &) const { BOOST_ASSERT(false); } diff --git a/src/insets/updatableinset.h b/src/insets/updatableinset.h index f8d124c26c..2191ae1c36 100644 --- a/src/insets/updatableinset.h +++ b/src/insets/updatableinset.h @@ -30,9 +30,9 @@ public: virtual EDITABLE editable() const; /// return the cursor pos, relative to the inset pos - virtual void getCursorPos(BufferView *, int &, int &) const {} + virtual void getCursorPos(int &, int &) const {} /// return the cursor dim - virtual void getCursorDim(BufferView *, int &, int &) const; + virtual void getCursorDim(int &, int &) const; /// virtual bool insertInset(BufferView *, InsetOld *) { return false; } /// diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 554e418681..fd1e396b43 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,7 @@ +2003-11-21 Michael Schmitt + + * formulabase.C (getCursorDim): squash unused variable + 2003-11-20 Angus Leeming * formulabase.C (getCursorDim): squash warning about unused variable. diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 7157c9d57f..d8a9aebb4a 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -170,7 +170,7 @@ void InsetFormulaBase::getCursor(BufferView &, int & x, int & y) const } -void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const +void InsetFormulaBase::getCursorPos(int & x, int & y) const { if (!mathcursor) { lyxerr << "getCursorPos - should not happen"; @@ -186,7 +186,7 @@ void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const } -void InsetFormulaBase::getCursorDim(BufferView *, int & asc, int & desc) const +void InsetFormulaBase::getCursorDim(int & asc, int & desc) const { if (!mathcursor) return; diff --git a/src/mathed/formulabase.h b/src/mathed/formulabase.h index 14455e6947..610d81ba18 100644 --- a/src/mathed/formulabase.h +++ b/src/mathed/formulabase.h @@ -45,9 +45,9 @@ public: /// what appears in the minibuffer when opening virtual std::string const editMessage() const; /// - virtual void getCursorPos(BufferView *, int &, int &) const; + virtual void getCursorPos(int &, int &) const; /// - virtual void getCursorDim(BufferView *, int &, int &) const; + virtual void getCursorDim(int &, int &) const; /// get the absolute document x,y of the cursor virtual void getCursor(BufferView & bv, int & x, int & y) const; ///