summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-12-24 14:32:20 +0300
committerMichael Weghorn <m.weghorn@posteo.de>2019-04-27 15:37:57 +0200
commitf6bca0587e337553cacfdbe16cbe3806639327a0 (patch)
tree4c1432f3d0977e601f44fa4569a7bc88120ebd00 /sc
parentdd8e9e7e271ce2d60a35a778ac265e8dda25c060 (diff)
Fix CppunitTest_chart2_xshape failing with Display Scaling on Windows
See thread starting at https://lists.freedesktop.org/archives/libreoffice/2018-December/081589.html Regression from commit 7263d223ddf42cc39d10a501159c7b04ef48df96. That change has made unit tests DPI-aware; and then some tests started failing on systems with resolutions other than 96 DPI. It has been suggested that the proper fix would be to do for Windows what commit ada20402efa81273e03e46cbedc21f25b9daeeac did for macOS. Another approach would be to fix all the tests to be DPI-aware. I cannot do the first mentioned fix; so I have fixed testFDO74215 test in sw_ooxmlexport4; and added DPI checks to the other failing tests in chart2_xshape and sc_subsequent_filters_test to skip testing when using non-default DPI. This is not ideal, of course, and conditionally skipped tests need to be re-enabled unconditionally once a proper fix arrives. Change-Id: I5c92cfe93ae65f53a8a180fcaec49231df377b8a Reviewed-on: https://gerrit.libreoffice.org/65595 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 9520378e37b97b0a44130c86be482060465b479e) Reviewed-on: https://gerrit.libreoffice.org/71356 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index c1d68418ba1f..c6d3bc4f644e 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -2765,6 +2765,12 @@ void ScFiltersTest::testFormulaDependency()
void ScFiltersTest::testMiscRowHeights()
{
+ // FIXME: the DPI check should be removed when either (1) the test is fixed to work with
+ // non-default DPI; or (2) unit tests on Windows are made to use svp VCL plugin.
+ if (Application::GetDefaultDevice()->GetDPIX() != 96
+ || Application::GetDefaultDevice()->GetDPIY() != 96)
+ return;
+
static const TestParam::RowData DfltRowData[] =
{
// check rows at the beginning and end of document
@@ -2803,6 +2809,12 @@ void ScFiltersTest::testMiscRowHeights()
void ScFiltersTest::testOptimalHeightReset()
{
+ // FIXME: the DPI check should be removed when either (1) the test is fixed to work with
+ // non-default DPI; or (2) unit tests on Windows are made to use svp VCL plugin.
+ if (Application::GetDefaultDevice()->GetDPIX() != 96
+ || Application::GetDefaultDevice()->GetDPIY() != 96)
+ return;
+
ScDocShellRef xDocSh = loadDoc("multilineoptimal.", FORMAT_ODS, true);
SCTAB nTab = 0;
SCROW nRow = 0;