]> git.lyx.org Git - features.git/commitdiff
small stuff
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 14 Aug 2004 21:28:59 +0000 (21:28 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 14 Aug 2004 21:28:59 +0000 (21:28 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8934 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/insets/ChangeLog
src/insets/insettext.C
src/lyxlength.C
src/tabular.C
src/tabular.h

index 555b745518c4a6afab0e60a81d9c8e6a3cf96109..94c537234bcb77d775724e62974c0fc7597ce0c7 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-14  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * tabular.h: remove bogus comments
+
+       * tabular.C (getDescentOfRow): 
+       (isPartOfMultiColumn): add assertions
+
+       * lyxlength.C (inPixels): remove #warning
 
 2004-08-14  André Pönitz  <poenitz@gmx.net>
 
index 65e8ec9b0cfeef841be48db52c336806a1c0b721..fb7c0e01be72fb421f0db0b16bf45e7303e9007f 100644 (file)
@@ -1,5 +1,7 @@
 2004-08-14  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
+       * insettext.C (editXY): compilation fix
+
        * insetinclude.C (priv_dispatch): fix showing dialog on mouse
        release
        (metrics): the insets is not full width any more. 
index 268d19a5991ccf0aed2d769f6cc5c38769c4b0e1..677218706281aa150e01248d8cbf3b75072256a3 100644 (file)
@@ -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());
index eaee147fc4e2e28f91a57d0837bef1d6b45150fd..027e17b21a67e7789b5e185115f6d03791cc2d78 100644 (file)
@@ -22,7 +22,6 @@
 #include <sstream>
 
 
-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_) {
index 0cb7adec7bb1b19be5bc611dfcbd1ddcba483538..73850324109eef5ec9a14a0a2617bbb53fd6f509 100644 (file)
@@ -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;
index a54012967d66e7769b450eecf1ad82dc2c7f0318..b2cccd45811ed9dd40b60aaef6e0f145ef0ddd00 100644 (file)
@@ -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);