summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2016-06-26 14:22:19 +0200
committerSebastian Geerken <devnull@localhost>2016-06-26 14:22:19 +0200
commita6e4821e31690ebd9367579f45ce8700baa35e0e (patch)
tree057834ded9399e597eccd58e367d967ed33d439a
parent69a3cd0edb23470da3fd1079196936a02591f35f (diff)
Fix valgrind complain.
-rw-r--r--dw/textblock.cc7
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);