Bug 116622 - Inserted EMF image is not cropped correctly
Summary: Inserted EMF image is not cropped correctly
Status: NEW
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: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2018-03-25 14:58 UTC by johan
Modified: 2019-07-06 13:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
example files (93.61 KB, application/zip)
2018-03-25 14:59 UTC, johan
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.