aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad/testcases
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2018-10-27 00:51:19 +0000
committerAndreas Beeker <kiwiwings@apache.org>2018-10-27 00:51:19 +0000
commit29587e78dfa0592fcc93a10850aafb7a8bac43e6 (patch)
tree9cffac43f940485bba5533bb8b544e7bf5f33ff6 /src/scratchpad/testcases
parent11e4643e5bc764feb0f92fd80b457f27ec7e5891 (diff)
downloadpoi-29587e78dfa0592fcc93a10850aafb7a8bac43e6.tar.gz
poi-29587e78dfa0592fcc93a10850aafb7a8bac43e6.zip
#60656 - Support export file that contains emf and render it correctly
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/hemf@1844931 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases')
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hemf/usermodel/HemfPictureTest.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/HemfPictureTest.java b/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/HemfPictureTest.java
index cabe627f66..8ff4742be6 100644
--- a/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/HemfPictureTest.java
+++ b/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/HemfPictureTest.java
@@ -63,7 +63,13 @@ public class HemfPictureTest {
public void paint() throws IOException {
byte buf[] = new byte[50_000_000];
- final boolean writeLog = false;
+ // good test samples to validate rendering:
+ // emfs/commoncrawl2/NB/NBWN2YH5VFCLZRFDQU7PB7IDD4UKY7DN_2.emf
+ // emfs/govdocs1/777/777525.ppt_0.emf
+ // emfs/govdocs1/844/844795.ppt_2.emf
+ // emfs/commoncrawl2/TO/TOYZSTNUSW5OFCFUQ6T5FBLIDLCRF3NH_0.emf
+
+ final boolean writeLog = true;
final boolean dumpRecords = false;
final boolean savePng = true;
@@ -257,7 +263,7 @@ public class HemfPictureTest {
long fudgeFactorX = 1000;
StringBuilder sb = new StringBuilder();
for (HemfRecord record : pic) {
- if (record.getEmfRecordType().equals(HemfRecordType.exttextoutw)) {
+ if (record.getEmfRecordType().equals(HemfRecordType.extTextOutW)) {
HemfText.EmfExtTextOutW extTextOutW = (HemfText.EmfExtTextOutW) record;
Point2D reference = extTextOutW.getReference();
if (lastY > -1 && lastY != reference.getY()) {
@@ -291,7 +297,7 @@ public class HemfPictureTest {
expectedParts.add("testPDF.pdf");
int foundExpected = 0;
for (HemfRecord record : pic) {
- if (record.getEmfRecordType().equals(HemfRecordType.exttextoutw)) {
+ if (record.getEmfRecordType().equals(HemfRecordType.extTextOutW)) {
HemfText.EmfExtTextOutW extTextOutW = (HemfText.EmfExtTextOutW) record;
Point2D reference = extTextOutW.getReference();
if (lastY > -1 && lastY != reference.getY()) {