[Libreoffice-commits] core.git: Branch 'feature/cib_contract138c' - 4 commits - configure.ac sc/qa sc/source
Thorsten Behrens (via logerrit)
logerrit at kemper.freedesktop.org
Sun Feb 16 23:56:25 UTC 2020
configure.ac | 2
sc/qa/unit/data/ods/autoheight2rows.ods |binary
sc/qa/unit/data/ods/tdf62268.ods |binary
sc/qa/unit/helper/qahelper.cxx | 3 -
sc/qa/unit/subsequent_export-test.cxx | 59 +++++++++++++----------------
sc/qa/unit/subsequent_filters-test.cxx | 65 ++++++++++++++++++++++++++++++--
sc/source/core/data/segmenttree.cxx | 4 +
sc/source/filter/xml/xmlimprt.cxx | 20 +++++++++
sc/source/filter/xml/xmlimprt.hxx | 4 +
sc/source/filter/xml/xmlrowi.cxx | 15 +++++++
10 files changed, 134 insertions(+), 38 deletions(-)
New commits:
commit 05e407d7083d598691190090f244c75f1d18915a
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Mon Feb 17 00:55:36 2020 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Feb 17 00:55:36 2020 +0100
Release 6.2.9.3
Change-Id: I54a07b03e58fa3e600321b484132f98c8a8a7793
diff --git a/configure.ac b/configure.ac
index 6d962c3acddf..b3724fff8595 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
# several non-alphanumeric characters, those are split off and used only for the
# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
-AC_INIT([LibreOffice],[6.2.9.2],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.2.9.3],[],[],[http://documentfoundation.org/])
AC_PREREQ([2.59])
commit 486aba66bb8456ae9f7989d2bef1dec886dd9d8d
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Sun Feb 16 12:14:01 2020 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Feb 17 00:54:17 2020 +0100
tdf#123971 don't clobber entire RowHeight range on updates
Use start index from current loop variable, not full range; otherwise
we're always clobbering values from (possibly higher) upper rows.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88785
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit f55140c7376c330bcdac071592aada75e8781e19)
Conflicts:
sc/qa/unit/subsequent_filters-test.cxx
Change-Id: I3add7c2358710f4ae3927e7b0a1c1ff544965a03
diff --git a/sc/qa/unit/data/ods/autoheight2rows.ods b/sc/qa/unit/data/ods/autoheight2rows.ods
index b687701240c1..099df137ff64 100644
Binary files a/sc/qa/unit/data/ods/autoheight2rows.ods and b/sc/qa/unit/data/ods/autoheight2rows.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 6b6b3deaf6a1..4266fed9bbf4 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -4295,11 +4295,16 @@ void ScFiltersTest::testAutoheight2Rows()
SCTAB nTab = 0;
int nHeight1 = rDoc.GetRowHeight(0, nTab, false);
- int nHeight3 = rDoc.GetRowHeight(2, nTab, false);
+ int nHeight2 = rDoc.GetRowHeight(1, nTab, false);
+ int nHeight4 = rDoc.GetRowHeight(3, nTab, false);
+ int nHeight5 = rDoc.GetRowHeight(4, nTab, false);
// We will do relative comparison, because calculated autoheight
// can be different on different platforms
- CPPUNIT_ASSERT_MESSAGE("Row #3 shoud be thinner than #1", nHeight3 < nHeight1);
+ CPPUNIT_ASSERT_MESSAGE("Row #1 and row #4 must have same height after load & auto-adjust",
+ abs( nHeight1 - nHeight4 ) < 10 );
+ CPPUNIT_ASSERT_MESSAGE("Row #2 and row #5 must have same height after load & auto-adjust",
+ abs( nHeight2 - nHeight5 ) < 10 );
xDocSh->DoClose();
}
diff --git a/sc/source/core/data/segmenttree.cxx b/sc/source/core/data/segmenttree.cxx
index 4c01deb06172..0f96946d806a 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -106,7 +106,9 @@ void ScFlatSegmentsImpl<ValueType_, ExtValueType_>::setValueIf(SCCOLROW nPos1, S
getRangeData(nCurrentStartRow, aRangeData);
if (rPredicate(aRangeData.mnValue))
{
- setValue(nPos1, std::min<SCCOLROW>(nPos2, aRangeData.mnPos2), nValue);
+ // set value from current iteration point on, til end of range.
+ // Note that aRangeData may well contain much lower values for nPos1
+ setValue(nCurrentStartRow, std::min<SCCOLROW>(nPos2, aRangeData.mnPos2), nValue);
}
// even if nPos2 is bigger than nPos2 this should terminate the loop
commit facee65a643ff82eda0dd6f03b7e94cf900f59e0
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Wed Apr 24 12:50:50 2019 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Feb 17 00:51:36 2020 +0100
calc: extra unittest for rows autoheight on load
Change-Id: Ie5310d3c3d4fde59a0718dbda228c638b7e0c366
Reviewed-on: https://gerrit.libreoffice.org/71235
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit 5a2aba31867e0912700f6c976f152116d902fe21)
diff --git a/sc/qa/unit/data/ods/autoheight2rows.ods b/sc/qa/unit/data/ods/autoheight2rows.ods
new file mode 100644
index 000000000000..b687701240c1
Binary files /dev/null and b/sc/qa/unit/data/ods/autoheight2rows.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index c6d3bc4f644e..6b6b3deaf6a1 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -253,6 +253,7 @@ public:
void testCharacterSetXLSXML();
void testTdf62268();
void testVBAMacroFunctionODS();
+ void testAutoheight2Rows();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBooleanFormatXLSX);
@@ -391,6 +392,7 @@ public:
CPPUNIT_TEST(testCondFormatFormulaListenerXLSX);
CPPUNIT_TEST(testTdf62268);
CPPUNIT_TEST(testVBAMacroFunctionODS);
+ CPPUNIT_TEST(testAutoheight2Rows);
CPPUNIT_TEST_SUITE_END();
@@ -4286,6 +4288,22 @@ void ScFiltersTest::testVBAMacroFunctionODS()
xDocSh->DoClose();
}
+void ScFiltersTest::testAutoheight2Rows()
+{
+ ScDocShellRef xDocSh = loadDoc("autoheight2rows.", FORMAT_ODS);
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ SCTAB nTab = 0;
+ int nHeight1 = rDoc.GetRowHeight(0, nTab, false);
+ int nHeight3 = rDoc.GetRowHeight(2, nTab, false);
+
+ // We will do relative comparison, because calculated autoheight
+ // can be different on different platforms
+ CPPUNIT_ASSERT_MESSAGE("Row #3 shoud be thinner than #1", nHeight3 < nHeight1);
+
+ xDocSh->DoClose();
+}
+
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "sc/qa/unit/data" )
{
commit e3a35b4e3549efd91855c64b950cf67347a879c6
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Mon Feb 17 00:48:37 2020 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Feb 17 00:48:37 2020 +0100
Revert "Revert "tdf#62268: allow row height recalculation on document load""
This reverts commit b238d4274e4018cc8d90bd7f8652529ce650dc03.
diff --git a/sc/qa/unit/data/ods/tdf62268.ods b/sc/qa/unit/data/ods/tdf62268.ods
new file mode 100644
index 000000000000..da88adfd25cd
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf62268.ods differ
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index e23886fc7033..dad65eb9d7c4 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -763,7 +763,8 @@ void ScBootstrapFixture::miscRowHeightsTest( TestParam const * aTestValues, unsi
bool bOpt = !(rDoc.GetRowFlags( nRow, nTab ) & CRFlags::ManualSize);
CPPUNIT_ASSERT_EQUAL(aTestValues[ index ].pData[ i ].bOptimal, bOpt);
}
- CPPUNIT_ASSERT_EQUAL(nExpectedHeight, nHeight);
+ // Due to some minor differences on Mac this comparison is made bit fuzzy
+ CPPUNIT_ASSERT_LESSEQUAL( 15, abs( nHeight - nExpectedHeight ) );
}
}
xShell->DoClose();
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 116222c0fb7e..22851e9b5f5f 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -1086,60 +1086,57 @@ void ScExportTest::testOutlineExportXLSX()
// We expected that exactly 13 unique Nodes will be produced
assertXPath(pSheet, "/x:worksheet/x:cols/x:col", 13);
- // We need to save all 30 rows, as it provides information about outLineLevel
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "r", "1");
+ // First row is empty and default so it is not written into XML file
+ // so we need to save 29 rows, as it provides information about outLineLevel
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "r", "2");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "hidden", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "outlineLevel", "0");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "outlineLevel", "1");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "collapsed", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "r", "2");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "r", "3");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "hidden", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "outlineLevel", "1");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "outlineLevel", "2");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "collapsed", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "r", "3");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "r", "4");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "hidden", "false");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "outlineLevel", "2");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "collapsed", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "r", "4");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "r", "5");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "hidden", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "outlineLevel", "2");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "outlineLevel", "3");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "collapsed", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "r", "5");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "r", "6");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "hidden", "false");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "outlineLevel", "3");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "collapsed", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "r", "6");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "hidden", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "outlineLevel", "3");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "r", "7");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "hidden", "true");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "outlineLevel", "4");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "collapsed", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "r", "7");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "r", "8");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "hidden", "true");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "outlineLevel", "4");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "collapsed", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "r", "8");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "r", "9");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "hidden", "true");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "outlineLevel", "4");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "collapsed", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[9]", "r", "9");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[9]", "hidden", "true");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[9]", "outlineLevel", "4");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[9]", "collapsed", "false");
// Next rows are the same as the previous one but it needs to bre preserved,
// as they contain information about outlineLevel
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "r", "21");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "hidden", "true");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "outlineLevel", "4");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "collapsed", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "r", "22");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[20]", "r", "21");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[20]", "hidden", "true");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[20]", "outlineLevel", "4");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[20]", "collapsed", "false");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "r", "22");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "hidden", "false");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "outlineLevel", "3");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "collapsed", "true");
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "r", "23");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "hidden", "false");
assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "outlineLevel", "3");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "collapsed", "true");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[23]", "r", "23");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[23]", "hidden", "false");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[23]", "outlineLevel", "3");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[23]", "collapsed", "false");
-
- // We expected that exactly 30 Row Nodes will be produced
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 30);
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "collapsed", "false");
+
+ // We expected that exactly 29 Row Nodes will be produced
+ assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 29);
}
void ScExportTest::testAllRowsHiddenXLSX()
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index a8e5fdec97df..c6d3bc4f644e 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -250,6 +250,9 @@ public:
void testBorderColorsXLSXML();
void testHiddenRowsColumnsXLSXML();
void testColumnWidthRowHeightXLSXML();
+ void testCharacterSetXLSXML();
+ void testTdf62268();
+ void testVBAMacroFunctionODS();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBooleanFormatXLSX);
@@ -386,6 +389,8 @@ public:
CPPUNIT_TEST(testColumnWidthRowHeightXLSXML);
CPPUNIT_TEST(testCharacterSetXLSXML);
CPPUNIT_TEST(testCondFormatFormulaListenerXLSX);
+ CPPUNIT_TEST(testTdf62268);
+ CPPUNIT_TEST(testVBAMacroFunctionODS);
CPPUNIT_TEST_SUITE_END();
@@ -2777,8 +2782,8 @@ void ScFiltersTest::testMiscRowHeights()
static const TestParam::RowData MultiLineOptData[] =
{
- // Row 0 is 12.63 mm and optimal flag is set
- { 0, 0, 0, 1263, CHECK_OPTIMAL, true },
+ // Row 0 is 12.63 mm, but optimal flag is set
+ { 0, 0, 0, 1236, CHECK_OPTIMAL, true },
// Row 1 is 11.99 mm and optimal flag is NOT set
{ 1, 1, 0, 1199, CHECK_OPTIMAL, false },
};
@@ -2816,8 +2821,9 @@ void ScFiltersTest::testOptimalHeightReset()
ScDocument& rDoc = xDocSh->GetDocument();
// open document in read/write mode ( otherwise optimal height stuff won't
// be triggered ) *and* you can't delete cell contents.
- int nHeight = sc::TwipsToHMM ( rDoc.GetRowHeight(nRow, nTab, false) );
- CPPUNIT_ASSERT_EQUAL(1263, nHeight);
+ int nHeight = rDoc.GetRowHeight(nRow, nTab, false);
+ // Due to some minor differences on Mac this comparison is made bit fuzzy
+ CPPUNIT_ASSERT_LESSEQUAL( 8, abs( nHeight - 701 ) );
ScDocFunc &rFunc = xDocSh->GetDocFunc();
@@ -4252,6 +4258,34 @@ void ScFiltersTest::testCondFormatFormulaListenerXLSX()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf62268()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf62268.", FORMAT_ODS);
+ ScDocument& rDoc = xDocSh->GetDocument();
+ int nHeight;
+
+ SCTAB nTab = 0;
+ nHeight = rDoc.GetRowHeight(0, nTab, false);
+ CPPUNIT_ASSERT_LESSEQUAL( 3, abs( 256 - nHeight ) );
+ nHeight = rDoc.GetRowHeight(1, nTab, false);
+ CPPUNIT_ASSERT_LESSEQUAL( 19, abs( 1905 - nHeight ) );
+
+ xDocSh->DoClose();
+}
+
+void ScFiltersTest::testVBAMacroFunctionODS()
+{
+ ScDocShellRef xDocSh = loadDoc("vba_macro_functions.", FORMAT_ODS);
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ OUString aFunction;
+ rDoc.GetFormula(2, 0, 0, aFunction);
+ std::cout << aFunction << std::endl;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, rDoc.GetValue(2, 0, 0), 1e-6);
+
+ xDocSh->DoClose();
+}
+
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "sc/qa/unit/data" )
{
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 36aed760837d..6179192b1641 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1794,6 +1794,26 @@ void SAL_CALL ScXMLImport::endDocument()
pDoc->SetStreamValid( nTab, true );
}
}
+
+ // There are rows with optimal height which need to be updated
+ if (pDoc && !maRecalcRowRanges.empty())
+ {
+ bool bLockHeight = pDoc->IsAdjustHeightLocked();
+ if (bLockHeight)
+ {
+ pDoc->UnlockAdjustHeight();
+ }
+
+ ScSizeDeviceProvider aProv(static_cast<ScDocShell*>(pDoc->GetDocumentShell()));
+ ScDocRowHeightUpdater aUpdater(*pDoc, aProv.GetDevice(), aProv.GetPPTX(), aProv.GetPPTY(), &maRecalcRowRanges);
+ aUpdater.update();
+
+ if (bLockHeight)
+ {
+ pDoc->LockAdjustHeight();
+ }
+ }
+
aTables.FixupOLEs();
}
if (GetModel().is())
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index efbdf3c35cc1..7cd7eabe70dc 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -264,6 +264,8 @@ class ScXMLImport: public SvXMLImport
ScMyTables aTables;
+ std::vector<ScDocRowHeightUpdater::TabRanges> maRecalcRowRanges;
+
std::unique_ptr<ScMyNamedExpressions> m_pMyNamedExpressions;
SheetNamedExpMap m_SheetNamedExpressions;
@@ -336,6 +338,8 @@ public:
ScMyTables& GetTables() { return aTables; }
+ std::vector<ScDocRowHeightUpdater::TabRanges>& GetRecalcRowRanges() { return maRecalcRowRanges; }
+
bool IsStylesOnlyMode() const { return !bLoadDoc; }
static sal_Int16 GetCellType(const char* rStrValue, const sal_Int32 nStrLength);
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index 484cae638a75..3093c33f0a8e 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -199,6 +199,21 @@ void SAL_CALL ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
}
if (bFiltered)
xRowProperties->setPropertyValue(SC_ISFILTERED, uno::makeAny(bFiltered));
+
+ uno::Any any = xRowProperties->getPropertyValue(SC_UNONAME_OHEIGHT);
+ bool bOptionalHeight = false;
+ any >>= bOptionalHeight;
+ if (bOptionalHeight)
+ {
+ // Save this row for later height update
+ std::vector<ScDocRowHeightUpdater::TabRanges>& rRecalcRanges = rXMLImport.GetRecalcRowRanges();
+ while (static_cast<SCTAB>(rRecalcRanges.size()) <= nSheet)
+ {
+ rRecalcRanges.emplace_back(0);
+ }
+ rRecalcRanges.at(nSheet).mnTab = nSheet;
+ rRecalcRanges.at(nSheet).mpRanges->setTrue(nFirstRow, nCurrentRow);
+ }
}
}
}
More information about the Libreoffice-commits
mailing list