Bug 47495 - Problem with RTF documents created using Oracle Report
Summary: Problem with RTF documents created using Oracle Report
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: x86 (IA32) Windows (All)
: medium major
Assignee: Miklos Vajna
URL:
Whiteboard: target:3.7.0 target:3.5.7 target:3.6.1
Keywords: filter:rtf, regression
Depends on:
Blocks:
 
Reported: 2012-03-19 03:01 UTC by Timon
Modified: 2015-12-17 12:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
in archive: original problem rtf file; pdf files with scans of how document looks like in Microsoft Office 2007 SP3 and LibreOffice 3.5.1; file with info (44.54 KB, application/zip)
2012-03-19 03:01 UTC, Timon
Details
Another good example of the differences (51.61 KB, application/zip)
2012-03-19 22:35 UTC, Timon
Details
Problems in LO 3.4.5 (not usable) & 3.5.1 (good, but Russian fonts troubles) (13.15 KB, application/zip)
2012-03-19 23:36 UTC, Timon
Details
Eample files of MSOffice rtf file, corrupted by LibreOffice (8.22 KB, application/zip)
2012-03-22 01:45 UTC, Timon
Details
Text areas close table framing (5.87 KB, application/rtf)
2012-08-30 04:56 UTC, Timon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timon 2012-03-19 03:01:21 UTC
Created attachment 58667 [details]
in archive: original problem rtf file; pdf files with scans of how document looks like in Microsoft Office 2007 SP3 and LibreOffice 3.5.1; file with info

Problem with RTF documents created using Oracle Report. In an attachment - example of the problem file (file has been changed to protect data and re-saved using Microsoft Office 2007 SP3, but all is very close to original).
If the file is opened using Microsoft Office 2007 SP3, all is fine and on right places, the tables are framed.
If the file is opened using LibreOffice 3.4.5, it's mostly ok, except that tables may be unframed and the fonts may be different.
If the file is opened using LibreOffice 3.5.1, then information will become completely unreadable at all - text, tables, headers, etc will be mixed up in random order.
Comment 1 s-joyemusequna 2012-03-19 06:36:10 UTC
Confirmed (Windows XP / Vista 64).

