[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - editeng/source

matteocam matteo.campanelli at gmail.com
Tue Aug 18 03:56:14 PDT 2015


 editeng/source/outliner/overflowingtxt.cxx |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 02739f1876f6d945823d5c4663e6b37f435f4a2f
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Aug 18 12:54:16 2015 +0200

    Assign return value of InsertText to EditSelection
    
    Change-Id: I6e00e408ed84c4310e276de8e0b37b230748cc13

diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 3a97c89..3454aee 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -184,25 +184,30 @@ OutlinerParaObject *OverflowingText::JuxtaposeParaObject(Outliner *pOutl, Outlin
     // XXX: this code should be moved in Outliner directly
     //          creating Outliner::InsertText(...transferable...)
     EditSelection aStartSel(pOutl->pEditEngine->CreateSelection(ESelection(0,0)));
-    EditPaM aPaM = pOutl->pEditEngine->InsertText(mxOverflowingContent,
+    EditSelection aNewSel = pOutl->pEditEngine->InsertText(mxOverflowingContent,
                                                   OUString(),
                                                   aStartSel.Min(),
                                                   true);
 
     // Separate Paragraphs
-    pOutl->pEditEngine->InsertParaBreak(EditSelection(aPaM, aPaM));
+    pOutl->pEditEngine->InsertParaBreak(aNewSel);
 
     return pOutl->CreateParaObject();
 }
 
-OutlinerParaObject *OverflowingText::impMakeOverflowingParaObject(Outliner *pOutliner)
+// XXX: This method should probably be removed
+OutlinerParaObject *OverflowingText::impMakeOverflowingParaObject(Outliner *)
 {
+    /*
     // Simply Juxtaposing; no within-para merging
     OutlinerParaObject *pOverflowingPObj = new OutlinerParaObject(*mpContentTextObj);
     // the OutlinerParaObject constr. at the prev line gives no valid outliner mode, so we set it
     pOverflowingPObj->SetOutlinerMode(pOutliner->GetOutlinerMode());
 
     return pOverflowingPObj;
+    */
+    assert(0); // Should not be called
+    return NULL;
 }
 
 
@@ -218,7 +223,9 @@ OutlinerParaObject *OverflowingText::DeeplyMergeParaObject(Outliner *pOutl, Outl
     // XXX: this code should be moved in Outliner directly
     //          creating Outliner::InsertText(...transferable...)
     EditSelection aStartSel(pOutl->pEditEngine->CreateSelection(ESelection(0,0)));
-    EditPaM aPaM = pOutl->pEditEngine->InsertText(mxOverflowingContent,
+    // We don't need to mark the selection
+    // EditSelection aNewSel =
+    pOutl->pEditEngine->InsertText(mxOverflowingContent,
                                                   OUString(),
                                                   aStartSel.Min(),
                                                   true);


More information about the Libreoffice-commits mailing list