[Libreoffice-commits] .: sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Mar 23 03:23:23 PDT 2011


 sw/source/core/inc/flyfrm.hxx   |    2 ++
 sw/source/core/inc/frame.hxx    |    3 +++
 sw/source/core/layout/fly.cxx   |    7 ++++++-
 sw/source/core/layout/wsfrm.cxx |    4 ++++
 4 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit f269d0c90682e5f3680ebd05c12299663c346255
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Wed Mar 23 11:22:57 2011 +0100

    fdo#35584, i#115557: Fixed crash when a control is anchored to a fly frame

diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index f252325..2e073ab 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -146,6 +146,8 @@ protected:
     // #i70122#
     virtual const SwRect GetObjBoundRect() const;
 
+    virtual const IDocumentDrawModelAccess* getIDocumentDrawModelAccess( );
+
 public:
     // #i26791#
     TYPEINFO();
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 84f9a22..fd62c0e 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -35,6 +35,7 @@
 #include "swtypes.hxx"	// fuer SwTwips
 #include "swrect.hxx"
 #include "calbck.hxx"	// fuer SwClient
+#include "IDocumentDrawModelAccess.hxx"
 
 #if OSL_DEBUG_LEVEL > 1
 #include <libxml/encoding.h>
@@ -498,6 +499,8 @@ protected:
         //Schatten und Umrandung painten
     void PaintShadow( const SwRect&, SwRect&, const SwBorderAttrs& ) const;
 
+    virtual const IDocumentDrawModelAccess* getIDocumentDrawModelAccess( );
+
 public:
     TYPEINFO();	//Bereits in Basisklasse Client drin.
 
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 7a74ae5..a16ba77 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -326,6 +326,11 @@ SwFlyFrm::~SwFlyFrm()
     FinitDrawObj();
 }
 
+const IDocumentDrawModelAccess* SwFlyFrm::getIDocumentDrawModelAccess()
+{
+    return GetFmt()->getIDocumentDrawModelAccess();
+}
+
 // OD 2004-01-19 #110582#
 void SwFlyFrm::Unchain()
 {
@@ -2211,7 +2216,7 @@ 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 = getIDocumentDrawModelAccess();
         const SdrLayerID aCurrentLayer(_rNewObj.DrawObj()->GetLayer());
         const SdrLayerID aControlLayerID(pIDDMA->GetControlsId());
         const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId());
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index d8f34dd..5e3405b 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -113,6 +113,10 @@ SwFrm::SwFrm( SwModify *pMod ) :
     bCompletePaint = bInfInvalid = sal_True;
 }
 
+const IDocumentDrawModelAccess* SwFrm::getIDocumentDrawModelAccess()
+{
+    return GetUpper()->GetFmt()->getIDocumentDrawModelAccess();
+}
 
 ViewShell * SwFrm::GetShell() const
 {


More information about the Libreoffice-commits mailing list