Kaydet (Commit) c34cc212 authored tarafından Chris Laplante's avatar Chris Laplante Kaydeden (comit) Caolán McNamara

cppcheck: Fix redundant assignments in the sw module

Change-Id: I5f266ced31295b327cdd7075b2e9d66698a01ade
Reviewed-on: https://gerrit.libreoffice.org/8914Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 91821848
......@@ -1206,6 +1206,8 @@ sal_Bool SwTableAutoFmtTbl::Save( SvStream& rStream ) const
.WriteUChar( (sal_uInt8)GetStoreCharSet( ::osl_getThreadTextEncoding() ) );
bRet = 0 == rStream.GetError();
if (!bRet)
return sal_False;
// Write this version number for all attributes
m_pImpl->m_AutoFormats[0].GetBoxFmt(0).SaveVersionNo(
......
......@@ -1156,10 +1156,9 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields, SwPageFrm
SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, sal_Bool bFtn )
{
SwRootFrm *pRoot = (SwRootFrm*)pPrevPage->GetUpper();
SwPageFrm *pSibling = (SwPageFrm*)pRoot->GetLower();
SwPageDesc *pDesc = pSibling->GetPageDesc();
SwPageFrm *pSibling = (SwPageFrm*)pPrevPage->GetNext();
SwPageDesc *pDesc = 0;
pSibling = (SwPageFrm*)pPrevPage->GetNext();
// insert right (odd) or left (even) page?
bool bNextOdd = !pPrevPage->OnRightPage();
bool bWishedOdd = bNextOdd;
......@@ -1167,7 +1166,6 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, sal_Bool bFtn )
// Which PageDesc is relevant?
// For CntntFrm take the one from format if provided,
// otherwise from the Follow of the PrevPage
pDesc = 0;
if ( IsFlowFrm() && !SwFlowFrm::CastFlowFrm( this )->IsFollow() )
{ SwFmtPageDesc &rDesc = (SwFmtPageDesc&)GetAttrSet()->GetPageDesc();
pDesc = rDesc.GetPageDesc();
......
......@@ -1102,7 +1102,6 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
pCurrPor = pFollow;
}
nLastLeft = nOldRealWidth - nQuoWidth;
Right( Right() - nQuoWidth );
SWAP_IF_NOT_SWAPPED( pFrm )
......
......@@ -676,6 +676,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
*pArgs++ <<= aLateInitSettings;
Sequence<Any> aEmptyArgs( 3 );
// cppcheck-suppress redundantAssignment
pArgs = aEmptyArgs.getArray();
*pArgs++ <<= xInfoSet;
*pArgs++ <<= xStatusIndicator;
......
......@@ -292,7 +292,6 @@ void sw_frmitems_MergeXMLVertPos( SvxGraphicPosition& ePos,
case GPOS_LT:
case GPOS_LM:
case GPOS_LB:
ePos = GPOS_MT==eVert ? GPOS_LT : (GPOS_MM==eVert ? GPOS_LM : GPOS_LB);
ePos = eVert;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment