From d73819d8dafe52d93ccc0f0c8e6a567459d8db4b Mon Sep 17 00:00:00 2001 From: Tim Allison Date: Fri, 3 Feb 2017 20:19:33 +0000 Subject: [PATCH] Bug 60677 -- handle multibyte encodings correctly in HwmfGraphics' drawString. Thanks to Dominik Stadler for finding this bug and a triggering doc via large scale regression testing. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1781593 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hwmf/draw/HwmfGraphics.java | 37 +++++++++++++++++-- .../org/apache/poi/hwmf/TestHwmfParsing.java | 26 +++++++++++++ 2 files changed, 60 insertions(+), 3 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwmf/draw/HwmfGraphics.java b/src/scratchpad/src/org/apache/poi/hwmf/draw/HwmfGraphics.java index f292313185..ef5af49e40 100644 --- a/src/scratchpad/src/org/apache/poi/hwmf/draw/HwmfGraphics.java +++ b/src/scratchpad/src/org/apache/poi/hwmf/draw/HwmfGraphics.java @@ -338,13 +338,44 @@ public class HwmfGraphics { if (dx == null || dx.length == 0) { addAttributes(as, font); } else { - for (int i=0; i