]> source.dussan.org Git - poi.git/commitdiff
bug #41071 is fixed in trunk. Added a unit test and resolved.
authorYegor Kozlov <yegor@apache.org>
Wed, 16 Apr 2008 07:47:16 +0000 (07:47 +0000)
committerYegor Kozlov <yegor@apache.org>
Wed, 16 Apr 2008 07:47:16 +0000 (07:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@648589 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/changes.xml
src/documentation/content/xdocs/status.xml
src/scratchpad/testcases/org/apache/poi/hslf/data/41071.ppt [new file with mode: 0755]
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java

index 91090ca5aebf0b9df270687476cfde288a160208..817bd818b7cabc78d929890f11d6d28c3f56e60f 100644 (file)
@@ -37,6 +37,9 @@
 
                <!-- Don't forget to update status.xml too! -->
         <release version="3.0.3-beta1" date="2008-04-??">
+           <action dev="POI-DEVELOPERS" type="add">HSLF: Implemented more methods in PPGraphics2D</action>
+           <action dev="POI-DEVELOPERS" type="add">HSLF: Added Freeform shape which can contain both lines and Bezier curves</action>
+           <action dev="POI-DEVELOPERS" type="fix">41071 - Improved text extraction in HSLF</action>
            <action dev="POI-DEVELOPERS" type="add">30311 - Conditional Formatting - improved API, added HSSFSheetConditionalFormatting</action>
            <action dev="POI-DEVELOPERS" type="fix">Update the formula parser code to use a HSSFWorkbook, rather than the low level model.Workbook, to make things cleaner and make supporting XSSF formulas in future much easier</action>
            <action dev="POI-DEVELOPERS" type="fix">Fix the logger used by POIFSFileSystem, so that commons-logging isn't required when not used</action>
index ea3157841402fdf2b815325b6b1f0bd70dade756..6fb6c35c03705cb194caf0d3d9b554094039504b 100644 (file)
@@ -34,6 +34,9 @@
        <!-- Don't forget to update changes.xml too! -->
     <changes>
         <release version="3.0.3-beta1" date="2008-04-??">
+           <action dev="POI-DEVELOPERS" type="add">HSLF: Implemented more methods in PPGraphics2D</action>
+           <action dev="POI-DEVELOPERS" type="add">HSLF: Added Freeform shape which can contain both lines and Bezier curves</action>
+           <action dev="POI-DEVELOPERS" type="fix">41071 - Improved text extraction in HSLF</action>
            <action dev="POI-DEVELOPERS" type="add">30311 - Conditional Formatting - improved API, added HSSFSheetConditionalFormatting</action>
            <action dev="POI-DEVELOPERS" type="fix">Update the formula parser code to use a HSSFWorkbook, rather than the low level model.Workbook, to make things cleaner and make supporting XSSF formulas in future much easier</action>
            <action dev="POI-DEVELOPERS" type="fix">Fix the logger used by POIFSFileSystem, so that commons-logging isn't required when not used</action>
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/data/41071.ppt b/src/scratchpad/testcases/org/apache/poi/hslf/data/41071.ppt
new file mode 100755 (executable)
index 0000000..4a44302
Binary files /dev/null and b/src/scratchpad/testcases/org/apache/poi/hslf/data/41071.ppt differ
index 19e7af64177e1119568846757a8dcff3c8031edb..6947ff9cfd7a30d666662e26d93c4111c73c4fd8 100644 (file)
@@ -360,4 +360,24 @@ public class TestBugs extends TestCase {
 \r
         assertTrue("No Exceptions while reading file", true);\r
     }\r
+\r
+    /**\r
+     * Bug 41071: Will not extract text from Powerpoint TextBoxes\r
+     */\r
+    public void test41071() throws Exception {\r
+        FileInputStream is = new FileInputStream(new File(cwd, "41071.ppt"));\r
+        SlideShow ppt = new SlideShow(is);\r
+        is.close();\r
+\r
+        Slide slide = ppt.getSlides()[0];\r
+        Shape[] sh = slide.getShapes();\r
+        assertEquals(1, sh.length);\r
+        assertTrue(sh[0] instanceof TextShape);\r
+        TextShape tx = (TextShape)sh[0];\r
+        assertEquals("Fundera, planera och involvera.", tx.getTextRun().getText());\r
+\r
+        TextRun[] run = slide.getTextRuns();\r
+        assertEquals(1, run.length);\r
+        assertEquals("Fundera, planera och involvera.", run[0].getText());\r
+    }\r
 }\r