diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-01 10:55:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-01 13:46:43 +0200 |
commit | 00dac9306480cdca9be4e19ae3ff248df8b59c45 (patch) | |
tree | 37eee246def8b6fb46bdf9ea781128f69473491e /editeng | |
parent | e7afd6407401014f9eee6cbce0f80da7c0491a4e (diff) |
cid#1485154 try moving initialization into member init list
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 <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/rtf/svxrtf.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
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 ); |