Bug 94731 - Look of square/quadratic gradient changed
Summary: Look of square/quadratic gradient changed
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.1.6.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ODF-import Object-Fill
  Show dependency treegraph
 
Reported: 2015-10-03 12:23 UTC by Yousuf Philips (jay) (retired)
Modified: 2016-11-08 10:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (10.03 KB, application/vnd.oasis.opendocument.text)
2015-10-03 12:23 UTC, Yousuf Philips (jay) (retired)
Details
master vs 3.3 (80.13 KB, image/png)
2015-10-03 20:28 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-10-03 12:23:55 UTC
Created attachment 119237 [details]
sample file

In LO 4.1, the gradient labelled 'Square' was renamed to 'Quadratic' and its look was altered to always show as a square even when the shape was a rectangle. This causes problems as other odf software (calligra, mso) show it in the old way, and ooxml files import with the incorrect looking square gradient.

Also the gradient labelled 'Rectangular' was also changed 'Square' at the same time and this doesnt correspond to how the gradient looks.

As this also is in AOO 4.1.1, i'm assuming it was merged from their code. The XML has them as <draw:gradient draw:style="square"> and <draw:gradient draw:style="rectangular">.

With the sample attachment, drag the bottom part of the square shapes to test the behaviour between 4.0 and master.

Version: 5.1.0.0.alpha1+
Build ID: ef1bafb588eb20a5d35df14e79a1a948885c721a
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-09-29_23:55:44
Locale: en-US (en_US.UTF-8)
Comment 1 Regina Henschel 2015-10-03 16:56:02 UTC
Please do not mix handling of ODF with problems in OOXML import and export.

ODF is very clear, how draw:style="square" should look. Read section 19.218.2<draw:gradient>, item 'square',
"square: defines a gradient that produces a square blend, imitating the visual perspective in a corridor or the aerial view of a pyramid. Also known as "box gradient" and "pyramidal gradient". The center of the square is defined with the draw:cx and draw:cy attributes. The width and height of the square is the minimum value of either the width or the height of the filled area. The outside of the square is filled with the end color."

LibeOffice shows it correctly in most cases. Only transparent gradient in presentation mode is wrong. The names in the UI are wrong for en-US. In German the gradients in Area dialog have the correct "Quadratisch" for draw:style="square" and "Rechteckig" for draw:style="rectangle", but German is wrong in the other cases too.

I think, not the drawing is wrong, but the naming in the UI.


OOXML import and export should be an own issue, but nevertheless a comment: OOXML has only the gradient types 'linear' and 'path based'. For 'path' it has the values 'circle', 'rect' and 'shape'. So there exists no direct mapping for ODF draw:style="square". Read annex L.4.8.4.2, and section 20.1.10.38 ST_PathShadeType, and section 20.1.8.33 gradFill; all in ECMA-376, 4th Edition; Office Open XML File Formats — Fundamentals and Markup Language Reference; December 2012. The nearest mapping would be to 'rect' and calculate its corner positions based on the current shape in a way, that the gradient area is a square.
Comment 2 Yousuf Philips (jay) (retired) 2015-10-03 20:28:18 UTC
Created attachment 119249 [details]
master vs 3.3

(In reply to Regina Henschel from comment #1)
> ODF is very clear, how draw:style="square" should look. Read section
> 19.218.2<draw:gradient>, item 'square',
> "square: defines a gradient that produces a square blend, imitating the
> visual perspective in a corridor or the aerial view of a pyramid. Also known
> as "box gradient" and "pyramidal gradient". The center of the square is
> defined with the draw:cx and draw:cy attributes. The width and height of the
> square is the minimum value of either the width or the height of the filled
> area. The outside of the square is filled with the end color."

If the ODF was very clear, calligra and MSO would show it the same way as LO currently shows it. When i read this, "The width and height of the square is the minimum value of either the width or the height of the filled area.", LO doesnt seem to follow this, as it doesnt alter the minimum square to the minimum width or height, as seen in the attached screenshot. It keeps the square as large as the maximum value of either the width or height.

> OOXML import and export should be an own issue, but nevertheless a comment:
> OOXML has only the gradient types 'linear' and 'path based'. For 'path' it
> has the values 'circle', 'rect' and 'shape'. So there exists no direct
> mapping for ODF draw:style="square". Read annex L.4.8.4.2, and section
> 20.1.10.38 ST_PathShadeType, and section 20.1.8.33 gradFill; all in
> ECMA-376, 4th Edition; Office Open XML File Formats — Fundamentals and
> Markup Language Reference; December 2012. The nearest mapping would be to
> 'rect' and calculate its corner positions based on the current shape in a
> way, that the gradient area is a square.

Would be great if you could provide a link to this, so i could read more about it. Word 2010 imports both ODF draw:style="square" and draw:style="rectangular" as rectangular gradient.
Comment 3 Regina Henschel 2015-10-04 12:56:38 UTC
Information about support of ODF 1.2 in Word, Excel and PowerPoint are available from https://msdn.microsoft.com/en-us/library/gg548604%28v=office.12%29.aspx. It is document [MS-OODF3]. (The other files might interest you too.)

ECMA-376 is available from http://www.ecma-international.org/publications/standards/Ecma-376.htm. You need part 1.

ISO/IEC 29500 is available from http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html. The ISO version is not on version 4th, but on version 3rd.


> If the ODF was very clear, calligra and MSO would show it the same way as LO
> currently shows it.

ODF 1.1 does not have such clear description, therefore applications have varied in the implementation. As LO claims to support ODF1.2, it should follow the standard.


> LO doesnt seem to follow this, as it doesnt alter the minimum square to the
> minimum width or height, as seen in the attached screenshot. It keeps the
> square as large as the maximum value of either the width or height.

You are right. LO does not render it as specified.
Comment 4 QA Administrators 2016-11-08 10:34:58 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice 
(5.1.6 or 5.2.3  https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and 
your operating system, and any changes you see in the bug behavior
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave 
a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to "inherited from OOo";
4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug-20161108