Bug 129308 - Not reading EMF+ EmfPlusPath records correctly
Summary: Not reading EMF+ EmfPlusPath records correctly
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Chris Sherlock
URL:
Whiteboard:
Keywords: filter:emf
Depends on:
Blocks: emf-testbed EMF-WMF 129138
  Show dependency treegraph
 
Reported: 2019-12-10 11:55 UTC by Chris Sherlock
Modified: 2020-08-09 04:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
EMF+ Joint line (684 bytes, image/emf)
2019-12-23 21:33 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Sherlock 2019-12-10 11:55:57 UTC
Description:
When we read EMF+ EmfPlusPath records, we are not reading the point types correctly when we use points that use relative locations.

According to [MS-EMFPLUS] section "2.2.1.6 EmfPlusPath Object":

"PathPointTypes (variable): An array of PathPointCount objects that specifies how the points in the PathPoints field are used to draw the path. The type of objects in this array is specified by the PathPointFlags field, as follows:

- If the R flag is set, the point types are specified by EmfPlusPathPointTypeRLE objects, which use run-length encoding (RLE) compression ([MS-WMF] section 3.1.6).

- If the R flag is clear, the point types are specified by EmfPlusPathPointType objects."

Currently we are handling the second case (where the R flag is clear), but we are not handline the case where the R flag is set. In that case we should be reading an EmfPlusPathPointTypeRLE, but this is not the case. 

Steps to Reproduce:
This needs a test case document, unfortunately I don't have one readily at hand.

Actual Results:
See above. 

Expected Results:
See above. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Bartosz 2019-12-10 19:31:20 UTC
Hello Chris.
Do you have example EMF+ image which demonstrate using of such PathPointTypes?
It will be really hard to verify if it is working correctly without some reference image.
Comment 2 Bartosz 2019-12-10 19:32:26 UTC
I will try to create such image.
Comment 3 Bartosz 2019-12-23 21:33:20 UTC
Created attachment 156763 [details]
EMF+ Joint line

It seems that joints are not rendered correctly,
code:

			GraphicsPath path;
			Pen penJoin(Color(255, 0, 0, 255), 8);

			path.StartFigure();
			path.AddLine(Point(50, 200), Point(100, 200));
			path.AddLine(Point(100, 200), Point(100, 250));

			penJoin.SetLineJoin(LineJoinBevel);
			graphics.DrawPath(&penJoin, &path);
Comment 4 Chris Sherlock 2019-12-30 05:57:52 UTC
Bartosz, that's a different issue I'm afraid. We don't seem to correctly support bevelled lines correctly, but that's a different issue to EmfPlusPath objects. 

Might be worthwhile logging a new bug about mitering (we currently don't support SETMITERLIMIT).
Comment 5 QA Administrators 2019-12-31 03:28:24 UTC Comment hidden (obsolete)
Comment 6 Xisco Faulí 2020-01-10 11:28:31 UTC
Hello Chris,
Could you please attach a screenshot showing how the file should look like ?
Comment 7 QA Administrators 2020-07-09 03:42:03 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2020-08-09 04:08:58 UTC
Dear Chris Sherlock,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp