sc/qa/unit/subsequent_export_test2.cxx |    4 ++++
 sc/source/filter/excel/xetable.cxx     |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit eebbde753b9d0181980cf9567a8051005f4fd9e2
Author:     Justin Luth <[email protected]>
AuthorDate: Wed Nov 19 16:59:24 2025 -0500
Commit:     Justin Luth <[email protected]>
CommitDate: Thu Nov 20 01:05:07 2025 +0100

    tdf#168892 export xlsx: only customHeight when custom height
    
    If the default row height is specified as a customHeight,
    then (by default) none of the rows will resize any more
    when a cell is marked as wrap-text.
    
    Not good.
    
    This fixes my 25.2 regression
    commit 507c6fc66cda7c1022008b3d1d4c087540cb2d18
        tdf#124741 export xlsx: no defaultRowHeight without customHeight
    
    Perhaps if the word "unsynced" had some related meaning
    I might not have made this rather large mistake.
    
    make CppunitTest_sc_subsequent_export_test2 \
        CPPUNIT_TEST_NAME=testTdf121260
    
    Change-Id: I0982aab90ca2f49143ec12d9e72a2b5260d8f382
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194225
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <[email protected]>

diff --git a/sc/qa/unit/subsequent_export_test2.cxx 
b/sc/qa/unit/subsequent_export_test2.cxx
index b57602b20ea5..16ba2f6f8f6a 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -244,6 +244,10 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf121260)
     assertXPathContent(pChart1,
                        
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:val/c:numRef/c:f",
                        u"Sheet1!$B$1:$B$2");
+
+    // tdf#168892: the default row height is automatic
+    xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
+    assertXPath(pSheet, "//x:sheetFormatPr", "customHeight", u"false");
 }
 
 CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf120168)
diff --git a/sc/source/filter/excel/xetable.cxx 
b/sc/source/filter/excel/xetable.cxx
index 0b287c404871..3b3981f118c5 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2831,7 +2831,7 @@ void XclExpCellTable::SaveXml( XclExpXmlStream& rStrm )
         // OOXTODO: XML_thickTop
         // OOXTODO: XML_thickBottom
         XML_defaultRowHeight, OString::number(static_cast<double> 
(rDefData.mnHeight) / 20.0),
-        XML_customHeight, ToPsz(true),
+        XML_customHeight, ToPsz(rDefData.IsUnsynced()),
         XML_zeroHeight, ToPsz( rDefData.IsHidden() ),
         XML_outlineLevelRow, 
OString::number(maRowBfr.GetHighestOutlineLevel()),
         XML_outlineLevelCol, 
OString::number(maColInfoBfr.GetHighestOutlineLevel()) );

Reply via email to