Issue 108607 - svx: ambiguous && || in svx/source/svdraw/svdoole2.cxx
Summary: svx: ambiguous && || in svx/source/svdraw/svdoole2.cxx
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: DEV300m70
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: Mathias_Bauer
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks: 96084
  Show dependency tree
 
Reported: 2010-01-23 16:40 UTC by caolanm
Modified: 2017-05-20 10:24 UTC (History)
1 user (show)

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


Attachments
keep current logic (814 bytes, patch)
2010-01-23 16:41 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-01-23 16:40:35 UTC
svx/source/svdraw/svdoole2.cxx has 

if ( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
        svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() )
        || xObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE
        )

which the compiler parses as...

if ( ((nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
        svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() ))
        || xObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE
        )

which in this case I guess is what we want, right ?, i.e. not

if ( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
        (svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() )
        || xObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE)
        )
Comment 1 caolanm 2010-01-23 16:41:20 UTC
Created attachment 67373 [details]
keep current logic
Comment 2 Mathias_Bauer 2010-04-12 10:25:33 UTC
I think that the current code is correct. When an OLE object is resized, e.g. by
dragging one of its corners with the mouse, it will change its visual area in
case it is active. In case an object is not active when it is resized, the
visual area will stay unchanged and the container document will apply a scaling
factor on the objects visual representation.

OLE objects can overwrite this behavior by requesting a visual area change for
each resize because its content might look better when it is adjusted by code,
not by scaling.

This behavior is inherited from Microsoft's OLE. 

So I take your patch to silence the warning.
Comment 3 Mathias_Bauer 2010-06-03 10:55:55 UTC
set to verified