[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - include/svx svx/source

matteocam matteo.campanelli at gmail.com
Fri Jul 24 09:21:41 PDT 2015


 include/svx/svdedxv.hxx       |    1 +
 svx/source/svdraw/svdedxv.cxx |   12 +++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit c70006435a69471b921faf785571dfc61514e1e0
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Fri Jul 24 18:15:29 2015 +0200

    Add Cursor handling after post-paste chaining
    
    Change-Id: Id3bd5a86e09d0171f6d0afdbd228fa6e45042a6d

diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index c7e9c99..6b6f27c 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -128,6 +128,7 @@ protected:
     // handler for AutoGrowing text with active Outliner
     DECL_LINK(ImpOutlinerStatusEventHdl,EditStatus*);
     DECL_LINK(ImpChainingEventHdl,void*);
+    DECL_LINK(ImpAfterPasteChainingEventHdl,void*);
     DECL_LINK(ImpOutlinerCalcFieldValueHdl,EditFieldInfo*);
 
     // link for EndTextEditHdl
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index fb71e2f..9324ffd 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -525,6 +525,16 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl)
     return 0;
 }
 
+IMPL_LINK_NOARG(SdrObjEditView,ImpAfterPasteChainingEventHdl)
+{
+    SdrTextObj* pTextObj = dynamic_cast< SdrTextObj * >( GetTextEditObject());
+    if (!pTextObj)
+        return 0;
+    ImpChainingEventHdl(NULL);
+    TextChainCursorManager *pCursorManager = new TextChainCursorManager(this, pTextObj);
+    ImpMoveCursorAfterChainingEvent(pCursorManager);
+    return 0;
+}
 
 void SdrObjEditView::ImpMoveCursorAfterChainingEvent(TextChainCursorManager *pCursorManager)
 {
@@ -789,7 +799,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
             pTextEditOutlinerView->ShowCursor();
             pTextEditOutliner->SetStatusEventHdl(LINK(this,SdrObjEditView,ImpOutlinerStatusEventHdl));
             if (pTextObj->IsChainable()) {
-                pTextEditOutlinerView->SetEndPasteLinkHdl(LINK(this,SdrObjEditView,ImpChainingEventHdl) );
+                pTextEditOutlinerView->SetEndPasteLinkHdl(LINK(this,SdrObjEditView,ImpAfterPasteChainingEventHdl) );
                 /* We should call:
                  *
                     ImpChainingEventHdl(NULL);


More information about the Libreoffice-commits mailing list