summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-10-09 16:44:39 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2018-12-11 16:26:31 +0100
commitada20402efa81273e03e46cbedc21f25b9daeeac (patch)
tree3b2cca205c43c463df944caf44f4af779fbfc9a3 /sc
parentd0e30c11740ba22af5f6a8156dd00dad8c378b2a (diff)
OSX implement bitmap-only rendering mode
Eventually OSX should also depend on SVP and SVP should just export the platform agnostic code, so we can get rid of all the IOS and ANDROID ifdefs. Since the SVP mode now also uses a default DPI value of 96, we can get rid of those "broken" adjustments to the tests in commit a4ab0c08e747 ("Row height tolerance level increase for unittest") and commit 1e55a47e89a9 ("tdf#62268: allow row height recalculation on document load"). The DPI handling on OSX seems really broken. Additionally DPI should probably a float value, as rounding results in various of-by-one errors in tests. Change-Id: I47881683a9c3d3e1b4f8e7aba1d03842da4d6652 Reviewed-on: https://gerrit.libreoffice.org/64736 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/helper/qahelper.cxx3
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx7
2 files changed, 4 insertions, 6 deletions
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index bc523cffe920..e3b2db0cbec4 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -759,8 +759,7 @@ void ScBootstrapFixture::miscRowHeightsTest( TestParam const * aTestValues, unsi
bool bOpt = !(rDoc.GetRowFlags( nRow, nTab ) & CRFlags::ManualSize);
CPPUNIT_ASSERT_EQUAL(aTestValues[ index ].pData[ i ].bOptimal, bOpt);
}
- // Due to some minor differences on Mac this comparison is made bit fuzzy
- CPPUNIT_ASSERT_LESSEQUAL( 15, abs( nHeight - nExpectedHeight ) );
+ CPPUNIT_ASSERT_EQUAL(nExpectedHeight, nHeight);
}
}
xShell->DoClose();
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 67471ea15af0..0eaa0d83cb74 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -2766,7 +2766,7 @@ void ScFiltersTest::testMiscRowHeights()
static const TestParam::RowData MultiLineOptData[] =
{
- // Row 0 is 12.63 mm, but optimal flag is set
+ // Row 0 is 12.63 mm and optimal flag is set => 12.36 mm
{ 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 },
@@ -2799,9 +2799,8 @@ 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 = 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 ) );
+ int nHeight = sc::TwipsToHMM ( rDoc.GetRowHeight(nRow, nTab, false) );
+ CPPUNIT_ASSERT_EQUAL(1236, nHeight);
ScDocFunc &rFunc = xDocSh->GetDocFunc();