[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - drawinglayer/source

Caolán McNamara caolanm at redhat.com
Tue Apr 29 03:43:24 PDT 2014


 drawinglayer/source/processor2d/vclprocessor2d.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 3bedb85460b028500ff450eeeb80acf8278df39e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 29 10:11:28 2014 +0100

    Resolves: fdo#62038 EPS not rendered in drawinglayer code paths
    
    It attempts to see if the outputdevice can draw the true EPS
    but if the outputdevice is in record-only mode it just stashs a
    new eps metaaction, and this time with no fallback image, and
    happily returns ok so the drawing layer ends up with a new
    replacement eps metaction, except with no preview anymore.
    
    Perhaps DrawEPS should return false here, but its safer this way
    
    Change-Id: I0e0b16e4b2be00802a1af1f8147500d816a3c5de
    (cherry picked from commit 3db00c554b38ee6c1b6e969768da53db4dc2f92a)
    Reviewed-on: https://gerrit.libreoffice.org/9192
    Tested-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 7f2ab70..0f580e8 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -1351,12 +1351,14 @@ namespace drawinglayer
 
                 if(!aRectangle.IsEmpty())
                 {
+                    bool bWillReallyRender = mpOutputDevice->IsDeviceOutputNecessary();
                     // try to paint EPS directly without fallback visualisation
-                    const bool bEPSPaintedDirectly(mpOutputDevice->DrawEPS(
+                    const bool bEPSPaintedDirectly = bWillReallyRender &&
+                        mpOutputDevice->DrawEPS(
                         aRectangle.TopLeft(),
                         aRectangle.GetSize(),
                         rEpsPrimitive2D.getGfxLink(),
-                        0));
+                        0);
 
                     if(!bEPSPaintedDirectly)
                     {


More information about the Libreoffice-commits mailing list