diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-11-20 00:02:44 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2014-11-20 18:20:10 +0000 |
commit | 0c5cbcd776f3f71226ea59d7d8e5d2c20f3c5c00 (patch) | |
tree | 4b25f8cb097ba28ffc7e4db558224e95b12c5801 | |
parent | 99099bb59a19a8367cb9c7c68470a31b09089144 (diff) |
simplify
Change-Id: Ib7bfe8d479ab4f0445f5a95b3108b48531f70101
Reviewed-on: https://gerrit.libreoffice.org/12997
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
-rw-r--r-- | sw/source/core/layout/flycnt.cxx | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index f09b010e47be..b23b6190e71c 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 { |