[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/source

matteocam matteo.campanelli at gmail.com
Thu Jun 11 11:30:19 PDT 2015


 svx/source/svdraw/svdotextdecomposition.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 1fadb6bb9052d1d6dc66afa11a5ceb29c7cc2272
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Thu Jun 11 14:29:37 2015 -0400

    Setting both outliner's and textObj's text in decomposition
    
    Change-Id: I95feefc67295070a5b12d032436d3138e3b9fc81

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index b48e7f9..e7ada87 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -780,7 +780,8 @@ void SdrTextObj::impLeaveOnlyNonOverflowingText(SdrOutliner *pOutliner) const
     // we need this when we are in editing mode
     if (pEdtOutl != NULL)
         pEdtOutl->SetText(*pNewText);
-
+    // adds it to current outliner anyway (useful in static decomposition)
+    pOutliner->SetText(*pNewText);
     const_cast<SdrTextObj*>(this)->SetOutlinerParaObject(pNewText);
 }
 
@@ -1650,13 +1651,15 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
     // Sets original text
     rOutliner.SetText(*pOutlinerParaObject);
 
+    /* Begin overflow handling */
+
     // If overflow occurs we have to cut the text at the right point
     if ( rOutliner.IsPageOverflow() ) {
-        const OutlinerParaObject *pNewTxt = impGetNonOverflowingParaObject(&rOutliner);
-        rOutliner.SetText(*pNewTxt);
+        impLeaveOnlyNonOverflowingText(&rOutliner);
 
         // XXX: Order transfer of stuff in next link here
     }
+    /* End overflow handling */
 
     // set visualizing page at Outliner; needed e.g. for PageNumberField decomposition
     rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage()));


More information about the Libreoffice-commits mailing list