[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Thu Nov 20 10:21:08 PST 2014
sw/source/core/layout/flycnt.cxx | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
New commits:
commit be049d3d2e84b99c7c62fd5931fa69b3827bb6d2
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Thu Nov 20 00:09:40 2014 +0100
expand complex cascading conditional operator
Change-Id: I5702b1acd214d7ef862d72fa1a0a0dc8a09c351e
Reviewed-on: https://gerrit.libreoffice.org/12998
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index b23b6190..68d3e58 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -562,16 +562,17 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
//Follow the text flow.
// #i70582#
// --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script
- 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 ( pUp->Frm().IsInside( rPt ) )
{
// <rPt> point is inside environment of given content frame
More information about the Libreoffice-commits
mailing list