svx/source/svdraw/svdotext.cxx | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-)
New commits: commit 0aab59ad3ab459b271bc9d6bab8d4002695845c1 Author: matteocam <matteo.campane...@gmail.com> Date: Fri Jun 19 21:19:06 2015 -0400 Finding out overflow by drawing outl if coming from underflow Change-Id: Ic19c17944b0c3d7d76e4a6623984fd5207b6eea8 diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index ca45989..b6a90e0 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1972,8 +1972,14 @@ void SdrTextObj::onOverflowStatusEvent( ) SdrOutliner &aDrawOutliner = ImpGetDrawOutliner(); if (pEdtOutl != NULL) mpOverflowingText = pEdtOutl->GetOverflowingText(); - else + else if(GetTextChain()->GetLinkHandlingUnderflow(this)) { + OutlinerParaObject *pPObj = GetOutlinerParaObject(); + aDrawOutliner.SetText(*pPObj); + aDrawOutliner.IsPageOverflow(); // Check for overflow to set flags mpOverflowingText = aDrawOutliner.GetOverflowingText(); + } else { + assert(0); // Should never happen. FIXME(matteocam) + } SdrTextObj *pNextTextObj = GetNextLinkInChain(); @@ -1991,6 +1997,11 @@ void SdrTextObj::onUnderflowStatusEvent( ) if (GetTextChain()->GetLinkHandlingUnderflow(this)) { + // possibly coming from an overflow + if (pEdtOutl) { + OutlinerParaObject *pPObj = GetOutlinerParaObject(); + pEdtOutl->SetText(*pPObj); + } GetTextChain()->SetLinkHandlingUnderflow(this, false); return; } @@ -2028,7 +2039,7 @@ void SdrTextObj::onUnderflowStatusEvent( ) pEdtOutl->SetText(*pNewText); */ - const_cast<SdrTextObj*>(this)->NbcSetOutlinerParaObject(pNewText); + const_cast<SdrTextObj*>(this)->SetOutlinerParaObject(pNewText); } } @@ -2133,7 +2144,18 @@ void SdrTextObj::onChainingEvent() if (!pEdtOutl) return; - bool bIsPageOverflow = pEdtOutl->IsPageOverflow(); + bool bIsPageOverflow; + + if (GetTextChain()->GetLinkHandlingUnderflow(this)) + { + // If handling underflow we check for overflow in the object + Outliner &aDrawOutliner = ImpGetDrawOutliner(); + OutlinerParaObject *pPObj = GetOutlinerParaObject(); + aDrawOutliner.SetText(*pPObj); + bIsPageOverflow = aDrawOutliner.IsPageOverflow(); + } else { + bIsPageOverflow = pEdtOutl->IsPageOverflow(); + } // Propagates the need for change SetToBeChained( bIsPageOverflow ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits