[Libreoffice-commits] core.git: 2 commits - canvas/source slideshow/source

Michael Stahl mstahl at redhat.com
Wed Mar 7 12:12:12 UTC 2018


 canvas/source/vcl/canvashelper_texturefill.cxx |    2 +-
 slideshow/source/engine/shapes/drawshape.cxx   |   23 ++++-------------------
 2 files changed, 5 insertions(+), 20 deletions(-)

New commits:
commit 5d710cf7dda27e78f237211fd92418be4dd1c551
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Mar 7 12:21:45 2018 +0100

    VCL canvas: fix clipping of gradients (related: tdf#115142)
    
    When using the presenter console, the secondary screen has
    a small view of the current slide, which is called a "Pane" in sdext.
    
    Clipping for this is done by sd::presenter::PresenterCanvas, which wraps
    the full-screen VCL canvas and has a MergeViewState() to intersect
    the clip region.
    
    The VCL canvas has a bug in its gradientFill() implemenation where it
    overrides the existing clip on the OutputDevice instead of intersecting
    it.
    
    This properly fixes the bug that was wrongly and badly attempted
    to be fixed by commit 99e373cd4c78084ded349f3e3de7b0504af2dd90.
    
    Change-Id: Id02678c2f134fe7b190866d6a6fff5b2e5e3aaff

diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index fcec72c0b475..d99bdb1ff77d 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -602,7 +602,7 @@ namespace vclcanvas
                 const vcl::Region aPolyClipRegion( rPoly );
 
                 rOutDev.Push( PushFlags::CLIPREGION );
-                rOutDev.SetClipRegion( aPolyClipRegion );
+                rOutDev.IntersectClipRegion( aPolyClipRegion );
 
                 doGradientFill( rOutDev,
                                 rValues,
commit 0408a590311c837d5f0ab1abfb72a564a266ddac
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Mar 7 12:35:23 2018 +0100

    tdf#115142 Revert "slideshow: clip shapes in secondary screen window"
    
    This reverts commit 99e373cd4c78084ded349f3e3de7b0504af2dd90.
    
    This is bogus as it actually does scaling and not clipping, and the
    actual clipping bug is in the VCL canvas, see following commit.
    
    Also should fix tdf#115652 and tdf#116196.
    
    Change-Id: Ief7be653a38626c9902ab5c7c453a133c2b9f882

diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx
index c023119ded06..00a8894f5ef0 100644
--- a/slideshow/source/engine/shapes/drawshape.cxx
+++ b/slideshow/source/engine/shapes/drawshape.cxx
@@ -133,26 +133,11 @@ namespace slideshow
 
         ViewShape::RenderArgs DrawShape::getViewRenderArgs() const
         {
-            uno::Reference<beans::XPropertySet> const xPropSet(mxPage,
-                    uno::UNO_QUERY_THROW);
-            sal_Int32 nWidth = 0;
-            sal_Int32 nHeight = 0;
-            xPropSet->getPropertyValue("Width") >>= nWidth;
-            xPropSet->getPropertyValue("Height") >>= nHeight;
-            basegfx::B2DRectangle slideRect(0, 0, nWidth, nHeight);
-            basegfx::B2DRectangle origBounds(maBounds);
-            origBounds.intersect(slideRect);
-            basegfx::B2DRectangle updateBounds(getUpdateArea());
-            updateBounds.intersect(slideRect);
-            basegfx::B2DRectangle bounds(getBounds());
-            bounds.intersect(slideRect);
-            basegfx::B2DRectangle unitBounds(getActualUnitShapeBounds());
-            unitBounds.intersect(slideRect);
             return ViewShape::RenderArgs(
-                origBounds,
-                updateBounds,
-                bounds,
-                unitBounds,
+                maBounds,
+                getUpdateArea(),
+                getBounds(),
+                getActualUnitShapeBounds(),
                 mpAttributeLayer,
                 maSubsetting.getActiveSubsets(),
                 mnPriority);


More information about the Libreoffice-commits mailing list