include/svx/svdotext.hxx | 1 + svx/source/svdraw/svdotextdecomposition.cxx | 12 ++++++++++-- svx/source/svdraw/svdotxed.cxx | 5 ++++- 3 files changed, 15 insertions(+), 3 deletions(-)
New commits: commit c3c510a4cb0bae1e9acf1e2b172540456094202b Author: matteocam <matteo.campane...@gmail.com> Date: Fri Jun 5 01:54:10 2015 -0400 Non-overflowing text is moved when we exit editing Change-Id: I4cab6c3363a2e58667599583d28a27cadb5266aa diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index a93f087..75df5ed 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -606,6 +606,7 @@ public: const drawinglayer::geometry::ViewInformation2D& aViewInformation) const; void impMoveChainedTextToNextLink(SdrTextObj *pNextTextObj) const; + OutlinerParaObject *impGetNonOverflowingParaObject() const; void impLeaveOnlyNonOverflowingText() const; // Handler for Chained Text diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 802863f..6b7b630 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -728,7 +728,7 @@ void SdrTextObj::impDecomposeContourTextPrimitive( rTarget = aConverter.getPrimitive2DSequence(); } -void SdrTextObj::impLeaveOnlyNonOverflowingText() const +OutlinerParaObject *SdrTextObj::impGetNonOverflowingParaObject() const { // Cut non overflowing text NonOverflowingText *pNonOverflowingTxt = @@ -754,7 +754,12 @@ void SdrTextObj::impLeaveOnlyNonOverflowingText() const rOutliner.AddText(*pPObj); } - OutlinerParaObject *pNewText = rOutliner.CreateParaObject(); + return rOutliner.CreateParaObject(); +} + +void SdrTextObj::impLeaveOnlyNonOverflowingText() const +{ + OutlinerParaObject *pNewText = impGetNonOverflowingParaObject(); const_cast<SdrTextObj*>(this)->SetOutlinerParaObject(pNewText); //const_cast<SdrTextObj*>(this)->ReformatText(); } @@ -1540,6 +1545,9 @@ void SdrTextObj::impDecomposeChainedTextPrimitive( assert (pNextTextObj); // NOTE: Commented because we do not need to do this anymore (maybe and for now) //impMoveChainedTextToNextLink(pNextTextObj); // XXX: it actually moves the overflowing text currently + + // XXX: + //const_cast<SdrTextObj*>(this)->impLeaveOnlyNonOverflowingText(); // Chaining occurred. Let's reset the status const_cast<SdrTextObj*>(this)->SetToBeChained( false ); diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index c0a5164..62e2c01 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -280,7 +280,10 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl) // for now doing the same as below - probably we don't need // any more chain checks here but one single default behavior sal_Int32 nParaAnz = rOutl.GetParagraphCount(); - pNewText = rOutl.CreateParaObject( 0, nParaAnz ); + // XXX: FRESHLY COMMENTED (5/6/15) // FIXME:matteocam + //pNewText = rOutl.CreateParaObject( 0, nParaAnz ); + + pNewText = impGetNonOverflowingParaObject(); // set non overflow part of text to current box _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits