svx/source/svdraw/svdedxv.cxx | 14 +++++++++++++- svx/source/svdraw/svdotext.cxx | 7 ------- 2 files changed, 13 insertions(+), 8 deletions(-)
New commits: commit 7f44515aa8ac339757d6fdf3d1ce6fc15849d940 Author: matteocam <matteo.campane...@gmail.com> Date: Mon Jul 6 16:49:12 2015 -0400 Fixed function name Change-Id: I3187547ac920725e448d9053893c857dbd17d427 diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 61c1593..cc16d53 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -490,13 +490,14 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) OutlinerView* pOLV = GetTextEditOutlinerView(); if( pTextObj && pOLV) { + TextChain *pTextChain = pTextObj->GetTextChain(); // This is true during an underflow-caused overflow (with pEdtOutl->SetText()) - if (GetTextChain()->GetNilChainingEvent(pTextObj)) { + if (pTextChain->GetNilChainingEvent(pTextObj)) { return 0; } // We prevent to trigger further handling of overflow/underflow for pTextObj - GetTextChain()->SetNilChainingEvent(pTextObj, true); + pTextChain->SetNilChainingEvent(pTextObj, true); // Save previous selection pos ESelection aPreChainingSel(pOLV->GetSelection()); @@ -507,7 +508,7 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) // XXX: this logic could be put in a separate approppriate class /* Cursor motion stuff */ - CursorChainingEvent aCursorEvent = pTextObj->GetTextChain()->GetCursorEvent(pTextObj); + CursorChainingEvent aCursorEvent = pTextChain->GetCursorEvent(pTextObj); SdrTextObj *pNextLink = pTextObj->GetNextLinkInChain(); switch (aCursorEvent) { @@ -534,8 +535,8 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) ESelection aEndSel(nLastParaIndex,nLenLastPara,nLastParaIndex,nLenLastPara); */ - // XXX: Must be called - GetTextChain()->SetNilChainingEvent(pTextObj, false); + // NOTE: Must be called. Don't let the function return if you set it to true and not reset it + pTextChain->SetNilChainingEvent(pTextObj, false); } else { // XXX fprintf(stderr, "[OnChaining] No Edit Outliner View\n"); commit f0618282407e22d2486da761af7a8d033babcfdd Author: matteocam <matteo.campane...@gmail.com> Date: Mon Jul 6 16:47:24 2015 -0400 NilChainingEvents handled in SdrObjEditView Change-Id: I30dd131b849c3a8a97d5a75a61fc013b3d17b89e diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index bc5bfb0..61c1593 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -490,6 +490,14 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) OutlinerView* pOLV = GetTextEditOutlinerView(); if( pTextObj && pOLV) { + // This is true during an underflow-caused overflow (with pEdtOutl->SetText()) + if (GetTextChain()->GetNilChainingEvent(pTextObj)) { + return 0; + } + + // We prevent to trigger further handling of overflow/underflow for pTextObj + GetTextChain()->SetNilChainingEvent(pTextObj, true); + // Save previous selection pos ESelection aPreChainingSel(pOLV->GetSelection()); @@ -498,6 +506,7 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) // XXX: this logic could be put in a separate approppriate class /* Cursor motion stuff */ + CursorChainingEvent aCursorEvent = pTextObj->GetTextChain()->GetCursorEvent(pTextObj); SdrTextObj *pNextLink = pTextObj->GetNextLinkInChain(); @@ -525,6 +534,8 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) ESelection aEndSel(nLastParaIndex,nLenLastPara,nLastParaIndex,nLenLastPara); */ + // XXX: Must be called + GetTextChain()->SetNilChainingEvent(pTextObj, false); } else { // XXX fprintf(stderr, "[OnChaining] No Edit Outliner View\n"); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 3455c97..531e41c 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1992,12 +1992,6 @@ void SdrTextObj::onChainingEvent() if (!pEdtOutl) return; - // This is true during an underflow-caused overflow (with pEdtOutl->SetText()) - if (GetTextChain()->GetNilChainingEvent(this)) { - - return; - } - // Outliner for text transfer SdrOutliner &aDrawOutliner = ImpGetDrawOutliner(); @@ -2027,7 +2021,6 @@ void SdrTextObj::onChainingEvent() } } - GetTextChain()->SetNilChainingEvent(this, false); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits