Hi,
On Sat, Sep 06, 2014 at 04:16:43AM -0700, julien2412 wrote:
Hello,
Cppcheck reported this:
1237 incorrectLogicOperator style Logical disjunction always evaluates to
true: nRepeat||!nRepeat.
in svx/source/svdraw/svdotextdecomposition.cxx
Indeed, we've got this:
1236 // loop. In loop, move through
1237 if(nRepeat || 0L == nRepeat)
1238 {
1239 drawinglayer::animation::AnimationEntryLoop aLoop(nRepeat ?
nRepeat : ENDLESS_LOOP);
1240 drawinglayer::animation::AnimationEntryLinear
aThrough(fTimeFullPath, fFrequency, bForward ? 0.0 : 1.0, bForward ? 1.0 :
0.0);
1241 aLoop.append(aThrough);
1242 rAnimList.append(aLoop);
1243 }
See
http://opengrok.libreoffice.org/xref/core/svx/source/svdraw/svdotextdecomposition.cxx#1237
First I thought about removing the test about nRepeat == 0L but line 1239
expects to have nRepeat different or equal to 0.
Any idea?
Just remove the whole test. 0 is a valid value for nRepeat and means an
infinite number of repetitions.
D.
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.