diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 02efb2f9e3ff..d81967b5e9be 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -452,8 +452,15 @@ void PDFIProcessor::tilingPatternFill(int nX0, int nY0, int nX1, int nY1, void PDFIProcessor::strokePath( const uno::Reference< rendering::XPolyPolygon2D >& rPath ) { basegfx::B2DPolyPolygon aPoly=basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath); + basegfx::B2DPolyPolygon aCurClip = getCurrentContext().Clip; aPoly.transform(getCurrentContext().Transformation); + if( aCurClip.count() ) { + aPoly = basegfx::utils::clipPolyPolygonOnPolyPolygon( aPoly, aCurClip, + true, /* bInside, keep parts inside the clip */ + true /* bStroke, stroked */ ); + } + PolyPolyElement* pPoly = ElementFactory::createPolyPolyElement( m_pCurElement, getGCId(getCurrentContext()),