[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - vcl/source

Caolán McNamara caolanm at redhat.com
Mon Jul 25 07:37:26 UTC 2016


 vcl/source/gdi/pdfextoutdevdata.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 8c04534c4a9272d3b35c619d18edb34ef16e63f2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 22 16:30:14 2016 +0100

    Resolves: tdf#100838 no transparency support on using original jpg data path
    
    This became a problem since...
    
    commit 76ec54e8c9f3580450bca85236a4f5af0c328588
    Author: Michael Meeks <michael.meeks at collabora.com>
    Date:   Mon Feb 8 14:24:15 2016 +0000
    
        tdf#97662 - Try to preserve original compressed JPEGs harder.
    
        Avoiding de-compressing and re-compressing them saves lots of time too.
    
    for the default JPEG Compress + Reduce Image resolution case
    
    but appears to always be a problem with the Lossless - Reduce Image resolution
    case.
    
    Change-Id: I24c69a59a16d69817e402cd87f84e744ee146a66
    (cherry picked from commit c72db36c7c791b1f92d3dd29fbc40c8ef168c609)
    Reviewed-on: https://gerrit.libreoffice.org/27446
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 03ed698..34d0c1b 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -442,7 +442,8 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
                 Graphic   aGraphic( mGraphics.front() );
 
                 mGraphics.pop_front();
-                mParaInts.pop_front(); //Transparency
+                sal_Int32 nTransparency = mParaInts.front();
+                mParaInts.pop_front();
                 aOutputRect = mParaRects.front();
                 mParaRects.pop_front();
                 aVisibleOutputRect = mParaRects.front();
@@ -463,7 +464,15 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
                                                        aVisibleOutputRect.Right(), aVisibleOutputRect.Bottom() ) ) );
                             rWriter.SetClipRegion( aRect);
                         }
+
                         Bitmap aMask;
+                        if (nTransparency)
+                        {
+                            AlphaMask aAlphaMask(aGraphic.GetSizePixel());
+                            aAlphaMask.Erase(nTransparency);
+                            aMask = aAlphaMask.GetBitmap();
+                        }
+
                         SvMemoryStream aTmp;
                         const sal_uInt8* pData = aGfxLink.GetData();
                         sal_uInt32 nBytes = aGfxLink.GetDataSize();


More information about the Libreoffice-commits mailing list