diff options
author | Alain Béarez <abearez@apache.org> | 2021-02-08 20:34:14 +0000 |
---|---|---|
committer | Alain Béarez <abearez@apache.org> | 2021-02-08 20:34:14 +0000 |
commit | 4cf6b5b071f53e884a9ef1cd2fb7c74046fb878d (patch) | |
tree | be97afb89a6d09da87d9896ed93ca88c1fcc9993 /src/ooxml/java/org | |
parent | db962309b990e766095eebd98cad42389572d15b (diff) | |
download | poi-4cf6b5b071f53e884a9ef1cd2fb7c74046fb878d.tar.gz poi-4cf6b5b071f53e884a9ef1cd2fb7c74046fb878d.zip |
Import slide notes when importing slide content
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886338 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org')
-rw-r--r-- | src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java | 7 | ||||
-rw-r--r-- | src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java index f84e30699e..5a267595e2 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java @@ -143,7 +143,10 @@ public abstract class XSLFShape implements Shape<XSLFShape,XSLFTextParagraph> { if (this instanceof PlaceableShape) { PlaceableShape<?,?> ps = (PlaceableShape<?,?>)this; - ps.setAnchor(sh.getAnchor()); + Rectangle2D anchor = sh.getAnchor(); + if (anchor != null) { + ps.setAnchor(anchor); + } } @@ -485,4 +488,4 @@ public abstract class XSLFShape implements Shape<XSLFShape,XSLFTextParagraph> { protected XmlObject getShapeProperties() { return getChild(CTShapeProperties.class, PML_NS, "spPr"); } -}
\ No newline at end of file +} diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java index 1bf2b60fbf..c126afdd7a 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java @@ -295,6 +295,11 @@ implements Slide<XSLFShape,XSLFTextParagraph> { return this; } + XSLFNotes srcNotes = ((XSLFSlide)src).getNotes(); + if (srcNotes != null) { + getSlideShow().getNotesSlide(this).importContent(srcNotes); + } + // only copy direct backgrounds - not backgrounds of master sheet CTBackground bgOther = ((XSLFSlide)src)._slide.getCSld().getBg(); if (bgOther == null) { |