Bug 116622 - Inserted EMF image is not cropped correctly
Summary: Inserted EMF image is not cropped correctly
Status: RESOLVED DUPLICATE of bug 116335
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2018-03-25 14:58 UTC by johan
Modified: 2020-11-16 14:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example files (93.61 KB, application/zip)
2018-03-25 14:59 UTC, johan
Details
EMF file exported with Paint (27.51 KB, image/png)
2020-11-12 01:26 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johan 2018-03-25 14:58:57 UTC
Description:
Migrated from bug 116335 (part 2)

Some EMF images are not cropped and displayed correctly when they are inserted into Writer. The top part of the image is missing but can be revealed by using the crop tool and pulling the top/top left crop handle outwards.

An example is attached. It contains:
- An EMF file
- A screenshot showing this problem
- A reference redering in Microsoft Word (note: This shows another, unrelated image as well)

Steps to Reproduce:
1. Download the example file and unpack it
2. Create a new document in Writer and insert the example EMF file into it
3. Look at the top of the image and compare with the screenshots. 
4. Select the image -> Crop
5. Pull the top left crop handle outwards to reveal the rest of the image.

Actual Results:  
The top part of the image is not initially displayed.

Expected Results:
The entire image should be displayed.


Reproducible: Always


User Profile Reset: No



Additional Info:
Tested with:

Version: 6.0.2.1
Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: fi-FI (fi_FI); Calc: group


Version: 5.2.7.2
Build ID: 1:5.2.7-1+deb9u2
CPU Threads: 4; OS Version: Linux 4.9; UI Render: default; VCL: gtk2; 
Locale: fi-FI (fi_FI.utf8); Calc: group


Version: 5.4.5.1
Build ID: 79c9829dd5d8054ec39a82dc51cd9eff340dbee8
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: fi-FI (fi_FI); Calc: group


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 johan 2018-03-25 14:59:37 UTC
Created attachment 140872 [details]
example files
Comment 2 johan 2018-03-25 15:03:42 UTC
Additional note: Try opening the EMF file in Inkscape. You can see that the top part is outside the canvas/page area.

(Inkscape does not show the image 100% correctly so it should not be used as a reference. This problem, however, can be seen in Inkscape as well.)
Comment 3 QA Administrators 2019-03-27 03:42:49 UTC Comment hidden (obsolete)
Comment 4 johan 2019-07-06 13:10:39 UTC
Tested on Windows 7, 32-bit, with a clean installation of:

Version: 6.2.5.2 (x86)
Build ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159
CPU threads 4; OS: Windows 6.1; Rendering component: default; VCL: win; 
Locale: fi-FI (fi_FI); UI Language: fi-FI
Calc: threaded


This problem still occurs and it has actually become worse. The top part of the image can't be revealed anymore using the crop tool. This also occurs when the image is opened in Draw.


Additional note which may be useful: This problem partially occurs in Inkscape (0.92.4 tested) - the image is placed outside the page/canvas area. All parts of the image are visible and editable, however. This problem has been reported to Inkscape developers.
Comment 5 Bartosz 2020-11-12 01:26:53 UTC
Created attachment 167224 [details]
EMF file exported with Paint
Comment 6 Commit Notification 2020-11-14 17:11:43 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b0b78838e795fcd7f3c53e7f74fb32b2921a5ccb

tdf#35986 tdf#92315 tdf#116335 tdf#116622 Add support for MapMode TEXT

It will be available in 7.1.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.
Comment 7 Bartosz 2020-11-15 20:36:58 UTC

*** This bug has been marked as a duplicate of bug 116335 ***
Comment 8 Commit Notification 2020-11-16 14:32:40 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/1c399bb1dc9af8d591258e936508200d38d3bb5a

tdf#35986 tdf#92315 tdf#116335 tdf#116622 Add support for MapMode TEXT

It will be available in 7.0.4.

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.