From aa2758e133a74cc5d76cdb42478604fcb0fe3f6e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 5 Mar 2017 23:34:10 +0100 Subject: Revert "Does aPos need proper initialization here?" This reverts commit 55212835b5eba797a14430a0268b3bea773e0852. For one, I'd intended to add the initialization in SalLayout::GetBoundRect, not SalLayout::GetOutline. And for another, if you look closer, the overrides of GetNextGlyphs will always set rPos (ignoring any old value) upon returning non- zero. I'd seen calls to WinSalGraphics::DrawTextLayout -> D2DWriteTextOutRenderer::operator () -> GetBoundRect fail (thus returning false from operator () and causing the assert in DrawTextLayout to fire) after 7453cb58df4ce434a1252567f961cfe497064aca "pPos and pGetNextGlypInfo always have the same value", but maybe that's even normal: Prior to that commit, that call chain would trivially return false: If none of the early returns from operator () hit, the final return (succeeded && bGlyphs && pRectToErase); would always return false as pRectToErase would be passed null from DrawTextLayout, and the assert there was assert(!result); --- vcl/source/gdi/sallayout.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl') diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 2179b63f1983..88f02d66f6fa 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -668,7 +668,7 @@ bool SalLayout::GetOutline( SalGraphics& rSalGraphics, basegfx::B2DPolyPolygon aGlyphOutline; - Point aPos(0, 0); + Point aPos; const GlyphItem* pGlyph; int nStart = 0; while (GetNextGlyphs(1, &pGlyph, aPos, nStart)) -- cgit