Page 1 of 1

issue-#184 HYPERLINK ignored in RTF import

Posted: Wed Mar 14, 2018 9:27 am
by Josef Templ
Based on the report by Helmut I have created https://redmine.blackboxframework.org/issues/184.

- Josef

Re: issue-#184 HYPERLINK ignored in RTF import

Posted: Wed Mar 14, 2018 1:02 pm
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

Re: issue-#184 HYPERLINK ignored in RTF import

Posted: Thu Mar 15, 2018 7:08 am
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

Re: issue-#184 HYPERLINK ignored in RTF import

Posted: Thu Mar 15, 2018 7:44 am
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

Re: issue-#184 HYPERLINK ignored in RTF import

Posted: Mon Mar 19, 2018 10:50 am
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

Re: issue-#184 HYPERLINK ignored in RTF import

Posted: Mon Mar 19, 2018 11:05 am
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.

Re: issue-#184 HYPERLINK ignored in RTF import

Posted: Mon Mar 19, 2018 12:00 pm
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 ...