Bug 54584 - RTF document from Consultant+ legal service with draw ojects problems and missing page numbering in footer
Summary: RTF document from Consultant+ legal service with draw ojects problems and mis...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: x86 (IA32) Windows (All)
: medium major
Assignee: Mike Kaganski
URL:
Whiteboard: target:5.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-06 07:05 UTC by Timon
Modified: 2016-10-25 19:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example 18.rtf - original file with draw objects and page numbering in footer, *.jpg - how the same section of document looks like MSO, LibO and AOO (518.93 KB, application/x-zip-compressed)
2012-09-06 07:05 UTC, Timon
Details
Screenshot where we can see too many footers on page 52 in LibO 4.1.0 Beta 1 (241.26 KB, image/jpeg)
2013-05-27 07:36 UTC, Timon
Details
Trimmed down document (6.08 KB, application/rtf)
2013-05-27 14:31 UTC, Urmas
Details
Minimal test case for bug 54584 (158 bytes, application/rtf)
2015-12-06 11:53 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timon 2012-09-06 07:05:05 UTC
Created attachment 66712 [details]
Example 18.rtf - original file with draw objects and page numbering in footer, *.jpg - how the same section of document looks like MSO, LibO and AOO

LibreOffice 3.6.1.2 (Final) (Build ID e29a214) Russian UI/Locale on Russian Windows XP Professional SP3 (32bit)

In MS Office 2007 SP3 all is fine. Draw objects are correct, numbering in footer is ok.

In LibreOffice 3.6.1.2 Final there are problems. In draw objects some symbols are missed (instead of addition, subtraction, multiplication, and amount symbols you will see empty squares), there is no numbering in footer at all.

In Apache OpenOffice 3.4.1 Final there are problems too. In draw objects some symbols are displayed incorrect, numbering in footer is ok.
Comment 1 Timon 2012-09-06 10:52:03 UTC
Just noticed one more problem in that file.

In LibreOffice 3.6.1.2 in headers and footers fonts are with wrong colors (titles "КонсультантПлюс" and links "www.consultant.ru" must be shades of blue, not black)

In Apache OpenOffice 3.4.1 & MS Office 2007 SP3 all colors are right.
Comment 2 Mike Kaganski 2012-09-14 04:29:20 UTC
As the OP has attached rather lenghty document, and forgot to mention the exact position of the draw objects problems, they may be found at page 52 and later.

I suppose it is a known problem with MS Metafile cheating with special fonts, using wrong codes for symbols. As it is quite common, it would be very desirable to create some workaround for it.
Comment 3 A (Andy) 2013-02-23 23:15:04 UTC
Thank you very much for your bug report and the additional screenshots to illustrate these bugs.

Unfortunately, most of the mentioned bugs are still reproducible with LO 4.0.0.3 (Win7 Home, 64bit).  But the mentioned symbols have already been improved in the meantime and are now shown correctly.
But the header and footer are displaced with wrong colors and missing page numbering.  The alignment of some formulas is also still buggy.  

importance changed to major
Comment 4 Timon 2013-05-27 07:36:44 UTC
Created attachment 79831 [details]
Screenshot where we can see too many footers on page 52 in LibO 4.1.0 Beta 1

Version: 4.1.0.0.beta1 Build ID: 5271b34bec742e190e2fe5a7dadb7334a705b54

In header and footer are right colors shown (titles "КонсультантПлюс" and links "www.consultant.ru" are shades of blue now).

But still missing page numbering.

There is a new problem with 4.1.0.0.beta1 - a huge number of footers (you can see them on page 52), also attached screenshot.
Comment 5 Urmas 2013-05-27 14:31:55 UTC
Created attachment 79849 [details]
Trimmed down document

This one should be easier to work with.
Comment 6 Julien Nabet 2013-11-11 21:56:02 UTC
Comment on attachment 79849 [details]
Trimmed down document

Mimetype fixed
Comment 7 QA Administrators 2015-04-19 03:21:00 UTC Comment hidden (obsolete)
Comment 8 Timon 2015-04-20 05:55:31 UTC
Most of the mentioned bugs are still reproducible with LibreOffice 4.4.2.2 Build ID c4c7d32d0d49397cad38d62472b0bc8acff48dd6 Locale ru_RU on Windows XP Professional SP3 (32bit)

The only thing was fixed - now in header and footer are right colors shown (titles "КонсультантПлюс" and links "www.consultant.ru" are shades of blue now).

But still in formulas some symbols are missed (instead of addition, subtraction, multiplication, and amount symbols you will see empty squares), there is no page numbering.
Comment 9 Timon 2015-12-03 08:32:43 UTC
Significant improvement in LibreOffice version: 5.0.4.1
Build ID: 2def61bcbb29a7a8611b833682fe1291910b11ad
Locale: ru-RU (ru_RU)

In formulas correct symbols are shown now.
But there is still no page numbering in footer.
Comment 10 Mike Kaganski 2015-12-06 11:53:27 UTC
Created attachment 121073 [details]
Minimal test case for bug 54584

The problem with page numbers is that the fields are prepended with backslashes (like this: \\PAGE). I attached an absolute minimum test case with the fields with and without backslashes.

The [MS-RTF] (https://www.microsoft.com/en-us/download/details.aspx?id=10725, page 194 "Fields") does not allow this. So, it may be considered ill-formed document, and closed as NOTOURBUG. But then, MS Word forgives this, and reads it normally; moreover, it keeps the backslashes when the document is saved to DOCX, and then LO is unable to show pages again.

I proposed a patch to gerrit: https://gerrit.libreoffice.org/20420
If reviewers decide it worth commiting, then this will be fixed.
Comment 11 Timon 2015-12-06 17:21:02 UTC
Of Course, someone can say, as always, that Apache OpenOffice is not the ancestor of LibreOffice, but as I wrote in first posts, even in old Apache OpenOffice 3.4.1 Final numbering in footer is ok. So, despite the fact that  [MS-RTF] (https://www.microsoft.com/en-us/download/details.aspx?id=10725, page 194 "Fields") does not allow this, problem occurs ONLY in LibreOffice at least from version 3.6 or even earlier.
Comment 12 Commit Notification 2015-12-07 09:39:05 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#54584: allow backslash before field type in RTF and DOCX

It will be available in 5.2.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.
Comment 13 Commit Notification 2015-12-08 08:18:07 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#54584: adjust skip-slash condition, allow unterminated quote

It will be available in 5.2.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.
Comment 14 Björn Michaelsen 2015-12-08 10:35:36 UTC
Assuming this to be fixed due to comment 12.