[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Thu Nov 20 10:20:38 PST 2014
sw/source/core/layout/flycnt.cxx | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
New commits:
commit 0c5cbcd776f3f71226ea59d7d8e5d2c20f3c5c00
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Thu Nov 20 00:02:44 2014 +0100
simplify
Change-Id: Ib7bfe8d479ab4f0445f5a95b3108b48531f70101
Reviewed-on: https://gerrit.libreoffice.org/12997
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 f09b010..b23b6190 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -1202,30 +1202,15 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
if ( pCnt->Frm().IsInside( aNew ) )
{
// #i70582#
- SwTwips nTopForObjPos;
if ( bVert )
{
- nTopForObjPos = pCnt->Frm().Left();
+ nY = pCnt->Frm().Left() - rNew.X();
if ( bVertL2R )
- nTopForObjPos += pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
- else
- nTopForObjPos += pCnt->Frm().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
+ nY = -nY;
+ nY -= pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
}
else
- {
- nTopForObjPos = pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
- }
- if( bVert )
- {
- if ( bVertL2R )
- nY = rNew.X() - nTopForObjPos;
- else
- nY = nTopForObjPos - rNew.X() - Frm().Width();
- }
- else
- {
- nY = rNew.Y() - nTopForObjPos;
- }
+ nY = rNew.Y() - pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
}
else
{
More information about the Libreoffice-commits
mailing list