Hi Alexey
please find a definitive example of the bug in the linked C# project (I removed the licence files, please re-add it) to be supplied to your team.
There are only 4 bookmark. Please look at “table3” bookmark which should remove 4 rows in a table which are orange highlighted.
If you use Aspose 22.8, the bookmark is removed but the rows are not. Instead, using Aspose 18.1, all is working and the rows are removed. Please check the resulting files Test_RemoveMultipleRowsTable_save_v18.docx and Test_RemoveMultipleRowsTable_save_v22.docx in the Debug folder.
I analyzed the code and I noticed that for this bookmark
Aspose.Words.Node.NodeTypeToString(bm.BookmarkStart.ParentNode.ParentNode.ParentNode.NodeType = “Selection” for Aspose 22.8 and “Row” for 18.1. This I think is part of the bug.
I can also observe that the problem does not occur for “table2” bookmark, which is apparently rather similar (two rows in a table). In this case, also for versione 22.8 the NodeType = “Row”. Strange, but I found out the difference and demonstrated that:
-
if I create the bookmark clicking+shift on the cell and then out of the table on the right of the last table row selecting the rows (as in “table3” bookmark) the rows are not canceled,
-
instead if I create the bookmark clicking not on the cell but on the left+shift of the first row and then out of the table on the right of the last table row selecting the rows (as in “tablee2” bookmark), the rows are correctly removed.
This is true only for version 22.8 (version 18.1 works independently from how I create the bookmark).
This is the link to the project
https://www.dropbox.com/s/9npvmlfb51oqj52/AsposeTest_simple.zip?dl=0
Please contact me if needed, we can also organize a meeting to show you, if something is not clear.
Best regards