]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.C
Scons: update_po target, part one: language_l10n.pot
[lyx.git] / src / tabular.C
index 7d873348eefb5c772c9208d912815d838b02251c..1aaff8e3788de6be51ac1064135af0828375a511 100644 (file)
@@ -2136,6 +2136,7 @@ int LyXTabular::TeXRow(odocstream & os, row_type i, Buffer const & buf,
                        os << "\\addlinespace\n";
                else
                        os << "\\noalign{\\vskip\\doublerulesep}\n";
+               ++ret;
        } else if(!row_info[i].top_space.zero()) {
                if (use_booktabs)
                        os << "\\addlinespace["
@@ -2193,6 +2194,7 @@ int LyXTabular::TeXRow(odocstream & os, row_type i, Buffer const & buf,
                        os << "\\addlinespace\n";
                else
                        os << "\\noalign{\\vskip\\doublerulesep}\n";
+               ++ret;
        } else if (!row_info[i].interline_space.zero()) {
                if (use_booktabs)
                        os << "\\addlinespace["
@@ -2453,8 +2455,8 @@ int LyXTabular::docbook(Buffer const & buf, odocstream & os,
 }
 
 
-int LyXTabular::plaintextTopHLine(odocstream & os, row_type row,
-                             vector<unsigned int> const & clen) const
+bool LyXTabular::plaintextTopHLine(odocstream & os, row_type row,
+                                   vector<unsigned int> const & clen) const
 {
        idx_type const fcell = getFirstCellInRow(row);
        idx_type const n = numberOfCellsInRow(fcell) + fcell;
@@ -2467,7 +2469,7 @@ int LyXTabular::plaintextTopHLine(odocstream & os, row_type row,
                }
        }
        if (!tmp)
-               return 0;
+               return false;
 
        char_type ch;
        for (idx_type i = fcell; i < n; ++i) {
@@ -2497,12 +2499,12 @@ int LyXTabular::plaintextTopHLine(odocstream & os, row_type row,
                }
        }
        os << endl;
-       return 1;
+       return true;
 }
 
 
-int LyXTabular::plaintextBottomHLine(odocstream & os, row_type row,
-                                vector<unsigned int> const & clen) const
+bool LyXTabular::plaintextBottomHLine(odocstream & os, row_type row,
+                                      vector<unsigned int> const & clen) const
 {
        idx_type const fcell = getFirstCellInRow(row);
        idx_type const n = numberOfCellsInRow(fcell) + fcell;
@@ -2515,7 +2517,7 @@ int LyXTabular::plaintextBottomHLine(odocstream & os, row_type row,
                }
        }
        if (!tmp)
-               return 0;
+               return false;
 
        char_type ch;
        for (idx_type i = fcell; i < n; ++i) {
@@ -2545,22 +2547,22 @@ int LyXTabular::plaintextBottomHLine(odocstream & os, row_type row,
                }
        }
        os << endl;
-       return 1;
+       return true;
 }
 
 
-int LyXTabular::plaintextPrintCell(Buffer const & buf, odocstream & os,
+void LyXTabular::plaintextPrintCell(Buffer const & buf, odocstream & os,
                               OutputParams const & runparams,
                               idx_type cell, row_type row, col_type column,
                               vector<unsigned int> const & clen,
                               bool onlydata) const
 {
        odocstringstream sstr;
-       int const ret = getCellInset(cell)->plaintext(buf, sstr, runparams);
+       getCellInset(cell)->plaintext(buf, sstr, runparams);
 
        if (onlydata) {
                os << sstr.str();
-               return ret;
+               return;
        }
 
        if (leftLine(cell))
@@ -2597,18 +2599,13 @@ int LyXTabular::plaintextPrintCell(Buffer const & buf, odocstream & os,
                os << " |";
        else
                os << "  ";
-
-       return ret;
 }
 
 
-int LyXTabular::plaintext(Buffer const & buf, odocstream & os,
-                     OutputParams const & runparams,
-                     int const depth,
-                     bool onlydata, unsigned char delim) const
+void LyXTabular::plaintext(Buffer const & buf, odocstream & os,
+                           OutputParams const & runparams, int const depth,
+                           bool onlydata, unsigned char delim) const
 {
-       int ret = 0;
-
        // first calculate the width of the single columns
        vector<unsigned int> clen(columns_);
 
@@ -2652,8 +2649,8 @@ int LyXTabular::plaintext(Buffer const & buf, odocstream & os,
                                continue;
                        if (onlydata && j > 0)
                                os << delim;
-                       ret += plaintextPrintCell(buf, os, runparams,
-                                             cell, i, j, clen, onlydata);
+                       plaintextPrintCell(buf, os, runparams,
+                                          cell, i, j, clen, onlydata);
                        ++cell;
                }
                os << endl;
@@ -2663,7 +2660,6 @@ int LyXTabular::plaintext(Buffer const & buf, odocstream & os,
                                os << docstring(depth * 2, ' ');
                }
        }
-       return ret;
 }