commit 9d60bbabc24dd279c6c236f799cb484be07c2b96
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Sep 9 10:30:54 2026 +0200

    Use cellvarwidth more consequently with multirows
    
    (cherry picked from commit 515229354e0b4dc3e0e0985a09f648c73d2833c3)
---
 src/insets/InsetTabular.cpp | 6 ++++--
 status.25x                  | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index c283bd10bc..86c5273943 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}";
diff --git a/status.25x b/status.25x
index afccc126b2..8d3669193b 100644
--- a/status.25x
+++ b/status.25x
@@ -39,6 +39,7 @@ What's new
 
 * DOCUMENT INPUT/OUTPUT
 
+- Fix varwidth table cells with multirows.
 
 
 * USER INTERFACE
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to