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
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();
}
}
}
......
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