coverity#704558 Unchecked dynamic cast
Change-Id: I45ce419c65e0fac28879747787ccf1ebc25e7698
This commit is contained in:
parent
7b4d53699c
commit
5aed432830
@ -3172,6 +3172,9 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
|
|||||||
|
|
||||||
pNewControl = pControl;
|
pNewControl = pControl;
|
||||||
OUnoObject* pObj = dynamic_cast<OUnoObject*>(pControl);
|
OUnoObject* pObj = dynamic_cast<OUnoObject*>(pControl);
|
||||||
|
assert(pObj);
|
||||||
|
if(pObj)
|
||||||
|
{
|
||||||
uno::Reference<beans::XPropertySet> xUnoProp(pObj->GetUnoControlModel(),uno::UNO_QUERY);
|
uno::Reference<beans::XPropertySet> xUnoProp(pObj->GetUnoControlModel(),uno::UNO_QUERY);
|
||||||
xShapeProp.set(pObj->getUnoShape(),uno::UNO_QUERY);
|
xShapeProp.set(pObj->getUnoShape(),uno::UNO_QUERY);
|
||||||
uno::Reference<beans::XPropertySetInfo> xShapeInfo = xShapeProp->getPropertySetInfo();
|
uno::Reference<beans::XPropertySetInfo> xShapeInfo = xShapeProp->getPropertySetInfo();
|
||||||
@ -3220,6 +3223,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
|
|||||||
xShapeProp->setSize(awt::Size(aOlSize.Height,aOlSize.Width)); // switch height and width
|
xShapeProp->setSize(awt::Size(aOlSize.Height,aOlSize.Width)); // switch height and width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const sal_Int32 nShapeWidth = aMap.getUnpackedValueOrDefault(PROPERTY_WIDTH,xShapeProp->getWidth());
|
const sal_Int32 nShapeWidth = aMap.getUnpackedValueOrDefault(PROPERTY_WIDTH,xShapeProp->getWidth());
|
||||||
if ( nShapeWidth != xShapeProp->getWidth() )
|
if ( nShapeWidth != xShapeProp->getWidth() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user