The last few instanceOf uses?
This commit is contained in:
@ -195,8 +195,9 @@ void OOFAwareWidget::notifySetParent ()
|
|||||||
widget != NULL && oofContainer[oofmIndex] == NULL;
|
widget != NULL && oofContainer[oofmIndex] == NULL;
|
||||||
widget = widget->getParent ())
|
widget = widget->getParent ())
|
||||||
if (isOOFContainer (widget, oofmIndex)) {
|
if (isOOFContainer (widget, oofmIndex)) {
|
||||||
assert (widget->instanceOf <OOFAwareWidget>());
|
auto *oaw= dynamic_cast< OOFAwareWidget * >( widget );
|
||||||
oofContainer[oofmIndex] = (OOFAwareWidget*)widget;
|
assert (oaw);
|
||||||
|
oofContainer[oofmIndex]= oaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_OBJ_ARRSET_PTR ("oofContainer", oofmIndex, oofContainer[oofmIndex]);
|
DBG_OBJ_ARRSET_PTR ("oofContainer", oofmIndex, oofContainer[oofmIndex]);
|
||||||
|
|||||||
@ -66,8 +66,8 @@ void OOFPosRelMgr::calcWidgetRefSize (Widget *widget, Requisition *size)
|
|||||||
// (Notice also that Widget::sizeRequest has to be called in all
|
// (Notice also that Widget::sizeRequest has to be called in all
|
||||||
// cases.)
|
// cases.)
|
||||||
|
|
||||||
if (widget->instanceOf <OOFAwareWidget>())
|
if (auto *oaw= dynamic_cast< OOFAwareWidget * >( widget ))
|
||||||
*size = *((OOFAwareWidget*)widget)->getRequisitionWithoutOOF ();
|
*size = *oaw->getRequisitionWithoutOOF ();
|
||||||
|
|
||||||
|
|
||||||
DBG_OBJ_LEAVE_VAL ("%d * (%d + %d)",
|
DBG_OBJ_LEAVE_VAL ("%d * (%d + %d)",
|
||||||
|
|||||||
@ -607,8 +607,8 @@ AlignedTableCell *Table::getCellRef ()
|
|||||||
int n = curCol + row * numCols;
|
int n = curCol + row * numCols;
|
||||||
if (childDefined (n)) {
|
if (childDefined (n)) {
|
||||||
child = children->get(n)->cell.widget;
|
child = children->get(n)->cell.widget;
|
||||||
if (child->instanceOf <AlignedTableCell>())
|
if (auto *atc= dynamic_cast< AlignedTableCell * >( child ))
|
||||||
return (AlignedTableCell*)child;
|
return atc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2763,12 +2763,11 @@ void Textblock::addParbreak (int space, core::style::Style *style)
|
|||||||
way that the space is in any case visible. */
|
way that the space is in any case visible. */
|
||||||
/* Find the widget where to adjust the breakSpace. (Only
|
/* Find the widget where to adjust the breakSpace. (Only
|
||||||
consider normal flow, no floats etc.) */
|
consider normal flow, no floats etc.) */
|
||||||
|
Textblock *textblock2= nullptr;
|
||||||
for (Widget *widget = this;
|
for (Widget *widget = this;
|
||||||
widget->getParent() != NULL &&
|
( textblock2= dynamic_cast< Textblock * >( widget->getParent() ) ) &&
|
||||||
widget->getParent()->instanceOf <Textblock>() &&
|
|
||||||
!isWidgetOOF (widget);
|
!isWidgetOOF (widget);
|
||||||
widget = widget->getParent ()) {
|
widget = widget->getParent ()) {
|
||||||
Textblock *textblock2 = (Textblock*)widget->getParent ();
|
|
||||||
int index = textblock2->hasListitemValue ? 1 : 0;
|
int index = textblock2->hasListitemValue ? 1 : 0;
|
||||||
bool isfirst = (textblock2->words->getRef(index)->content.type
|
bool isfirst = (textblock2->words->getRef(index)->content.type
|
||||||
== core::Content::WIDGET_IN_FLOW
|
== core::Content::WIDGET_IN_FLOW
|
||||||
@ -3192,9 +3191,9 @@ int Textblock::getGeneratorWidth ()
|
|||||||
int xRel;
|
int xRel;
|
||||||
// We only examine instances of dw::Textblock, since they are relevant
|
// We only examine instances of dw::Textblock, since they are relevant
|
||||||
// for floats, for which this method is only called.
|
// for floats, for which this method is only called.
|
||||||
if(word->content.type == core::Content::WIDGET_IN_FLOW &&
|
if(Textblock *tbChild= nullptr;
|
||||||
word->content.widget->instanceOf<Textblock>()) {
|
word->content.type == core::Content::WIDGET_IN_FLOW &&
|
||||||
Textblock *tbChild = (Textblock*)word->content.widget;
|
( tbChild= dynamic_cast< Textblock * >( word->content.widget ) )) {
|
||||||
if(tbChild->findSizeRequestReference(this, &xRel, NULL))
|
if(tbChild->findSizeRequestReference(this, &xRel, NULL))
|
||||||
wChild = max(wChild, xRel + tbChild->getGeneratorWidth());
|
wChild = max(wChild, xRel + tbChild->getGeneratorWidth());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user