[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/source
matteocam
matteo.campanelli at gmail.com
Tue Jun 23 14:58:18 PDT 2015
svx/source/svdraw/svdotext.cxx | 3 +++
svx/source/svdraw/svdotextdecomposition.cxx | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit e7123b1b7f92be21dcdb1b9edfe839d4926a30c7
Author: matteocam <matteo.campanelli at gmail.com>
Date: Tue Jun 23 17:57:16 2015 -0400
Fixed source of (non)overflowing text after UF-caused OF
Change-Id: I432120ef6476c3ab373206b7015e2444ed4dedff
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index df1a01b..c38170e 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -2051,6 +2051,8 @@ void SdrTextObj::onUnderflowStatusEvent( )
aDrawOutliner.AddText(*pNextLinkWholeText);
bool bIsOverflowFromUnderflow = aDrawOutliner.IsPageOverflow();
+ if (bIsOverflowFromUnderflow)
+ mpOverflowingText = aDrawOutliner.GetOverflowingText();
OutlinerParaObject *pNewText = aDrawOutliner.CreateParaObject();
@@ -2066,6 +2068,7 @@ void SdrTextObj::onUnderflowStatusEvent( )
// handle overflow
if (bIsOverflowFromUnderflow) {
+
// prevents infinite loops when setting text for editing outliner
GetTextChain()->SetNilChainingEvent(const_cast<SdrTextObj*>(this), true);
impLeaveOnlyNonOverflowingText(&aDrawOutliner);
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 2ad4c40..dcb4ad2 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -739,7 +739,8 @@ OutlinerParaObject *SdrTextObj::impGetNonOverflowingParaObject(SdrOutliner *pOut
{
NonOverflowingText *pNonOverflowingTxt;
// We have to get text from the editing outliner if this is set
- if (pEdtOutl != NULL)
+ if (pEdtOutl != NULL
+ && !GetTextChain()->GetNilChainingEvent(const_cast<SdrTextObj*>(this))) // this is equivalent to checking for not(underflow-caused overflow)
pNonOverflowingTxt =
pEdtOutl->GetNonOverflowingText();
else
More information about the Libreoffice-commits
mailing list