sw/source/core/layout/flycnt.cxx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-)
New commits: commit 99099bb59a19a8367cb9c7c68470a31b09089144 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Wed Nov 19 23:47:35 2014 +0100 expand complex cascading conditional operator Change-Id: I290797eba555617e39ced5ba8e6c209fd6d0780f Reviewed-on: https://gerrit.libreoffice.org/12996 Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 4aae102..f09b010 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1202,16 +1202,19 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) if ( pCnt->Frm().IsInside( aNew ) ) { // #i70582# - const SwTwips nTopForObjPos = - bVert - ? ( bVertL2R - ? ( pCnt->Frm().Left() + - pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) - : ( pCnt->Frm().Left() + - pCnt->Frm().Width() - - pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) ) - : ( pCnt->Frm().Top() + - pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ); + SwTwips nTopForObjPos; + if ( bVert ) + { + nTopForObjPos = pCnt->Frm().Left(); + if ( bVertL2R ) + nTopForObjPos += pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + else + nTopForObjPos += pCnt->Frm().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + } + else + { + nTopForObjPos = pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + } if( bVert ) { if ( bVertL2R )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits