[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - editeng/source
matteocam
matteo.campanelli at gmail.com
Wed Jul 1 11:16:49 PDT 2015
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.campanelli at 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;
}
More information about the Libreoffice-commits
mailing list