From 00dac9306480cdca9be4e19ae3ff248df8b59c45 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 1 Jun 2021 10:55:21 +0100 Subject: cid#1485154 try moving initialization into member init list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit see if it has an effect on bogus "Uninitialized scalar variable" Change-Id: I68d6a466f7fc9aa3412d50223dc53d6b60b721c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116527 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- editeng/source/rtf/svxrtf.cxx | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'editeng') diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index b2cc406b9980..9c3f4cd2af17 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -914,23 +914,22 @@ const SfxItemSet& SvxRTFParser::GetRTFDefaults() SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange ) - : aAttrSet( rPool, pWhichRange ) + : aAttrSet(rPool, pWhichRange) + , nBasedOn(0) + , nOutlineNo(sal_uInt8(-1)) // not set { - nOutlineNo = sal_uInt8(-1); // not set - nBasedOn = 0; } - SvxRTFItemStackType::SvxRTFItemStackType( SfxItemPool& rPool, const sal_uInt16* pWhichRange, const EditPosition& rPos ) : aAttrSet( rPool, pWhichRange ) - , nStyleNo( 0 ) + , mxStartNodeIdx(rPos.MakeNodeIdx()) + , mxEndNodeIdx(mxStartNodeIdx) + , nSttCnt(rPos.GetCntIdx()) + , nEndCnt(nSttCnt) + , nStyleNo(0) { - mxStartNodeIdx = rPos.MakeNodeIdx(); - nSttCnt = rPos.GetCntIdx(); - mxEndNodeIdx = mxStartNodeIdx; - nEndCnt = nSttCnt; } SvxRTFItemStackType::SvxRTFItemStackType( @@ -938,13 +937,12 @@ SvxRTFItemStackType::SvxRTFItemStackType( const EditPosition& rPos, bool const bCopyAttr ) : aAttrSet( *rCpy.aAttrSet.GetPool(), rCpy.aAttrSet.GetRanges() ) - , nStyleNo( rCpy.nStyleNo ) + , mxStartNodeIdx(rPos.MakeNodeIdx()) + , mxEndNodeIdx(mxStartNodeIdx) + , nSttCnt(rPos.GetCntIdx()) + , nEndCnt(nSttCnt) + , nStyleNo(rCpy.nStyleNo) { - mxStartNodeIdx = rPos.MakeNodeIdx(); - nSttCnt = rPos.GetCntIdx(); - mxEndNodeIdx = mxStartNodeIdx; - nEndCnt = nSttCnt; - aAttrSet.SetParent( &rCpy.aAttrSet ); if( bCopyAttr ) aAttrSet.Put( rCpy.aAttrSet ); @@ -1107,7 +1105,6 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults ) } } - RTFPlainAttrMapIds::RTFPlainAttrMapIds( const SfxItemPool& rPool ) { nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, false ); -- cgit