Bug 142566 - [EMF] PolyTextOut support
Summary: [EMF] PolyTextOut support
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: low minor
Assignee: Bartosz
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2021-05-30 13:35 UTC by Valek Filippov
Modified: 2021-07-15 07:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
EMF sample with PolyTextOutA (248 bytes, image/x-emf)
2021-05-30 13:36 UTC, Valek Filippov
Details
EMF sample for PolyTextOutW (256 bytes, image/x-emf)
2021-05-30 13:37 UTC, Valek Filippov
Details
How it should look like (1.15 KB, image/png)
2021-05-30 13:39 UTC, Valek Filippov
Details
Comparison LibreOffice 7.2 master and MSO 2010 (72.14 KB, image/png)
2021-05-31 13:58 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valek Filippov 2021-05-30 13:35:34 UTC
Description:
LO doesn't implement PolyTextOutA/PolyTextOutW EMRs.

Steps to Reproduce:
Open attached EMF sample

Actual Results:
LO shows empty object

Expected Results:
It should show one line of text.


Reproducible: Always


User Profile Reset: No



Additional Info:
Both samples have one PolyTextOut EMR with cString equals 1.
It works fine in MS Paint, Wordpad and MSO.
I was unable to make a working sample with cString greater than 1.
MS Paint/Wordpad didn't open such files, MSO loaded empty object.

Limited implementation could be trivial: inject ReadUInt32 for cString value, create a debug log if the value is above 1, consider only first EmrText object.
Comment 1 Valek Filippov 2021-05-30 13:36:58 UTC
Created attachment 172451 [details]
EMF sample with PolyTextOutA
Comment 2 Valek Filippov 2021-05-30 13:37:26 UTC
Created attachment 172452 [details]
EMF sample for PolyTextOutW
Comment 3 Valek Filippov 2021-05-30 13:39:40 UTC
Created attachment 172453 [details]
How it should look like
Comment 4 Xisco Faulí 2021-05-31 13:58:10 UTC
Created attachment 172499 [details]
Comparison LibreOffice 7.2 master and  MSO 2010
Comment 5 Xisco Faulí 2021-05-31 13:59:09 UTC
Reproduced in

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: f49e5902a3737c02fabf5bec23243ccb126426c4
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

and

Version: 5.2.0.0.alpha0+
Build ID: dd46727b99d4bb5135451aa7e5e1bdb197373843
CPU Threads: 4; OS Version: Linux 5.7; UI Render: default; 
Locale: en-US (en_US.UTF-8)
Comment 6 Commit Notification 2021-06-01 21:49:16 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/82bde77366e8d92a791ca629df02026bfa5efe21

tdf#142566 EMF Add support for EMR_POLYTEXTOUT records

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.