diff options
author | Sebastian Geerken <devnull@localhost> | 2015-12-29 13:22:31 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2015-12-29 13:22:31 +0100 |
commit | 59643c8abb46e2eaadf4a2d177ac916da521546d (patch) | |
tree | 1270aabdcd6761b2dc4deac0d0a12a4c32101cb4 /dw/textblock_linebreaking.cc | |
parent | 6211c25f5528bf4a3e660f94de459b83bdd5c2e9 (diff) |
SRDOP: RTFL messages.
Diffstat (limited to 'dw/textblock_linebreaking.cc')
-rw-r--r-- | dw/textblock_linebreaking.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc index 0f76b2f4..0b7e4e5a 100644 --- a/dw/textblock_linebreaking.cc +++ b/dw/textblock_linebreaking.cc @@ -30,6 +30,7 @@ #include <math.h> using namespace lout; +using namespace lout::misc; namespace dw { @@ -782,10 +783,12 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll) } while (floatHandled); int minHeight; - if (firstIndex <= breakPos) + if (firstIndex <= breakPos) { // Not an empty line: calculate line height from contents. minHeight = 1; - else { + DBG_OBJ_MSGF ("construct.word", 1, "%d <= %d => minHeight = %d", + firstIndex, breakPos, minHeight); + } else { // Empty line. Too avoid too many lines one pixel high, we // use the float heights. if (newLineHasFloatLeft && newLineHasFloatRight) @@ -799,6 +802,14 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll) else // May this happen? minHeight = 1; + + DBG_OBJ_MSGF ("construct.word", 1, + "%d < %d => minHeight = %d (l: %s (%d), r: %s (%d))", + firstIndex, breakPos, minHeight, + boolToStr (newLineHasFloatLeft), + newLineHasFloatLeft ? newLineLeftFloatHeight : 0, + boolToStr (newLineHasFloatRight), + newLineHasFloatRight ? newLineRightFloatHeight : 0); } addLine (firstIndex, breakPos, lastFloatPos, tempNewLine, minHeight); @@ -969,7 +980,7 @@ void Textblock::balanceBreakPosAndHeight (int wordIndex, int firstIndex, runNo++; } - DBG_OBJ_LEAVE (); + DBG_OBJ_LEAVE_VAL ("%d, %d, %d", *searchUntil, *lastFloatPos, *height); } // *wordIndexEnd must be initialized (initially to wordIndex) |