From 2b8352eb44310fca3802a843e2c2674256b3e08c Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Wed, 29 Oct 2014 10:45:24 +0100 Subject: Paint background images always via drawinglayer Painting via GraphicObject is obsolete. See fdo#68927 where the problem was the quality of svg graphics, it seems a good idea to extend this improvement to all graphic type. Change-Id: I57a26d4fcfea8e4f666504a90281365e8a9a7e1d --- svtools/source/graphic/grfmgr.cxx | 63 --------------------------------------- 1 file changed, 63 deletions(-) (limited to 'svtools/source') diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 7c1dc2f4b9ab..fa87a2ec8c4f 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -33,8 +33,6 @@ #include #include -#include - #include #include #include @@ -607,67 +605,6 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, return bRet; } -// #i105243# -bool GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, - const Point& rPt, const Size& rSz, - const GraphicAttr* pGrfAttr, - const sal_uLong nFlags ) -{ - const GraphicAttr aGrfAttr( pGrfAttr ? *pGrfAttr : GetAttr() ); - - // Notify PDF writer about linked graphic (if any) - bool bWritingPdfLinkedGraphic( false ); - Point aPt( rPt ); - Size aSz( rSz ); - Rectangle aCropRect; - vcl::PDFExtOutDevData* pPDFExtOutDevData = - dynamic_cast(rOutDev.GetExtOutDevData()); - if( pPDFExtOutDevData ) - { - // only delegate image handling to PDF, if no special treatment is necessary - if( GetGraphic().IsLink() && - rSz.Width() > 0L && - rSz.Height() > 0L && - !aGrfAttr.IsSpecialDrawMode() && - !aGrfAttr.IsMirrored() && - !aGrfAttr.IsRotated() && - !aGrfAttr.IsAdjusted() ) - { - bWritingPdfLinkedGraphic = true; - - if( aGrfAttr.IsCropped() ) - { - tools::PolyPolygon aClipPolyPoly; - bool bRectClip; - const bool bCrop = ImplGetCropParams( &rOutDev, - aPt, aSz, - &aGrfAttr, - aClipPolyPoly, - bRectClip ); - if ( bCrop && bRectClip ) - { - aCropRect = aClipPolyPoly.GetBoundRect(); - } - } - - pPDFExtOutDevData->BeginGroup(); - } - } - - bool bRet = Draw( &rOutDev, rPt, rSz, &aGrfAttr, nFlags ); - - // Notify PDF writer about linked graphic (if any) - if( bWritingPdfLinkedGraphic ) - { - pPDFExtOutDevData->EndGroup( const_cast< Graphic& >(GetGraphic()), - aGrfAttr.GetTransparency(), - Rectangle( aPt, aSz ), - aCropRect ); - } - - return bRet; -} - bool GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D ) { -- cgit