Bug 142639 - [EMF] ExtSelectClipRng region data coords should be converted between Window and Viewport with MapMode MM_ANISOTROPIC
Summary: [EMF] ExtSelectClipRng region data coords should be converted between Window ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: EMF-WMF 116623
  Show dependency treegraph
 
Reported: 2021-06-03 14:33 UTC by Valek Filippov
Modified: 2023-08-30 03:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
EMF sample with ExtSelectClipRgn (856 bytes, image/x-emf)
2021-06-03 14:35 UTC, Valek Filippov
Details
How it should look like (1.32 KB, image/png)
2021-06-03 14:37 UTC, Valek Filippov
Details
How it looks in LO 7.2 (1.04 KB, image/png)
2021-06-03 14:38 UTC, Valek Filippov
Details
EMF sample with RegionMode set to RGN_AND (856 bytes, image/x-emf)
2021-06-03 14:38 UTC, Valek Filippov
Details
One more sample with RGN_COPY (1.53 KB, image/x-emf)
2021-06-17 21:06 UTC, Valek Filippov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valek Filippov 2021-06-03 14:33:52 UTC
Description:
Region's RectL coords seem to require conversion.
Otherwise ClipRegion becomes offset if WindowOrgEx/WindowExtEx/ViewportOrgEx/VieportExtEx are used.

Steps to Reproduce:
Open attached EMF sample.

Actual Results:
Red-filled rectangle is in the top-left quadrant.

Expected Results:
Red-filled rectangle should be at the eight edge on the same level as black rectangle.


Reproducible: Always


User Profile Reset: No



Additional Info:
The sample made from TextMapMode test case.
Comment 1 Valek Filippov 2021-06-03 14:35:46 UTC
Created attachment 172593 [details]
EMF sample with ExtSelectClipRgn
Comment 2 Valek Filippov 2021-06-03 14:37:39 UTC
Created attachment 172594 [details]
How it should look like
Comment 3 Valek Filippov 2021-06-03 14:38:01 UTC
Created attachment 172595 [details]
How it looks in LO 7.2
Comment 4 Valek Filippov 2021-06-03 14:38:47 UTC
Created attachment 172596 [details]
EMF sample with RegionMode set to RGN_AND
Comment 5 Valek Filippov 2021-06-03 14:46:13 UTC
tdf#116623 root cause is that Region has to be reset if RGN_COPY mode is in use only of no region data are provided.
However implementing RGN_COPY fails on other tests, because ClipRegion can appear offset from the expected position.

There are three cases for RGN_COPY:
1. There is a RegionData block -- it should be used to calculate and set the region.
2. There is no RegionData at all -- it should reset the region to default.
3. There is a RegionData with 0 RectL provided -- that seems to set ClipRegion to 0 sized area, hence no drawing made after is visible until the region is reset.
Comment 6 Valek Filippov 2021-06-17 21:06:13 UTC
Created attachment 172991 [details]
One more sample with RGN_COPY

This one is minified version of the sample from AOO bz120195.

Blue square sides should be the same size as red line.
Red line should be on the top of the square.

The root cause of the problem is that LO ignores ClipRegion data because it has RGN_COPY mode.
Comment 7 Roman Kuznetsov 2021-08-29 17:53:41 UTC
Confirm in

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 05ff3d67d0e2e436406786c949eb7cfca107ba33
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-08-28_00:08:59
Calc: threaded
Comment 8 QA Administrators 2023-08-30 03:05:52 UTC
Dear Valek Filippov,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug