Apache OpenOffice (AOO) Bugzilla – Issue 96531
URL containing brackets not handled properly by Autocorrect
Last modified: 2017-05-20 11:17:42 UTC
If I paste an URL containing a pair of brackets into a Writer document, the auto-insertion function leaves out the closing bracket. The effect is not immediate, but when I convert the document to pdf, and then try to print the pdf with Adobe Reader (Version 8.1.3), the print fails. The Error message reads "The document could not be printed"). Example: The URL "http://en.wikipedia.org/wiki/Layers_(digital_image_editing)" gets truncated to "http://en.wikipedia.org/wiki/Layers_(digital_image_editing" This error seems to be very similar to the error 58011 reported in 2005 that was (or should have been) fixed in OOo 2.0.1
MRU->OS: could you please have a look whether this is a problem of the Autoformat of the Break iterator? When entering a link like www.blabla.hallo(wach) the closing bracket won't be regarded for the link formatting.
->sb: AutoCorrect uses URIHelper::FindFirstURLInText()
That the final ")" is not part of the hyperlink but just plain text is probably indeed due to URIHelper::findFirstURLInText. As greenrd2004 put it in issue 58011: "this URL was auto-recognised by OpenOffice when I pasted it, but the auto-recognising code didn't include the closing bracket (probably for good heuristic reasons, because most of the time a closing bracket in pasted text *isn't* part of a URL)." Indeed, the heuristic used to detect URLs is not (and cannot be) perfect. However, I assume the main problem of voschix (correct me if I am wrong) in this issue is that the resulting PDF document cannot be printed---which indeed looks like issue 58011. And I doubt the reason for *that* problem is the behavior of URIHelper::findFirstURLInText.
I have done some more tests, using Firefox 3.0.4, Adobe Reader 8.1.3, CutePDF 2.7, Adobe Acrobat Standard 6.0. Things are getting more confused. The link with both brackets: "http://en.wikipedia.org/wiki/Layers_(digital_image_editing)" opens from OpenOffice.org Writer correctly the page “http://en.wikipedia.org/wiki/Layers_(digital_image_editing)†The OO.o pdf function translates this double bracket link into: “http://en.wikipedia.org/wiki/Layers_%5C(digital_image_editing%5C)†which opens this page from Adobe Reader: http://en.wikipedia.org/wiki/Layers_\(digital_image_editing\) The pdf prints fine from Adobe Reader. The link with the closing bracket missing (as produced by the auto-insertion function of OO.o): "http://en.wikipedia.org/wiki/Layers_(digital_image_editing" opens this page when ctrl-clicked in OO.o Writer: “http://en.wikipedia.org/wiki/Layers_(digital_image_editing†The OO.o pdf function translates this single-bracket link into: “http://en.wikipedia.org/wiki/Layers_†which from Adobe Reader opens this page: “http://en.wikipedia.org/wiki/Layers†However the pdf document that contains this link refuses to print from Adobe Reader with the unspecific error message: “The document could not be printed†If I use CutePDF or Acrobat Writer to create the pdf from the OO.o Writer and not the built-in pdf function the result is different: The link created in the pdf looks the same: “http://en.wikipedia.org/wiki/Layers_†but it prints ok from Adobe Reader.
@hdu,pl: Wild guess is that there is some problem writing unbalanced parentheses to PDF (as at least in PostScript parentheses have special meaning---no idea whether that is true in PDF as well).
Reset assigne to the default "issues@openoffice.apache.org".