diff options
author | Henry Castro <hcastro@collabora.com> | 2023-12-04 10:33:01 -0400 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-12-05 12:59:14 +0100 |
commit | fd11b63244f784b336690d9096cd3f820cdbb9ee (patch) | |
tree | 50fe8f17824f7c7d34a5108566b91d1f7cc9d1bb | |
parent | 464d5f1265bd3ed2eff0c809152b8ccb53b785df (diff) |
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 <hcastro@collabora.com>
Change-Id: I930d7724b9c94e10e9207ec749b7249d2fee0e39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160314
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit eccbe3bb4ed6f0bed4e7fbacfaf50762c93f9464)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160183
Tested-by: Jenkins
-rw-r--r-- | sc/inc/globstr.hrc | 1 | ||||
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 5 |
2 files changed, 6 insertions, 0 deletions
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"); |