diff options
author | Eike Rathke <erack@redhat.com> | 2018-03-01 22:41:50 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2018-03-15 17:02:52 +0100 |
commit | 1c354750f9e52bfa241e3edffeb6d84dd8b92e5e (patch) | |
tree | f5ad6b94c3cf65e5cfbaf086d397814d94c238e3 | |
parent | f7247d66b3376b37da403acd74ee49f59b8b18a5 (diff) |
Resolves: tdf#54197 update input line with new cell content after Ctrl+D fill
This is a combination of 3 commits.
Resolves: tdf#54197 update input line with new cell content after Ctrl+D fill
... and invalidate cell slots.
Related: tdf#115297 copy AutoSpellData from row above if no selection
Related: tdf#54197 copy AutoSpellData from adjacent if no selection
62ebb3579d5c05e71ca10879ae0ade5bda3bbeba
82223a64f5c5ec3c98dba390d88af8369a322bd7
Change-Id: Icbe7784430f7ddeed8fa0bc56352269447ee8cbb
Reviewed-on: https://gerrit.libreoffice.org/50608
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index fb4c178e10f1..5d5457b4e088 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1264,10 +1264,36 @@ void ScViewFunc::FillSimple( FillDir eDir ) { pDocSh->UpdateOle(&GetViewData()); UpdateScrollBars(); + bool bDoAutoSpell = pDocSh->GetDocument().GetDocOptions().IsAutoSpell(); if ( bDoAutoSpell ) + { + // Copy AutoSpellData from above(left/right/below) if no selection. + switch (eDir) + { + case FILL_TO_BOTTOM: + if (aRange.aStart.Row() > 0 && aRange.aStart.Row() == aRange.aEnd.Row()) + aRange.aStart.IncRow(-1); + break; + case FILL_TO_TOP: + if (aRange.aEnd.Row() < MAXROW && aRange.aStart.Row() == aRange.aEnd.Row()) + aRange.aEnd.IncRow(1); + break; + case FILL_TO_RIGHT: + if (aRange.aStart.Col() > 0 && aRange.aStart.Col() == aRange.aEnd.Col()) + aRange.aStart.IncCol(-1); + break; + case FILL_TO_LEFT: + if (aRange.aEnd.Col() < MAXCOL && aRange.aStart.Col() == aRange.aEnd.Col()) + aRange.aEnd.IncCol(1); + break; + } CopyAutoSpellData(eDir, aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), ::std::numeric_limits<sal_uLong>::max()); + } + + // Invalidate cell slots and update input line with new content. + CellContentChanged(); } } else |