Bug 138969 - Crop totally wrong after save & reload if the image cut/pasted before cropping
Summary: Crop totally wrong after save & reload if the image cut/pasted before cropping
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Clipboard PDF
  Show dependency treegraph
 
Reported: 2020-12-16 10:53 UTC by Telesto
Modified: 2022-02-28 08:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (128.69 KB, application/vnd.oasis.opendocument.text)
2020-12-16 10:53 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-12-16 10:53:24 UTC
Description:
Crop totally wrong after save & reload if the image cut/pasted before cropping

Steps to Reproduce:
1. open the attached file
2. Cut & Paste the (PDF) image
3. Crop it (say select rainbow figure area)
4. Save & reload

Actual Results:
Full page inside small crop window

Expected Results:
The actual cropped area


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ (x64)
Build ID: 15e4427e8fb56a143caa28b8a3120f3761fc77a5
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-12-16 10:53:43 UTC
Created attachment 168217 [details]
Example file
Comment 2 Telesto 2020-12-16 10:55:38 UTC
Fine with
Version: 6.2.9.0.0+ (x86)
Build ID: 5f01fe15eb2661f1f9ce12d1d99dc2a705b462ee
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL
Comment 3 Xisco Faulí 2020-12-16 11:23:48 UTC
Reproduced in

Version: 7.2.0.0.alpha0+
Build ID: 8b3982681e98818388c09233960ad6eaacee205a
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 4 Xisco Faulí 2020-12-16 11:36:16 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=6ac2d66c78d6c080aabfa46157113684c2f3a3b0

author	Jan Holesovsky <kendy@collabora.com>	2019-10-18 11:19:04 +0200
committer	Tomaž Vajngerl <quikee@gmail.com>	2020-03-17 22:01:15 +0100
commit 6ac2d66c78d6c080aabfa46157113684c2f3a3b0 (patch)
tree f9f3311931b517eeeca54701aa9dc772ee28698a
parent dc3c59a1d9e9240acfbc1a613115f04f577d1ca4 (diff)
pdfium: Make Insert -> Image... use VectorGraphicData for PDF.

Bisected with: bibisect-linux64-7.0

Adding Cc: to Jan Holesovsky
Comment 5 Justin L 2022-01-24 12:29:50 UTC
The cut aspect seems irrelevant here. I see the same thing when pasting any pdf from the file system (or via drag/drop) into a new document.

When opening the image properties dialog, all settings look fine, and simply pressing OK "fixes" the crop.
Comment 6 Justin L 2022-02-28 08:56:03 UTC
This was fixed in LO 7.4 by author Miklos Vajna on 2022-02-08 13:42:45 +0100
commit 4df75c2a2f9abbf2621a9aacd0c4f9fe8841b051
    sw: fix size of inserted PDF image
    We used to multiply the pixel size with the DPI, which resulted in some
    large enough mm100 width that the inserted image was as wide as the body
    frame allowed it.