cui/source/options/tsaurls.cxx | 10 ++++------ cui/source/tabpages/tpbitmap.cxx | 19 +++++++------------ cui/source/tabpages/tphatch.cxx | 17 +++++++---------- 3 files changed, 18 insertions(+), 28 deletions(-)
New commits: commit cd916775d7b031404261b9ae2f90d496f18b5aaf Author: Michael Weghorn <[email protected]> AuthorDate: Thu Feb 19 16:35:50 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Feb 20 08:18:05 2026 +0100 tdf#158280 cui: Use SvxNameDialog directly in SvxHatchTabPage 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: I400816d749c27617f0e05427964bdc2f6b9ad846 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199743 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index f5f6f8512d01..4594c17917f6 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -38,13 +38,13 @@ #include <svx/xtable.hxx> #include <svx/xflbckit.hxx> #include <cuitabarea.hxx> -#include <svx/svxdlg.hxx> #include <dialmgr.hxx> #include <svx/dlgutil.hxx> #include <svx/dialmgr.hxx> #include <svx/strings.hrc> #include <svx/svxids.hrc> #include <sal/log.hxx> +#include <svtools/dlgname.hxx> #include <svtools/unitconv.hxx> using namespace com::sun::star; @@ -433,13 +433,12 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, weld::Button&, void) bValidHatchName = (SearchHatchList(aName) == -1); } - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); + SvxNameDialog aDlg(GetFrameWeld(), aName, aDesc); sal_uInt16 nError = 1; - while( pDlg->Execute() == RET_OK ) + while (aDlg.run() == RET_OK) { - aName = pDlg->GetName(); + aName = aDlg.GetName(); bValidHatchName = (SearchHatchList(aName) == -1); if( bValidHatchName ) @@ -453,7 +452,6 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, weld::Button&, void) if (xWarnBox->run() != RET_OK) break; } - pDlg.disposeAndClear(); if( nError ) return; @@ -548,13 +546,12 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void ) OUString aDesc( CuiResId( RID_CUISTR_DESC_HATCH ) ); OUString aName( m_pHatchingList->GetHatch( nPos )->GetName() ); - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); + SvxNameDialog aDlg(GetFrameWeld(), aName, aDesc); bool bLoop = true; - while( bLoop && pDlg->Execute() == RET_OK ) + while (bLoop && aDlg.run() == RET_OK) { - aName = pDlg->GetName(); + aName = aDlg.GetName(); sal_Int32 nHatchPos = SearchHatchList( aName ); bool bValidHatchName = (nHatchPos == static_cast<sal_Int32>(nPos) ) || (nHatchPos == -1); commit 72c7fb6f0444110085dda39e38d8b468b4680158 Author: Michael Weghorn <[email protected]> AuthorDate: Thu Feb 19 16:30:29 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Feb 20 08:17:58 2026 +0100 tdf#158280 cui: Use SvxNameDialog directly in SvxBitmapTabPage 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: Id2bc42177b54c5d8aeebc6f397096be932442f9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199742 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 75ecd4ce05aa..03aa8b578aef 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -25,6 +25,7 @@ #include <svx/xbtmpit.hxx> #include <svx/svxids.hrc> #include <strings.hrc> +#include <svtools/dlgname.hxx> #include <svx/xfillit0.hxx> #include <svx/xtable.hxx> #include <svx/xflbmsxy.hxx> @@ -46,7 +47,6 @@ #include <vcl/svapp.hxx> #include <vcl/weld/MessageDialog.hxx> #include <vcl/weld/weld.hxx> -#include <svx/svxdlg.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/dialoghelper.hxx> #include <sal/log.hxx> @@ -582,13 +582,12 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, SvxPresetListBox*, void) OUString aDesc( CuiResId( RID_CUISTR_DESC_NEW_BITMAP ) ); OUString aName( m_pBitmapList->GetBitmap( nPos )->GetName() ); - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); + SvxNameDialog aDlg(GetFrameWeld(), aName, aDesc); bool bLoop = true; - while( bLoop && pDlg->Execute() == RET_OK ) + while (bLoop && aDlg.run() == RET_OK) { - aName = pDlg->GetName(); + aName = aDlg.GetName(); sal_Int32 nBitmapPos = SearchBitmapList( aName ); bool bValidBitmapName = (nBitmapPos == static_cast<sal_Int32>(nPos) ) || (nBitmapPos == -1); @@ -792,14 +791,12 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void) // convert file URL to UI name OUString aName; INetURLObject aURL( aDlg.GetPath() ); - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( - pDialogFrameWeld, aURL.GetLastName().getToken(0, '.'), aDesc)); + SvxNameDialog aNameDlg(pDialogFrameWeld, aURL.GetLastName().getToken(0, '.'), aDesc); nError = ErrCode(1); - while( pDlg->Execute() == RET_OK ) + while (aNameDlg.run() == RET_OK) { - aName = pDlg->GetName(); + aName = aNameDlg.GetName(); bool bDifferent = true; @@ -818,8 +815,6 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void) break; } - pDlg.disposeAndClear(); - if( !nError ) AddBitmap(std::move(aGraphic), aName); } commit d2d466e851452375b20a4da8b6a76ec5b80d597f Author: Michael Weghorn <[email protected]> AuthorDate: Thu Feb 19 16:27:28 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Feb 20 08:17:52 2026 +0100 tdf#158280 cui: Use SvxNameDialog directly in TSAURLsDialog 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: Ie7a4de5055d406b548634c60a0ca090dfd46bb6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199741 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/cui/source/options/tsaurls.cxx b/cui/source/options/tsaurls.cxx index 36cfe4a335a8..facbf27673d4 100644 --- a/cui/source/options/tsaurls.cxx +++ b/cui/source/options/tsaurls.cxx @@ -8,9 +8,9 @@ */ #include <officecfg/Office/Common.hxx> -#include <svx/svxdlg.hxx> #include <comphelper/sequence.hxx> #include <comphelper/diagnose_ex.hxx> +#include <svtools/dlgname.hxx> #include <vcl/vclenum.hxx> #include <vcl/weld/Builder.hxx> #include <vcl/weld/Dialog.hxx> @@ -93,13 +93,11 @@ IMPL_LINK_NOARG(TSAURLsDialog, AddHdl_Impl, weld::Button&, void) { OUString aDesc(m_xEnterAUrl->get_label()); - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxNameDialog> pDlg( - pFact->CreateSvxNameDialog(m_xDialog.get(), OUString(), aDesc)); + SvxNameDialog aDlg(m_xDialog.get(), OUString(), aDesc); - if (pDlg->Execute() == RET_OK) + if (aDlg.run() == RET_OK) { - AddTSAURL(pDlg->GetName()); + AddTSAURL(aDlg.GetName()); m_xOKBtn->set_sensitive(true); } m_xURLListBox->unselect_all();
