sc/inc/globstr.hrc | 1 + sc/source/ui/view/viewfunc.cxx | 5 +++++ 2 files changed, 6 insertions(+)
New commits: commit fd11b63244f784b336690d9096cd3f820cdbb9ee Author: Henry Castro <hcas...@collabora.com> AuthorDate: Mon Dec 4 10:33:01 2023 -0400 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Dec 5 12:59:14 2023 +0100 sc: show a message dialog if insert cells fail Use case, go to the max row and insert a row. Signed-off-by: Henry Castro <hcas...@collabora.com> Change-Id: I930d7724b9c94e10e9207ec749b7249d2fee0e39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160314 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit eccbe3bb4ed6f0bed4e7fbacfaf50762c93f9464) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160183 Tested-by: Jenkins diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index e8e45fc01b2e..8b07dc508edd 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -566,6 +566,7 @@ #define STR_UNDO_EDIT_SPARKLINE NC_("STR_UNDO_EDIT_SPARKLINE", "Edit Sparkline") #define STR_UNDO_THEME_CHANGE NC_("STR_UNDO_THEME_CHANGE", "Theme Change") #define STR_UNDO_THEME_COLOR_CHANGE NC_("STR_UNDO_THEME_COLOR_CHANGE", "Theme Color Change") +#define STR_ERR_INSERT_CELLS NC_("STR_ERR_INSERT_CELLS", "Failed to insert cells") #endif diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 98d2a1ebbe42..0b8b0865f0fc 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -1786,6 +1786,11 @@ bool ScViewFunc::InsertCells( InsCellCmd eCmd, bool bRecord, bool bPartOfPaste ) true /* bGroups */, GetViewData().GetTabNo()); } } + else + { + ErrorMessage(STR_ERR_INSERT_CELLS); + } + OUString aStartAddress = aRange.aStart.GetColRowString(); OUString aEndAddress = aRange.aEnd.GetColRowString(); collectUIInformation({{"RANGE", aStartAddress + ":" + aEndAddress}}, "INSERT_CELLS");