bug 62591 -- revert to ignoring place holders even if they contain metroblobs in ppt
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1837742 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7b8ff720f4
commit
5e241fdd3c
@ -704,10 +704,7 @@ implements TextShape<HSLFShape,HSLFTextParagraph> {
|
|||||||
return
|
return
|
||||||
((getPlaceholderAtom() != null) ||
|
((getPlaceholderAtom() != null) ||
|
||||||
//special case for files saved in Office 2007
|
//special case for files saved in Office 2007
|
||||||
(getHFPlaceholderAtom() != null)) &&
|
(getHFPlaceholderAtom() != null));
|
||||||
// check for metro shape of complex placeholder
|
|
||||||
(!new HSLFMetroShape<HSLFShape>(this).hasMetroBlob())
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -309,7 +309,6 @@ public final class TestExtractor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
@Test
|
@Test
|
||||||
public void testSlideMasterText() throws IOException {
|
public void testSlideMasterText() throws IOException {
|
||||||
String masterTitleText = "This is the Master Title";
|
String masterTitleText = "This is the Master Title";
|
||||||
@ -320,7 +319,25 @@ public final class TestExtractor {
|
|||||||
|
|
||||||
String text = ppe.getText();
|
String text = ppe.getText();
|
||||||
assertContains(text, masterRandomText);
|
assertContains(text, masterRandomText);
|
||||||
assertContains(text, masterFooterText);
|
assertNotContained(text, masterTitleText);
|
||||||
|
|
||||||
|
//make sure that the footer only appears once
|
||||||
|
int masterFooters = 0;
|
||||||
|
int offset = text.indexOf(masterFooterText);
|
||||||
|
while (offset > -1) {
|
||||||
|
masterFooters++;
|
||||||
|
offset = text.indexOf(masterFooterText, offset+1);
|
||||||
|
}
|
||||||
|
assertEquals(1, masterFooters);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSlideMasterText2() throws IOException {
|
||||||
|
try (final SlideShowExtractor ppe = openExtractor("bug62591.ppt")) {
|
||||||
|
ppe.setMasterByDefault(true);
|
||||||
|
String text = ppe.getText();
|
||||||
|
assertNotContained(text, "Titelmasterformat");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
test-data/slideshow/bug62591.ppt
Normal file
BIN
test-data/slideshow/bug62591.ppt
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user