From 720db41739a4b9564e33e9912b40636f59ddaf52 Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Thu, 31 Dec 2015 23:49:34 +0000 Subject: [PATCH] #55030 - RichTextRun getFontName can not get Chinese font name git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722479 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/hslf/usermodel/HSLFTextParagraph.java | 18 ++++++++++--- .../poi/hslf/usermodel/HSLFTextRun.java | 2 +- .../apache/poi/hslf/usermodel/TestBugs.java | 24 +++++++++++++++--- test-data/slideshow/bug55030.ppt | Bin 0 -> 15360 bytes 4 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 test-data/slideshow/bug55030.ppt diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java index 8460a5b979..f1443ccfe0 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java @@ -680,10 +680,16 @@ public final class HSLFTextParagraph implements TextParagraph paraList : sl.getTextParagraphs()) { + for (HSLFTextParagraph htp : paraList) { + for (HSLFTextRun htr : htp) { + String actFamily = htr.getFontFamily(); + assertEquals(expFamily, actFamily); + } + } + } + + ppt.close(); + } private static HSLFSlideShow open(String fileName) throws IOException { File sample = HSLFTestDataSamples.getSampleFile(fileName); diff --git a/test-data/slideshow/bug55030.ppt b/test-data/slideshow/bug55030.ppt new file mode 100644 index 0000000000000000000000000000000000000000..1f2f22b0048238e41d4549df0f08c07ef442eec0 GIT binary patch literal 15360 zcmeG@30%$F*87~(r0JYgq^P6oiX^4Mtjyd?Qb;o7HcLfi$VDeZ$&_Acz)c|`Ly`+NDPx99GIT;osBf+PKgTUZ_r34;eeeB#Z?pGWds=I+z1CiPIR8qDm8#-Ss6QZI zgpq_pnp-*%saEBzRyg4iq5*jcoIPLAX{Hq4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