summaryrefslogtreecommitdiff
path: root/sc/qa/unit/subsequent_filters-test.cxx
diff options
context:
space:
mode:
authorVasily Melenchuk <Vasily.Melenchuk@cib.de>2018-04-06 20:19:10 +0300
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-10-22 23:30:23 +0200
commit693953dd4699887bd3f5bca2c3582b5fae1d6992 (patch)
tree2091b2fe8d997ef84f149ace1e6a1f00fd8e08fe /sc/qa/unit/subsequent_filters-test.cxx
parentfad764c02c7a9cd210bfa44ea0ce1ac5354d6427 (diff)
tdf#62268: allow row height recalculation on document load
During document load rows with style:use-optimal-row-height="true" should recalculate it's height. * includes: Row height tolerance level increase for unittest * tdf#118086: calc: invalid row autoheight fixed Change-Id: Ib38b5b753d9ff8352116d77851d228c5d77bd530 Reviewed-on: https://gerrit.libreoffice.org/52521 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 1e55a47e89a9d9d6cf9cb3993484022aaf2c097b) Reviewed-on: https://gerrit.libreoffice.org/61898 Tested-by: Jenkins
Diffstat (limited to 'sc/qa/unit/subsequent_filters-test.cxx')
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 0d6bc90761fb..5d112bd73489 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -246,6 +246,7 @@ public:
void testBorderColorsXLSXML();
void testHiddenRowsColumnsXLSXML();
void testColumnWidthRowHeightXLSXML();
+ void testTdf62268();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBooleanFormatXLSX);
@@ -378,6 +379,7 @@ public:
CPPUNIT_TEST(testHiddenRowsColumnsXLSXML);
CPPUNIT_TEST(testColumnWidthRowHeightXLSXML);
CPPUNIT_TEST(testCondFormatFormulaListenerXLSX);
+ CPPUNIT_TEST(testTdf62268);
CPPUNIT_TEST_SUITE_END();
@@ -2654,8 +2656,8 @@ void ScFiltersTest::testMiscRowHeights()
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 },
};
@@ -2687,8 +2689,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();
@@ -4078,6 +4081,21 @@ 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_EQUAL(256, nHeight);
+ nHeight = rDoc.GetRowHeight(1, nTab, false);
+ CPPUNIT_ASSERT_EQUAL(1905, nHeight);
+
+ xDocSh->DoClose();
+}
+
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "sc/qa/unit/data" )
{