You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ye...@apache.org on 2009/08/31 18:57:03 UTC
svn commit: r809659 - in /poi/trunk:
src/documentation/content/xdocs/status.xml
src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java
src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java
test-data/document/header_image.doc
Author: yegor
Date: Mon Aug 31 16:57:03 2009
New Revision: 809659
URL: http://svn.apache.org/viewvc?rev=809659&view=rev
Log:
Support for extraction of header / footer images in HWPF, see Bugzilla 47733
Added:
poi/trunk/test-data/document/header_image.doc (with props)
Modified:
poi/trunk/src/documentation/content/xdocs/status.xml
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java
Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=809659&r1=809658&r2=809659&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Mon Aug 31 16:57:03 2009
@@ -33,6 +33,7 @@
<changes>
<release version="3.5-beta7" date="2009-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">47773 - Support for extraction of header / footer images in HWPF</action>
<action dev="POI-DEVELOPERS" type="fix">moved all test data to a top-level directory</action>
<action dev="POI-DEVELOPERS" type="add">47721 - Added implementation for INDIRECT()</action>
<action dev="POI-DEVELOPERS" type="add">45583 - Avoid exception when reading ClipboardData packet in OLE property sets</action>
Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java?rev=809659&r1=809658&r2=809659&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java Mon Aug 31 16:57:03 2009
@@ -189,7 +189,7 @@
public List getAllPictures() {
ArrayList pictures = new ArrayList();
- Range range = _document.getRange();
+ Range range = _document.getOverallRange();
for (int i = 0; i < range.numCharacterRuns(); i++) {
CharacterRun run = range.getCharacterRun(i);
String text = run.text();
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java?rev=809659&r1=809658&r2=809659&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java Mon Aug 31 16:57:03 2009
@@ -143,4 +143,12 @@
List pics = doc.getPicturesTable().getAllPictures();
assertEquals(pics.size(), 2);
}
+
+ public void testPicturesInHeader() {
+ HWPFDocument doc = HWPFTestDataSamples.openSampleFile("header_image.doc");
+
+ List pics = doc.getPicturesTable().getAllPictures();
+ assertEquals(pics.size(), 2);
+ }
+
}
Added: poi/trunk/test-data/document/header_image.doc
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/document/header_image.doc?rev=809659&view=auto
==============================================================================
Binary file - no diff available.
Propchange: poi/trunk/test-data/document/header_image.doc
------------------------------------------------------------------------------
svn:executable = *
Propchange: poi/trunk/test-data/document/header_image.doc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org