svx/source/svdraw/svdotext.cxx | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
New commits: commit d910aeb4e8b73e9679cdbc954cbf82217b02ff3e Author: matteocam <matteo.campane...@gmail.com> Date: Fri Jun 19 21:52:56 2015 -0400 Other changes related to finding overflow in drawing outl Change-Id: I7f5b1996c622cce53a4497e7faf579efdbb8646f diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index b6a90e0..3c394de 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1970,14 +1970,19 @@ void SdrTextObj::onOverflowStatusEvent( ) // Pushes text in next link on the fly if ( mbToBeChained ) { SdrOutliner &aDrawOutliner = ImpGetDrawOutliner(); - if (pEdtOutl != NULL) - mpOverflowingText = pEdtOutl->GetOverflowingText(); - else if(GetTextChain()->GetLinkHandlingUnderflow(this)) { + + // If this is the a post-underflow-type of overflow then we cannot + // trust the editing outl on the text since it has still the old one + if(GetTextChain()->GetLinkHandlingUnderflow(this)) { OutlinerParaObject *pPObj = GetOutlinerParaObject(); + aDrawOutliner.SetUpdateMode(true); + aDrawOutliner.SetMaxAutoPaperSize(pEdtOutl->GetMaxAutoPaperSize()); aDrawOutliner.SetText(*pPObj); aDrawOutliner.IsPageOverflow(); // Check for overflow to set flags mpOverflowingText = aDrawOutliner.GetOverflowingText(); - } else { + } else if (pEdtOutl != NULL) + mpOverflowingText = pEdtOutl->GetOverflowingText(); + else { assert(0); // Should never happen. FIXME(matteocam) } @@ -2014,11 +2019,9 @@ void SdrTextObj::onUnderflowStatusEvent( ) OutlinerParaObject *pNextLinkWholeText = pNextLink->GetOutlinerParaObject(); if (pNextLinkWholeText) { OutlinerParaObject *pCurText; - if (pEdtOutl) { - pCurText = pEdtOutl->CreateParaObject(); - } else { - pCurText = GetOutlinerParaObject(); - } + + pCurText = pEdtOutl->CreateParaObject(); + // NewTextForCurBox = Txt(CurBox) ++ Txt(NextBox) aDrawOutliner.SetText(*pCurText); aDrawOutliner.AddText(*pNextLinkWholeText); @@ -2150,6 +2153,8 @@ void SdrTextObj::onChainingEvent() { // If handling underflow we check for overflow in the object Outliner &aDrawOutliner = ImpGetDrawOutliner(); + aDrawOutliner.SetUpdateMode(true); + aDrawOutliner.SetMaxAutoPaperSize(pEdtOutl->GetMaxAutoPaperSize()); OutlinerParaObject *pPObj = GetOutlinerParaObject(); aDrawOutliner.SetText(*pPObj); bIsPageOverflow = aDrawOutliner.IsPageOverflow(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits