svx/source/svdraw/svdotxed.cxx | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-)
New commits: commit 83fe0b18b0c37c859f123722d08e79fbe32e880b Author: matteocam <matteo.campane...@gmail.com> Date: Wed Jul 30 17:38:03 2014 +0300 Template of SdrTextObj actions for chaining after edit is over Change-Id: I4b6edd5c28518d73623d2cb1fa16ee7f343eb5af diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 4c7754e..b8deb75 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -254,12 +254,29 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl) if(rOutl.IsModified()) { OutlinerParaObject* pNewText = NULL; + OutlinerParaObject* pOverflownText = NULL; - // to make the gray field background vanish again + // to make the gray field background vanish again rOutl.UpdateFields(); - sal_Int32 nParaAnz = rOutl.GetParagraphCount(); - pNewText = rOutl.CreateParaObject( 0, nParaAnz ); + // FIXME(matteocam) + if ( IsToBeChained() ) + { + // set non overflow part of text to current box + pNewText = rOutl.GetNotOverflowingParaObject(); + pNextText = rOutl.GetOverflowingParaObject(); + + // XXX: should this SdrTextObj know "how much text to ask" by CreateParaObject? + // No, it must be the editengine (or outliner) to give it since it is + // a special case: we want to have something that may be interrupted + // within a paragraph itself. + + } + else // standard case + { + sal_Int32 nParaAnz = rOutl.GetParagraphCount(); + pNewText = rOutl.CreateParaObject( 0, nParaAnz ); + } // need to end edit mode early since SetOutlinerParaObject already // uses GetCurrentBoundRect() which needs to take the text into account @@ -274,6 +291,14 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl) nStat &= ~EE_CNTRL_AUTOPAGESIZE; rOutl.SetControlWord(nStat); + // sets text to next box + if (pNextText != NULL) { + SdrTextObj *pNextTextObj = GetNextLinkInChain(); + pNextTextObj->SetOutlinerParaObject( pOverflownText ); + pNextTextObj->BegTextEdit( rOutl ); + // XXX: Also, will all those calls currently in impCopyTextInTextObj be necessary too? + } + mbInEditMode = false; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits