sw/qa/core/layout/layout.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit cacb19b479f83dc0411f165edab9fd13f05b0afb
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Sep 8 18:07:12 2022 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Sep 8 20:54:37 2022 +0200

    Fix CppunitTest_sw_core_layout on non-default DPI
    
    Change-Id: I84f21b165628577ad680c98b0f28ac6956328833
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139699
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index a6a949b5337b..d75157f2b860 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -745,6 +745,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, 
testDoublePageBorder)
 
 CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testNegativePageBorder)
 {
+    // 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 (!IsDefaultDPI())
+        return;
+
     // Given a document with a top margin and a negative border distance:
     createSwDoc();
     SwXTextDocument* pTextDoc = 
dynamic_cast<SwXTextDocument*>(mxComponent.get());
@@ -782,6 +787,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, 
testNegativePageBorder)
 
 CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testNegativePageBorderNoMargin)
 {
+    // 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 (!IsDefaultDPI())
+        return;
+
     // Given a document with no top margin and a negative border distance:
     createSwDoc();
     SwXTextDocument* pTextDoc = 
dynamic_cast<SwXTextDocument*>(mxComponent.get());

Reply via email to