summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-03 16:05:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-02-04 10:03:14 +0100
commitf9950994914c0d605260e6f5bbc0e21bcab94826 (patch)
tree5f4a0c349df609e94e9e93fede8ff9a6a4cc2191 /emfio
parent84b79376d7bc57a3967d7203a7d51466625588e8 (diff)
the real font used for 'Roman' is arbitrary
the font name isn't a typical semi-standard one so it neither exists nor has a standard fallback. binary-hack "Roman" to "Arial" which is conveniently the same length and does have a standard fallback of "Liberation Sans" which we can add a dependency on via more_fonts Change-Id: I1d9b8294f67a00a1e5cabe38b71467e66b83aedf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129454 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/CppunitTest_emfio_emf.mk2
-rw-r--r--emfio/CppunitTest_emfio_wmf.mk1
-rw-r--r--emfio/qa/cppunit/wmf/data/tdf88163-non-placeable.wmfbin1268 -> 1268 bytes
-rw-r--r--emfio/qa/cppunit/wmf/data/tdf88163-wrong-font-size.wmfbin1290 -> 1290 bytes
-rw-r--r--emfio/qa/cppunit/wmf/wmfimporttest.cxx13
5 files changed, 6 insertions, 10 deletions
diff --git a/emfio/CppunitTest_emfio_emf.mk b/emfio/CppunitTest_emfio_emf.mk
index e8e90d7dddd4..38a1c98250f7 100644
--- a/emfio/CppunitTest_emfio_emf.mk
+++ b/emfio/CppunitTest_emfio_emf.mk
@@ -41,6 +41,8 @@ $(eval $(call gb_CppunitTest_use_vcl,emfio_emf))
$(eval $(call gb_CppunitTest_use_rdb,emfio_emf,services))
+$(eval $(call gb_CppunitTest_use_more_fonts,emfio_emf))
+
$(eval $(call gb_CppunitTest_use_configuration,emfio_emf))
# vim: set noet sw=4 ts=4:
diff --git a/emfio/CppunitTest_emfio_wmf.mk b/emfio/CppunitTest_emfio_wmf.mk
index a127bdb0af1f..8ab4a9064dba 100644
--- a/emfio/CppunitTest_emfio_wmf.mk
+++ b/emfio/CppunitTest_emfio_wmf.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_CppunitTest_use_libraries,emfio_wmf,\
vcl \
))
+$(eval $(call gb_CppunitTest_use_more_fonts,emfio_wmf))
$(eval $(call gb_CppunitTest_use_configuration,emfio_wmf))
$(eval $(call gb_CppunitTest_use_sdk_api,emfio_wmf))
$(eval $(call gb_CppunitTest_use_ure,emfio_wmf))
diff --git a/emfio/qa/cppunit/wmf/data/tdf88163-non-placeable.wmf b/emfio/qa/cppunit/wmf/data/tdf88163-non-placeable.wmf
index b39514bd1b5c..6d27691f0d2d 100644
--- a/emfio/qa/cppunit/wmf/data/tdf88163-non-placeable.wmf
+++ b/emfio/qa/cppunit/wmf/data/tdf88163-non-placeable.wmf
Binary files differ
diff --git a/emfio/qa/cppunit/wmf/data/tdf88163-wrong-font-size.wmf b/emfio/qa/cppunit/wmf/data/tdf88163-wrong-font-size.wmf
index edcab8aea635..4902ba18d16b 100644
--- a/emfio/qa/cppunit/wmf/data/tdf88163-wrong-font-size.wmf
+++ b/emfio/qa/cppunit/wmf/data/tdf88163-wrong-font-size.wmf
Binary files differ
diff --git a/emfio/qa/cppunit/wmf/wmfimporttest.cxx b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
index db84998523fa..846527b3aa22 100644
--- a/emfio/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
@@ -117,14 +117,10 @@ void WmfTest::testTdf88163NonPlaceableWmf()
// These values come from the fix for tdf#88163
- // Font 'Roman' and its height can vary according to the platform
// Fails without the fix
- // Linux: With fix: 3136, without fix: ~ 8000
- // Mac: With fix: 3230, without fix: ~ 8000
- // Windows: With fix: 3303, without fix: ~ 8000
+ // With fix: 3272, without fix: ~ 8000
auto x = getXPath(pDoc, "/metafile/push[2]/font[1]", "height");
- CPPUNIT_ASSERT_GREATEREQUAL(sal_Int32(3000), x.toInt32());
- CPPUNIT_ASSERT_LESS(sal_Int32(3500), x.toInt32());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3272), x.toInt32());
// Fails without the fix: Expected: 7359, Actual: 7336
assertXPath(pDoc, "/metafile/push[2]/textarray[1]", "x", "7359");
@@ -157,12 +153,9 @@ void WmfTest::testTdf88163PlaceableWmf()
// These values come from the fix for tdf#88163
- // Font 'Roman' and its height can vary according to the platform
// The fix does not affect the font size
- // Linux: 300 - Mac: 309 - Windows: 316
auto x = getXPath(pDoc, "/metafile/push[2]/font[1]", "height");
- CPPUNIT_ASSERT_GREATEREQUAL(sal_Int32(287), x.toInt32());
- CPPUNIT_ASSERT_LESS(sal_Int32(320), x.toInt32());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(313), x.toInt32());
// Fails without the fix: Expected: 1900, Actual: 19818
assertXPath(pDoc, "/metafile", "height", "1900");