From d09ecf579cd4824736bc62fcf4577318fcd0bcf1 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Tue, 5 Aug 2008 16:33:07 +0000 Subject: [PATCH] Start on bug #45537 - headers and footers from ppt git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@682778 13f79535-47bb-0310-9956-ffa450edef68 --- .../hslf/extractor/PowerPointExtractor.java | 10 +++++ .../org/apache/poi/hslf/data/45537_Footer.ppt | Bin 0 -> 13312 bytes .../org/apache/poi/hslf/data/45537_Header.ppt | Bin 0 -> 12288 bytes .../poi/hslf/extractor/TextExtractor.java | 35 ++++++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 src/scratchpad/testcases/org/apache/poi/hslf/data/45537_Footer.ppt create mode 100644 src/scratchpad/testcases/org/apache/poi/hslf/data/45537_Header.ppt 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 9dddb700b..95900a45e 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java +++ b/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java @@ -175,6 +175,12 @@ public class PowerPointExtractor extends POIOLE2TextExtractor if(getSlideText) { for(int i=0; i<_slides.length; i++) { Slide slide = _slides[i]; + + HeadersFooters hf = slide.getHeadersFooters(); + if(hf != null && hf.getHeaderText() != null) { + ret.append(hf.getHeaderText() + "\n"); + } + TextRun[] runs = slide.getTextRuns(); for(int j=0; jNO zww8k0MGz2M2-8fV%9QdW6HqXWs9^c&j3N~y1T0Q*7@7_`6i`{P7FwX|_ucz$vb)(W zn+n)!@6Or#f9^Two_p@O@7|$jYliQ5@VMQQ7v_m02Q!sYo>gukO;8~uQiBBZ2Q!(B zE)+rXSU8F#@BwI@g2{6L0YDjmb6x=m0xAJjfC+$Vz(l|#fD3>M$TR@wzYg(az*Ila zvU)##6p7>ij?@bzj$cwdIY+t>Cu9v~t@JPz8e@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