summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/fly.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/fly.cxx')
-rw-r--r--sw/source/core/layout/fly.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index eaa4c9bfc4..7e26349598 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -2352,7 +2352,10 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj )
// Assure the control objects and group objects containing controls are on the control layer
if ( ::CheckControlLayer( _rNewObj.DrawObj() ) )
{
- const IDocumentDrawModelAccess* pIDDMA = GetUpper()->GetFmt()->getIDocumentDrawModelAccess();
+ const IDocumentDrawModelAccess* pIDDMA = (IsFlyFrm())
+ ? static_cast<SwFlyFrm*>(this)->GetFmt()->
+ getIDocumentDrawModelAccess()
+ : GetUpper()->GetFmt()->getIDocumentDrawModelAccess();
const SdrLayerID aCurrentLayer(_rNewObj.DrawObj()->GetLayer());
const SdrLayerID aControlLayerID(pIDDMA->GetControlsId());
const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId());