Unplanned
Last Updated: 14 Jul 2017 15:45 by ADMIN
ADMIN
Boby
Created on: 09 Aug 2016 10:27
Category: WordsProcessing
Type: Bug Report
2
WordsProcessing: Paragraphs which are removed from list by applying direct formatting are added to the list on import from Docx
If Paragraph has applied style, and this style has associated list, and the paragraph is removed from the list locally, then on import the paragraph is added to the list.

The additional numbering could be removed from the paragraph by changing its style:

foreach (var p in this.document.EnumerateChildrenOfType<Paragraph>())
{
    if (p.ListLevel == 0)
    {
        var style = new Telerik.Windows.Documents.Flow.Model.Styles.Style("NoListStyle", StyleType.Paragraph);
        style.ParagraphProperties.CopyPropertiesFrom(this.document.StyleRepository.GetStyle(p.StyleId).ParagraphProperties);
        style.ParagraphProperties.ListId.LocalValue = null;
        style.ParagraphProperties.ListLevel.LocalValue = null;
        p.StyleId = "NoListStyle";
    }
}
0 comments