editeng/source/outliner/outliner.cxx | 2 +- editeng/source/outliner/overflowingtxt.cxx | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit 20f4c1f5c025afd2afb1abd612753f421186ee39 Author: matteocam <matteo.campane...@gmail.com> Date: Wed Jul 1 14:15:40 2015 -0400 Fixed Outliner mode issue; Fixed wrong para index Change-Id: I88024bcc8280d017db10570f636f101a25d270b9 diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index bfd4189..63c40a1 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -2231,7 +2231,7 @@ OverflowingText *Outliner::GetOverflowingText() const sal_uInt32 nOverflowingPara = pEditEngine->GetOverflowingParaNum(); ESelection aOverflowingTextSel; sal_Int32 nLastPara = nParaCount-1; - sal_Int32 nLastParaLen = GetText(GetParagraph(nOverflowingPara-1)).getLength(); + sal_Int32 nLastParaLen = GetText(GetParagraph(nLastPara-1)).getLength(); aOverflowingTextSel = ESelection(nOverflowingPara, nLen, nLastPara, nLastParaLen); diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx index 5a7b15c..666f53b 100644 --- a/editeng/source/outliner/overflowingtxt.cxx +++ b/editeng/source/outliner/overflowingtxt.cxx @@ -28,7 +28,11 @@ OutlinerParaObject *NonOverflowingText::ToParaObject(Outliner *pOutliner) const { if (mpContentTextObj) - return new OutlinerParaObject(*mpContentTextObj); + { + OutlinerParaObject *pPObj = new OutlinerParaObject(*mpContentTextObj); + pPObj->SetOutlinerMode(pOutliner->GetOutlinerMode()); + return pPObj; + } // XXX: Possibility: let the NonUnderflowingParaObject just be a TextEditObject created by the Outliner (by means of a selection). @@ -99,7 +103,10 @@ OutlinerParaObject *OverflowingText::GetJuxtaposedParaObject(Outliner *pOutl, Ou OutlinerParaObject *pOverflowingPObj = new OutlinerParaObject(*mpContentTextObj); pOutl->SetText(*pOverflowingPObj); pOutl->AddText(*pNextPObj); - return pOutl->CreateParaObject(); + + OutlinerParaObject *pPObj = pOutl->CreateParaObject(); + pPObj->SetOutlinerMode(pOutl->GetOutlinerMode()); + return pPObj; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits