[Libreoffice-commits] core.git: sc/qa
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 25 09:28:02 UTC 2019
sc/qa/unit/data/ods/autoheight2rows.ods |binary
sc/qa/unit/subsequent_filters-test.cxx | 18 ++++++++++++++++++
2 files changed, 18 insertions(+)
New commits:
commit 5a2aba31867e0912700f6c976f152116d902fe21
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: Thu Apr 25 11:27:17 2019 +0200
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>
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 e7b719d35a14..f4d579504a3c 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -247,6 +247,7 @@ public:
void testCharacterSetXLSXML();
void testTdf62268();
void testVBAMacroFunctionODS();
+ void testAutoheight2Rows();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBooleanFormatXLSX);
@@ -385,6 +386,7 @@ public:
CPPUNIT_TEST(testCondFormatFormulaListenerXLSX);
CPPUNIT_TEST(testTdf62268);
CPPUNIT_TEST(testVBAMacroFunctionODS);
+ CPPUNIT_TEST(testAutoheight2Rows);
CPPUNIT_TEST_SUITE_END();
@@ -4251,6 +4253,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" )
{
More information about the Libreoffice-commits
mailing list