Declined
Last Updated: 03 May 2016 10:35 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 12 Oct 2015 12:22
Category:
Type: Bug Report
0
Moved to TDP: FIX. RadWordsProcessing - cloning document containing fields without Separator causes NullReferenceException
Workaround:

      private static void WorkaroundFieldsIssue(RadFlowDocument flowdocument)
        {
            foreach (FieldCharacter fieldCharacter in flowdocument.EnumerateChildrenOfType<FieldCharacter>().ToList())
            {
                // only for start
                if (fieldCharacter.FieldCharacterType == FieldCharacterType.Start)
                {
                    if (fieldCharacter.FieldInfo.Separator != null && fieldCharacter.FieldInfo.Separator.Parent == null)
                    {
                        Paragraph parent = fieldCharacter.FieldInfo.End.Paragraph;
                        int index = parent.Inlines.IndexOf(fieldCharacter.FieldInfo.End);

                        fieldCharacter.FieldInfo.End.Paragraph.Inlines.Insert(index, fieldCharacter.FieldInfo.Separator);
                    }
                }
            }
        }
This item is migrated to the Telerik Document Processing portal: 
http://feedback.telerik.com/Project/184/Feedback/Details/190083 
Please use the new item for commenting, voting and subscribing instead of this one.
0 comments