Kaydet (Commit) a6b6bb2a authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1302656 Unchecked dynamic_cast

Change-Id: If84fc54892bbe65799b3bc344c700bb43bedc0cd
üst 56763e94
...@@ -1947,7 +1947,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) : ...@@ -1947,7 +1947,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
aColLabelText( SW_RES(STR_CHART2_COL_LABEL_TEXT) ), aColLabelText( SW_RES(STR_CHART2_COL_LABEL_TEXT) ),
xDataProvider( rObj.pDataProvider ), xDataProvider( rObj.pDataProvider ),
pDataProvider( rObj.pDataProvider ), pDataProvider( rObj.pDataProvider ),
pTableCrsr( dynamic_cast<SwUnoTableCrsr*>(rObj.pTableCrsr.get())->Clone() ), pTableCrsr( dynamic_cast<SwUnoTableCrsr&>(*rObj.pTableCrsr.get()).Clone() ),
aCursorDepend( this, pTableCrsr.get() ), aCursorDepend( this, pTableCrsr.get() ),
_pPropSet( rObj._pPropSet ) _pPropSet( rObj._pPropSet )
{ {
...@@ -2032,7 +2032,7 @@ uno::Sequence< uno::Any > SAL_CALL SwChartDataSequence::getData() ...@@ -2032,7 +2032,7 @@ uno::Sequence< uno::Any > SAL_CALL SwChartDataSequence::getData()
// keep original cursor and make copy of it that gets handed // keep original cursor and make copy of it that gets handed
// over to the SwXCellRange object which takes ownership and // over to the SwXCellRange object which takes ownership and
// thus will destroy the copy later. // thus will destroy the copy later.
SwXCellRange aRange( dynamic_cast<SwUnoTableCrsr*>(pTableCrsr.get())->Clone(), *pTableFormat, aDesc ); SwXCellRange aRange( dynamic_cast<SwUnoTableCrsr&>(*pTableCrsr.get()).Clone(), *pTableFormat, aDesc );
aRange.GetDataSequence( &aRes, 0, 0 ); aRange.GetDataSequence( &aRes, 0, 0 );
} }
} }
......
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