Dialogs missing after saving document as flat XML (.fodt)

I want to track changes using a VCS (i.e. Git) for a database input form built with LibreOffice Writer(*) and tried saving the document as a flat XML ODT file (.fodt) as described in the Wiki

After saving the document, all dialogs are lost (whereas the wiki states: “If a document is saved as .fodt file it keeps the same data the .odt file would contain.”)

Is there a VCS-friendly way of saving a Writer document with all macros, dialogs, etc.?

Steps to reproduce:

  1. Create a new Writer document
  2. Open “Tools” > “Macros” > “Organize Dialogs…”
  3. Select the newly created document (e.g. “Untitled 1”)
  4. Click “New…”
  5. Confirm with “OK” (The name does not matter)
  6. The “Dialog:” tree should look similar to this:
    • My Dialogs
    • LibreOffice Dialogs
    • Untitled 1
      • Standard
        • Dialog1
  7. Close the “LibreOffice Basic Macro Manager”
  8. (optional)
  • Save the document as a “normal” OpenDocument text file (*.odt)
  • Close the document
  • Open the document again
  • Confirm the dialog still exists (“Tools” > “Macros” > “Organize Dialogs…”)
  1. Save the document as a flat XML document (*.fodt)
  2. (optional) Confirm the dialog still exists (“Tools” > “Macros” > “Organize Dialogs…”)
  3. Close the document
  4. Open the .fodt document again
  5. The dialog is missing in “Tools” > “Macros” > “Organize Dialogs…”

Windows 10 64bit, LibreOffice 6.1.6 and 6.2.5

PS: The problem also applies to Calc spreadsheets saved as *.fods

(*) Not my decision to use LO Writer for this scenario, but I have to maintain it

The wiki doesn’t mention some known shortcomings of the flat format (e.g., tdf#63642 which I’ll add there shortly). In any case, you should file a new bug related to the problem you facing (attaching a sample ODT/ODS which looses part of data when saved as FODT/FODS).

Thank you, I have filed an issue in the bugtracker

Please mention the bug # here for the record. Thanks!

Bug #126772