This is a migrated thread and some comments may be shown as answers.

Empty paragraph in ToC target - ToC broken

2 Answers 63 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 14 Dec 2012, 04:21 PM
Hi

I'm using the latest released 1129 build.  Create a new document.

Add text such as

"Heading 1

Heading 2"

Highlight all, set to Heading 1 style.

Generate ToC.  This will not work.  The code throws an exception during InsertTableOfContentsCommand.PrepareExecuteCore(). 

This seems to be because empty paragraphs are skipped and no bookmark added to "paragraphToBookmark" dictionary, but the later foreach loop that iterates the paragraphs and gets bookmark names from this dictionary doesn't skip any paragraphs - so the empty ones will throw an exception, as they aren't in the dictionary.

2 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 19 Dec 2012, 05:29 PM
Hello Charles,

Thank you for reporting this issue. We will log it and try to address it soon.

We have updated your Telerik points as a token of appreciation for reporting this issue and taking the time to investigate yourself what is wrong with the implementation.

Kind regards,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Iva Toteva
Telerik team
answered on 20 Dec 2012, 04:49 PM
Hi Charles,

Actually this bug has already been fixed in an internal build, so if you download the LIB from your account, you should no longer experience this problem.

All the best,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Charles
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or