Преглед на файлове

Support for extraction of header / footer images in HWPF, see Bugzilla 47733

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@809659 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_3_5-FINAL
Yegor Kozlov преди 14 години
родител
ревизия
96d4031d66

+ 1
- 0
src/documentation/content/xdocs/status.xml Целия файл

@@ -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>

+ 1
- 1
src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java Целия файл

@@ -189,7 +189,7 @@ public final class PicturesTable
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();

+ 8
- 0
src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java Целия файл

@@ -143,4 +143,12 @@ public final class TestPictures extends TestCase {
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);
}

}

Двоични данни
test-data/document/header_image.doc Целия файл


Loading…
Отказ
Запис