you fixed a couple of compiler warnings ("unused parameters") by simply removing the names of corresponding function parameters.
However, I think we can completely remove the parameters as they are never used (in all functions with the same name).
I prepared a small patch for "getCursorPos" and "getCursorDim". Could you (or Andre, or Alfredo...) please check whether this is the right way to go or whether we will need the buffer view parameters in the future?
There is a similar "problem" with methods "open" and "close" in the insets directory. IMHO the status of a collapsable inset (open/closed) should be independent from a particular buffer. If we allow an inset to be closed in one view and open in another one, we will certainly get into serious trouble. The only problem with the removal of the bufferview parameter is in "InsetERT::status". What should the final "if" statement look like?
Kind regards,
Michael
Index: src/cursor.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/cursor.C,v retrieving revision 1.23 diff -u -r1.23 cursor.C --- src/cursor.C 2003/11/18 11:39:29 1.23 +++ src/cursor.C 2003/11/21 13:38:00 @@ -180,7 +180,7 @@ asc = row.baseline(); desc = row.height() - asc; } else - innerInset()->getCursorDim(bv_, asc, desc); + innerInset()->getCursorDim(asc, desc); } @@ -202,7 +202,7 @@ // 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_; } Index: src/insets/insetcollapsable.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetcollapsable.C,v retrieving revision 1.211 diff -u -r1.211 insetcollapsable.C --- src/insets/insetcollapsable.C 2003/11/20 10:38:12 1.211 +++ src/insets/insetcollapsable.C 2003/11/21 13:38:04 @@ -330,9 +330,9 @@ } -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(); } Index: src/insets/insetcollapsable.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetcollapsable.h,v retrieving revision 1.148 diff -u -r1.148 insetcollapsable.h --- src/insets/insetcollapsable.h 2003/11/13 13:43:42 1.148 +++ src/insets/insetcollapsable.h 2003/11/21 13:38:04 @@ -77,7 +77,7 @@ /// 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); Index: src/insets/insettabular.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insettabular.C,v retrieving revision 1.378 diff -u -r1.378 insettabular.C --- src/insets/insettabular.C 2003/11/20 01:22:50 1.378 +++ src/insets/insettabular.C 2003/11/21 13:38:08 @@ -970,7 +970,7 @@ } -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_; Index: src/insets/insettabular.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insettabular.h,v retrieving revision 1.168 diff -u -r1.168 insettabular.h --- src/insets/insettabular.h 2003/11/17 12:53:44 1.168 +++ src/insets/insettabular.h 2003/11/21 13:38:09 @@ -110,7 +110,7 @@ /// 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); /// Index: src/insets/insettext.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insettext.C,v retrieving revision 1.548 diff -u -r1.548 insettext.C --- src/insets/insettext.C 2003/11/21 08:35:15 1.548 +++ src/insets/insettext.C 2003/11/21 13:38:10 @@ -438,7 +438,7 @@ } -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; Index: src/insets/insettext.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insettext.h,v retrieving revision 1.232 diff -u -r1.232 insettext.h --- src/insets/insettext.h 2003/11/17 20:28:11 1.232 +++ src/insets/insettext.h 2003/11/21 13:38:10 @@ -89,7 +89,7 @@ /// 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; /// Index: src/insets/updatableinset.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/updatableinset.C,v retrieving revision 1.38 diff -u -r1.38 updatableinset.C --- src/insets/updatableinset.C 2003/11/13 08:50:26 1.38 +++ src/insets/updatableinset.C 2003/11/21 13:38:10 @@ -107,7 +107,7 @@ } -void UpdatableInset::getCursorDim(BufferView *, int &, int &) const +void UpdatableInset::getCursorDim(int &, int &) const { BOOST_ASSERT(false); } Index: src/insets/updatableinset.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/updatableinset.h,v retrieving revision 1.25 diff -u -r1.25 updatableinset.h --- src/insets/updatableinset.h 2003/11/13 08:50:26 1.25 +++ src/insets/updatableinset.h 2003/11/21 13:38:11 @@ -30,9 +30,9 @@ 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; } /// Index: src/mathed/ChangeLog =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/ChangeLog,v retrieving revision 1.407 diff -u -r1.407 ChangeLog --- src/mathed/ChangeLog 2003/11/20 01:22:51 1.407 +++ src/mathed/ChangeLog 2003/11/21 13:38:16 @@ -1,3 +1,7 @@ +2003-11-20 Michael Schmitt <[EMAIL PROTECTED]> + + * formulabase.C (getCursorDim): squash unused variable + 2003-11-20 Angus Leeming <[EMAIL PROTECTED]> * formulabase.C (getCursorDim): squash warning about unused variable. Index: src/mathed/formulabase.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/formulabase.C,v retrieving revision 1.312 diff -u -r1.312 formulabase.C --- src/mathed/formulabase.C 2003/11/20 01:22:51 1.312 +++ src/mathed/formulabase.C 2003/11/21 13:38:19 @@ -170,7 +170,7 @@ } -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::getCursorDim(BufferView *, int & asc, int & desc) const +void InsetFormulaBase::getCursorDim(int & asc, int & desc) const { if (!mathcursor) return; Index: src/mathed/formulabase.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/formulabase.h,v retrieving revision 1.86 diff -u -r1.86 formulabase.h --- src/mathed/formulabase.h 2003/11/13 08:50:26 1.86 +++ src/mathed/formulabase.h 2003/11/21 13:38:19 @@ -45,9 +45,9 @@ /// 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; ///