From 4619ec4637604c20340d02f31c42057113aa21cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sun, 25 Sep 2011 06:36:58 +0000 Subject: [PATCH] Fix bottom border allocation when setting a multirow. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39755 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetTabular.cpp | 13 ++++++++----- src/insets/InsetTabular.h | 3 ++- status.20x | 2 ++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index dc6effe946..680ce1b1af 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -1649,7 +1649,8 @@ bool Tabular::isMultiRow(idx_type cell) const } -Tabular::idx_type Tabular::setMultiRow(idx_type cell, idx_type number) +Tabular::idx_type Tabular::setMultiRow(idx_type cell, idx_type number, + bool const bottom_border) { idx_type const col = cellColumn(cell); idx_type const row = cellRow(cell); @@ -1670,8 +1671,8 @@ Tabular::idx_type Tabular::setMultiRow(idx_type cell, idx_type number) // cells: left cs.alignment = LYX_ALIGN_LEFT; - // set the bottom row of the last selected cell - setBottomLine(cell, bottomLine(cell + (number - 1)*ncols())); + // set the bottom line of the last selected cell + setBottomLine(cell, bottom_border); for (idx_type i = 1; i < number; ++i) { CellData & cs1 = cell_info[row + i][col]; @@ -5399,7 +5400,8 @@ void InsetTabular::tabularFeatures(Cursor & cur, // just multirow for one single cell // check whether we are completely in a multirow if (!tabular.isMultiRow(cur.idx())) - tabular.setMultiRow(cur.idx(), 1); + tabular.setMultiRow(cur.idx(), 1, + tabular.bottomLine(cur.idx())); break; } // we have a selection so this means we just add all this @@ -5407,7 +5409,8 @@ void InsetTabular::tabularFeatures(Cursor & cur, idx_type const s_start = cur.selBegin().idx(); row_type const row_start = tabular.cellRow(s_start); row_type const row_end = tabular.cellRow(cur.selEnd().idx()); - cur.idx() = tabular.setMultiRow(s_start, row_end - row_start + 1); + cur.idx() = tabular.setMultiRow(s_start, row_end - row_start + 1, + tabular.bottomLine(cur.selEnd().idx())); cur.pit() = 0; cur.pos() = 0; cur.setSelection(false); diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h index 00124eab7a..10516fe2a5 100644 --- a/src/insets/InsetTabular.h +++ b/src/insets/InsetTabular.h @@ -475,7 +475,8 @@ public: /// bool isMultiRow(idx_type cell) const; /// - idx_type setMultiRow(idx_type cell, idx_type number); + idx_type setMultiRow(idx_type cell, idx_type number, + bool const bottom_border); /// void unsetMultiRow(idx_type cell); /// diff --git a/status.20x b/status.20x index 4705e95083..b2e434da30 100644 --- a/status.20x +++ b/status.20x @@ -105,6 +105,8 @@ What's new - Fix Horizontal Space dialog when issued from within math (bug 7746). +- Fix bottom border allocation when setting a multirow (bug 7791). + - Disable interword and protected space lfuns in math, since these spaces are not yet supported. -- 2.39.5