[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/source
matteocam
matteo.campanelli at gmail.com
Fri Jun 19 18:19:32 PDT 2015
svx/source/svdraw/svdotext.cxx | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
New commits:
commit 0aab59ad3ab459b271bc9d6bab8d4002695845c1
Author: matteocam <matteo.campanelli at 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 );
More information about the Libreoffice-commits
mailing list