sc/source/ui/view/viewfun2.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
New commits: commit 1c354750f9e52bfa241e3edffeb6d84dd8b92e5e Author: Eike Rathke <er...@redhat.com> Date: Thu Mar 1 22:41:50 2018 +0100 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 <c...@libreoffice.org> Reviewed-by: Michael Meeks <michael.me...@collabora.com> 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits