summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unoredline.cxx
diff options
context:
space:
mode:
authorAttila Szűcs <attila.szucs@collabora.com>2023-10-17 09:31:22 +0200
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-29 19:30:43 +0100
commite4fb4937b3f75ce3544f8de354ed92f7dd314511 (patch)
tree680dc5473643210c9afbd467c446cd2ea59f8477 /sw/source/core/unocore/unoredline.cxx
parent81f36caea6acd3042d42625940a9396305f5569c (diff)
tdf#157663 SW: Tracked change improve move
Made accept/reject handle move redlines other pair, (moveto-movefrom) and handle the whole move redline, even if it is split into small pieces that separated from each other. Added unique ID to every move redline to help find their other parts. This move ID is generated in case of: move recognition moveing a paragraph. (directly create move redline with unique id without calling the recognition it is faster and more stable) (there are other cases that could be improved to not use recognition, but generate ID directly, like moveing selected partial text with mouse) Implemented the odt export/import of this move ID. it is a tag like this: "<loext:move-id>4</loext:move-id>" next to creator/date Improved the docx import to generate this move ID, so move redlines can find their other parts (Not changed Docx export... it works a bit, but far from perfect) Improved move reckognition: It can find them even if they are split into multiple parts differently. (like "ab"+"cd" == "a"+"bcd") Disabled this because of probably performance issue. made a complex unit test for it. Note: Left the move recognition on every place, to avoid as much regressions as possible.. but in the future, we may can disable it in some cases. Note2: We will have to keep move recognitnion, because there are documents from past, saved without any move informations in the file, and users expect to see move redlines there. (generated by the recognition.) Change-Id: If968d4235b676c5e538cfaf4187a4482a86eae9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158611 Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/unocore/unoredline.cxx')
-rw-r--r--sw/source/core/unocore/unoredline.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index b76368c15223..feeceec92b31 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -250,7 +250,9 @@ uno::Any SwXRedlinePortion::GetPropertyValue( std::u16string_view rPropertyName
{
aRet <<= rRedline.GetTimeStamp().GetUNODateTime();
}
- else if(rPropertyName == UNO_NAME_REDLINE_COMMENT)
+ else if (rPropertyName == UNO_NAME_REDLINE_MOVED_ID)
+ aRet <<= rRedline.GetMovedID();
+ else if (rPropertyName == UNO_NAME_REDLINE_COMMENT)
aRet <<= rRedline.GetComment();
else if(rPropertyName == UNO_NAME_REDLINE_DESCRIPTION)
aRet <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();