From de07f40030bbd604bc42d58f0e954cca284a2646 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Sat, 21 Apr 2018 07:50:54 +0200 Subject: cppcheck: identicalInnerCondition renamed temporary list in EnhancedCustomShape2d.cxx to avoid shadow of a local variable Change-Id: I17a2261dafd2067480fcc5314af4f48765d6b690 Reviewed-on: https://gerrit.libreoffice.org/53244 Tested-by: Jenkins Reviewed-by: Jochen Nitschke --- sw/source/filter/ww8/ww8par2.cxx | 44 +++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'sw/source/filter/ww8') diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 0395b9902528..0f328d303d0f 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1146,30 +1146,28 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS, short nLen) WW8_TCellVer6 const * pTc = reinterpret_cast(pT); for (int i = 0; i < nColsToRead; i++, ++pCurrentTC,++pTc) { - if( i < nColsToRead ) - { // TC from file ? - sal_uInt8 aBits1 = pTc->aBits1Ver6; - pCurrentTC->bFirstMerged = sal_uInt8( ( aBits1 & 0x01 ) != 0 ); - pCurrentTC->bMerged = sal_uInt8( ( aBits1 & 0x02 ) != 0 ); - pCurrentTC->rgbrc[ WW8_TOP ] - = WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_TOP ] )); - pCurrentTC->rgbrc[ WW8_LEFT ] - = WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_LEFT ] )); - pCurrentTC->rgbrc[ WW8_BOT ] - = WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_BOT ] )); - pCurrentTC->rgbrc[ WW8_RIGHT ] + // TC from file ? + sal_uInt8 aBits1 = pTc->aBits1Ver6; + pCurrentTC->bFirstMerged = sal_uInt8( ( aBits1 & 0x01 ) != 0 ); + pCurrentTC->bMerged = sal_uInt8( ( aBits1 & 0x02 ) != 0 ); + pCurrentTC->rgbrc[ WW8_TOP ] + = WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_TOP ] )); + pCurrentTC->rgbrc[ WW8_LEFT ] + = WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_LEFT ] )); + pCurrentTC->rgbrc[ WW8_BOT ] + = WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_BOT ] )); + pCurrentTC->rgbrc[ WW8_RIGHT ] + = WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_RIGHT ] )); + if( ( pCurrentTC->bMerged ) + && ( i > 0 ) ) + { + // Cell merged -> remember + //bWWMergedVer6[i] = true; + pTCs[i-1].rgbrc[ WW8_RIGHT ] = WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_RIGHT ] )); - if( ( pCurrentTC->bMerged ) - && ( i > 0 ) ) - { - // Cell merged -> remember - //bWWMergedVer6[i] = true; - pTCs[i-1].rgbrc[ WW8_RIGHT ] - = WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_RIGHT ] )); - // apply right border to previous cell - // bExist must not be set to false, because WW - // does not count this cells in text boxes.... - } + // apply right border to previous cell + // bExist must not be set to false, because WW + // does not count this cells in text boxes.... } } } -- cgit v1.2.1