diff options
author | Sebastian Geerken <devnull@localhost> | 2014-09-12 13:45:18 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-09-12 13:45:18 +0200 |
commit | 63be701d81f71cac1c5a4bc67d983e82399ef0c5 (patch) | |
tree | 722b8bdcc109b0ab2854d0cc0f5d91748629a891 /dw/oofawarewidget.cc | |
parent | 6adaf25af5c3f3e326a6a929afcd4277fcabdcd7 (diff) |
OOFAwareWidget: some fixes.
Diffstat (limited to 'dw/oofawarewidget.cc')
-rw-r--r-- | dw/oofawarewidget.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/dw/oofawarewidget.cc b/dw/oofawarewidget.cc index f1c91d11..e5e6aa2f 100644 --- a/dw/oofawarewidget.cc +++ b/dw/oofawarewidget.cc @@ -34,8 +34,13 @@ namespace dw { namespace oof { +int OOFAwareWidget::CLASS_ID = -1; + OOFAwareWidget::OOFAwareWidget () { + DBG_OBJ_CREATE ("dw::oof::OOFAwareWidget"); + registerName ("dw::oof::OOFAwareWidget", &CLASS_ID); + for (int i = 0; i < NUM_OOFM; i++) { oofContainer[i] = NULL; outOfFlowMgr[i] = NULL; @@ -44,6 +49,7 @@ OOFAwareWidget::OOFAwareWidget () OOFAwareWidget::~OOFAwareWidget () { + DBG_OBJ_DELETE (); } void OOFAwareWidget::notifySetAsTopLevel() @@ -89,7 +95,7 @@ bool OOFAwareWidget::isContainingBlock (Widget *widget, int oofmIndex) // necessary? (What about other absolutely widgets containing // children, like tables? TODO: Check CSS spec.) - return widget->instanceOf (Textblock::CLASS_ID) && + return widget->instanceOf (OOFAwareWidget::CLASS_ID) && (widget->getParent() == NULL || testWidgetAbsolutelyPositioned (widget) || testWidgetRelativelyPositioned (widget) || @@ -119,8 +125,8 @@ void OOFAwareWidget::notifySetParent () widget != NULL && oofContainer[oofmIndex] == NULL; widget = widget->getParent ()) if (isContainingBlock (widget, oofmIndex)) { - assert (widget->instanceOf (Textblock::CLASS_ID)); - oofContainer[oofmIndex] = (Textblock*)widget; + assert (widget->instanceOf (OOFAwareWidget::CLASS_ID)); + oofContainer[oofmIndex] = (OOFAwareWidget*)widget; } DBG_OBJ_ARRSET_PTR ("containingBlock", oofmIndex, |