Issue 113329 - sw: && || ambiguity in frmtool.cxx
Summary: sw: && || ambiguity in frmtool.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 12:22 UTC by caolanm
Modified: 2017-05-20 10:22 UTC (History)
2 users (show)

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


Attachments
version 1, keep logic silence gcc warnings (677 bytes, patch)
2010-07-21 12:22 UTC, caolanm
no flags Details | Diff
version 2, change logic, possibly what was intended (677 bytes, patch)
2010-07-21 12:23 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 12:22:17 UTC
in frmtool.cxx we have...
if( pSct && ( pFtnFrm && !pSct->IsInFtn() ) || pUpper->IsCellFrm() )
    pSct = NULL;

by precedence thats...

if( (pSct && (pFtnFrm && !pSct->IsInFtn())) || pUpper->IsCellFrm() )

seeing as the target is to set pSct to NULL, then there's no point doing it if
its already NULL so this likely should be...

if( pSct && ((pFtnFrm && !pSct->IsInFtn()) || pUpper->IsCellFrm()) )
    pSct = NULL;
Comment 1 caolanm 2010-07-21 12:22:43 UTC
Created attachment 70754 [details]
version 1, keep logic silence gcc warnings
Comment 2 caolanm 2010-07-21 12:23:55 UTC
Created attachment 70755 [details]
version 2, change logic, possibly what was intended
Comment 3 mst.ooo 2010-08-02 15:11:11 UTC
mine
Comment 4 mst.ooo 2010-08-02 15:49:28 UTC
doesn't seem to matter much in this case, the result will be the same...
but i prefer version 2.

fixed in cws sw34bf01
http://hg.services.openoffice.org/hg/cws/sw34bf01/rev/324ae7d552ae
Comment 5 mst.ooo 2010-10-07 11:09:30 UTC
please verify
Comment 6 caolanm 2010-10-07 11:23:28 UTC
verified