svx/source/svdraw/svdotxed.cxx | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
New commits: commit 98b10d15f111c0960959c26f6fa5778f028a8228 Author: matteocam <matteo.campane...@gmail.com> Date: Wed Aug 5 15:09:34 2015 +0200 Set text object before flushing overflow checks Change-Id: Ie7e3162616f7d1ab53198dd0190326885a31b5fc diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index f948674..92288ad 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -316,6 +316,8 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl) // Set parameters // Code from ImpSetTextEditParams ImpUpdateOutlParamsForOverflow(&rDrawOutl, GetNextLinkInChain()); + const OutlinerParaObject *pObj = GetNextLinkInChain()->GetOutlinerParaObject(); + rDrawOutl.SetText(*pObj); rDrawOutl.SetUpdateMode(true); // XXX: Change name of method above to impHandleChainingEventsNonEditMode commit b0ad0b1a8294dd95f38fe4028787b01781e0ed68 Author: matteocam <matteo.campane...@gmail.com> Date: Wed Aug 5 14:43:58 2015 +0200 Update parameters for overflow as done for edt outl Change-Id: I963a50e8f5a6511cfe5dc9e5fe4d308c29d64d75 diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 02c800fe..f948674 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -262,6 +262,18 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p if (pViewInit!=NULL) *pViewInit=aViewInit; } +void ImpUpdateOutlParamsForOverflow(SdrOutliner *pOutl, SdrTextObj *pTextObj) +{ + Size aPaperMin; + Size aPaperMax; + Rectangle aEditArea; + pTextObj->TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,NULL); + + pOutl->SetMinAutoPaperSize(aPaperMin); + pOutl->SetMaxAutoPaperSize(aPaperMax); + pOutl->SetPaperSize(Size()); +} + void SdrTextObj::EndTextEdit(SdrOutliner& rOutl) { OutlinerParaObject* pNewText = NULL; @@ -286,13 +298,25 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl) rOutl.ClearOverflowingParaNum(); // XXX: Experiment /* Flush overflow for next textbox */ - if (IsChainable() && + if ( + IsChainable() && GetNextLinkInChain() && GetTextChain()->GetPendingOverflowCheck(GetNextLinkInChain()) ) { GetTextChain()->SetPendingOverflowCheck(GetNextLinkInChain(), false); // NEXT: Prepare outliner for overflow + /* FIXME + * Outliner needs to be prepared in the same way it is prepared + * in SdrTextObj::impDecomposeChainedTextPrimitive. + * This is not immediately feasible because that code needs some parameters + * that are specific of decomposition. + * Is there any other part where we get those parameters, e.g. who prepares the editing outliner? XXX + */ SdrOutliner rDrawOutl = GetNextLinkInChain()->ImpGetDrawOutliner(); + + // Set parameters // Code from ImpSetTextEditParams + ImpUpdateOutlParamsForOverflow(&rDrawOutl, GetNextLinkInChain()); + rDrawOutl.SetUpdateMode(true); // XXX: Change name of method above to impHandleChainingEventsNonEditMode GetNextLinkInChain()->impHandleChainingEventsDuringDecomposition(rDrawOutl); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits