Bug 124272 - Edit Contour of Image Wrap doesn't appear on Exported PDF
Summary: Edit Contour of Image Wrap doesn't appear on Exported PDF
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.3.2 release
Hardware: All All
: high major
Assignee: Armin Le Grand (allotropia)
URL:
Whiteboard: target:6.3.0 target:6.2.3 target:6.1....
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-03-22 14:13 UTC by lucas_costa
Modified: 2021-03-12 14:33 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Contour edited and appearing in LibreOffice Writer. (252.67 KB, image/png)
2019-03-22 14:14 UTC, lucas_costa
Details
LibreOffice Write's Exported PDF with contour not working (223.12 KB, application/pdf)
2019-03-22 14:17 UTC, lucas_costa
Details
Apache OpenOffice Write's Exported PDF with contour working (91.35 KB, application/pdf)
2019-03-22 14:23 UTC, lucas_costa
Details
Contour edited and appearing in Apache OpenOffice Writer (Print Screen) (471.51 KB, image/png)
2019-03-22 14:27 UTC, lucas_costa
Details
sample document (170.00 KB, application/vnd.oasis.opendocument.text)
2019-03-25 16:24 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lucas_costa 2019-03-22 14:13:12 UTC
Description:
"Edit Contour" (Right-Click on a Image → Wrap → Edit Contour) was not applied when the user export to PDF. For example, you have a drawing with a white background and you want the text to go around the drawing. When you edit the contour, the drawing overlays the text in the PDF file. 

Exporting on Apache OpenOffice, it doens't happens.

Steps to Reproduce:
1. Create some text
2. Put a drawing with some background (White for example) (tried with PNG and JPG)
2. Edit Contour of a image
3. Export the Document file (ODT) as PDF

Actual Results:
The image (drawing) overlaps the text on PDF file.

Expected Results:
The image is outlined (contoured) by the text on PDF file. 
Apache OpenOffice does this result with no problem.  


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 lucas_costa 2019-03-22 14:14:58 UTC
Created attachment 150182 [details]
Contour edited and appearing in LibreOffice Writer.
Comment 2 lucas_costa 2019-03-22 14:17:14 UTC
Created attachment 150183 [details]
LibreOffice Write's Exported PDF with contour not working
Comment 3 lucas_costa 2019-03-22 14:23:06 UTC
Created attachment 150185 [details]
Apache OpenOffice Write's Exported PDF with contour working
Comment 4 lucas_costa 2019-03-22 14:27:16 UTC
Created attachment 150188 [details]
Contour edited and appearing in Apache OpenOffice Writer (Print Screen)
Comment 5 mulla.tasanim 2019-03-22 18:26:55 UTC
Thank you for reporting the bug.

I can confirm that the bug is present in


Version: 6.2.1.2 (x64)
Build ID: 7bcb35dc3024a62dea0caee87020152d1ee96e71
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL


Version: 6.3.0.0.alpha0+ (x64)
Build ID: 91cdf22b88a4f7bec243c8fb187627e766d3294c
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-03-08_00:38:10
Locale: en-US (en_US); UI-Language: en-US
Calc: CL
Comment 6 Xisco Faulí 2019-03-25 16:24:03 UTC
Created attachment 150273 [details]
sample document
Comment 7 Xisco Faulí 2019-03-25 16:44:50 UTC
Regression introduced by:

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

author	Armin Le Grand <Armin.Le.Grand@cib.de (CIB)>	2018-02-26 15:13:06 +0100
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-02-26 22:52:12 +0100
commit c1230cede19ae3633e51c7ca780cb34d9dbaa20f (patch)
tree 596a7ea589b91df43abc42fae7169611b4bce346
parent cc92324bed7f039e91d07d241f958ad773582c48 (diff)
tdf#114076: Expand ClipRange to next PixelBound

Bisected with: bibisect-linux64-6.1

Adding Cc: to Armin Le Grand
Comment 8 Armin Le Grand (allotropia) 2019-04-02 14:04:57 UTC
Looks as if tdf#114076 fix was too rough - the set ClipRegion at the OutputDevice was assumed to be a Rectangle/B2DRange, but is probably also used as B2DPolyPolygon in some cases (like this one). Will have to check against Region::IsRectangle and evtl. have to scale the PolyPolygon (create a full transform from old to new range as linear composition of the inverse current transform and the new one)...
Comment 9 Armin Le Grand (allotropia) 2019-04-02 16:03:42 UTC
Decided to use a slightly different method - do not scale the orig poly when not a rect, but embed making use of PolyPolygon topology. This will be correct and preserve both needs.
Comment 10 Armin Le Grand (allotropia) 2019-04-02 16:04:25 UTC
Fix on Gerrit (see https://gerrit.libreoffice.org/#/c/70146/)
Comment 11 Commit Notification 2019-04-02 19:03:47 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c%5E%21

tdf#124272 use ClipRegion's geometry if not a rectangle

It will be available in 6.3.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 12 Armin Le Grand (allotropia) 2019-04-02 19:04:41 UTC
@xisco: Maybe backport somewhere...?
Comment 13 Commit Notification 2019-04-02 22:19:50 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/2b7b1a1501b88474ed5d691bafb45d465d8ab9f6%5E%21

tdf#124272 use ClipRegion's geometry if not a rectangle

It will be available in 6.2.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.
Comment 14 Xisco Faulí 2019-04-03 08:41:44 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 93f1c3665fcdc31c36078f179ac37fd69d3ebb00
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Armin Le Grand, thanks for fixing this issue!!

I'm working on a unittest for this -> https://gerrit.libreoffice.org/#/c/70081/
Comment 15 Xisco Faulí 2019-04-03 08:55:23 UTC
(In reply to Armin Le Grand from comment #12)
> @xisco: Maybe backport somewhere...?

Hi Armin,
yes, backported to 6-2, 6-2-3 and 6-1 branches.
Comment 16 Commit Notification 2019-04-03 10:33:44 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/c2ae30b19d8145271f1189c9757d59d43de391c7%5E%21

tdf#124272 use ClipRegion's geometry if not a rectangle

It will be available in 6.1.6.

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 17 Commit Notification 2019-04-04 12:40:04 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "libreoffice-6-2-3":

https://git.libreoffice.org/core/+/1100ca5407e7ffd9ce58fc0c2f4afe7e8e60e0f8%5E%21

tdf#124272 use ClipRegion's geometry if not a rectangle

It will be available in 6.2.3.

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 18 Commit Notification 2021-03-12 14:33:40 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2f1effff74c77eb13b53a7d4b5d31a7f2ac9ff8f

tdf#124272: vcl_pdfexport: Add unittest

It will be available in 7.2.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.