diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-26 15:19:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-26 15:52:00 +0100 |
commit | 8ce3c6f7c30f6f816ffd14cb640a7d0b1458860c (patch) | |
tree | 732fdb4c9b72a1641b41dc0e946c197703b83e1b | |
parent | 9c2b19c926b65fff2fcbea2b0e970aa499432410 (diff) |
coverity#704659 Unchecked dynamic_cast
Change-Id: I773351290293b1e54f6e983852baf6ffd2fc3e05
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 6ea7f946ecb5..e4be3ed58e6f 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -556,8 +556,8 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL; if ( pObject ) { - OObjectBase* pBase = dynamic_cast<OObjectBase*>(pObject); - pBase->EndListening(false); + OObjectBase& rBase = dynamic_cast<OObjectBase&>(*pObject); + rBase.EndListening(false); if ( aPos.X < i_nLeftMargin ) { aPos.X = i_nLeftMargin; @@ -571,9 +571,9 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I aSize.Width += aPos.X - i_nLeftMargin; aPos.X = i_nLeftMargin; // add listener around - pBase->StartListening(); + rBase.StartListening(); xReportComponent->setSize(aSize); - pBase->EndListening(false); + rBase.EndListening(false); } bChanged = true; } @@ -591,7 +591,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I pObject->RecalcBoundRect(); } - pBase->StartListening(); + rBase.StartListening(); } } } |