Kaydet (Commit) 55f6eb27 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Fridrich Štrba

coverity#704659 Unchecked dynamic_cast

Change-Id: I773351290293b1e54f6e983852baf6ffd2fc3e05
üst ee8a5820
...@@ -556,8 +556,8 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I ...@@ -556,8 +556,8 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL; SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL;
if ( pObject ) if ( pObject )
{ {
OObjectBase* pBase = dynamic_cast<OObjectBase*>(pObject); OObjectBase& rBase = dynamic_cast<OObjectBase&>(*pObject);
pBase->EndListening(false); rBase.EndListening(false);
if ( aPos.X < i_nLeftMargin ) if ( aPos.X < i_nLeftMargin )
{ {
aPos.X = i_nLeftMargin; aPos.X = i_nLeftMargin;
...@@ -571,9 +571,9 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I ...@@ -571,9 +571,9 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
aSize.Width += aPos.X - i_nLeftMargin; aSize.Width += aPos.X - i_nLeftMargin;
aPos.X = i_nLeftMargin; aPos.X = i_nLeftMargin;
// add listener around // add listener around
pBase->StartListening(); rBase.StartListening();
xReportComponent->setSize(aSize); xReportComponent->setSize(aSize);
pBase->EndListening(false); rBase.EndListening(false);
} }
bChanged = true; bChanged = true;
} }
...@@ -591,7 +591,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I ...@@ -591,7 +591,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
pObject->RecalcBoundRect(); pObject->RecalcBoundRect();
} }
pBase->StartListening(); rBase.StartListening();
} }
} }
} }
......
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