diff options
author | László Németh <nemeth@numbertext.org> | 2021-09-07 15:57:35 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-09-08 15:28:00 +0200 |
commit | 99059a1ececa3621c2fe46fabdd79eed9d626c42 (patch) | |
tree | 2f34d312d7a32dae47f61f2c20d8553e0bb0c222 /sw/source/core/unocore/unocrsrhelper.cxx | |
parent | 160b6db92cc94f2ec2447ae0e9c60c8c9dcf3bad (diff) |
tdf#143359 sw: track deletion of empty table rows
Empty table rows were deleted immediately during
change tracking, or in the case of a deleted table
also with non-empty rows, accepting table deletion
kept empty rows.
Note: as a workaround for tracking of the empty rows,
i.e. rows without text content, add a redline with
invisible text ZWJ in the first cell of the empty row.
See also commit a483a44ca00f43a64ae51d62b8fbb4129a413f6d
"tdf#143215 DOCX import: fix tracked empty row insertion/deletion",
commit b50d386dfa70f7c1d4eb1a49091ec9dd782b767b
"tdf#142701 track changes: fix layout regression of image deletion"
and commit 05366b8e6683363688de8708a3d88cf144c7a2bf
"tdf#60382 sw offapi: add change tracking of table/row deletion".
Note: switch off unnecessary redlining of tdf#132744 unit test
to keep the sake of that test (i.e. cut of the selected table
with empty rows).
Change-Id: Ief59008e8714fb88afdfce867598e3dda21bfba5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121784
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source/core/unocore/unocrsrhelper.cxx')
-rw-r--r-- | sw/source/core/unocore/unocrsrhelper.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index be694be3ce65..e8e6c40ef702 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -35,6 +35,7 @@ #include <svx/unoshape.hxx> #include <cmdid.h> +#include <hintids.hxx> #include <unotextrange.hxx> #include <unodraw.hxx> #include <unofootnote.hxx> @@ -1411,11 +1412,12 @@ void makeTableRowRedline( SwTableLine& rTableLine, SvxPrintItem aSetTracking(RES_PRINT, false); SwNodeIndex aInsPos( *(rTableLine.GetTabBoxes()[0]->GetSttNd()), 1 ); // as a workaround for the rows without text content, - // add a redline with invisible text ZWJ + // add a redline with invisible text CH_TXT_TRACKED_DUMMY_CHAR if ( rTableLine.IsEmpty() ) { SwPaM aPaM(aInsPos); - pDoc->getIDocumentContentOperations().InsertString( aPaM, u"" ); + pDoc->getIDocumentContentOperations().InsertString( aPaM, + OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR) ); aPaM.SetMark(); aPaM.GetMark()->nContent.Assign(aPaM.GetContentNode(), 0); makeRedline(aPaM, RedlineType::TableRowInsert == eType |