From: Jean-Marc Lasgouttes Date: Sat, 14 Aug 2004 21:28:59 +0000 (+0000) Subject: small stuff X-Git-Tag: 1.6.10~15063 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c6204d60c2a5631d1ad38a2f77687d454c1a92a5;p=features.git small stuff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8934 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 555b745518..94c537234b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2004-08-14 Jean-Marc Lasgouttes + + * tabular.h: remove bogus comments + + * tabular.C (getDescentOfRow): + (isPartOfMultiColumn): add assertions + + * lyxlength.C (inPixels): remove #warning 2004-08-14 André Pönitz diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 65e8ec9b0c..fb7c0e01be 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,5 +1,7 @@ 2004-08-14 Jean-Marc Lasgouttes + * insettext.C (editXY): compilation fix + * insetinclude.C (priv_dispatch): fix showing dialog on mouse release (metrics): the insets is not full width any more. diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 268d19a599..6772187062 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -306,7 +306,6 @@ void InsetText::edit(LCursor & cur, bool left) InsetBase * InsetText::editXY(LCursor & cur, int x, int y) const { - lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION << endl; old_par = -1; return text_.editXY(cur, x, y); //sanitizeEmptyText(cur.bv()); diff --git a/src/lyxlength.C b/src/lyxlength.C index eaee147fc4..027e17b21a 100644 --- a/src/lyxlength.C +++ b/src/lyxlength.C @@ -22,7 +22,6 @@ #include -using std::abs; using std::ostringstream; using std::string; @@ -146,10 +145,6 @@ int LyXLength::inPixels(int text_width, int em_width_base) const // between lengths and font sizes on the screen // is the same as on paper. -#ifdef WITH_WARNINGS -#warning if you don't care than either call this function differently or let it return negative values and call abs() explicitly when needed (Andre') -#endif - double result = 0.0; switch (unit_) { diff --git a/src/tabular.C b/src/tabular.C index 0cb7adec7b..7385032410 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -1683,8 +1683,7 @@ int LyXTabular::getAscentOfRow(int row) const int LyXTabular::getDescentOfRow(int row) const { - if (row >= rows_) - return 0; + BOOST_ASSERT(row < rows_); return row_info[row].descent_of_row; } @@ -1701,16 +1700,16 @@ int LyXTabular::getHeightOfTabular() const bool LyXTabular::isPartOfMultiColumn(int row, int column) const { - if (row >= rows_ || column >= columns_) - return false; + BOOST_ASSERT(row < rows_); + BOOST_ASSERT(column < columns_); return cell_info[row][column].multicolumn == CELL_PART_OF_MULTICOLUMN; } int LyXTabular::TeXTopHLine(ostream & os, int row) const { - if (row < 0 || row >= rows_) - return 0; + BOOST_ASSERT(row >= 0); + BOOST_ASSERT(row < rows_); int const fcell = getFirstCellInRow(row); int const n = numberOfCellsInRow(fcell) + fcell; diff --git a/src/tabular.h b/src/tabular.h index a54012967d..b2cccd4581 100644 --- a/src/tabular.h +++ b/src/tabular.h @@ -205,11 +205,11 @@ public: int getDescentOfRow(int row) const; /// int getHeightOfTabular() const; - /// Returns true if a complete update is necessary, otherwise false + /// void setAscentOfRow(int row, int height); - /// Returns true if a complete update is necessary, otherwise false + /// void setDescentOfRow(int row, int height); - /// Returns true if a complete update is necessary, otherwise false + /// void setWidthOfCell(int cell, int new_width); /// void setAllLines(int cell, bool line);