[Libreoffice-commits] core.git: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 7 07:26:42 UTC 2018
sd/source/core/sdpage2.cxx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit 2c8ef031af56f5e787e7984e746ffb8b65bf0a5b
Author: Paul Trojahn <paul.trojahn at gmail.com>
AuthorDate: Sun Nov 4 23:07:45 2018 +0100
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Dec 7 08:26:17 2018 +0100
tdf#63029 Copy and paste comments with slide
Change-Id: Iceb0e744f8e994ece91cd8f50fefaed631aa8396
Reviewed-on: https://gerrit.libreoffice.org/64126
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 0744eca27585..996f9760f121 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -30,6 +30,7 @@
#include <svl/urihelper.hxx>
#include <editeng/xmlcnitm.hxx>
#include <svx/svditer.hxx>
+#include <com/sun/star/text/XTextCopy.hpp>
#include <Annotation.hxx>
#include <notifydocumentevent.hxx>
@@ -391,6 +392,22 @@ void SdPage::lateInit(const SdPage& rSrcPage)
// animations
rSrcPage.cloneAnimations(*this);
+ // annotations
+ for(const Reference< XAnnotation >& srcAnnotation : rSrcPage.maAnnotations)
+ {
+ Reference< XAnnotation > ref;
+ createAnnotation(ref);
+ ref->setPosition(srcAnnotation->getPosition());
+ ref->setSize(srcAnnotation->getSize());
+ ref->setAuthor(srcAnnotation->getAuthor());
+ ref->setInitials(srcAnnotation->getInitials());
+ ref->setDateTime(srcAnnotation->getDateTime());
+ Reference< ::css::text::XTextCopy > srcRange ( srcAnnotation->getTextRange(), uno::UNO_QUERY);
+ Reference< ::css::text::XTextCopy > range ( ref->getTextRange(), uno::UNO_QUERY);
+ if(srcRange.is() && range.is())
+ range->copyText( srcRange );
+ }
+
// fix user calls for duplicated slide
SdrObjListIter aSourceIter( &rSrcPage, SdrIterMode::DeepWithGroups );
SdrObjListIter aTargetIter( this, SdrIterMode::DeepWithGroups );
More information about the Libreoffice-commits
mailing list