[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - editeng/source svx/source
matteocam
matteo.campanelli at gmail.com
Thu Jun 18 21:10:33 PDT 2015
editeng/source/outliner/overflowingtxt.cxx | 2 +-
svx/source/svdraw/svdotextdecomposition.cxx | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 83e85d7477b962454d8dd39f208fa7c276fe25fb
Author: matteocam <matteo.campanelli at gmail.com>
Date: Fri Jun 19 00:09:29 2015 -0400
Changed way of adding ending lines for overwriting case (no insert)
Change-Id: Ie13acc2e6eadb0d9b87ceaa44e21d1b9952d606e
diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 99b2250..196d1f8 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -27,7 +27,7 @@ OUString OverflowingText::GetEndingLines() const
{
// If the only overflowing part is some lines in a paragraph,
// the end of the overflowing text is its head.
- if (mTailTxt == "" && mpMidParas == NULL)
+ if (!HasOtherParas())
return mHeadTxt;
return mTailTxt;
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 7fb4dc6..0868bf7 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -805,16 +805,20 @@ OutlinerParaObject *SdrTextObj::impGetOverflowingParaObject(SdrOutliner *pOutlin
GetTextChain()->SetOverwriteOnOverflow(pNextTextObj, false);
if (mpOverflowingText->HasOtherParas()) {
- // Make first paragraph
+ // Make Para Object from the ending lines (to be appended later)
impSetOutlinerToEmptyTxt(pOutliner);
Paragraph *pFstPara = pOutliner->GetParagraph(0);
+ pOutliner->SetText(mpOverflowingText->GetEndingLines(), pFstPara);
+ OutlinerParaObject *pLastPara = pOutliner->CreateParaObject();
+
+ // Set heading lines as first paragraph
pOutliner->SetText(mpOverflowingText->GetHeadingLines(), pFstPara);
// Add middle paragraphs
if (mpOverflowingText->mpMidParas)
pOutliner->AddText(*mpOverflowingText->mpMidParas);
- pOutliner->Insert(mpOverflowingText->GetEndingLines());
+ pOutliner->AddText(*pLastPara);
} else {
impSetOutlinerToEmptyTxt(pOutliner);
Paragraph *pFstPara = pOutliner->GetParagraph(0);
More information about the Libreoffice-commits
mailing list