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 <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index f9153d8..417eb73 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));