diff options
author | Sebastian Geerken <devnull@localhost> | 2016-06-26 14:22:19 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2016-06-26 14:22:19 +0200 |
commit | a6e4821e31690ebd9367579f45ce8700baa35e0e (patch) | |
tree | 057834ded9399e597eccd58e367d967ed33d439a /dw | |
parent | 69a3cd0edb23470da3fd1079196936a02591f35f (diff) |
Fix valgrind complain.
Diffstat (limited to 'dw')
-rw-r--r-- | dw/textblock.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index 12868c11..53a1de24 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -2292,8 +2292,13 @@ bool Textblock::calcSizeOfWidgetInFlow (int wordIndex, Widget *widget, // Since the child widget will regard floats, we do not have to include // floats when calculating left and right border. + + // TODO Actually line1OffsetEff should be used instead of line1Offset, but + // it may not initialized here. Anyway, since ignoreLine1OffsetSometimes + // is not used, line1OffsetEff is always equal to line1Offset. + int leftBorder = boxOffsetX () + leftInnerPadding - + (lines->size () == 0 ? line1OffsetEff : 0); + + (lines->size () == 0 ? line1Offset /* ...Eff, actually */ : 0); int rightBorder = boxRestWidth (); int lastMargin, yLine = yOffsetOfLineToBeCreated (&lastMargin); |