Completed
Last Updated: 01 Sep 2021 12:10 by ADMIN
Release R1 2021
ADMIN
Deyan
Created on: 26 Apr 2016 13:10
Category: WordsProcessing
Type: Bug Report
0
WordsProcessing: List indentation is imported from RTF as local paragraph properties
When the indentation of a paragraph is coming from a list, the RTF format provider applies them to the paragraph as local properties.

This affects all conversions of documents containing lists from RTF to HTML.


Workaround: After importing the document check if the indentation of the paragraph is the same as the one coming from the list. Here is example on how this could be done:

RtfFormatProvider provider = new RtfFormatProvider(); 
RadFlowDocument document = provider.Import(stream); 

foreach (Paragraph paragraph in document.EnumerateChildrenOfType<Paragraph>()) 
{ 
List list = this.document.Lists.GetList(paragraph.ListId); 
if (paragraph.Indentation.HangingIndent == list.Levels[0].ParagraphProperties.HangingIndent.LocalValue) 
{ 
paragraph.Indentation.HangingIndent = Paragraph.HangingIndentPropertyDefinition.DefaultValue.Value; 
} 

if (paragraph.Indentation.FirstLineIndent == list.Levels[0].ParagraphProperties.FirstLineIndent.LocalValue) 
{ 
paragraph.Indentation.FirstLineIndent = Paragraph.FirstLineIndentPropertyDefinition.DefaultValue.Value; 
}
}
0 comments