diff --git a/src/ChangeLog b/src/ChangeLog index b6f2964323..f399b1ab58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,9 @@ * paragraph_funcs.C (moveItem): ... here. + * text.C: + lyxtext.h (LyXText::workWidth(InsetOld*)) remove. unused. + 2003-07-30 Martin Vermeer * LColor.[Ch]: Add comment and greyedout logical colors. diff --git a/src/lyxtext.h b/src/lyxtext.h index 978d59026b..83027e9c43 100644 --- a/src/lyxtext.h +++ b/src/lyxtext.h @@ -398,8 +398,6 @@ public: void checkParagraph(ParagraphList::iterator pit, lyx::pos_type pos); /// int workWidth() const; - /// returns width of row containing inset - int workWidth(InsetOld const * inset) const; /// void computeBidiTables(Buffer const *, RowList::iterator row) const; diff --git a/src/text.C b/src/text.C index 93dce36902..a4ad945e4b 100644 --- a/src/text.C +++ b/src/text.C @@ -148,50 +148,6 @@ int LyXText::workWidth() const } -int LyXText::workWidth(InsetOld const * inset) const -{ - ParagraphList::iterator par = ownerParagraphs().begin(); - ParagraphList::iterator end = ownerParagraphs().end(); - for ( ; par != end; ++par) - if (&*par == inset->parOwner()) - break; - - if (par == ownerParagraphs().end()) { - lyxerr << "LyXText::workWidth: unexpected\n"; - return -1; - } - - pos_type pos = par->getPositionOfInset(inset); - Assert(pos != -1); - - LyXLayout_ptr const & layout = par->layout(); - - if (layout->margintype != MARGIN_RIGHT_ADDRESS_BOX) { - // Optimization here: in most cases, the real row is - // not needed, but only the par/pos values. So we just - // construct a dummy row for leftMargin. (JMarc) - return workWidth() - leftMargin(Row(par, pos)); - } - - RowList::iterator row = getRow(par, pos); - RowList::iterator frow = row; - RowList::iterator beg = rowlist_.begin(); - - while (frow != beg && frow->par() == boost::prior(frow)->par()) - --frow; - - // FIXME: I don't understand this code - jbl - - unsigned int maxw = 0; - while (!isParEnd(*this, frow)) { - if (frow != row && maxw < frow->width()) - maxw = frow->width(); - ++frow; - } - return maxw ? maxw : workWidth(); -} - - int LyXText::getRealCursorX() const { int x = cursor.x();