summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorGökay Şatır <gokaysatir@gmail.com>2023-09-01 09:49:53 +0300
committerMiklos Vajna <vmiklos@collabora.com>2023-09-12 17:09:18 +0200
commit62cc2217217650d23c72e4646ccd793f76722d94 (patch)
treed7e0d86f0a0135b1ee75bd1e3634dec53f902119 /desktop
parentb8f6f91f476f1c3f93bb44265381305f6f02b161 (diff)
Added parent / child relationship to comments.
Adding parent name of a comment into odf file when there is a parent. Also includes: Added test case to comment property test. Change-Id: I033f6574b4875fcb76b16c8b5b9d9f7d55b52cbe Also includes: Add parent / child relations to replied comments. Change-Id: Ia7d95c4e6020b501798a89cbdcae64dc5691437c Change-Id: I08b5ab6eb11adcafcbf3559896d79d41b449b26a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156824 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/data/comments.odtbin9694 -> 10507 bytes
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx14
2 files changed, 7 insertions, 7 deletions
diff --git a/desktop/qa/data/comments.odt b/desktop/qa/data/comments.odt
index ee7f15f8b755..1bcdcc0385ea 100644
--- a/desktop/qa/data/comments.odt
+++ b/desktop/qa/data/comments.odt
Binary files differ
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 8a55ae18172d..8f90f3198b27 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2452,7 +2452,7 @@ void DesktopLOKTest::testCommentsWriter()
// This is a reply comment
else if (rComment.second.get<std::string>("text") == "Reply to Comment 2")
{
- CPPUNIT_ASSERT_EQUAL(nComment2Id, rComment.second.get<int>("parent"));
+ CPPUNIT_ASSERT_EQUAL(nComment2Id, rComment.second.get<int>("parentId"));
}
}
@@ -2594,8 +2594,8 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
// We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action and linked to its parent comment
CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView1.m_aCommentCallbackResult.get<std::string>("action"));
CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView2.m_aCommentCallbackResult.get<std::string>("action"));
- CPPUNIT_ASSERT_EQUAL(nCommentId1, aView1.m_aCommentCallbackResult.get<int>("parent"));
- CPPUNIT_ASSERT_EQUAL(nCommentId1, aView2.m_aCommentCallbackResult.get<int>("parent"));
+ CPPUNIT_ASSERT_EQUAL(nCommentId1, aView1.m_aCommentCallbackResult.get<int>("parentId"));
+ CPPUNIT_ASSERT_EQUAL(nCommentId1, aView2.m_aCommentCallbackResult.get<int>("parentId"));
CPPUNIT_ASSERT_EQUAL(std::string("Reply comment"), aView1.m_aCommentCallbackResult.get<std::string>("text"));
CPPUNIT_ASSERT_EQUAL(std::string("Reply comment"), aView2.m_aCommentCallbackResult.get<std::string>("text"));
int nCommentId2 = aView1.m_aCommentCallbackResult.get<int>("id");
@@ -2609,8 +2609,8 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
CPPUNIT_ASSERT_EQUAL(std::string("Modify"), aView1.m_aCommentCallbackResult.get<std::string>("action"));
CPPUNIT_ASSERT_EQUAL(std::string("Modify"), aView2.m_aCommentCallbackResult.get<std::string>("action"));
// parent is unchanged still
- CPPUNIT_ASSERT_EQUAL(nCommentId1, aView1.m_aCommentCallbackResult.get<int>("parent"));
- CPPUNIT_ASSERT_EQUAL(nCommentId1, aView2.m_aCommentCallbackResult.get<int>("parent"));
+ CPPUNIT_ASSERT_EQUAL(nCommentId1, aView1.m_aCommentCallbackResult.get<int>("parentId"));
+ CPPUNIT_ASSERT_EQUAL(nCommentId1, aView2.m_aCommentCallbackResult.get<int>("parentId"));
CPPUNIT_ASSERT_EQUAL(std::string("Edited comment"), aView1.m_aCommentCallbackResult.get<std::string>("text"));
CPPUNIT_ASSERT_EQUAL(std::string("Edited comment"), aView2.m_aCommentCallbackResult.get<std::string>("text"));
@@ -2633,8 +2633,8 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
// We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action and linked to its parent comment
CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView1.m_aCommentCallbackResult.get<std::string>("action"));
CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView2.m_aCommentCallbackResult.get<std::string>("action"));
- CPPUNIT_ASSERT_EQUAL(nCommentId1, aView1.m_aCommentCallbackResult.get<int>("parent"));
- CPPUNIT_ASSERT_EQUAL(nCommentId1, aView2.m_aCommentCallbackResult.get<int>("parent"));
+ CPPUNIT_ASSERT_EQUAL(nCommentId1, aView1.m_aCommentCallbackResult.get<int>("parentId"));
+ CPPUNIT_ASSERT_EQUAL(nCommentId1, aView2.m_aCommentCallbackResult.get<int>("parentId"));
CPPUNIT_ASSERT_EQUAL(std::string("Reply comment again"), aView1.m_aCommentCallbackResult.get<std::string>("text"));
CPPUNIT_ASSERT_EQUAL(std::string("Reply comment again"), aView2.m_aCommentCallbackResult.get<std::string>("text"));