Issue 113325 - sw: && || ambiguity in calcmove.cxx/pagechg.cxx
Summary: sw: && || ambiguity in calcmove.cxx/pagechg.cxx
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: DEV300m84
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: 3.4.0
Assignee: caolanm
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks: 96084
  Show dependency tree
 
Reported: 2010-07-21 11:56 UTC by caolanm
Modified: 2017-05-20 10:22 UTC (History)
3 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
version 1, keep logic silence gcc warnings (646 bytes, patch)
2010-07-21 11:56 UTC, caolanm
no flags Details | Diff
version 2, change logic, small possibility that is what was intended (724 bytes, patch)
2010-07-21 11:57 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2010-07-21 11:56:28 UTC
in calcmove.cxx we have...

if ( bFly && 
    WEIT_WECH == pObj->GetObjRect().Width()||
    rFmt.GetFrmSize().GetWidthPercent() )

by precedence that's 

if ( (bFly && WEIT_WECH == pObj->GetObjRect().Width()) ||
    rFmt.GetFrmSize().GetWidthPercent() )

is that what we want (i.e. version1 patch) ? I guess there's a small outside
chance we might have intended...

if ( bFly && 
    (WEIT_WECH == pObj->GetObjRect().Width() ||
    rFmt.GetFrmSize().GetWidthPercent()) )

?
Comment 1 caolanm 2010-07-21 11:56:51 UTC
Created attachment 70750 [details]
version 1, keep logic silence gcc warnings
Comment 2 caolanm 2010-07-21 11:57:06 UTC
Created attachment 70751 [details]
version 2, change logic, small possibility that is what was intended
Comment 3 caolanm 2010-07-21 13:04:22 UTC
same WEIT_WECH usage in pagechg.cxx as well
Comment 4 mst.ooo 2010-08-02 15:11:38 UTC
mine
Comment 5 mst.ooo 2010-08-02 15:46:51 UTC
the WEIT_WECH constant is only used with writer flyframes, so variant 1 is right.

fixed in cws sw34bf01
http://hg.services.openoffice.org/hg/cws/sw34bf01/rev/e0f56d62009f
Comment 6 mst.ooo 2010-08-02 15:47:40 UTC
d'oh
Comment 7 mst.ooo 2010-10-07 11:08:33 UTC
please verify
Comment 8 caolanm 2010-10-07 11:15:23 UTC
verified