Bug 98971 - Imported text has monospace font, and text has strikethrough effect
Summary: Imported text has monospace font, and text has strikethrough effect
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTF-Opening
  Show dependency treegraph
 
Reported: 2016-03-30 03:58 UTC by Nicholas van Oudtshoorn
Modified: 2020-06-07 13:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample showing monospace font and strikethrough text (6.33 KB, application/rtf)
2016-03-30 03:58 UTC, Nicholas van Oudtshoorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas van Oudtshoorn 2016-03-30 03:58:59 UTC
Created attachment 123943 [details]
Sample showing monospace font and strikethrough text

This file - as with all from the site it comes from, isn't rendered nicely with LibreOffice. Text is in a monospace font, and from a few lines in, all has the strikethrough effect enabled.

Document renders much better in WPS (for once!)

Version set to 5.0.0.5, though I believe the bug has been around for a LOT longer. Also tested in the latest daily, with no difference.
Comment 1 Nicholas van Oudtshoorn 2016-03-30 04:09:17 UTC
Also of interest is that apostrophes seem to be stripped from the text, and the strikethrough  starts where the first apostrophe in the text is...
Comment 2 raal 2016-03-30 08:12:54 UTC
I can confirm with Version: 5.2.0.0.alpha0+ and Version 4.0.0.3

in terminal:
:1: parser error : Document is empty
SchoolsLive Session
Comment 3 Miklos Vajna 2016-04-01 14:42:59 UTC
This is a plain text file, and has nothing to do with RTF. :-)

In a dbgutil build I also see:

OdtGenerator: Document Body: Finished writing all doc els..

So probably the strikethrough text is caused by one of the DLP import libs volunteering to import the doc and then not handling plain text input.

David: any idea? ;-)
Comment 4 David Tardon 2016-04-04 11:48:29 UTC
The most likely culprit is WordPerfect 4 import in libwpd. That format is just a plain text with inserted control characters.
Comment 5 QA Administrators 2017-05-22 13:19:51 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2020-05-21 03:42:20 UTC Comment hidden (obsolete)
Comment 7 Nicholas van Oudtshoorn 2020-05-22 01:56:16 UTC
Still present. This might just have been a malformed download (from a website that no longer exists). Even so, it would be nice for the filters to fail gracefully when there is just plain text.

Version: 7.0.0.0.alpha1+
Build ID: 97e9b250426ff09bba4546835ee9138d91e03fbb
CPU threads: 4; OS: Linux 5.6; UI render: Skia/Vulkan; VCL: kf5; 
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2020-05-19_08:36:14
Calc: threaded
Comment 8 David Tardon 2020-06-07 13:38:22 UTC
(In reply to Nicholas van Oudtshoorn from comment #7)
> Still present. This might just have been a malformed download (from a
> website that no longer exists). Even so, it would be nice for the filters to
> fail gracefully when there is just plain text.

Well, WordPerfect 4.2 document *is* just plain text: pure ASCII, with 15-20 characters from the 0x80-0xff range acting as function codes that handle basic text formatting. So no, the libwpd filter cannot "fail gracefully", because there's simply nothing by which it could tell the file is not a WP 4.2 document (it would reject the file if it contained only ASCII characters, but that's not the case here).

Btw, the libwpd filter (along with all the other filters) is only tried because the file does have extension .rtf instead of .txt . If I rename it, LibreOffice opens it directly using its plain text filter. (I still have to pick the "Text - Choose Encoding" file type and then choose the right encoding to make it look right, but that's "plain text" for you--there's no way around this.)

Btw 2, LibreOffice (and OpenOffice.org before it) has been opening plain text files using a monospace font since forever. That has nothing to do with another filter being used.
Comment 9 Nicholas van Oudtshoorn 2020-06-07 13:42:22 UTC
Sounds good! A bad source document - from a web site that's been retired. Thanks for the time, David.