From 23077dfb49be23ba5a833a2fbc51ccfc6d78a2cd Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Fri, 24 Jun 2011 11:18:49 +0000 Subject: [PATCH] Add a unit test to show that bug #49648 no longer occurs git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1139245 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hslf/usermodel/TestBugs.java | 14 ++++++++++++++ test-data/slideshow/49648.ppt | Bin 0 -> 13312 bytes 2 files changed, 14 insertions(+) create mode 100644 test-data/slideshow/49648.ppt diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java index 122c72c96..088e0bcae 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java @@ -392,4 +392,18 @@ public final class TestBugs extends TestCase { // Good } } + + /** + * Changing text from Ascii to Unicode + */ + public void test49648() throws Exception { + SlideShow ppt = new SlideShow(_slTests.openResourceAsStream("49648.ppt")); + for(Slide slide : ppt.getSlides()) { + for(TextRun run : slide.getTextRuns()) { + String text = run.getRawText(); + text.replace("{txtTot}", "With \u0123\u1234\u5678 unicode"); + run.setRawText(text); + } + } + } } diff --git a/test-data/slideshow/49648.ppt b/test-data/slideshow/49648.ppt new file mode 100644 index 0000000000000000000000000000000000000000..841b904a1c03b629e5d707b3c83c1e99c86a38f1 GIT binary patch literal 13312 zcmeHN4RBP|6+Um@hHQTDEi5Q1ng>Nd1dPO@7R61$2rUd560LPm6UoMG4cW|QAs||p zN)-{>SSXU}UqXGJa#u22B z|2t9VN(g@uvE@8zKpK`MuwKvUXn2fP8e@TX^|G2<=R7m$`gi0mx&P$1(m6#3jQr%G z@lP2h3ft*4pmL1fECGzmTu{ki%XH-D%R*Uz8cNkYjTM){I7FV5qx+VbHILDOK{-;P z##tcMYVI>JUM)rsW9({-97MjsY1-wJ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