diff options
Diffstat (limited to 'sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx')
-rw-r--r-- | sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 71e85c9d94fa..857ba69146b3 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -36,6 +36,9 @@ // --> OD 2004-10-15 #i26945# #include <tabfrm.hxx> // <-- +#include "rootfrm.hxx" +#include "viewopt.hxx" +#include "viewsh.hxx" #include <frmfmt.hxx> #include <IDocumentSettingAccess.hxx> #include <fmtsrnd.hxx> @@ -159,10 +162,13 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // declare and set <bBrowse> to true, if document is in browser mode and // object is anchored at the body, but not at frame belonging to a table. - const bool bBrowse = GetAnchorFrm().IsInDocBody() && - !GetAnchorFrm().IsInTab() - ? rFrmFmt.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) - : false; + bool bBrowse = GetAnchorFrm().IsInDocBody() && !GetAnchorFrm().IsInTab(); + if( bBrowse ) + { + const ViewShell *pSh = GetAnchorFrm().getRootFrm()->GetCurrShell(); + if( !pSh || !pSh->GetViewOptions()->getBrowseMode() ) + bBrowse = false; + } // determine left/right and its upper/lower spacing. const SvxLRSpaceItem &rLR = rFrmFmt.GetLRSpace(); |