sc/source/core/data/document.cxx | 8 -------- sc/source/ui/view/tabvwshf.cxx | 12 ++++++++++-- 2 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit 19ff17218aaf4f101acb7e1c791680e473efd477 Author: Pranam Lashkari <[email protected]> AuthorDate: Fri Nov 28 22:52:12 2025 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Dec 5 11:25:15 2025 +0100 fix multiple sheet rename error dialogs appearing regression from 70d8195a2b72440fe929e4e3761d1f1d5ace0096 Change-Id: I285a87f6a315034527749662eb96321afe081994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194802 Tested-by: Jenkins CollaboraOffice <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194956 diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 91d1504a6f0b..9b2297ed9918 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -916,14 +916,6 @@ bool ScDocument::RenameTab( SCTAB nTab, const OUString& rName, bool bExternalDoc SfxLokHelper::notifyDocumentSizeChangedAllViews(pModel); } } - else - { - OUString aErrMsg(ScResId(STR_INVALIDTABNAME)); - std::shared_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( - GetDocumentShell()->GetFrame()->GetFrameWeld(), VclMessageType::Warning, - VclButtonsType::Ok, aErrMsg)); - xBox->runAsync(xBox, [](sal_uInt32) {}); - } } collectUIInformation({{"NewName", rName}}, u"Rename_Sheet"_ustr); diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index c471bc4be27e..6ec5cfd7b5ef 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -1101,6 +1101,14 @@ void ScTabViewShell::ExecuteAppendOrRenameTable(SfxRequest& rReq) { rReq.Done( *pReqArgs ); } + else + { + OUString aErrMsg(ScResId(STR_INVALIDTABNAME)); + std::shared_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( + GetFrameWeld(), VclMessageType::Warning, + VclButtonsType::Ok, aErrMsg)); + xBox->runAsync(xBox, [](sal_uInt32) {}); + } } else { @@ -1192,8 +1200,8 @@ bool ScTabViewShell::DoAppendOrRenameTableDialog(sal_Int32 nResult, const VclPtr else { OUString aErrMsg ( ScResId( STR_INVALIDTABNAME ) ); - std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), - VclMessageType::Warning, VclButtonsType::Ok, aErrMsg)); + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( + GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, aErrMsg)); xBox->run(); } }
