summaryrefslogtreecommitdiff
path: root/sw/source/core/frmedt/fefly1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/frmedt/fefly1.cxx')
-rw-r--r--sw/source/core/frmedt/fefly1.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index d175b9963129..ce7b32d42581 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -46,6 +46,7 @@
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentState.hxx>
+#include <IDocumentLayoutAccess.hxx>
#include <dview.hxx>
#include <dflyobj.hxx>
#include <dcontact.hxx>
@@ -88,7 +89,7 @@ static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor,
else
{
const SwCntntNode *pCntNd = rNode.GetCntntNode();
- const SwCntntFrm* pCFrm = pCntNd ? pCntNd->getLayoutFrm( pCntNd->GetDoc()->GetCurrentLayout(), &rPt, 0, false ) : 0;
+ const SwCntntFrm* pCFrm = pCntNd ? pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, 0, false ) : 0;
const SwPageFrm *pPg = pCFrm ? pCFrm->FindPageFrm() : 0;
rAnchor.SetPageNum( pPg ? pPg->GetPhyPageNum() : 1 );
@@ -162,7 +163,7 @@ static bool lcl_FindAnchorPos(
SwCrsrMoveState aState( MV_SETONLYTEXT );
SwPosition aPos( rDoc.GetNodes() );
aTmpPnt.setX(aTmpPnt.getX() - 1); // do not land in the fly!
- rDoc.GetCurrentLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
+ rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
pNewAnch = ::FindAnchor(
aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( rFrm.getRootFrm(), 0, 0, false ),
aTmpPnt )->FindFlyFrm();