starmath/source/view.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits: commit a799b6755cc0c06f25bd016e0610485938071c7b Author: Michael Weghorn <[email protected]> AuthorDate: Thu Feb 19 10:09:24 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Thu Feb 19 14:29:48 2026 +0100 tdf#158280 starmath: Use SvxNameDialog directly in SmViewShell As mentioned in earlier commit commit 7c42839f7b4a26d1f239a5f1968b65295f9c4117 Author: Michael Weghorn <[email protected]> Date: Tue Feb 17 15:43:22 2026 +0100 tdf#158280 Move SvxNameDialog etc. from cui to svtools , SvxNameDialog can now be used directly instead of via the AbstractSvxNameDialog abstraction. Change-Id: I498f8b854535b0bca98312d12e20b0ff67294360 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199703 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index f4ea496548e2..e9a5a90213e4 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -58,6 +58,7 @@ #include <svl/voiditem.hxx> #include <vcl/transfer.hxx> #include <svtools/colorcfg.hxx> +#include <svtools/dlgname.hxx> #include <svl/whiter.hxx> #include <svx/sidebar/SelectionChangeHandler.hxx> #include <svx/zoomslideritem.hxx> @@ -1846,13 +1847,11 @@ void SmViewShell::Execute(SfxRequest& rReq) { OUString aName = "My Formula 1"; OUString aDesc(SmResId(STR_USER_DEFINED_FORMULA)); - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxNameDialog> pDlg( - pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); + SvxNameDialog aDlg(GetFrameWeld(), aName, aDesc); - if (pDlg->Execute() == RET_OK) + if (aDlg.run() == RET_OK) { - aName = pDlg->GetName(); + aName = aDlg.GetName(); if (SmModule::get()->GetConfig()->HasUserDefinedFormula(aName)) { std::unique_ptr<weld::MessageDialog> xQuery(Application::CreateMessageDialog( @@ -1872,7 +1871,6 @@ void SmViewShell::Execute(SfxRequest& rReq) Broadcast(SfxHint(SfxHintId::SmNewUserFormula)); rReq.Ignore (); } - pDlg.disposeAndClear(); } break; }
