[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Thu Mar 1 21:53:47 UTC 2018


 sc/source/ui/view/viewfun2.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 59587251357973dc9139e7c4038c1f1563b83be4
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Mar 1 22:52:31 2018 +0100

    Related: tdf#115297 copy AutoSpellData from row above if no selection
    
    Change-Id: I62ebb3579d5c05e71ca10879ae0ade5bda3bbeba

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index cad55a396f70..606d7a0f7a48 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1285,8 +1285,13 @@ void ScViewFunc::FillSimple( FillDir eDir )
 
             bool bDoAutoSpell = pDocSh->GetDocument().GetDocOptions().IsAutoSpell();
             if ( bDoAutoSpell )
-                CopyAutoSpellData(eDir, aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(),
+            {
+                SCROW nFromRow = aRange.aStart.Row();
+                if (nFromRow > 0 && nFromRow == aRange.aEnd.Row())
+                    --nFromRow;     // copy AutoSpellData from row above if no selection
+                CopyAutoSpellData(eDir, aRange.aStart.Col(), nFromRow, aRange.aEnd.Col(), aRange.aEnd.Row(),
                         ::std::numeric_limits<sal_uLong>::max());
+            }
 
             // Invalidate cell slots and update input line with new content.
             CellContentChanged();


More information about the Libreoffice-commits mailing list