Apache OpenOffice (AOO) Bugzilla – Issue 96163
sd: ambiguous && ||
Last modified: 2009-05-29 10:35:24 UTC
In three places source/filter/grf/sdgrffilter.cxx source/ui/view/drviews8.cxx source/ui/view/drviews9.cxx we have the pattern of.. if ((aSize.Height() > aPageSize.Height()) || (aSize.Width() > aPageSize.Width()) && aSize.Height() && aPageSize.Height()) which by operator precedence is equivalent to if ( (aSize.Height() > aPageSize.Height()) || ( (aSize.Width() > aPageSize.Width()) && aSize.Height() && aPageSize.Height() ) ) That doesn't looks quite right, I suspect we intend if ( ( (aSize.Height() > aPageSize.Height()) || (aSize.Width() > aPageSize.Width()) ) && aSize.Height() && aPageSize.Height() ) If so, then the attached patch fixes the three places using this pattern. Otherwise some extra brackets to make the logic explicit might be called for
Created attachment 57945 [details] I suspect this was what was intended
KA=>SJ: could you verify this patch, please?
the patch has been applied in cws[sjfixes10]
closing