Hi, would you please review attached patches for 3-3-0 - they're extracted from OOo's calc65 CWS, which'll go into RC10. Both are tested & work fine for me - they're safe in a sense that they'll definitely not make matters worse. ;) Cheers, -- Thorsten
changeset: 274229:e8ffb0039660 user: Andre Fischer<andre.f.fischer@oracle.com> date: Thu Jan 13 16:25:57 2011 +0100 summary: calc65: #i116318# Fixed the painting of axial gradients. diff -r 6fcb36ae022d -r e8ffb0039660 cppcanvas/source/mtfrenderer/implrenderer.cxx --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx Thu Jan 13 15:58:12 2011 +0100 +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx Thu Jan 13 16:25:57 2011 +0100 @@ -682,10 +682,23 @@ case GRADIENT_AXIAL: { - basegfx::tools::createLinearODFGradientInfo(aGradInfo, + // Adapt the border so that it is suitable + // for the axial gradient. An axial + // gradient consists of two linear + // gradients. Each of those covers half + // of the total size. In order to + // compensate for the condensed display of + // the linear gradients, we have to + // enlarge the area taken up by the actual + // gradient (1-fBorder). After that we + // have to turn the result back into a + // border value, hence the second (left + // most 1-... + const double fAxialBorder (1-2*(1-fBorder)); + basegfx::tools::createAxialODFGradientInfo(aGradInfo, aBounds, nSteps, - fBorder, + fAxialBorder, fRotation); // map odf to svg gradient orientation - x // instead of y direction
changeset: 274228:6fcb36ae022d user: Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> date: Thu Jan 13 15:58:12 2011 +0100 summary: calc65: #i116371# fix backgrounds for polypolygons in metafile diff -r c70c59ba39fd -r 6fcb36ae022d drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx Thu Jan 06 17:27:00 2011 +0100 +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx Thu Jan 13 15:58:12 2011 +0100 @@ -1379,6 +1379,7 @@ { // need to handle PolyPolygonHatchPrimitive2D here to support XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END const primitive2d::PolyPolygonHatchPrimitive2D& rHatchCandidate = static_cast< const primitive2d::PolyPolygonHatchPrimitive2D& >(rCandidate); + const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch(); basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon()); // #i112245# Metafiles use tools Polygon and are not able to have more than 65535 points @@ -1386,8 +1387,20 @@ while(fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon)) ; + if(rFillHatchAttribute.isFillBackground()) + { + // with fixing #i111954# (see below) the possible background + // fill of a hatched object was lost.Generate a background fill + // primitive and render it + const primitive2d::Primitive2DReference xBackground( + new primitive2d::PolyPolygonColorPrimitive2D( + aLocalPolyPolygon, + rHatchCandidate.getBackgroundColor())); + + process(primitive2d::Primitive2DSequence(&xBackground, 1)); + } + SvtGraphicFill* pSvtGraphicFill = 0; - const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch(); aLocalPolyPolygon.transform(maCurrentTransformation); if(!mnSvtGraphicFillCount && aLocalPolyPolygon.count())
Attachment:
pgp_tePet0bun.pgp
Description: PGP signature