diff options
-rw-r--r-- | include/svtools/grfmgr.hxx | 8 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 63 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 11 |
3 files changed, 2 insertions, 80 deletions
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx index a8c391c0791a..3ebb7563a46a 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -431,14 +431,6 @@ public: sal_uLong nFlags = GRFMGR_DRAW_STANDARD ); - bool DrawWithPDFHandling( - OutputDevice& rOutDev, - const Point& rPt, - const Size& rSz, - const GraphicAttr* pGrfAttr = NULL, - const sal_uLong nFlags = GRFMGR_DRAW_STANDARD - ); - /** Draw the graphic repeatedly into the given output rectangle @param pOut 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 <vcl/virdev.hxx> #include <svtools/grfmgr.hxx> -#include <vcl/pdfextoutdevdata.hxx> - #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <boost/scoped_ptr.hpp> @@ -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<vcl::PDFExtOutDevData*>(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 ) { diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 9d819547c641..0272522cbc2e 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1824,15 +1824,8 @@ static void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut, // used, these coordinates have to be determined on pixel level. ::SwAlignGrfRect( &aAlignedGrfRect, *pOut ); - if (pGrf->GetGraphic().getSvgData().get()) - { // fdo#68927 - SVGs are rasterized badly by DrawWithPDFHandling - paintGraphicUsingPrimitivesHelper(*pOut, - *pGrf, pGrf->GetAttr(), aAlignedGrfRect); - } - else - { - pGrf->DrawWithPDFHandling( *pOut, aAlignedGrfRect.Pos(), aAlignedGrfRect.SSize() ); - } + paintGraphicUsingPrimitivesHelper(*pOut, + *pGrf, pGrf->GetAttr(), aAlignedGrfRect); if ( bNotInside ) pOut->Pop(); |