summaryrefslogtreecommitdiff
path: root/sc/qa/unit/subsequent_filters-test.cxx
diff options
context:
space:
mode:
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" )
{