Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On Tue, Feb 5, 2013 at 6:03 PM, Caolán McNamara <caolanm@redhat.com> wrote:

On Tue, 2013-02-05 at 14:26 -0800, julien2412 wrote:
Hello,

Cppcheck detected this:
sc/source/core/data/table5.cxx
147   unreadVariable  style   Variable 'bSkipBreaks' is assigned a value
that is
never used.

Hmm, I reckon kohei should have a look at that. bSkipBreaks doesn't go
anywhere so its doing nothing. git blame shows d8c68b41b and references
#i94698 and looking at the context of the original patch there it seems
that back then there was only a single "bSkipBreaks" bool while now
there are two, bSkipColBreaks and bSkipRowBreaks.

Presumably somewhere along the go-ooo time
sc-fit-to-width-height-skip-breaks.diff didn't apply after bSkipBreaks
got split into bSkipColBreaks and bSkipRowBreaks and the fixup didn't
take account of that.


Yup, that's probably what happened.  When you look closely at the two if
statement blocks where the values of bSkipBreaks, bSkipColBreaks and
bSkipRowBreaks are assigned, they are almost identical. The second one came
from the patch I wrote back in the Go-OO times, and the first one was added
by Niklas later.  My patch was against the code before Niklas' change, and
as a result of this mixup and merge hiccups bSkipBreaks got left out in
limbo.

Given this, and the way the code looks today, we can safely remove
bSkipBreaks and the whole if statement (the 2nd one) where bSkipBreaks is
assigned a value.

Kohei



C.



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.