Hi,
I am using Spire.Officefor.NETStandard 7.2.3 with Dotnet 6.03 on Windows and have noticed quite a few regressions. I am putting them in separate topics to help better track them.
Code like:
....
var listStyle =
new ListStyle(document, Spire.Doc.Documents.ListType.Numbered)
{
Name = listStyleName
};
for (var i = 0; i < 7; i++)
{
listStyle.Levels[i].PatternType = docPatternType;
listStyle.Levels[i].NumberPrefix = listNumberPrefix;
listStyle.Levels[i].NumberSufix = listNumberSuffix;
listStyle.Levels[i].IsLegalStyleNumbering = isLegalStyleNumbering;
var orderedListLevel = new OrderedListLevels
{
ListStyleName = listStyleName,
MarginLeft = string.Empty,
ListLevel = i
};
OrderedListLevelsList.Add(orderedListLevel);
}
document.ListStyles.Add(listStyle);
is normally used to generate list styles which are then applied when word lists are created (ordered in this case, but the same happens with unordered). Under the dotnet version of Spire.Office, this works perfectly. Under the netstandard version neither the Prefix nor the Suffix are applied. I have not tested all the properties, so there may be others that also do not work.
The workaround is to instead apply them with each list item instead of letting the style take care of it.
Cheers,
Alex