From a6e4821e31690ebd9367579f45ce8700baa35e0e Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Sun, 26 Jun 2016 14:22:19 +0200 Subject: Fix valgrind complain. --- dw/textblock.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3