diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2018-04-20 13:45:18 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2018-04-20 13:45:18 +0000 |
commit | 7ddef62cc460b9215503d0855014eb843f81bb8a (patch) | |
tree | 109f07c1ebb5695bd1447b5ece92489713e92d12 /src/testcases/org/apache/poi/sl/usermodel | |
parent | e81613175907a4f6f7d135c57cb412c78ea1db72 (diff) | |
download | poi-7ddef62cc460b9215503d0855014eb843f81bb8a.tar.gz poi-7ddef62cc460b9215503d0855014eb843f81bb8a.zip |
#61459 - HSLFShape.getShapeName() returns name of shapeType and not the shape name
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1829656 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/sl/usermodel')
-rw-r--r-- | src/testcases/org/apache/poi/sl/usermodel/BaseTestSlideShow.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/sl/usermodel/BaseTestSlideShow.java b/src/testcases/org/apache/poi/sl/usermodel/BaseTestSlideShow.java index 47b886e174..347ea73a6c 100644 --- a/src/testcases/org/apache/poi/sl/usermodel/BaseTestSlideShow.java +++ b/src/testcases/org/apache/poi/sl/usermodel/BaseTestSlideShow.java @@ -157,4 +157,19 @@ public abstract class BaseTestSlideShow { } } } + + @Test + public void shapeName() throws IOException { + final String file = "SampleShow.ppt"+(getClass().getSimpleName().contains("XML")?"x":""); + try (final InputStream is = slTests.openResourceAsStream(file)) { + try (final SlideShow<? extends Shape, ?> ppt = SlideShowFactory.create(is)) { + final List<? extends Shape> shapes1 = ppt.getSlides().get(0).getShapes(); + assertEquals("The Title", shapes1.get(0).getShapeName()); + assertEquals("Another Subtitle", shapes1.get(1).getShapeName()); + final List<? extends Shape> shapes2 = ppt.getSlides().get(1).getShapes(); + assertEquals("Title 1", shapes2.get(0).getShapeName()); + assertEquals("Content Placeholder 2", shapes2.get(1).getShapeName()); + } + } + } } |