diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-28 12:07:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-28 13:49:48 +0100 |
commit | d0b9fe795a9589517c813d94efc950d348c1f9a6 (patch) | |
tree | 469198c87912e5295dabb71b40a6ce81885916dd | |
parent | 551b054ba96d8474534654696e1864fef7b74420 (diff) |
coverity#704962 Unchecked dynamic_cast
Change-Id: I6960b09ef68a9755469c42715f5ccd25ac3d3896
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index e683f384afcd..a17cd9db44f0 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -3906,8 +3906,8 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An // remove actions to enable box selection UnoActionRemoveContext aRemoveContext(pDoc); } - SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pTblCrsr); - pCrsr->MakeBoxSels(); + SwUnoTableCrsr& rCrsr = dynamic_cast<SwUnoTableCrsr&>(*pTblCrsr); + rCrsr.MakeBoxSels(); switch(pEntry->nWID ) { case FN_UNO_TABLE_CELL_BACKGROUND: @@ -3944,7 +3944,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An aBoxInfo.SetValid(nValid, true); aSet.Put(aBoxInfo); - pDoc->GetTabBorders(*pCrsr, aSet); + pDoc->GetTabBorders(rCrsr, aSet); aSet.Put(aBoxInfo); SvxBoxItem aBoxItem((const SvxBoxItem&)aSet.Get(RES_BOX)); @@ -3957,7 +3957,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An { SfxUInt32Item aNumberFormat(RES_BOXATR_FORMAT); ((SfxPoolItem&)aNumberFormat).PutValue(aValue, 0); - pDoc->SetBoxAttr( *pCrsr, aNumberFormat); + pDoc->SetBoxAttr(rCrsr, aNumberFormat); } break; case FN_UNO_RANGE_ROW_LABEL: @@ -3983,15 +3983,15 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An default: { SfxItemSet aItemSet( pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID ); - SwUnoCursorHelper::GetCrsrAttr(pCrsr->GetSelRing(), + SwUnoCursorHelper::GetCrsrAttr(rCrsr.GetSelRing(), aItemSet); if (!SwUnoCursorHelper::SetCursorPropertyValue( - *pEntry, aValue, pCrsr->GetSelRing(), aItemSet)) + *pEntry, aValue, rCrsr.GetSelRing(), aItemSet)) { m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet); } - SwUnoCursorHelper::SetCrsrAttr(pCrsr->GetSelRing(), + SwUnoCursorHelper::SetCrsrAttr(rCrsr.GetSelRing(), aItemSet, nsSetAttrMode::SETATTR_DEFAULT, true); } } |