Problems while copying numbered list from source ODT document to a target document

We have recently upgraded to last versions of Aspose Words for Java.
After the upgrade we are receiving many reports of problems while copying the content of an ODT document into a bookmark of a target ODT document. The problems arise when the source document contains numbered lists.
In the final document the numbering of the numbered lists is lost or changed.
The formatting and indentation of the lists in the target document is also altered.

This is the numbered list in the source document:

and this in the final document:


(in red numbered list problems, in blue other formatting issues with bulleted list items)

Here’s a sample code to reproduce the problem (in attach example files)
TEST_documents.zip (71.6 KB)

public static void main(String[] args) throws Exception
  {
    String path = "c:"; // documents path
    
    testDocumentBookmarks(path+"TEST_testo.odt", path+"TEST_Verbale_modello.odt", "TESTO", path+"TEST_Verbale_compilato.odt");
  }

  private static void testDocumentBookmarks(String sourceFilename, String templateFilename, String bookmarkName, String outputFilename) throws Exception
  {
    // Carica il documento di origine (ODT)
    Document sourceDoc = new Document(sourceFilename);

    // Carica il documento di destinazione (ODT)
    Document destDoc = new Document(templateFilename);


    boolean ret = importDocumentOri(sourceDoc, destDoc, bookmarkName);
    if (!ret) return;

    // Salva il documento di destinazione aggiornato (in formato ODT)
    destDoc.save(outputFilename);
    System.out.println("Output file written: "+outputFilename);
  }

  private static boolean importDocumentOri(Document sourceDoc, Document destDoc, String bookmarkName) throws Exception
  {
    // COPY
    Document clipboard = sourceDoc.deepClone();

    // SELECT A BOOKMARK    
    Bookmark bm = destDoc.getRange().getBookmarks().get(bookmarkName);
    if (bm == null) {
        System.out.println("E' stato richiesto di inserire un valore dentro il bookmark " + bookmarkName + ", ma questo non pare esistere nel documento.");
        return false;
    } 
     
    BookmarkStart start = bm.getBookmarkStart();
    
    // PASTE        
    DocumentBuilder builder = new DocumentBuilder(destDoc);
    builder.moveTo(start);
    
    builder.insertDocument(clipboard, ImportFormatMode.KEEP_SOURCE_FORMATTING);
    return true;
  }

The expected behaviour is to have the numbered lists in the target document with same numering and formatting of the source document.

Please help us to resolve this issue as we cannot downgrade to old vesions of the library.

@fabio.parise
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-28270

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thank you.
Is there any way to get this issue fixed in the next release of Aspose Words for Java?

@fabio.parise Unfortunately, we cannot promise you anything at the moment. The issue is currently in the queue for analysis.
By the way the problem is reproducible by simple open/save TEST_testo.odt document using Aspose.Words.

Can you suggest any temporary workarounds while waiting for the fix?

@fabio.parise I am afraid, there is no workaround of the problem.

Hello. We are having a lot of issues with several customers for this problem.
We need to find a workaround. Numbered lists are getting corrupted with random behavior.
Bullets become numbers or letters and vice versa with seemingly nonsensical behavior.

Is there a way to programmatically detect when list formattings get corrupted?

@fabio.parise

Unfortunately, there is no way to detect this programmatically, since corruption occurs upon loading document into Aspose.Words DOM.

I have asked the development team to take a look at the issue as soon as possible. Please accept our apologies for your inconvenience.