EvotecIT / OfficeIMO

Fast and easy to use cross-platform .NET library that creates or modifies Microsoft Word (DocX) and later also Excel (XLSX) files without installing any software. Library is based on Open XML SDK
MIT License
280 stars 50 forks source link

When I am upgrading from 0.4.0 to 0.4.1 Lists do not show up anymore #82

Closed surematu closed 1 year ago

surematu commented 1 year ago

Hello. I'm sorry but I do not really know how to publish a issue in github, so please ask if any more information is needed.

What I do: Run the code example for an advance document from the readme, also tried the exmaple where Tried with .net 4.7.2, .net 5, .net 6 and .net 7. They all return the same issue.

Also tried the list code that was updated 18 days ago, where it describe some of the same issue, lists not appearing.

62 Fix not saving list when save to Stream

OfficeIMO/OfficeIMO.Examples/Word/Lists/Lists.Create2.cs

Issue: On version 0.4.0 tittles, lists and TOC appears like normal. When I run the code example after upgrading to 0.4, text from the list appears, but not the bulletpoint itself. The titles lacks formating. See picture bellow.

Picture: image

PrzemyslawKlys commented 1 year ago

It does seem broken. Could be related to change

PrzemyslawKlys commented 1 year ago

I can confirm this is related to change in #76. Rewerting whole class brings back numbering

image

PrzemyslawKlys commented 1 year ago

Ok, so the issue is the order of run and paragraph properties does matter.

Proper order is:

In the @rstm-sf PR the order is:

image

When it should be:

image

PrzemyslawKlys commented 1 year ago

The PR fixes the issue, but we need to add more tests for cases like this,, to check order of paragraphs objects.

This can be visible if we open up XML and validate document.

image