Created attachment 125349 [details] rtf-document gone blank Hello, This has happened with v5.1.1.2, the previous version (I think), and also Apache OpenOffice in their 2015/2016 versions. I believe it's the same thing on all the computers I've used LibreOffice and OpenOffice on (They are Mac OSX, Win 7 x32, Win 8 x64, Win 10 x64). I've tested doing this (with some small variations) 20 times in a row: Paste a link at the top of the rtf document, save and close Open, go to the start of the link, press enter and write something on the top line, save and close And the document goes blank again and again. Sometimes one line is left, and sometimes I can see a line in Preview but nothing in the open document. The attachment is just a blank file, but maybe you can see beyond that with your tools???! As I said, I've written stuff and saved it about 20 times so it SHOULD be something there, but I have no idea, hehe...
I can not reproduce in the following environment. OS: Debian jessie Version: 5.1.3.2 Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b CPU Threads: 4; OS Version: Linux 3.16; UI Render: default; Locale: en-US (ja_JP.utf8)
What do you mean? That everything works as it should on your system? Or that you can't see anything in the attached document? M.
I can not reproduce with Version: 5.3.0.0.alpha0+ Build ID: 33d4f7e5624d77ef1ce51aece1c8a0ef7ea21603 CPU Threads: 1; OS Version: Windows 6.1; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2016-05-29_01:58:16 and 5.1.3 Text is not lost. In your RTF file I see the link (not in writer, but when open with notepad). Please could you attach video with reproduction steps, maybe we missed something. Thank you.
I also cannot reproduce this bug with version 5.2.0.0alpha1+ in Windows 10. I opened the attached file in notepad++ and saw a link, but when I opened it in writer, the document was blank. I also preformed the following test. As Raal said, could you go more into detail about the reproduction steps and your environment? Steps to reproduce: 1. Open then attached RTF document (it is blank in writer) 2. Type in a URL, save the document in RTF format, and close it. 3. Open the RTF document again 4. Press enter while the text input cursor is in front of the URL 5. Type some words in the line above the URL 6. Save the document and close it again. 7. Reopen the document Expected Result: the document has the words typed in step 5, followed by the URL in the next line Actual Result: the document has the words typed in step 5, followed by the URL in the next line Version: 5.2.0.0.alpha1+ Build ID: cc1a0ba927ad6f85103059aa8e6108017f436304 CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-05-17_02:31:19 Locale: en-US (en_US)
Created attachment 125512 [details] Screencast of document going blank and then not Probably goes without saying, but to be 100% clear: I used Cmd + V, cmd + S and cmd + W
Sorry for delayed reply. As I said before, this happens in different environments: - Mac 10.9.5, Version: 5.1.2.2. It happens also with Apache OpenOffice - except in OpenOffice the words written above the link is still there when I open the document. - Win 8.1, Version 5.1.2.2, also OpenOffice - Win 10, Version 5.1.2.2 and 5.1.3, also OpenOffice I just do this: Type a link on top of the document Press enter while the text input cursor is in front of the URL Write something on the line above the URL Save (as rtf) and close Open it and it's blank almost every time. However, it does not go blank when I do this: Type a link on top of the document Press enter while the text input cursor is in front of the URL Write something in front of and on the same line as the URL Press enter Save (as rtf) and close That none of you can reproduce as you say, I really don't understand as it happens on all computers I've tried it on, all on my home network. Could it be something with my network? There's nothing to be found with Malwarebytes, Superantispyware, Avast or Bitdefender on any of the computers.
Created attachment 125627 [details] Test document saved in 4.4.0.3 (buggy) Reproduced based on steps described in Comment 6, starting from 4.4.0.3 to 5.2 beta2, not reproducible with 4.3.0.4, this is a regression. Attaching samples saved in both versions. Also reproduced in Linux with 5.5.0.2. Steps taken to produce attached doc: start with empty document, insert hyperlink, press Home, press Enter, press Up, write "test", save as RTF.
Created attachment 125628 [details] Test document saved in 4.3.0.4 (working)
This seems to have begun at the below commit. Adding Cc: to Michael Stahl; Could you possibly take a look at this one? Thanks 1a2f1c300d35805384d51aa9641934e4a71b256b is the first bad commit commit 1a2f1c300d35805384d51aa9641934e4a71b256b Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Thu May 14 03:45:32 2015 -0500 source 0f78ae1ca33f83737553ad204c869a63498b7d2d author Michael Stahl <mstahl@redhat.com> 2014-12-15 20:19:01 (GMT) committer Michael Stahl <mstahl@redhat.com> 2014-12-15 21:18:13 (GMT) commit 0f78ae1ca33f83737553ad204c869a63498b7d2d (patch) tree 86a945e082534b12d8b04bbce616e6793776cd3b parent 6d8ab70f1da785767e539383087258bd666fbf62 (diff) fdo#85876: Revert "fdo#74981: cutting nothing should do nothing, ...
this must be a regression in the RTF export that was masked by the wrong fix for bug 74981 that was being reverted by the commit in comment #9 (which is obviously correct) in 4.2.3.2 i get this: \pgndec\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af5\langfe2052\dbch\af6\afs24\alang1081\loch\f3\fs24\lang1031{{\field{\*\fldinst HYPERLINK "http://example.com/" }\rtlch \ltrch\loch }test} but current master produces a \fldrslt group that it doesn't close: {\*\ftnsep\chftnsep}\pgndec\pard\plain \s0\widctlpar\hyphpar0\cf0\kerning1\dbch\af5\langfe2052\dbch\af6\afs24\alang1081\loch\f3\fs24\lang1031{}}}{\field{\*\fldinst HYPERLINK "http://example.com/" }{\fldrslt {\rtlch \ltrch\loch test}
apparently this is what broke it: commit b8907bf3d3b37c686a414ffbbd2d732348aab5b9 Author: Michael Stahl <mstahl@redhat.com> AuthorDate: Fri Jun 27 16:02:45 2014 +0200 fdo#78758: sw: RTF export: don't export multiple \fldrst for one hyperlink Ensure that we export only one \fldresult per hyperlink by doing that in StartURL() and EndURL(); the TextINetFormat() is called once per text portion. This shouldn't cause problems as there can't be anything between the end of the \field group and the start of \fldresult anyway.
fixed on master
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b4855bd63c05096df1a2da339133f243bb30d902 tdf#100105 sw: RTF export: fix empty hyperlinks It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=744bd590fd2c39638e8df41a569cb2cc376e7450&h=libreoffice-5-2 tdf#100105 sw: RTF export: fix empty hyperlinks It will be available in 5.2.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I've tried the Mac version of the 5.2.1 daily build now, and the problem is gone - hooray and thank you very much! Looking forward to the Windows version. Thanks again, Monika
Confirmed working in 5.2.0.1. Since this bug can produce invalid RTF documents, requesting backport to 5.1.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f687c57465292e940f9e0d69aa2e4ee3376bd569&h=libreoffice-5-1 tdf#100105 sw: RTF export: fix empty hyperlinks It will be available in 5.1.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.