svx/source/svdraw/svdotextdecomposition.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit 3ba153bb9323032d6d61cb655b2d075fb9b9d8df Author: matteocam <matteo.campane...@gmail.com> Date: Thu Jun 11 14:04:26 2015 -0400 Replace some clears with setting empty text Change-Id: I16f5f3f08f5375e6f4052839e8a8967a220a985c diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index d77e157..c17436d 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -778,6 +778,12 @@ void SdrTextObj::impLeaveOnlyNonOverflowingText(SdrOutliner *pOutliner) const const_cast<SdrTextObj*>(this)->SetOutlinerParaObject(pNewText); } +void impSetOutlinerToEmptyTxt(SdrOutliner *pOutliner) +{ + OutlinerParaObject *pEmptyTxt = pOutliner->GetEmptyParaObject(); + pOutliner->SetText(*pEmptyTxt); +} + OutlinerParaObject *SdrTextObj::impGetOverflowingParaObject(SdrOutliner *pOutliner, SdrTextObj *pNextTextObj) const { @@ -807,7 +813,8 @@ OutlinerParaObject *SdrTextObj::impGetOverflowingParaObject(SdrOutliner *pOutlin OutlinerParaObject *pJoiningPara = NULL; if (pOldPara0) { - //pOutliner->Clear(); + //pOutliner->Clear(); // you need a clear outliner here + impSetOutlinerToEmptyTxt(pOutliner); pTmpPara0 = pOutliner->GetParagraph(0); pOutliner->SetText(mpOverflowingText->mTailTxt + aOldPara0Txt, pTmpPara0); @@ -816,6 +823,7 @@ OutlinerParaObject *SdrTextObj::impGetOverflowingParaObject(SdrOutliner *pOutlin // start actual composition //pOutliner->Clear(); + impSetOutlinerToEmptyTxt(pOutliner); // Set headText at the beginning of box Paragraph *pNewPara0 = pOutliner->GetParagraph(0); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits