From: Nick Burch Date: Tue, 5 Aug 2008 22:49:24 +0000 (+0000) Subject: With help from Yegor, fix bug #45537 - Include headers and footers (of slides and... X-Git-Tag: REL_3_2_FINAL~207 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9d70190dab933588caeed6fc79bdf240b754d22b;p=poi.git With help from Yegor, fix bug #45537 - Include headers and footers (of slides and notes) in the extracted text from HSLF git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@683020 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/documentation/content/xdocs/changes.xml b/src/documentation/content/xdocs/changes.xml index 76d4b0e6e8..1119b76d02 100644 --- a/src/documentation/content/xdocs/changes.xml +++ b/src/documentation/content/xdocs/changes.xml @@ -37,6 +37,7 @@ + 45537 - Include headers and footers (of slides and notes) in the extracted text from HSLF 45472 - Fixed incorrect default row height in OpenOffice 2.3 44692 - HSSFPicture.resize() stretched image when there was a text next to it 45543 - Optionally extract comment text with PowerPointExtractor, and initial hslf model support for comments diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 8edb88bd1b..cf5dc669f8 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 45537 - Include headers and footers (of slides and notes) in the extracted text from HSLF 45472 - Fixed incorrect default row height in OpenOffice 2.3 44692 - HSSFPicture.resize() stretched image when there was a text next to it 45543 - Optionally extract comment text with PowerPointExtractor, and initial hslf model support for comments diff --git a/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java b/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java index 95900a45ef..865471eefe 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java +++ b/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java @@ -176,11 +176,13 @@ public class PowerPointExtractor extends POIOLE2TextExtractor for(int i=0; i<_slides.length; i++) { Slide slide = _slides[i]; + // Slide header, if set HeadersFooters hf = slide.getHeadersFooters(); - if(hf != null && hf.getHeaderText() != null) { + if(hf != null && hf.isHeaderVisible() && hf.getHeaderText() != null) { ret.append(hf.getHeaderText() + "\n"); } + // Slide text TextRun[] runs = slide.getTextRuns(); for(int j=0; j 0) { for(int j=0; j