summaryrefslogtreecommitdiff
path: root/sd/source/ui/annotations
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-02-21 15:20:45 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-02-21 15:30:50 +0530
commitede35e5c693a287f31e3c02d8afd33580e827380 (patch)
treeef5ad251ad1ae41f0412b4b68313529422a33926 /sd/source/ui/annotations
parent0e21f6619c72f1e17a7b0a52b6317810973d8a3e (diff)
sd lok: Include parthash in annotation list and callbacks
... and update the tests accordingly. Change-Id: Id11f2d19274e743b0e2a0bbeb0c21936f12b7777
Diffstat (limited to 'sd/source/ui/annotations')
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 8d8c88304d1c..e4d593f36562 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -122,13 +122,15 @@ namespace {
(nType == CommentNotificationType::Remove ? "Remove" :
(nType == CommentNotificationType::Modify ? "Modify" : "???"))));
aAnnotation.put("id", sd::getAnnotationId(rxAnnotation));
- if (nType != CommentNotificationType::Remove)
+ if (nType != CommentNotificationType::Remove && rxAnnotation.is())
{
aAnnotation.put("id", sd::getAnnotationId(rxAnnotation));
aAnnotation.put("author", rxAnnotation->getAuthor());
aAnnotation.put("dateTime", utl::toISO8601(rxAnnotation->getDateTime()));
uno::Reference<text::XText> xText(rxAnnotation->getTextRange());
aAnnotation.put("text", xText->getString());
+ const SdPage* pPage = sd::getAnnotationPage(rxAnnotation);
+ aAnnotation.put("parthash", pPage ? OString::number(pPage->GetHashCode()) : OString());
}
boost::property_tree::ptree aTree;