[LyX/master] Use cellvarwidth more consequently with multirows

Juergen Spitzmueller spitz at lyx.org
Wed Sep 9 08:31:31 UTC 2026


commit 515229354e0b4dc3e0e0985a09f648c73d2833c3
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Wed Sep 9 10:30:54 2026 +0200

    Use cellvarwidth more consequently with multirows
---
 src/insets/InsetTabular.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 8791d5151a..7c14731937 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -3314,7 +3314,8 @@ void Tabular::TeXCellPreamble(otexstream & os, idx_type cell,
 		   << "}\n";
 	} else if (getUsebox(cell) == BOX_VARWIDTH
 		   && (getRotateCell(cell) != 0 || align != LYX_ALIGN_LEFT
-		       || valign != LYX_VALIGN_TOP || hasNewlines(cell))) {
+		       || valign != LYX_VALIGN_TOP || hasNewlines(cell)
+		       || isMultiRow(cell))) {
 		os << "\\begin{cellvarwidth}[";
 		switch (valign) {
 		case LYX_VALIGN_TOP:
@@ -3363,7 +3364,8 @@ void Tabular::TeXCellPostamble(otexstream & os, idx_type cell,
 		os << breakln << "\\end{minipage}";
 	else if (getUsebox(cell) == BOX_VARWIDTH
 		 && (getRotateCell(cell) != 0 || getAlignment(cell, !isMultiColumn(cell)) != LYX_ALIGN_LEFT
-		     || getVAlignment(cell, !isMultiColumn(cell)) != LYX_VALIGN_TOP || hasNewlines(cell)))
+		     || getVAlignment(cell, !isMultiColumn(cell)) != LYX_VALIGN_TOP || hasNewlines(cell)
+		     || isMultiRow(cell)))
 		os << breakln << "\\end{cellvarwidth}";
 	if (getRotateCell(cell) != 0)
 		os << breakln << "\\end{turn}";


More information about the lyx-cvs mailing list