summaryrefslogtreecommitdiff
path: root/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-06-13 15:22:56 +0200
committerMathias Bauer <mba@openoffice.org>2010-06-13 15:22:56 +0200
commitebc5777548dea42ed966a16c66d879b1485bbfb4 (patch)
treebbba6f44a8ddd5c25683de28f8c56331589a3bc1 /sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
parenta572c2e12be5c2c40088269f3dc96e75e5912398 (diff)
CWS swlayoutrefactoring: #i81480#: enable sw code to use multiple layouts
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 729a1eabaded..243e9b3804bb 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>
@@ -131,8 +132,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() +