issue-#184 HYPERLINK ignored in RTF import

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

issue-#184 HYPERLINK ignored in RTF import

Post by Josef Templ »

Based on the report by Helmut I have created https://redmine.blackboxframework.org/issues/184.

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

Re: issue-#184 HYPERLINK ignored in RTF import

Post by Josef Templ »

I have prepared a fix for this issue.

See diffs at https://redmine.blackboxframework.org/p ... 5e4e36379b.

There is a little difference to Helmut's proposal.
My approach is to do a full trim (trim left and trim right) of the field instruction.
This also solves the problem with the closing double quote, which is caused by a space
character appended. This way we are independent from any assumption about the
number of spaces appended.

A test version is available from http://blackboxframework.org/unstable/i ... 1.1017.zip.

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

Re: issue-#184 HYPERLINK ignored in RTF import

Post by Zinn »

Josef,
perfect solution. You kill two birds with one stone.
About my problem with html (cut & paste from browser to BlackBox): Is there also a simple solution that the hyperlink is copied too? Other formatting I currently don't care.
- Helmut
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#184 HYPERLINK ignored in RTF import

Post by Josef Templ »

Zinn wrote:Josef,
About my problem with html (cut & paste from browser to BlackBox): Is there also a simple solution that the hyperlink is copied too? Other formatting I currently don't care.
- Helmut
As far as I know, there is currently only the path over RTF import.
Importing html directly would require an html data converter.
If you already have an html file converter it should be possible to
use that as a foundation of a data converter. You mainly have to strip off the
preceding html fragment description.

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

Re: issue-#184 HYPERLINK ignored in RTF import

Post by Josef Templ »

Are there any further comments on this issue?

One comment from my side is this:
I have added the Trim procedure to HostTextConv, where it is needed for the fix.
An obvious alternative would be to add it to module Strings.
This would be a general purpose feature then.
Since there are more procedures (e.g. TrimLeft, TrimRight, StartsWith, EndsWith, Match) that could be added to
Strings, I tried to keep the changes at a minimum for now and avoid the discussion on Strings extensions.

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#184 HYPERLINK ignored in RTF import

Post by Robert »

Josef Templ wrote:Are there any further comments on this issue?
I have no particular comments. I do occasionally use RTF export, but probably never use RTF import!

I noticed that Trim looked a little out of place for a potentially generally useful function, but agree that moving it is a separate, and for me not urgent, discussion.
Bernhard
Posts: 68
Joined: Tue Sep 17, 2013 6:56 am
Location: Munich, Germany

Re: issue-#184 HYPERLINK ignored in RTF import

Post by Bernhard »

I am also quite unemotional about it here.
An obvious alternative would be to add it to module Strings.
This would be a general purpose feature then.
what about starting with a module StringUtils, which can be extended in the future with other general useful string utilities collecting them from places where these are used. I currently cannot foresee how much this would add at load time vs. saved lines of duplicated code. I also see that this might start lengthy discussions about what sould be included and what not, so I would say: go agead with it ...
Post Reply