editeng/source/outliner/outliner.cxx       |    4 ++--
 editeng/source/outliner/overflowingtxt.cxx |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 729dbfa57af9a237357dd54cd4b3f78c1ae32295
Author: matteocam <[email protected]>
Date:   Thu Aug 20 18:22:31 2015 +0200

    Set right selection when creating OverflowingText
    
    Change-Id: I795eca81c54e3196554915571e42978974fc0d73

diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index 11e299b..9e76a00 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2159,8 +2159,8 @@ NonOverflowingText *Outliner::GetNonOverflowingText() 
const
         //sal_Int32 nStartPos = 0;
         ESelection aOverflowingTextSelection;
 
-        const sal_Int32 nEndPara = 1000000;
-        const sal_Int32 nEndPos = 1000000;
+        const sal_Int32 nEndPara = GetParagraphCount()-1;
+        const sal_Int32 nEndPos = pEditEngine->GetTextLen(nEndPara);
 
         if (nLen == 0) {
             // XXX: What happens inside this case might be dependent on the 
joining paragraps or not-thingy
diff --git a/editeng/source/outliner/overflowingtxt.cxx 
b/editeng/source/outliner/overflowingtxt.cxx
index b46ad22..9b6ae81 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -89,7 +89,7 @@ OutlinerParaObject *TextChainingUtils::DeeplyMergeParaObject(
 TranferableText TextChainingUtils::CreateTransferableFromText(Outliner *pOutl)
 {
     const EditEngine &rEditEngine = pOutl->GetEditEngine();
-    sal_Int32 nLastPara = rEditEngine.GetParagraphCount()-1;
+    sal_Int32 nLastPara = pOutl->GetParagraphCount()-1;
     ESelection aWholeTextSel(0, 0, nLastPara, 
rEditEngine.GetTextLen(nLastPara));
 
     return rEditEngine.CreateTransferable(aWholeTextSel);
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to