[Libreoffice-commits] core.git: sw/inc sw/source

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Sun Dec 4 11:35:32 UTC 2016


 sw/inc/frmfmt.hxx                |    3 ++-
 sw/source/core/draw/dcontact.cxx |    6 ++++++
 sw/source/core/undo/undobj1.cxx  |   12 +-----------
 3 files changed, 9 insertions(+), 12 deletions(-)

New commits:
commit 68b64b41e5e156facb3fe20bb109a8e02dc97111
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Thu Dec 1 13:50:23 2016 +0100

    use proper message passing
    
    Change-Id: I0c6610308f75a57e517b233db66c66b34eb25189
    Reviewed-on: https://gerrit.libreoffice.org/31492
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index a0110c6..718be2e 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -239,7 +239,8 @@ namespace sw
     enum class DrawFrameFormatHintId {
         DYING,
         PREPPASTING,
-        PAGE_OUT_OF_BOUNDS
+        PREP_INSERT_FLY,
+        PAGE_OUT_OF_BOUNDS,
     };
     struct SW_DLLPUBLIC DrawFrameFormatHint final: SfxHint
     {
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 672cf98..9ecd71b 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1539,6 +1539,12 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint)
             case sw::DrawFrameFormatHintId::PREPPASTING:
                 MoveObjToVisibleLayer(GetMaster());
                 break;
+            case sw::DrawFrameFormatHintId::PREP_INSERT_FLY:
+                InsertMasterIntoDrawPage();
+                // #i40845# - follow-up of #i35635#
+                // move object to visible layer
+                MoveObjToVisibleLayer(GetMaster());
+                break;
             case sw::DrawFrameFormatHintId::PAGE_OUT_OF_BOUNDS:
                 DisconnectFromLayout();
                 break;
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 2fcc24e..c08292c 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -65,17 +65,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame)
 
     // OD 26.06.2003 #108784# - insert 'master' drawing object into drawing page
     if ( RES_DRAWFRMFMT == pFrameFormat->Which() )
-    {
-        SwDrawContact* pDrawContact =
-            static_cast<SwDrawContact*>(pFrameFormat->FindContactObj());
-        if ( pDrawContact )
-        {
-            pDrawContact->InsertMasterIntoDrawPage();
-            // #i40845# - follow-up of #i35635#
-            // move object to visible layer
-            pDrawContact->MoveObjToVisibleLayer( pDrawContact->GetMaster() );
-        }
-    }
+        pFrameFormat->CallSwClientNotify(sw::DrawFrameFormatHint(sw::DrawFrameFormatHintId::PREP_INSERT_FLY));
 
     SwFormatAnchor aAnchor( (RndStdIds)nRndId );
 


More information about the Libreoffice-commits mailing list