Bug 69270 - FORMATTING: Croping scaled SVG images does not work properly [Regression]
Summary: FORMATTING: Croping scaled SVG images does not work properly [Regression]
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:4.2.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-09-12 12:37 UTC by Bojan Vitnik
Modified: 2014-02-14 21:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document with inserted SVG picture, SVG picture itself and screenshots of the document and crop settings in various versions of LO Writer. (691.46 KB, application/zip)
2013-09-12 12:37 UTC, Bojan Vitnik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bojan Vitnik 2013-09-12 12:37:26 UTC
Created attachment 85718 [details]
Example document with inserted SVG picture, SVG picture itself and screenshots of the document and crop settings in various versions of LO Writer.

Problem description: 

Steps to reproduce:
1. Open the "Front_page.odt" document found in attached zip archive.

Current behavior:

As of version 4.0.x of LO Writer, inserted SVG pictures are not croped properly if scaled. They are croped properly only if left in original scaling. Also, it seems only SVG pictures are affected, or maybe only vector images, because inserted PNG pictures do not exhibit this behavior.

In attached zip archive you will find screenshots of "Front_page.odt" file as it is displayed in LO Writer 3.6.7, 4.0.5 and 4.1.1 along with screenshots of settings in "Crop" dialog. The document is correctly displayed only in version 3.6.7 of LO Writer. Later versions display it incorrectly. Version 4.1.1 of LO Writer additionally displays the picture in color instead of light gray which is another bug I'll report separately.

It seems as if the order of operations - croping and scaling - is reversed in 4.0.x and later versions. Croping is done after upscaling so croping amount of, for example, 0.5cm is relative to upscaled size of the picture, for example 15x15cm. On the other hand, in version 3.6.7 croping amount is relative to original size of the picture (around 2x2cm) and upscaling is done after croping. The problem with versions 4.0.x and later is that they show the same croping preview (in "Crop" dialog) as version 3.6.7 but document is displayed differently than what is shown in the preview. Additionally, croping values in 4.0.x and later can not be larger than 2cm or so because that is the original size of the picture.

Expected behavior:

LO Writer versions 4.0.x and later should display the attached document the same way as version 3.6.7.
Operating System: Ubuntu
Version: 4.0.0.3 release
Last worked in: 3.6.7.2 release
Comment 1 Bojan Vitnik 2014-01-20 11:40:27 UTC
Can someone confirm this please?
Comment 2 Michael Stahl (allotropia) 2014-02-14 12:51:52 UTC
this came in with the new SVG filter from AOO and was fixed in LO 4.2
by commit 2e5167528f7566dd9b000e50fc1610b7bf99132a

... which we can't backport to 4.1 because it is known to have
some undesirable side effects of its own.
Comment 3 Bojan Vitnik 2014-02-14 21:21:00 UTC
Yes. I can confirm it's fixed in LO 4.2.

Thank you!