cui/source/tabpages/tpgradnt.cxx |   17 +++++++----------
 cui/source/tabpages/tplneend.cxx |   16 +++++++---------
 sd/source/ui/func/fulinend.cxx   |   11 +++++------
 3 files changed, 19 insertions(+), 25 deletions(-)

New commits:
commit 863479b367fd815363ef887fcaa7737ba0a5b973
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Feb 19 09:51:44 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Feb 19 14:29:22 2026 +0100

    tdf#158280 Use SvxNameDialog directly in FuLineEnd::DoExecute
    
    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: I839d87acae73bdcb10f08dcdef39346cf69626c1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199699
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index 1a652d48a7e2..1ab9ae47620a 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -18,8 +18,8 @@
  */
 
 #include <fulinend.hxx>
+#include <svtools/dlgname.hxx>
 #include <svx/xtable.hxx>
-#include <svx/svxdlg.hxx>
 #include <svx/svdobj.hxx>
 #include <svx/svdopath.hxx>
 #include <vcl/svapp.hxx>
@@ -113,15 +113,14 @@ void FuLineEnd::DoExecute( SfxRequest& )
         }
     }
 
-    SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    ScopedVclPtr<AbstractSvxNameDialog> pDlg( pFact->CreateSvxNameDialog( 
nullptr, aName, aDesc ) );
+    SvxNameDialog aDlg(nullptr, aName, aDesc);
 
-    pDlg->SetEditHelpId( HID_SD_NAMEDIALOG_LINEEND );
+    aDlg.SetEditHelpId(HID_SD_NAMEDIALOG_LINEEND);
 
-    if( pDlg->Execute() != RET_OK )
+    if (aDlg.run() != RET_OK)
         return;
 
-    aName = pDlg->GetName();
+    aName = aDlg.GetName();
     bDifferent = true;
 
     for( ::tools::Long i = 0; i < nCount && bDifferent; i++ )
commit 42d3036dc4d1231b7464e62a64845bc332aa227a
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Feb 19 09:49:43 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Feb 19 14:29:16 2026 +0100

    tdf#158280 Use SvxNameDialog directly in SvxLineEndDefTabPage
    
    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: I5c6e58bff37acd257109159a544a0f9fcda1af7c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199698
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 0898fa6753ee..428908e504a5 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -28,6 +28,7 @@
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
 
 #include <strings.hrc>
+#include <svtools/dlgname.hxx>
 #include <svx/dialmgr.hxx>
 #include <svx/dlgctrl.hxx>
 #include <svx/svdobj.hxx>
@@ -42,7 +43,6 @@
 #include <svx/xlnedit.hxx>
 #include <cuitabline.hxx>
 #include <cuitabarea.hxx>
-#include <svx/svxdlg.hxx>
 #include <dialmgr.hxx>
 #include <basegfx/range/b2drange.hxx>
 #include <basegfx/polygon/b2dpolypolygontools.hxx>
@@ -287,13 +287,12 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, 
ClickModifyHdl_Impl, weld::Button&, void)
         std::unique_ptr<weld::MessageDialog> 
xWarningBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr));
         xWarningBox->run();
 
-        SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        ScopedVclPtr<AbstractSvxNameDialog> 
pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc));
+        SvxNameDialog aDlg(GetFrameWeld(), aName, aDesc);
         bool bLoop = true;
 
-        while( !bDifferent && bLoop && pDlg->Execute() == RET_OK )
+        while (!bDifferent && bLoop && aDlg.run() == RET_OK)
         {
-            aName = pDlg->GetName();
+            aName = aDlg.GetName();
             bDifferent = true;
 
             for( tools::Long i = 0; i < nCount && bDifferent; i++ )
@@ -390,13 +389,12 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
                     bDifferent = false;
         }
 
-        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();
             bDifferent = true;
 
             for( tools::Long i = 0; i < nCount && bDifferent; i++ )
commit 6ff279c67dd45b801a120f876da5a590e18bf442
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Feb 19 09:46:07 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Feb 19 14:29:10 2026 +0100

    tdf#158280 Use SvxNameDialog directly in SvxGradientTabPage
    
    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: I03cf5822d17fefe5703199bab6edc5704c2c0ec8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199697
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index c1fb2c56fa99..05b5c9a00eaa 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -36,8 +36,8 @@
 #include <svx/xtable.hxx>
 #include <svx/xgrscit.hxx>
 #include <cuitabarea.hxx>
-#include <svx/svxdlg.hxx>
 #include <dialmgr.hxx>
+#include <svtools/dlgname.hxx>
 #include <svx/dialmgr.hxx>
 #include <svx/strings.hrc>
 #include <svx/svxids.hrc>
@@ -353,13 +353,12 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
         bValidGradientName = (SearchGradientList(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();
 
         bValidGradientName = (SearchGradientList(aName) == -1);
 
@@ -374,7 +373,6 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
         if (xWarnBox->run() != RET_OK)
             break;
     }
-    pDlg.disposeAndClear();
 
     if( !nError )
     {
@@ -488,13 +486,12 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickRenameHdl_Impl, 
SvxPresetListBox*, void
     OUString aDesc( CuiResId( RID_CUISTR_DESC_GRADIENT ) );
     OUString aName( m_pGradientList->GetGradient( 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 nGradientPos = SearchGradientList(aName);
         bool bValidGradientName = (nGradientPos == 
static_cast<sal_Int32>(nPos) ) || (nGradientPos == -1);
 

Reply via email to