Comment 106 for bug 689349

Revision history for this message
In , Mikekaganski (mikekaganski) wrote :

The problem caused by following lines in EnhancedCustomShape2d.cxx:

> if( !bLineGeometryNeededOnly )
> {
> // hack aNewB2DPolyPolygon to fill logic rect - this is
> // needed to produce gradient fills that look like mso
> aNewB2DPolygon.clear();
> aNewB2DPolygon.append(basegfx::B2DPoint(0,0));
> aNewB2DPolygon.setClosed(true);
> aNewB2DPolyPolygon.append(aNewB2DPolygon);
>
> aNewB2DPolygon.clear();
> aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(),
> aLogicRect.GetHeight()));
> aNewB2DPolygon.setClosed(true);
> aNewB2DPolyPolygon.append(aNewB2DPolygon);
> }

Disabling this codepath stops adding the points. Current AOO code doesn't contain these lines.

This is added by:

author Thorsten Behrens <email address hidden> 2010-10-26 21:04:44 (GMT)
committer Thorsten Behrens <email address hidden> 2010-10-26 21:04:44 (GMT)
commit f64ef72743e55389e446e0d4bc6febd475011023
tree 13dacfb392466476bbe647c74520fa1e4eb860af
parent 5e1626f2cf40d4b52128d4464e838b8df0be55a7
> Better shading algo for customshapes, better gradients
> Some custom shapes can have shaded parts, like for example 3d can,
> the bevelled buttons etc. Those shaded colors are calculated
> internally, and have been way off at times. Now using HSV color
> space & the originally documented luminance modifications in steps
> of 10 percent. Compared to MSO, still no 100 percent match, but
> that seems due to gamma correction there.
> Additionally, starting with MSO12, gradients on those shaded surfaces
> look much better; adapted code to display gradients equally nice.
>
> Note that most of this patch also applies to ooxml import; note as
> well that customshapes from *all* kind of input files (including ODF
> docs) now look different than before; no real way of changing this
> in a backward-compatible way, since behaviour of custom shapes is
> mandated (mostly) by internal tables, and not stored in a file.
>
> Applies patches/dev300/ppt-customshape-shading-fix (much of it was
> accepted at OOo already, via i#102797)
>
> Applies patches/dev300/ppt-customshape-shading-fix.diff: fixed prob
> with line arrows - the extra-added single point polygons lead to
> extra arrows randomly around the custom shape. i#105654

The problem isn't in PDF export, so removing filter:pdf keyword. To see it on screen, one needs to disable OpenGL and AntiAliasing in Tools->Options->LibreOffice->View. In older versions, one may look for AntiAliasing in Expert Configuration or in config files.

The code was applied to OOo in i#102797, and was reverted later in i#105654. However, they still were reproducible in Linux distros before LO, possibly as part of GoOO (in 3.1 and 3.2 versions of OOo under SUSE and Ubuntu: see https://bz.apache.org/ooo/show_bug.cgi?id=108658 and https://bz.apache.org/ooo/show_bug.cgi?id=115511).

The OOo issue didn't contain any clear specifications or test cases, only patches, neither are there any unit tests on this, so I cannot check if reverting this part of commit breaks something.

A patch (that reverts these lines) is submitted for review: https://gerrit.libreoffice.org/35498. Thorsten, I added you as reviewer.