issue-#86 improvements in RTF import

Merged to the master branch
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#86 improvements in RTF import

Post by Ivan Denisov »

Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#86 improvements in RTF import

Post by Zinn »

I test the new implementation of the table handling in RTF import.
It works better than the old one. Now the tabs are insert into the ruler at the correct position. That was in the old one missing.
One error I detect: there is an empty line between each table row. That means there is one new line too much after each end of row.
- Helmut
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#86 improvements in RTF import

Post by Josef Templ »

Thanks, Helmut. The CR for \row is not needed because it is emitted by Paragraph() anyway.
Removed.

In addition, openBrackets has been removed because it turned out not to be required.
The current context (con) can be used for detecting if a closing bracket belongs to a
hyperlink. The same principle is now also applied for detecting if a table row is being processed.

In addition, a subtle bug with the the detection of the end of an RTF import has been found and fixed (this bug must already have existed in BB1.6. It is hard to reproduce because it depends on random memory contents outside the control of of BB):
When importing via the Clipboard, the MemReader does not detect the end of the RTF data correctly but delivers undefined characters until it hits a 0X. Therefore, ParseRichText now terminates when the outermost bracket is closed.
I would appreciate a contents independent way of detecting the end of text because that could also be applied when dumping the RTF data instead of interpreting them. The dump may still contain random characters at the end.

For the changes see http://redmine.blackboxframework.org/pr ... 8360a4f3c5.

- Josef
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#86 improvements in RTF import

Post by Josef Templ »

\super and \sub use the current font size for proper scaling.
The option for 'hasNum' is not required and has been removed.
\fs also scales the font size when inside a super or sub.

For the changes see http://redmine.blackboxframework.org/pr ... 2ad7ce410b.

- Josef
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#86 improvements in RTF import

Post by Josef Templ »

I have not yet tested the changes regarding codepage support.
@Helmut: Have you tested it? Can you give me an example RTF file that needs this codepage support?

Otherwise, the changes look good to me now.

- Josef
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#86 improvements in RTF import

Post by Josef Templ »

From my point of view this issue is ready for voting.

- Josef
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#86 improvements in RTF import

Post by Josef Templ »

From my point of view this issue is ready for voting.

- Josef
Post Reply