LibO 3.4.5 : OK (compared to Word 2007)
LibO 3.5.1 : messed up (unusable) => REGRESSION
Comment 2 Timon 2012-03-19 22:28:54 UTC
I have one more examples, which show, that there are problems in LibreOffice 3.4.5, but they are not so big as LibreOffice 3.5.1 (but I don't see how to attach one more file).
Also big rtf files are opened very slowly in LibreOffice 3.4.5. In LibreOffice 3.5.1 they are opened more quickly, but if we try to open preview mode and then exit it, we need to wait quite a long time.
Comment 3 Timon 2012-03-19 22:35:10 UTC
Created attachment 58723 [details]
Another good example of the differences

Archive with files
Example 2.rtf - original file (as is original, not corrected and not re-saved)
MSO2007SP3.pdf - so the document looks in MS Office 2007 SP3 (all fine as I see)
LO 3.4.5.pdf - so the document looks in LibreOffice 3.4.5 (tables are not framed)
LO 3.5.1.pdf - so the document looks in LibreOffice 3.5.1 (not usable)
info.txt - description file
Comment 4 Timon 2012-03-19 23:36:02 UTC
Created attachment 58724 [details]
Problems in LO 3.4.5 (not usable) & 3.5.1 (good, but Russian fonts troubles)

Example 3.rtf (different problem with RTF file with discussion)

in MS Office 2007 SP3 (mostly all fine)
in LibreOffice 3.4.5 (not usable, besause the entire text of the agreement was distributed in two columns, which should not be there. there is no notes at all)
in LibreOffice 3.5.1 (pretty good, but in headers, footers and notes there is  a problem with Russian fonts displaying)
Comment 5 Timon 2012-03-20 00:36:42 UTC
Also if file like "Example 3" is 455 kb only, but complex enough (approximately 8 pages of text with 20,000 characters and lots of notes), then opening in LibreOffice 3.5.1 may take about 10 and more minutes and about 300 megabytes of RAM. In LibreOffice 3.4.5 file is opened quickly, but completely unsuitable even for reading (the entire text of the agreement is distributed in two columns, which should not be there; no notes at all)
Comment 6 s-joyemusequna 2012-03-20 09:19:23 UTC
Comment to your "Comment 4":

Word 2007 OK
LibO 3.5.1 OK, but russian characters in header, footer and comments garbled (i.e. no russian characters)
LibO 3.4.5 completely unusable

LibO 3.3.4 OK, but comments (=notes) completely missing !
Comment 7 Timon 2012-03-22 01:45:25 UTC
Created attachment 58852 [details]
Eample files of MSOffice rtf file, corrupted by LibreOffice

One more problem Example 4

Create a document in Microsoft Office 2007 SP3, write in it a single line of text, save as RTF (Example 4 Step 1.rtf). Exit Microsoft Office 2007 SP3.
Open the document in LibreOffice 3.4.5 or 3.5.1. Copy this line of text and paste it into document, to get two identical lines of text one after another. Again, re-save document in RTF format (Example 4 Step 2.rtf). Exit LibreOffice.
Try to open file "Example 4 Step 2.rtf" using the Microsoft Office 2007 SP3. File does not open, says that it is corrupted.
Try to open file "Example 4 Step 2.rtf" using LibreOffice. File may be opened, but the text is completely unreadable (instead of the Russian text we see strange set of symbols or sometimes something like "arabic characters").
As a result, file "Example 4 Step 2.rtf" is completely unsuitable for further use.
Sorry for my poor English.
Comment 8 Jean-Baptiste Faure 2012-03-24 01:35:57 UTC
Hi Timon,

Please do not mix several problems in one bug report. Original bug report is about import RTF files  produced by Oracle Crystal Report. In order to do something with that, developers need a non modified file produced by Oracle Crystal Report. If you resave it with another software, we cannot know where is the bug.

Other problems like performance when opening big RTF files or opening RTF file with non latin characters, have been already reported. Please do a search in bugzilla with RTF in the summary.

Last thing: don't forget that the RTF filter has been replaced by a new one in LO 3.5. And RTF (old filter) is indeed broken in LO 3.4, but will not be fixed because the end-of-life of 3.4 branch.

Best regards. JBF
Comment 9 Timon 2012-04-05 05:37:59 UTC
All the above problems were not fixed in version 3.5.2 !!!
Comment 10 Jean-Baptiste Faure 2012-04-05 21:44:41 UTC
Hi Timon,

Why did you set the status to REOPENED when this bug has not been closed? Instead, please provide a non modified RTF file produced by Oracle Report.

Please do not change version number, it gives the first version in which the problem has been detected.

Best regards. JBF
Comment 11 Timon 2012-04-05 21:51:00 UTC
https://bugs.freedesktop.org/attachment.cgi?id=58723 (Example2.zip) in which Example 2.rtf - original non modified RTF file produced by Oracle Report
it is there since 2012-03-19
Comment 12 Jean-Baptiste Faure 2012-04-15 10:25:46 UTC
(In reply to comment #11)
> https://bugs.freedesktop.org/attachment.cgi?id=58723 (Example2.zip) in which
> Example 2.rtf - original non modified RTF file produced by Oracle Report
> it is there since 2012-03-19

Ok, the document generated by Crystal Report looks like a table when exported in PDF but it is, in fact, a complex set of text areas.

Miklos: please have a look. Feel free to reassign if you can't handle this bug.

Best regards. JBF
Comment 13 Timon 2012-05-30 05:51:36 UTC
(In reply to comment #0)
> Created attachment 58667 [details]
> in archive: original problem rtf file; pdf files with scans of how document
> looks like in Microsoft Office 2007 SP3 and LibreOffice 3.5.1; file with info
> 
> Problem with RTF documents created using Oracle Report. In an attachment -
> example of the problem file (file has been changed to protect data and re-saved
> using Microsoft Office 2007 SP3, but all is very close to original).
> If the file is opened using Microsoft Office 2007 SP3, all is fine and on right
> places, the tables are framed.
> If the file is opened using LibreOffice 3.4.5, it's mostly ok, except that
> tables may be unframed and the fonts may be different.
> If the file is opened using LibreOffice 3.5.1, then information will become
> completely unreadable at all - text, tables, headers, etc will be mixed up in
> random order.

In LibreOffice 3.5.4 problems with RTF file, saved in MS Office 2007 only increased. File is not suitable even for viewing. Regression
Comment 14 Miklos Vajna 2012-08-13 10:20:43 UTC
Just had a look at this, it seems over time most problems of this bugdoc got fixed, except one. The problem is that the document starts with a text frame, and there are several shapes inside that textframe. Since bug 47036, we handle that situation (reset the started text frame, import the shape, send the textframe again later), but that was never tested with multiple shapes -- and this bugdoc have multiple ones.

The result is that there are several additional empty paragraphs, resulting in a two-page imported document, where half of the frames are anchored to the first-page paragraphs, the rest is anchored to second-page ones.

So all we need to fix here is that this "reset started text frame, import shape" logic is only necessary for the first shape inside a textframe only; and then the result will be a single page here as well.
Comment 15 Not Assigned 2012-08-13 10:41:26 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ad72a47dbd16f65316432df71dffe3b9b835fcc7

fdo#47495 fix RTF import of multiple shapes inside textframes
Comment 16 Miklos Vajna 2012-08-13 10:49:27 UTC
Resolved in master, -3-6 and -3-5 reviews (this part of the code had quite some refactoring since -3-6 branchoff in master):

https://gerrit.libreoffice.org/405
https://gerrit.libreoffice.org/406
Comment 17 Not Assigned 2012-08-14 13:36:54 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9f6ede5c0a998d2925b017b82ff73dd0a793a858&g=libreoffice-3-5

fdo#47495 fix RTF import of multiple shapes inside textframes


It will be available in LibreOffice 3.5.7.
Comment 18 Not Assigned 2012-08-14 14:12:54 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1067832bbfae15811ff2e1d478139b5af283de51&g=libreoffice-3-6

fdo#47495 fix RTF import of multiple shapes inside textframes


It will be available in LibreOffice 3.6.1.
Comment 19 Not Assigned 2012-08-14 15:02:51 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7910c47221d07e836d62b7d816e1afe19859b601&g=libreoffice-3-6

Fix fdo#47495 backport


It will be available in LibreOffice 3.6.2.
Comment 20 Not Assigned 2012-08-14 15:08:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-3-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=558f5af9feec7825f4edf5f7e4e6f7094fc1c094&g=libreoffice-3-6-1

Fix fdo#47495 backport


It will be available already in LibreOffice 3.6.1.
Comment 21 Not Assigned 2012-08-14 15:15:25 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=53d64c71d3a4fcc6b238e946fd6883b8b4593bca&g=libreoffice-3-5

Fix fdo#47495 backport


It will be available in LibreOffice 3.5.7.
Comment 22 Timon 2012-08-30 04:56:08 UTC
Created attachment 66313 [details]
Text areas close table framing

Example 15.rtf another Oracle Report document. Mostly all is fine even in multipage document, but text areas close table framing. In preview and while printing tables look ragged (broken). Also, the more such text areas in document, the longer it is opened. If document have 120 rows in a table (2 sheets), it is even impossible to scroll such document normally (all is freezing).
Comment 23 Miklos Vajna 2012-08-30 07:24:03 UTC
Hi Timon,

Please see:

http://wiki.documentfoundation.org/BugReport_Details#How_to_reopen_Bugs

If you have a new document, then that should be handled in a new bugreport, so closing this one again.

Thanks,

Miklos
Comment 24 Robinson Tryon (qubit) 2015-12-17 12:05:00 UTC
Migrating Whiteboard tags to Keywords: (filter:rtf)
Replace rtf_filter -> filter:rtf.
[NinjaEdit]