sc/source/core/data/document.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit e0f710ad29d33acda3c1b77d7a0980ca9ae2e3d1 Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Thu Dec 14 12:07:48 2023 +0300 Commit: Gülşah Köse <gulsah.k...@collabora.com> CommitDate: Wed Jan 3 11:59:46 2024 +0100 ONLINE: Exit cell edit mode before add a new sheet Prevents to move last edited cell to new sheet. Signed-off-by: Gülşah Köse <gulsah.k...@collabora.com> Change-Id: If4a4533d81ce244ae50bbdde1fae89da14f6b53a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160758 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index aafd4271e5d1..04e20ce4b8ac 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -485,6 +485,11 @@ void ScDocument::InvalidateStreamOnSave() bool ScDocument::InsertTab( SCTAB nPos, const OUString& rName, bool bExternalDocument, bool bUndoDeleteTab ) { + // auto-accept any in-process input to prevent move the cell into next sheet in online. + if (comphelper::LibreOfficeKit::isActive()) + if (!SC_MOD()->IsFormulaMode()) + SC_MOD()->InputEnterHandler(); + SCTAB nTabCount = GetTableCount(); bool bValid = ValidTab(nTabCount); if ( !bExternalDocument ) // else test rName == "'Doc'!Tab" first