svx/source/svdraw/svdotextdecomposition.cxx |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 72a93fb858bce7f4eeeb4d858d8028af035bd5af
Author: matteocam <matteo.campane...@gmail.com>
Date:   Mon Jun 15 15:00:38 2015 -0400

    Fixed NbcSetOutlinerParaObj. Get infinite loop though.
    
    Change-Id: Iade699f6b87d1aa22a6d0303accb22087090c1d5

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index b030462..87e0559 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -762,14 +762,14 @@ OutlinerParaObject 
*SdrTextObj::impGetNonOverflowingParaObject(SdrOutliner *pOut
         //pOutliner->Clear();
         //pOutliner->SetStyleSheet( 0, pEdtOutl->GetStyleSheet(0));
 
-        if (pNonOverflowingTxt->mpHeadParas != NULL)
+        if (pNonOverflowingTxt->mpHeadParas != NULL) {
             pOutliner->SetText(*pNonOverflowingTxt->mpHeadParas);
-        else { // set empty paraObj
-            OutlinerParaObject *pEmptyPObj = pOutliner->GetEmptyParaObject();
-            pOutliner->SetText(*pEmptyPObj);
+            pOutliner->AddText(*pPObj);
+         } else { // set empty paraObj
+            //OutlinerParaObject *pEmptyPObj = pOutliner->GetEmptyParaObject();
+            //pOutliner->SetText(*pEmptyPObj);
+            pOutliner->SetText(*pPObj);
         }
-
-        pOutliner->AddText(*pPObj);
     }
 
      return pOutliner->CreateParaObject();
@@ -784,7 +784,7 @@ void SdrTextObj::impLeaveOnlyNonOverflowingText(SdrOutliner 
*pOutliner) const
         pEdtOutl->SetText(*pNewText);
     // adds it to current outliner anyway (useful in static decomposition)
     pOutliner->SetText(*pNewText);
-    const_cast<SdrTextObj*>(this)->SetOutlinerParaObject(pNewText);
+    const_cast<SdrTextObj*>(this)->NbcSetOutlinerParaObject(pNewText);
 }
 
 OutlinerParaObject *SdrTextObj::impGetOverflowingParaObject(SdrOutliner 
*pOutliner, SdrTextObj *pNextTextObj) const
@@ -1632,13 +1632,16 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
         const_cast<SdrTextObj*>(this)->mpOverflowingText = 
rOutliner.GetOverflowingText();
 
         /* Leave only non overflowing text */
-        OutlinerParaObject *pNewTextCurBox = 
impGetNonOverflowingParaObject(&rOutliner);
+        impLeaveOnlyNonOverflowingText(&rOutliner);
+
+        /*OutlinerParaObject *pNewTextCurBox = 
impGetNonOverflowingParaObject(&rOutliner);
         // we need this when we are in editing mode
         // XXX: we use next line just to be sure for now
         if (pEdtOutl != NULL)
             pEdtOutl->SetText(*pNewTextCurBox);
         // adds it to current outliner anyway (useful in static decomposition)
         rOutliner.SetText(*pNewTextCurBox);
+        NbcSetOutlinerParaObject(pNewTextCurBox);*/
 
         /* Get chaining outliner  here */
         // Code adapted from ImpGetDrawOutliner
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to