summaryrefslogtreecommitdiff
path: root/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx')
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
index cf02ed8e45cd..6637c361c923 100644
--- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
@@ -31,15 +31,16 @@
#include <anchoredobject.hxx>
#include <frame.hxx>
#include <pagefrm.hxx>
-#ifndef _SVX_SVDOBJ_HXX
#include <svx/svdobj.hxx>
-#endif
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmtsrnd.hxx>
#include <IDocumentSettingAccess.hxx>
#include <frmatr.hxx>
+#include "viewsh.hxx"
+#include "viewopt.hxx"
+#include "rootfrm.hxx"
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
@@ -135,8 +136,9 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
// if in online-layout the bottom of to-page anchored object is beyond
// the page bottom, the page frame has to grow by growing its body frame.
+ const ViewShell *pSh = GetAnchorFrm().getRootFrm()->GetCurrShell();
if ( !bFlyAtFly && GetAnchorFrm().IsPageFrm() &&
- rFrmFmt.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
+ pSh && pSh->GetViewOptions()->getBrowseMode() )
{
const long nAnchorBottom = GetAnchorFrm().Frm().Bottom();
const long nBottom = GetAnchorFrm().Frm().Top() +