diff options
-rw-r--r-- | dw/textblock.cc | 1 | ||||
-rw-r--r-- | dw/textblock.hh | 10 | ||||
-rw-r--r-- | dw/textblock_linebreaking.cc | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index ab5c44e8..bdb8067d 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -1855,6 +1855,7 @@ void Textblock::fillWord (int wordNo, int width, int ascent, int descent, word->size.width = width; word->size.ascent = ascent; word->size.descent = descent; + DBG_SET_WORD_SIZE (wordNo); word->origSpace = word->effSpace = 0; word->hyphenWidth = 0; word->badnessAndPenalty.setPenalty (PENALTY_PROHIBIT_BREAK); diff --git a/dw/textblock.hh b/dw/textblock.hh index a7eeab47..80f29bd7 100644 --- a/dw/textblock.hh +++ b/dw/textblock.hh @@ -936,6 +936,16 @@ public: DBG_SET_WORD_PENALTY (n, 1, "1"); \ } D_STMT_END +#define DBG_SET_WORD_SIZE(n) \ + D_STMT_START { \ + DBG_OBJ_ARRATTRSET_NUM ("words", n, "size.width", \ + words->getRef(n)->size.width); \ + DBG_OBJ_ARRATTRSET_NUM ("words", n, "size.ascent", \ + words->getRef(n)->size.ascent); \ + DBG_OBJ_ARRATTRSET_NUM ("words", n, "size.descent", \ + words->getRef(n)->size.descent); \ + } D_STMT_END + #define DBG_MSG_WORD(aspect, prio, prefix, n, suffix) \ D_STMT_START { \ if ((n) < 0 || (n) >= words->size ()) \ diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc index 719389a6..974d64f4 100644 --- a/dw/textblock_linebreaking.cc +++ b/dw/textblock_linebreaking.cc @@ -1917,6 +1917,7 @@ void Textblock::rewrap () switch (word->content.type) { case core::Content::WIDGET_IN_FLOW: word->content.widget->sizeRequest (&word->size); + DBG_SET_WORD_SIZE (i); break; case core::Content::WIDGET_OOF_REF: @@ -1924,6 +1925,7 @@ void Textblock::rewrap () int oofmIndex = getOOFMIndex (word->content.widget); oof::OutOfFlowMgr *oofm = searchOutOfFlowMgr (oofmIndex); oofm->calcWidgetRefSize (word->content.widget, &(word->size)); + DBG_SET_WORD_SIZE (i); } break; |