summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-03-01 22:52:31 +0100
committerEike Rathke <erack@redhat.com>2018-03-01 22:52:45 +0100
commit59587251357973dc9139e7c4038c1f1563b83be4 (patch)
tree5341cd75e8da67e88340f9eba2b8d974ad99a5b8
parentf97622381b77a0b14af5600ef4179f277723d50f (diff)
Related: tdf#115297 copy AutoSpellData from row above if no selection
Change-Id: I62ebb3579d5c05e71ca10879ae0ade5bda3bbeba
-rw-r--r--sc/source/ui/view/viewfun2.cxx7
1 files changed, 6 insertions, 1 deletions
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();