sw/source/core/text/porfld.cxx | 3 +++ sw/source/core/text/porfld.hxx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit 3895d4c574ac1b6bf02c493494a034bdc5d0a42e Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Aug 26 14:42:32 2022 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Aug 26 21:54:23 2022 +0200 crashtesting: empty brace init of o3tl::enumarray doesn't zero each element so the stretch used to layout fdo66401-6.docx is random, leading to sometimes too much stretch for cairo/freetype to handle and the conversion crashes. A problem since: commit d51db77c8d87f210785a8a8c6dd875f7bacddb3c Date: Tue Oct 15 01:57:12 2019 +0300 Remove some memset calls Replace them with default initialization or calloc Change-Id: I49408eee6c7e36bd9c98cbb10c7f95a57c0f7a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138827 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 2affe7edd844..444313cc2533 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -1086,6 +1086,9 @@ void SwTextFrame::StopAnimation( const OutputDevice* pOut ) */ SwCombinedPortion::SwCombinedPortion( const OUString &rText ) : SwFieldPortion( rText ) + , m_aWidth{ static_cast<sal_uInt16>(0), + static_cast<sal_uInt16>(0), + static_cast<sal_uInt16>(0) } , m_nUpPos(0) , m_nLowPos(0) , m_nProportion(55) diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx index 45a2027b4e74..84141a340448 100644 --- a/sw/source/core/text/porfld.hxx +++ b/sw/source/core/text/porfld.hxx @@ -213,7 +213,7 @@ public: class SwCombinedPortion : public SwFieldPortion { sal_uInt16 m_aPos[6]; // up to six X positions - o3tl::enumarray<SwFontScript,sal_uInt16> m_aWidth = {}; // one width for every scripttype + o3tl::enumarray<SwFontScript,sal_uInt16> m_aWidth; // one width for every scripttype SwFontScript m_aScrType[6]; // scripttype of every character sal_uInt16 m_nUpPos; // the Y position of the upper baseline sal_uInt16 m_nLowPos; // the Y position of the lower baseline