sw/source/core/text/porfld.cxx |    3 +++
 sw/source/core/text/porfld.hxx |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 6dcaa2d812a1c9eb95398d46ff00eec616f0ff68
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Aug 26 14:42:32 2022 +0100
Commit:     Christian Lohmaier <[email protected]>
CommitDate: Wed Aug 31 16:04:01 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/+/138828
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 86a5e2542a1a073f7456f2f8f6aea06d3dfd557e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138896
    Tested-by: Christian Lohmaier <[email protected]>
    Reviewed-by: Christian Lohmaier <[email protected]>

diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 6ef492c1b9d5..6110edc415fe 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -1074,6 +1074,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 519e56f8f58c..f424edbf7632 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -207,7 +207,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

Reply via email to