vcl/source/outdev/textline.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 17e22f416fde350d89b935922911f0172cdeaa8c
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Sep 14 20:37:36 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Sep 15 09:43:53 2021 +0200

    Related: tdf#143831 add guards to ImplDrawWaveLineBezier
    
    seeing as the mpAlphaVDev ImplDrawWaveLineBezier sub call is not
    protected otherwise now that it can be called from the outer case
    
    Change-Id: I66f0fea134aa177bd7493720670c4724311752a8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122098
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index f9153d823fe4..417eb7342715 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -1070,6 +1070,20 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, 
const Point& rEndPos, to
 
 void OutputDevice::ImplDrawWaveLineBezier(tools::Long nStartX, tools::Long 
nStartY, tools::Long nEndX, tools::Long nEndY, tools::Long nWaveHeight, double 
fOrientation, tools::Long nLineWidth)
 {
+    // we need a graphics
+    if( !mpGraphics && !AcquireGraphics() )
+        return;
+    assert(mpGraphics);
+
+    if ( mbInitClipRegion )
+        InitClipRegion();
+
+    if ( mbOutputClipped )
+        return;
+
+    if (!InitFont())
+        return;
+
     const basegfx::B2DRectangle aWaveLineRectangle(nStartX, nStartY, nEndX, 
nEndY + nWaveHeight);
     const basegfx::B2DPolygon aWaveLinePolygon = 
basegfx::createWaveLinePolygon(aWaveLineRectangle);
     const basegfx::B2DHomMatrix aRotationMatrix = 
basegfx::utils::createRotateAroundPoint(nStartX, nStartY, 
basegfx::deg2rad(-fOrientation));

Reply via email to