summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index fa5991baac56..2146b05d44e9 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -92,7 +92,19 @@ SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, Frmmgr_Type nT
{
// Default anchor for new graphics and objects is at-char, except for Math objects.
SwViewOption aViewOpt(*pSh->GetViewOptions());
- m_aSet.Put(SwFormatAnchor(aViewOpt.GetDefaultAnchorType()));//RndStdIds::FLY_AT_CHAR
+
+ RndStdIds eAnchorType = aViewOpt.GetDefaultAnchorType();
+
+ const SwFormatAnchor rStyleAnchor
+ = m_pOwnSh->GetFormatFromPool(nId)->GetAttrSet().GetAnchor();
+ if (rStyleAnchor.GetAnchorId() != RndStdIds::FLY_AT_PARA)
+ {
+ // The style has a custom anchor type, prefer that over the user profile
+ // default.
+ eAnchorType = rStyleAnchor.GetAnchorId();
+ }
+
+ m_aSet.Put(SwFormatAnchor(eAnchorType));
}
}
}