From: Georg Baum Date: Wed, 15 Nov 2006 09:17:40 +0000 (+0000) Subject: rename parameters to sensible names, the old names where misleading X-Git-Tag: 1.6.10~11867 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=48dd2567332feeb53fa48f5a1e406f3d0b374eb9;p=lyx.git rename parameters to sensible names, the old names where misleading git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15933 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tabular.C b/src/tabular.C index 239c1ff65b..711e5432ab 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -662,29 +662,29 @@ LyXTabular::idx_type LyXTabular::numberOfCellsInRow(idx_type const cell) const } -bool LyXTabular::topLine(idx_type const cell, bool const onlycolumn) const +bool LyXTabular::topLine(idx_type const cell, bool const wholerow) const { - if (!onlycolumn && isMultiColumn(cell) && + if (!wholerow && isMultiColumn(cell) && !(use_booktabs && row_of_cell(cell) == 0)) return cellinfo_of_cell(cell).top_line; return row_info[row_of_cell(cell)].top_line; } -bool LyXTabular::bottomLine(idx_type const cell, bool onlycolumn) const +bool LyXTabular::bottomLine(idx_type const cell, bool wholerow) const { - if (!onlycolumn && isMultiColumn(cell) && + if (!wholerow && isMultiColumn(cell) && !(use_booktabs && isLastRow(cell))) return cellinfo_of_cell(cell).bottom_line; return row_info[row_of_cell(cell)].bottom_line; } -bool LyXTabular::leftLine(idx_type cell, bool onlycolumn) const +bool LyXTabular::leftLine(idx_type cell, bool wholecolumn) const { if (use_booktabs) return false; - if (!onlycolumn && isMultiColumn(cell) && + if (!wholecolumn && isMultiColumn(cell) && (isFirstCellInRow(cell) || isMultiColumn(cell-1))) { if (cellinfo_of_cell(cell).align_special.empty()) @@ -697,11 +697,11 @@ bool LyXTabular::leftLine(idx_type cell, bool onlycolumn) const } -bool LyXTabular::rightLine(idx_type cell, bool onlycolumn) const +bool LyXTabular::rightLine(idx_type cell, bool wholecolumn) const { if (use_booktabs) return false; - if (!onlycolumn && isMultiColumn(cell) && + if (!wholecolumn && isMultiColumn(cell) && (isLastCellInRow(cell) || isMultiColumn(cell + 1))) { if (cellinfo_of_cell(cell).align_special.empty()) @@ -1025,37 +1025,37 @@ void LyXTabular::setAllLines(idx_type cell, bool line) } -void LyXTabular::setTopLine(idx_type cell, bool line, bool onlycolumn) +void LyXTabular::setTopLine(idx_type cell, bool line, bool wholerow) { row_type const row = row_of_cell(cell); - if (onlycolumn || !isMultiColumn(cell)) + if (wholerow || !isMultiColumn(cell)) row_info[row].top_line = line; else cellinfo_of_cell(cell).top_line = line; } -void LyXTabular::setBottomLine(idx_type cell, bool line, bool onlycolumn) +void LyXTabular::setBottomLine(idx_type cell, bool line, bool wholerow) { - if (onlycolumn || !isMultiColumn(cell)) + if (wholerow || !isMultiColumn(cell)) row_info[row_of_cell(cell)].bottom_line = line; else cellinfo_of_cell(cell).bottom_line = line; } -void LyXTabular::setLeftLine(idx_type cell, bool line, bool onlycolumn) +void LyXTabular::setLeftLine(idx_type cell, bool line, bool wholecolumn) { - if (onlycolumn || !isMultiColumn(cell)) + if (wholecolumn || !isMultiColumn(cell)) column_info[column_of_cell(cell)].left_line = line; else cellinfo_of_cell(cell).left_line = line; } -void LyXTabular::setRightLine(idx_type cell, bool line, bool onlycolumn) +void LyXTabular::setRightLine(idx_type cell, bool line, bool wholecolumn) { - if (onlycolumn || !isMultiColumn(cell)) + if (wholecolumn || !isMultiColumn(cell)) column_info[right_column_of_cell(cell)].right_line = line; else cellinfo_of_cell(cell).right_line = line; diff --git a/src/tabular.h b/src/tabular.h index 24e24da4af..8c8180e8f6 100644 --- a/src/tabular.h +++ b/src/tabular.h @@ -205,13 +205,13 @@ public: row_type rows_arg); /// Returns true if there is a topline, returns false if not - bool topLine(idx_type cell, bool onlycolumn = false) const; + bool topLine(idx_type cell, bool wholerow = false) const; /// Returns true if there is a topline, returns false if not - bool bottomLine(idx_type cell, bool onlycolumn = false) const; + bool bottomLine(idx_type cell, bool wholerow = false) const; /// Returns true if there is a topline, returns false if not - bool leftLine(idx_type cell, bool onlycolumn = false) const; + bool leftLine(idx_type cell, bool wholecolumn = false) const; /// Returns true if there is a topline, returns false if not - bool rightLine(idx_type cell, bool onlycolumn = false) const; + bool rightLine(idx_type cell, bool wholecolumn = false) const; /// bool topAlreadyDrawn(idx_type cell) const; @@ -246,13 +246,13 @@ public: /// void setAllLines(idx_type cell, bool line); /// - void setTopLine(idx_type cell, bool line, bool onlycolumn = false); + void setTopLine(idx_type cell, bool line, bool wholerow = false); /// - void setBottomLine(idx_type cell, bool line, bool onlycolumn = false); + void setBottomLine(idx_type cell, bool line, bool wholerow = false); /// - void setLeftLine(idx_type cell, bool line, bool onlycolumn = false); + void setLeftLine(idx_type cell, bool line, bool wholecolumn = false); /// - void setRightLine(idx_type cell, bool line, bool onlycolumn = false); + void setRightLine(idx_type cell, bool line, bool wholecolumn = false); /// void setAlignment(idx_type cell, LyXAlignment align, bool onlycolumn = false);