diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-10-26 10:54:03 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-10-30 12:13:16 +0100 |
commit | 75d4e779e408bd532ddeda2b18923806c920b4a7 (patch) | |
tree | 7c24e614b8c54d38f650b7ceb96f07beeeb446f8 /sw/source/core/objectpositioning | |
parent | f6edddfa230d6478571ef67ebdc506c54f589648 (diff) |
Adapted to get/setSwFrame and get/setSwPrint
Change-Id: I6cce40ec49dd5bd32d94fe06b9d2dabd368448be
Diffstat (limited to 'sw/source/core/objectpositioning')
4 files changed, 82 insertions, 82 deletions
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 31f0d159b77c..6c9635d717e8 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -158,7 +158,7 @@ SwTwips SwAnchoredObjectPosition::GetTopForObjPos( const SwFrame& _rFrame, const SwRectFn& _fnRect, const bool _bVert ) const { - SwTwips nTopOfFrameForObjPos = (_rFrame.FrameRA().*_fnRect->fnGetTop)(); + SwTwips nTopOfFrameForObjPos = (_rFrame.getSwFrame().*_fnRect->fnGetTop)(); if ( _rFrame.IsTextFrame() ) { @@ -213,14 +213,14 @@ void SwAnchoredObjectPosition::GetVertAlignmentValues( case text::RelOrientation::FRAME: { // #i11860# - consider upper space of previous frame - nHeight = aRectFnSet.GetHeight(_rVertOrientFrame.FrameRA()) - + nHeight = aRectFnSet.GetHeight(_rVertOrientFrame.getSwFrame()) - nVertOrientUpperSpaceForPrevFrameAndPageGrid; nOffset = 0; } break; case text::RelOrientation::PRINT_AREA: { - nHeight = aRectFnSet.GetHeight(_rVertOrientFrame.PrintRA()); + nHeight = aRectFnSet.GetHeight(_rVertOrientFrame.getSwPrint()); // #i11860# - consider upper space of previous frame nOffset = aRectFnSet.GetTopMargin(_rVertOrientFrame) - nVertOrientUpperSpaceForPrevFrameAndPageGrid; @@ -234,12 +234,12 @@ void SwAnchoredObjectPosition::GetVertAlignmentValues( { if( pPrtFrame->IsHeaderFrame() ) { - nHeight -= pPrtFrame->FrameRA().Height(); - nOffset += pPrtFrame->FrameRA().Height(); + nHeight -= pPrtFrame->getSwFrame().Height(); + nOffset += pPrtFrame->getSwFrame().Height(); } else if( pPrtFrame->IsFooterFrame() ) { - nHeight -= pPrtFrame->FrameRA().Height(); + nHeight -= pPrtFrame->getSwFrame().Height(); } pPrtFrame = pPrtFrame->GetNext(); } @@ -248,18 +248,18 @@ void SwAnchoredObjectPosition::GetVertAlignmentValues( break; case text::RelOrientation::PAGE_FRAME: { - nHeight = aRectFnSet.GetHeight(_rPageAlignLayFrame.FrameRA()); + nHeight = aRectFnSet.GetHeight(_rPageAlignLayFrame.getSwFrame()); nOffset = aRectFnSet.YDiff( - aRectFnSet.GetTop(_rPageAlignLayFrame.FrameRA()), + aRectFnSet.GetTop(_rPageAlignLayFrame.getSwFrame()), nVertOrientTop ); } break; case text::RelOrientation::PAGE_PRINT_AREA: { - nHeight = aRectFnSet.GetHeight(_rPageAlignLayFrame.PrintRA()); + nHeight = aRectFnSet.GetHeight(_rPageAlignLayFrame.getSwPrint()); nOffset = aRectFnSet.GetTopMargin(_rPageAlignLayFrame) + aRectFnSet.YDiff( - aRectFnSet.GetTop(_rPageAlignLayFrame.FrameRA()), + aRectFnSet.GetTop(_rPageAlignLayFrame.getSwFrame()), nVertOrientTop ); // if aligned to page in horizontal layout, consider header and // footer frame height appropriately. @@ -271,12 +271,12 @@ void SwAnchoredObjectPosition::GetVertAlignmentValues( { if( pPrtFrame->IsHeaderFrame() ) { - nHeight -= pPrtFrame->FrameRA().Height(); - nOffset += pPrtFrame->FrameRA().Height(); + nHeight -= pPrtFrame->getSwFrame().Height(); + nOffset += pPrtFrame->getSwFrame().Height(); } else if( pPrtFrame->IsFooterFrame() ) { - nHeight -= pPrtFrame->FrameRA().Height(); + nHeight -= pPrtFrame->getSwFrame().Height(); } pPrtFrame = pPrtFrame->GetNext(); } @@ -426,11 +426,11 @@ SwTwips SwAnchoredObjectPosition::ImplAdjustVertRelPos( const SwTwips nTopOfAnch ( !bFollowTextFlow || !GetAnchoredObj().GetAnchorFrame()->IsInTab() ) ) { - aPgAlignArea = rPageAlignLayFrame.FindPageFrame()->FrameRA(); + aPgAlignArea = rPageAlignLayFrame.FindPageFrame()->getSwFrame(); } else { - aPgAlignArea = rPageAlignLayFrame.FrameRA(); + aPgAlignArea = rPageAlignLayFrame.getSwFrame(); } } @@ -530,34 +530,34 @@ SwTwips SwAnchoredObjectPosition::ImplAdjustHoriRelPos( if( bVert ) { - if ( rAnchorFrame.FrameRA().Top() + nAdjustedRelPosX + aObjSize.Height() > - _rPageAlignLayFrame.FrameRA().Bottom() ) + if ( rAnchorFrame.getSwFrame().Top() + nAdjustedRelPosX + aObjSize.Height() > + _rPageAlignLayFrame.getSwFrame().Bottom() ) { - nAdjustedRelPosX = _rPageAlignLayFrame.FrameRA().Bottom() - - rAnchorFrame.FrameRA().Top() - + nAdjustedRelPosX = _rPageAlignLayFrame.getSwFrame().Bottom() - + rAnchorFrame.getSwFrame().Top() - aObjSize.Height(); } - if ( rAnchorFrame.FrameRA().Top() + nAdjustedRelPosX < - _rPageAlignLayFrame.FrameRA().Top() ) + if ( rAnchorFrame.getSwFrame().Top() + nAdjustedRelPosX < + _rPageAlignLayFrame.getSwFrame().Top() ) { - nAdjustedRelPosX = _rPageAlignLayFrame.FrameRA().Top() - - rAnchorFrame.FrameRA().Top(); + nAdjustedRelPosX = _rPageAlignLayFrame.getSwFrame().Top() - + rAnchorFrame.getSwFrame().Top(); } } else { - if ( rAnchorFrame.FrameRA().Left() + nAdjustedRelPosX + aObjSize.Width() > - _rPageAlignLayFrame.FrameRA().Right() ) + if ( rAnchorFrame.getSwFrame().Left() + nAdjustedRelPosX + aObjSize.Width() > + _rPageAlignLayFrame.getSwFrame().Right() ) { - nAdjustedRelPosX = _rPageAlignLayFrame.FrameRA().Right() - - rAnchorFrame.FrameRA().Left() - + nAdjustedRelPosX = _rPageAlignLayFrame.getSwFrame().Right() - + rAnchorFrame.getSwFrame().Left() - aObjSize.Width(); } - if ( rAnchorFrame.FrameRA().Left() + nAdjustedRelPosX < - _rPageAlignLayFrame.FrameRA().Left() ) + if ( rAnchorFrame.getSwFrame().Left() + nAdjustedRelPosX < + _rPageAlignLayFrame.getSwFrame().Left() ) { - nAdjustedRelPosX = _rPageAlignLayFrame.FrameRA().Left() - - rAnchorFrame.FrameRA().Left(); + nAdjustedRelPosX = _rPageAlignLayFrame.getSwFrame().Left() - + rAnchorFrame.getSwFrame().Left(); } } @@ -580,7 +580,7 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( const SwFrame& _rHoriOri { case text::RelOrientation::PRINT_AREA: { - nWidth = aRectFnSet.GetWidth(_rHoriOrientFrame.PrintRA()); + nWidth = aRectFnSet.GetWidth(_rHoriOrientFrame.getSwPrint()); nOffset = aRectFnSet.GetLeftMargin(_rHoriOrientFrame); if ( _rHoriOrientFrame.IsTextFrame() ) { @@ -597,12 +597,12 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( const SwFrame& _rHoriOri { if( pPrtFrame->IsHeaderFrame() ) { - nWidth -= pPrtFrame->FrameRA().Height(); - nOffset += pPrtFrame->FrameRA().Height(); + nWidth -= pPrtFrame->getSwFrame().Height(); + nOffset += pPrtFrame->getSwFrame().Height(); } else if( pPrtFrame->IsFooterFrame() ) { - nWidth -= pPrtFrame->FrameRA().Height(); + nWidth -= pPrtFrame->getSwFrame().Height(); } pPrtFrame = pPrtFrame->GetNext(); } @@ -614,8 +614,8 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( const SwFrame& _rHoriOri // align at left border of page frame/fly frame/cell frame nWidth = aRectFnSet.GetLeftMargin(_rPageAlignLayFrame); nOffset = aRectFnSet.XDiff( - aRectFnSet.GetLeft(_rPageAlignLayFrame.FrameRA()), - aRectFnSet.GetLeft(_rHoriOrientFrame.FrameRA()) ); + aRectFnSet.GetLeft(_rPageAlignLayFrame.getSwFrame()), + aRectFnSet.GetLeft(_rHoriOrientFrame.getSwFrame()) ); _obAlignedRelToPage = true; } break; @@ -625,7 +625,7 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( const SwFrame& _rHoriOri nWidth = aRectFnSet.GetRightMargin(_rPageAlignLayFrame); nOffset = aRectFnSet.XDiff( aRectFnSet.GetPrtRight(_rPageAlignLayFrame), - aRectFnSet.GetLeft(_rHoriOrientFrame.FrameRA()) ); + aRectFnSet.GetLeft(_rHoriOrientFrame.getSwFrame()) ); _obAlignedRelToPage = true; } break; @@ -641,7 +641,7 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( const SwFrame& _rHoriOri // align at right border of anchor frame // Unify and simplify nWidth = aRectFnSet.GetRightMargin(_rHoriOrientFrame); - nOffset = aRectFnSet.GetRight(_rHoriOrientFrame.PrintRA()); + nOffset = aRectFnSet.GetRight(_rHoriOrientFrame.getSwPrint()); } break; case text::RelOrientation::CHAR: @@ -653,17 +653,17 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( const SwFrame& _rHoriOri nWidth = 0; nOffset = aRectFnSet.XDiff( aRectFnSet.GetLeft(*ToCharRect()), - aRectFnSet.GetLeft(ToCharOrientFrame()->FrameRA()) ); + aRectFnSet.GetLeft(ToCharOrientFrame()->getSwFrame()) ); break; } SAL_FALLTHROUGH; } case text::RelOrientation::PAGE_PRINT_AREA: { - nWidth = aRectFnSet.GetWidth(_rPageAlignLayFrame.PrintRA()); + nWidth = aRectFnSet.GetWidth(_rPageAlignLayFrame.getSwPrint()); nOffset = aRectFnSet.XDiff( aRectFnSet.GetPrtLeft(_rPageAlignLayFrame), - aRectFnSet.GetLeft(_rHoriOrientFrame.FrameRA()) ); + aRectFnSet.GetLeft(_rHoriOrientFrame.getSwFrame()) ); if ( _rHoriOrientFrame.IsPageFrame() && aRectFnSet.IsVert() ) { // for to-page anchored objects, consider header/footer frame @@ -674,12 +674,12 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( const SwFrame& _rHoriOri { if( pPrtFrame->IsHeaderFrame() ) { - nWidth -= pPrtFrame->FrameRA().Height(); - nOffset += pPrtFrame->FrameRA().Height(); + nWidth -= pPrtFrame->getSwFrame().Height(); + nOffset += pPrtFrame->getSwFrame().Height(); } else if( pPrtFrame->IsFooterFrame() ) { - nWidth -= pPrtFrame->FrameRA().Height(); + nWidth -= pPrtFrame->getSwFrame().Height(); } pPrtFrame = pPrtFrame->GetNext(); } @@ -689,16 +689,16 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( const SwFrame& _rHoriOri } case text::RelOrientation::PAGE_FRAME: { - nWidth = aRectFnSet.GetWidth(_rPageAlignLayFrame.FrameRA()); + nWidth = aRectFnSet.GetWidth(_rPageAlignLayFrame.getSwFrame()); nOffset = aRectFnSet.XDiff( - aRectFnSet.GetLeft(_rPageAlignLayFrame.FrameRA()), - aRectFnSet.GetLeft(_rHoriOrientFrame.FrameRA()) ); + aRectFnSet.GetLeft(_rPageAlignLayFrame.getSwFrame()), + aRectFnSet.GetLeft(_rHoriOrientFrame.getSwFrame()) ); _obAlignedRelToPage = true; break; } default: { - nWidth = aRectFnSet.GetWidth(_rHoriOrientFrame.FrameRA()); + nWidth = aRectFnSet.GetWidth(_rHoriOrientFrame.getSwFrame()); bool bWrapThrough = _bObjWrapThrough; // If the frame format is a TextBox of a draw shape, then use the @@ -846,8 +846,8 @@ SwTwips SwAnchoredObjectPosition::CalcRelPosX( // the frame, the object is oriented at. if ( &rAnchorFrame != &_rHoriOrientFrame ) { - SwTwips nLeftOrient = aRectFnSet.GetLeft(_rHoriOrientFrame.FrameRA()); - SwTwips nLeftAnchor = aRectFnSet.GetLeft(rAnchorFrame.FrameRA()); + SwTwips nLeftOrient = aRectFnSet.GetLeft(_rHoriOrientFrame.getSwFrame()); + SwTwips nLeftAnchor = aRectFnSet.GetLeft(rAnchorFrame.getSwFrame()); nRelPosX += aRectFnSet.XDiff( nLeftOrient, nLeftAnchor ); } @@ -913,7 +913,7 @@ SwTwips SwAnchoredObjectPosition::AdjustHoriRelPosForDrawAside( SwTwips nAdjustedRelPosX = _nProposedRelPosX; // determine proposed object bound rectangle - Point aTmpPos = aRectFnSet.GetPos(rAnchorTextFrame.FrameRA()); + Point aTmpPos = aRectFnSet.GetPos(rAnchorTextFrame.getSwFrame()); if( aRectFnSet.IsVert() ) { aTmpPos.X() -= _nRelPosY + aObjBoundRect.Width(); @@ -940,19 +940,19 @@ SwTwips SwAnchoredObjectPosition::AdjustHoriRelPosForDrawAside( if( aRectFnSet.IsVert() ) { const SvxULSpaceItem& rOtherUL = pFly->GetFormat()->GetULSpace(); - const SwTwips nOtherTop = pFly->FrameRA().Top() - rOtherUL.GetUpper(); - const SwTwips nOtherBot = pFly->FrameRA().Bottom() + rOtherUL.GetLower(); + const SwTwips nOtherTop = pFly->getSwFrame().Top() - rOtherUL.GetUpper(); + const SwTwips nOtherBot = pFly->getSwFrame().Bottom() + rOtherUL.GetLower(); if ( nOtherTop <= aTmpObjRect.Bottom() + _rULSpacing.GetLower() && nOtherBot >= aTmpObjRect.Top() - _rULSpacing.GetUpper() ) { if ( _eHoriOrient == text::HoriOrientation::LEFT ) { SwTwips nTmp = nOtherBot + 1 + _rULSpacing.GetUpper() - - rAnchorTextFrame.FrameRA().Top(); + rAnchorTextFrame.getSwFrame().Top(); if ( nTmp > nAdjustedRelPosX && - rAnchorTextFrame.FrameRA().Top() + nTmp + + rAnchorTextFrame.getSwFrame().Top() + nTmp + aObjBoundRect.Height() + _rULSpacing.GetLower() - <= pObjPage->FrameRA().Height() + pObjPage->FrameRA().Top() ) + <= pObjPage->getSwFrame().Height() + pObjPage->getSwFrame().Top() ) { nAdjustedRelPosX = nTmp; } @@ -961,34 +961,34 @@ SwTwips SwAnchoredObjectPosition::AdjustHoriRelPosForDrawAside( { SwTwips nTmp = nOtherTop - 1 - _rULSpacing.GetLower() - aObjBoundRect.Height() - - rAnchorTextFrame.FrameRA().Top(); + rAnchorTextFrame.getSwFrame().Top(); if ( nTmp < nAdjustedRelPosX && - rAnchorTextFrame.FrameRA().Top() + nTmp - _rULSpacing.GetUpper() - >= pObjPage->FrameRA().Top() ) + rAnchorTextFrame.getSwFrame().Top() + nTmp - _rULSpacing.GetUpper() + >= pObjPage->getSwFrame().Top() ) { nAdjustedRelPosX = nTmp; } } - aTmpObjRect.Pos().Y() = rAnchorTextFrame.FrameRA().Top() + + aTmpObjRect.Pos().Y() = rAnchorTextFrame.getSwFrame().Top() + nAdjustedRelPosX; } } else { const SvxLRSpaceItem& rOtherLR = pFly->GetFormat()->GetLRSpace(); - const SwTwips nOtherLeft = pFly->FrameRA().Left() - rOtherLR.GetLeft(); - const SwTwips nOtherRight = pFly->FrameRA().Right() + rOtherLR.GetRight(); + const SwTwips nOtherLeft = pFly->getSwFrame().Left() - rOtherLR.GetLeft(); + const SwTwips nOtherRight = pFly->getSwFrame().Right() + rOtherLR.GetRight(); if( nOtherLeft <= aTmpObjRect.Right() + _rLRSpacing.GetRight() && nOtherRight >= aTmpObjRect.Left() - _rLRSpacing.GetLeft() ) { if ( _eHoriOrient == text::HoriOrientation::LEFT ) { SwTwips nTmp = nOtherRight + 1 + _rLRSpacing.GetLeft() - - rAnchorTextFrame.FrameRA().Left(); + rAnchorTextFrame.getSwFrame().Left(); if ( nTmp > nAdjustedRelPosX && - rAnchorTextFrame.FrameRA().Left() + nTmp + + rAnchorTextFrame.getSwFrame().Left() + nTmp + aObjBoundRect.Width() + _rLRSpacing.GetRight() - <= pObjPage->FrameRA().Width() + pObjPage->FrameRA().Left() ) + <= pObjPage->getSwFrame().Width() + pObjPage->getSwFrame().Left() ) { nAdjustedRelPosX = nTmp; } @@ -997,15 +997,15 @@ SwTwips SwAnchoredObjectPosition::AdjustHoriRelPosForDrawAside( { SwTwips nTmp = nOtherLeft - 1 - _rLRSpacing.GetRight() - aObjBoundRect.Width() - - rAnchorTextFrame.FrameRA().Left(); + rAnchorTextFrame.getSwFrame().Left(); if ( nTmp < nAdjustedRelPosX && - rAnchorTextFrame.FrameRA().Left() + nTmp - _rLRSpacing.GetLeft() - >= pObjPage->FrameRA().Left() ) + rAnchorTextFrame.getSwFrame().Left() + nTmp - _rLRSpacing.GetLeft() + >= pObjPage->getSwFrame().Left() ) { nAdjustedRelPosX = nTmp; } } - aTmpObjRect.Pos().X() = rAnchorTextFrame.FrameRA().Left() + + aTmpObjRect.Pos().X() = rAnchorTextFrame.getSwFrame().Left() + nAdjustedRelPosX; } } // end of <if (bVert)> @@ -1035,8 +1035,8 @@ bool SwAnchoredObjectPosition::DrawAsideFly( const SwFlyFrame* _pFly, SwRectFnSet aRectFnSet(&GetAnchorFrame()); if ( _pFly->IsFlyAtContentFrame() && - aRectFnSet.BottomDist( _pFly->FrameRA(), aRectFnSet.GetTop(_rObjRect) ) < 0 && - aRectFnSet.BottomDist( _rObjRect, aRectFnSet.GetTop(_pFly->FrameRA()) ) < 0 && + aRectFnSet.BottomDist( _pFly->getSwFrame(), aRectFnSet.GetTop(_rObjRect) ) < 0 && + aRectFnSet.BottomDist( _rObjRect, aRectFnSet.GetTop(_pFly->getSwFrame()) ) < 0 && ::FindContext( _pFly->GetAnchorFrame(), SwFrameType::Column ) == _pObjContext ) { sal_uLong nOtherIndex = diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index 6c05bad93860..df2fc6bd9ba9 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -303,7 +303,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() // set new anchor position and relative position SwFlyInContentFrame* pFlyInContentFrame = &const_cast<SwFlyInContentFrame&>(rFlyInContentFrame); pFlyInContentFrame->SetRefPoint( aAnchorPos, aRelAttr, aRelPos ); - if( nObjWidth != aRectFnSet.GetWidth(pFlyInContentFrame->FrameRA()) ) + if( nObjWidth != aRectFnSet.GetWidth(pFlyInContentFrame->getSwFrame()) ) { // recalculate object bound rectangle, if object width has changed. aObjBoundRect = GetAnchoredObj().GetObjRect(); @@ -313,7 +313,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() aObjBoundRect.Height( aObjBoundRect.Height() + rULSpace.GetLower() ); } } - OSL_ENSURE( aRectFnSet.GetHeight(rFlyInContentFrame.FrameRA()), + OSL_ENSURE( aRectFnSet.GetHeight(rFlyInContentFrame.getSwFrame()), "SwAnchoredObjectPosition::CalcPosition(..) - fly frame has an invalid height" ); } diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index a0d948cd698f..e3c51c2c4f92 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -529,12 +529,12 @@ void SwToContentAnchoredObjectPosition::CalcPosition() else if ( aVert.GetRelationOrient() == text::RelOrientation::PAGE_FRAME ) { nVertOffsetToFrameAnchorPos += aRectFnSet.YDiff( - aRectFnSet.GetTop(rPageAlignLayFrame.FrameRA()), + aRectFnSet.GetTop(rPageAlignLayFrame.getSwFrame()), nTopOfOrient ); } else if ( aVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA ) { - SwRect aPgPrtRect( rPageAlignLayFrame.FrameRA() ); + SwRect aPgPrtRect( rPageAlignLayFrame.getSwFrame() ); if ( rPageAlignLayFrame.IsPageFrame() ) { aPgPrtRect = @@ -661,7 +661,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() pUpperOfOrientFrame = pTmp; bMoveable = rAnchorTextFrame.IsMoveable( pUpperOfOrientFrame ); aRectFnSet.Refresh(pUpperOfOrientFrame); - nAvail = aRectFnSet.GetHeight(pUpperOfOrientFrame->PrintRA()); + nAvail = aRectFnSet.GetHeight(pUpperOfOrientFrame->getSwPrint()); } else { @@ -904,7 +904,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() SwRectFnSet fnRectX(pNextLay); if ( !bInSct || ( pUpperOfOrientFrame->FindSctFrame()->IsAnFollow( pNextLay->FindSctFrame() ) && - fnRectX.GetHeight(pNextLay->PrintRA()) ) ) + fnRectX.GetHeight(pNextLay->getSwPrint()) ) ) { SwTwips nTmpRelPosY = aRectFnSet.YDiff( aRectFnSet.GetPrtTop(*pNextLay), @@ -1052,12 +1052,12 @@ void SwToContentAnchoredObjectPosition::CalcPosition() { GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() ); } - GetAnchoredObj().SetObjTop( rAnchorTextFrame.FrameRA().Top() + + GetAnchoredObj().SetObjTop( rAnchorTextFrame.getSwFrame().Top() + aRelPos.Y() ); } else { - GetAnchoredObj().SetObjLeft( rAnchorTextFrame.FrameRA().Left() + + GetAnchoredObj().SetObjLeft( rAnchorTextFrame.getSwFrame().Left() + aRelPos.X() ); GetAnchoredObj().SetObjTop( nTopOfAnch + aRelPos.Y() ); } diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index 109f835266aa..a4b53f1668fd 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -125,8 +125,8 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() if ( !bFlyAtFly && GetAnchorFrame().IsPageFrame() && pSh && pSh->GetViewOptions()->getBrowseMode() ) { - const long nAnchorBottom = GetAnchorFrame().FrameRA().Bottom(); - const long nBottom = GetAnchorFrame().FrameRA().Top() + + const long nAnchorBottom = GetAnchorFrame().getSwFrame().Bottom(); + const long nBottom = GetAnchorFrame().getSwFrame().Top() + aRelPos.Y() + aObjBoundRect.Height(); if ( nAnchorBottom < nBottom ) { |