summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2008-04-16 07:47:16 +0000
committerYegor Kozlov <yegor@apache.org>2008-04-16 07:47:16 +0000
commit3e3ed348cc702a6994832b8b155b8c87eabfbfe3 (patch)
tree2507c73bb74782dde06e4ccd5d9f3847d48cdce8
parentc59e7e7cd298149f20e2a282c49724479d3f22e6 (diff)
downloadpoi-3e3ed348cc702a6994832b8b155b8c87eabfbfe3.tar.gz
poi-3e3ed348cc702a6994832b8b155b8c87eabfbfe3.zip
bug #41071 is fixed in trunk. Added a unit test and resolved.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@648589 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/documentation/content/xdocs/changes.xml3
-rw-r--r--src/documentation/content/xdocs/status.xml3
-rwxr-xr-xsrc/scratchpad/testcases/org/apache/poi/hslf/data/41071.pptbin0 -> 18432 bytes
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java20
4 files changed, 26 insertions, 0 deletions
diff --git a/src/documentation/content/xdocs/changes.xml b/src/documentation/content/xdocs/changes.xml
index 91090ca5ae..817bd818b7 100644
--- a/src/documentation/content/xdocs/changes.xml
+++ b/src/documentation/content/xdocs/changes.xml
@@ -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>
diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml
index ea31578414..6fb6c35c03 100644
--- a/src/documentation/content/xdocs/status.xml
+++ b/src/documentation/content/xdocs/status.xml
@@ -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
index 0000000000..4a443025e2
--- /dev/null
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/data/41071.ppt
Binary files differ
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 19e7af6417..6947ff9cfd 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
@@ -360,4 +360,24 @@ public class TestBugs extends TestCase {
assertTrue("No Exceptions while reading file", true);
}
+
+ /**
+ * Bug 41071: Will not extract text from Powerpoint TextBoxes
+ */
+ public void test41071() throws Exception {
+ FileInputStream is = new FileInputStream(new File(cwd, "41071.ppt"));
+ SlideShow ppt = new SlideShow(is);
+ is.close();
+
+ Slide slide = ppt.getSlides()[0];
+ Shape[] sh = slide.getShapes();
+ assertEquals(1, sh.length);
+ assertTrue(sh[0] instanceof TextShape);
+ TextShape tx = (TextShape)sh[0];
+ assertEquals("Fundera, planera och involvera.", tx.getTextRun().getText());
+
+ TextRun[] run = slide.getTextRuns();
+ assertEquals(1, run.length);
+ assertEquals("Fundera, planera och involvera.", run[0].getText());
+ }
}