diff options
-rw-r--r-- | dw/textblock.hh | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/dw/textblock.hh b/dw/textblock.hh index f78be2df..faf65d0a 100644 --- a/dw/textblock.hh +++ b/dw/textblock.hh @@ -926,34 +926,48 @@ public: .getPenalty (i)); \ } D_STMT_END +#ifdef DBG_RTFL +#define DBG_OBJ_ARRATTRSET_PTR_NUM(var, ind, attr, val1, val2) \ + RTFL_OBJ_PRINT ("set", "p:s.d.s:p (d)", this, var, ind, attr, val1, val2) +#else +#define DBG_OBJ_ARRATTRSET_PTR_NUM(var, ind, attr, val1, val2) STMT_NOP +#endif + #define DBG_SET_WORD(n) \ D_STMT_START { \ switch (words->getRef(n)->content.type) { \ case ::dw::core::Content::TEXT: \ DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "TEXT"); \ - DBG_OBJ_ARRATTRSET_STR ("words", n, "text/widget/breakSpace", \ + DBG_OBJ_ARRATTRSET_STR ("words", n, \ + "text/widget/widgetReference/breakSpace", \ words->getRef(n)->content.text); \ break; \ case ::dw::core::Content::WIDGET_IN_FLOW: \ DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "WIDGET_IN_FLOW"); \ - DBG_OBJ_ARRATTRSET_PTR ("words", n, "text/widget/breakSpace", \ + DBG_OBJ_ARRATTRSET_PTR ("words", n, \ + "text/widget/widgetReference/breakSpace", \ words->getRef(n)->content.widget); \ break; \ case ::dw::core::Content::WIDGET_OOF_REF: \ - /* It would be nice to show also parentRef. */ \ DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "WIDGET_OOF_REF"); \ - DBG_OBJ_ARRATTRSET_PTR ("words", n, "text/widget/breakSpace", \ - words->getRef(n) \ - ->content.widgetReference->widget); \ + DBG_OBJ_ARRATTRSET_PTR_NUM ("words", n, \ + "text/widget/widgetReference/breakSpace", \ + words->getRef(n) \ + ->content.widgetReference->widget, \ + words->getRef(n) \ + ->content.widgetReference->parentRef); \ break; \ case ::dw::core::Content::BREAK: \ DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "BREAK"); \ - DBG_OBJ_ARRATTRSET_NUM ("words", n, "text/widget/breakSpace", \ + DBG_OBJ_ARRATTRSET_NUM ("words", n, \ + "text/widget/widgetReference/breakSpace", \ words->getRef(n)->content.breakSpace); \ break; \ default: \ DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "???"); \ - DBG_OBJ_ARRATTRSET_SYM ("words", n, "text/widget/breakSpace", "???"); \ + DBG_OBJ_ARRATTRSET_SYM ("words", n, \ + "text/widget/widgetReference/breakSpace", \ + "???"); \ } \ DBG_SET_WORD_PENALTY (n, 0, "0"); \ DBG_SET_WORD_PENALTY (n, 1, "1"); \ @@ -984,9 +998,11 @@ public: words->getRef(n)->content.widget); \ break; \ case ::dw::core::Content::WIDGET_OOF_REF: \ - /* It would be nice to show also parentRef. */ \ - DBG_OBJ_MSGF (aspect, prio, prefix "WIDGET_OOF_REF / %p" suffix, \ - words->getRef(n)->content.widgetReference->widget); \ + DBG_OBJ_MSGF (aspect, prio, \ + prefix "WIDGET_OOF_REF / %p (%d)" suffix,\ + words->getRef(n)->content.widgetReference->widget, \ + words->getRef(n)->content.widgetReference \ + ->parentRef); \ break; \ case ::dw::core::Content::BREAK: \ DBG_OBJ_MSGF (aspect, prio, prefix "BREAK / %d" suffix, \ |