summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-02-15 14:54:50 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-02-16 10:09:27 +0530
commit7d04c367158039f18f04b0b9e1157829e5e6e082 (patch)
treedd6b453d3028335ca77691ac696908f757d70ad8 /sc
parent4a22a8f16d144681d8a802a407f9aec43ca4a190 (diff)
sc lok: comments: Use tab.rowcolumn string as postit id
Change-Id: I5eaa7c82239ab65a567a893d76c68468cf116469
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index f506fa5fe1a8..71a87539cf4d 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -982,7 +982,7 @@ OUString ScModelObj::getPostIts()
if (!pDocShell)
return OUString();
- const ScDocument& rDoc = pDocShell->GetDocument();
+ ScDocument& rDoc = pDocShell->GetDocument();
std::vector<sc::NoteEntry> aNotes;
rDoc.GetAllNoteEntries(aNotes);
@@ -990,7 +990,11 @@ OUString ScModelObj::getPostIts()
for (const sc::NoteEntry& aNote : aNotes)
{
boost::property_tree::ptree aAnnotation;
- aAnnotation.put("id", aNote.maPos.hash());
+ OStringBuffer aBuf;
+ aNote.maPos.Format(aBuf, ScRefFlags::VALID | ScRefFlags::TAB_3D, &rDoc,
+ ScAddress::Details(formula::FormulaGrammar::AddressConvention::CONV_ODF, aNote.maPos));
+
+ aAnnotation.put("id", aBuf.toString());
aAnnotation.put("author", aNote.mpNote->GetAuthor());
aAnnotation.put("dateTime", aNote.mpNote->GetDate());
aAnnotation.put("text", aNote.mpNote->GetText());