cui/source/tabpages/tplnedef.cxx   |   17 +++++++----------
 cui/source/tabpages/tppattern.cxx  |   18 +++++++-----------
 sd/source/ui/docshell/docshel2.cxx |   16 +++++++---------
 sd/source/ui/inc/DrawDocShell.hxx  |    4 ++--
 4 files changed, 23 insertions(+), 32 deletions(-)

New commits:
commit 706bdb9eca55b3e48b78a60f68114794e28c57fc
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Feb 19 16:44:36 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Feb 20 08:18:25 2026 +0100

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

diff --git a/sd/source/ui/docshell/docshel2.cxx 
b/sd/source/ui/docshell/docshel2.cxx
index 7ff45f6f2cf6..83020e7df156 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -19,8 +19,8 @@
 
 #include <memory>
 #include <DrawDocShell.hxx>
+#include <svtools/dlgname.hxx>
 #include <svx/svdpagv.hxx>
-#include <svx/svxdlg.hxx>
 #include <o3tl/string_view.hxx>
 
 #include <helpids.h>
@@ -280,25 +280,23 @@ bool DrawDocShell::CheckPageName(weld::Window* pWin, 
OUString& rName)
     if( ! bIsNameValid )
     {
         OUString aDesc;
-        SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-
         if (GetDocumentType() == DocumentType::Draw)
             aDesc = SdResId( STR_WARN_PAGE_EXISTS_DRAW );
         else
             aDesc = SdResId( STR_WARN_PAGE_EXISTS );
 
-        ScopedVclPtr<AbstractSvxNameDialog> 
aNameDlg(pFact->CreateSvxNameDialog(pWin, aStrForDlg, aDesc));
-        aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
+        SvxNameDialog aNameDlg(pWin, aStrForDlg, aDesc);
+        aNameDlg.SetEditHelpId(HID_SD_NAMEDIALOG_PAGE);
 
-        aNameDlg->SetCheckNameHdl( LINK( this, DrawDocShell, RenameSlideHdl ) 
);
+        aNameDlg.SetCheckNameHdl(LINK(this, DrawDocShell, RenameSlideHdl));
 
         rtl::Reference<FuPoor> xFunc( mpViewShell->GetCurrentFunction() );
         if( xFunc.is() )
             xFunc->cancel();
 
-        if( aNameDlg->Execute() == RET_OK )
+        if (aNameDlg.run() == RET_OK)
         {
-            rName = aNameDlg->GetName();
+            rName = aNameDlg.GetName();
             bIsNameValid = IsNewPageNameValid( rName );
         }
     }
@@ -414,7 +412,7 @@ bool DrawDocShell::IsPageNameUnique( std::u16string_view 
rPageName ) const
     return mpDoc->IsPageNameUnique(rPageName);
 }
 
-IMPL_LINK( DrawDocShell, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bool 
)
+IMPL_LINK(DrawDocShell, RenameSlideHdl, SvxNameDialog&, rDialog, bool)
 {
     OUString aNewName = rDialog.GetName();
     return IsNewPageNameValid( aNewName );
diff --git a/sd/source/ui/inc/DrawDocShell.hxx 
b/sd/source/ui/inc/DrawDocShell.hxx
index 4bb16b3e8615..1cef23c66025 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -38,8 +38,8 @@ class SdDrawDocument;
 class SdPage;
 class SfxPrinter;
 struct SpellCallbackInfo;
-class AbstractSvxNameDialog;
 class SfxUndoManager;
+class SvxNameDialog;
 
 namespace sd {
 
@@ -198,7 +198,7 @@ public:
     */
     virtual OutputDevice* GetDocumentRefDev() override;
 
-    DECL_DLLPRIVATE_LINK( RenameSlideHdl, AbstractSvxNameDialog&, bool );
+    DECL_DLLPRIVATE_LINK(RenameSlideHdl, SvxNameDialog&, bool);
 
     // ExecuteSpellPopup now handled by DrawDocShell
     DECL_DLLPRIVATE_LINK( OnlineSpellCallback, SpellCallbackInfo&, void );
commit 41fba33c48a2b0d031786f92b1aa82a736cbf646
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Feb 19 16:41:13 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Feb 20 08:18:19 2026 +0100

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

diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 25317e1bbbd1..1953d7bb5784 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -21,6 +21,7 @@
 #include <tools/urlobj.hxx>
 #include <sfx2/dialoghelper.hxx>
 #include <sfx2/objsh.hxx>
+#include <svtools/dlgname.hxx>
 #include <svx/colorbox.hxx>
 #include <svx/dialmgr.hxx>
 #include <vcl/BitmapTools.hxx>
@@ -40,7 +41,6 @@
 #include <svx/xtable.hxx>
 #include <svx/xflbmtit.hxx>
 #include <cuitabarea.hxx>
-#include <svx/svxdlg.hxx>
 #include <dialmgr.hxx>
 #include <sal/log.hxx>
 
@@ -353,13 +353,12 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
         bValidPatternName = (SearchPatternList(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();
 
         bValidPatternName = (SearchPatternList(aName) == -1);
 
@@ -374,8 +373,6 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
             break;
     }
 
-    pDlg.disposeAndClear();
-
     if( !nError )
     {
         std::unique_ptr<XBitmapEntry> pEntry;
@@ -450,14 +447,13 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickRenameHdl_Impl, 
SvxPresetListBox*, void)
     OUString aDesc(CuiResId(RID_CUISTR_DESC_NEW_PATTERN));
     OUString aName(m_pPatternList->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 nPatternPos = SearchPatternList(aName);
         bool bValidPatternName = (nPatternPos == static_cast<sal_Int32>(nPos) 
) || (nPatternPos == -1);
 
commit 92b6cd53daa6f4dac17f282d3f7709dbdcf8ffef
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Feb 19 16:38:41 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Feb 20 08:18:12 2026 +0100

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

diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index a04c5c0e81ae..d7208478afcc 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <svtools/dlgname.hxx>
 #include <tools/debug.hxx>
 #include <tools/urlobj.hxx>
 #include <vcl/svapp.hxx>
@@ -38,7 +39,6 @@
 #include <svx/dlgctrl.hxx>
 #include <cuitabline.hxx>
 #include <defdlgname.hxx>
-#include <svx/svxdlg.hxx>
 #include <dialmgr.hxx>
 #include <svx/dlgutil.hxx>
 #include <svx/dialmgr.hxx>
@@ -507,13 +507,12 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, 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++ )
@@ -553,7 +552,6 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
             xBox->run();
         }
     }
-    pDlg.disposeAndClear();
 
     // determine button state
     if ( pDashList->Count() )
@@ -574,15 +572,14 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl, 
weld::Button&, void)
     OUString aName( pDashList->GetDash( nPos )->GetName() );
     OUString aOldName = aName;
 
-    SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    ScopedVclPtr<AbstractSvxNameDialog> 
pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc));
+    SvxNameDialog aDlg(GetFrameWeld(), aName, aDesc);
 
     tools::Long nCount = pDashList->Count();
     bool bLoop = true;
 
-    while ( bLoop && pDlg->Execute() == RET_OK )
+    while (bLoop && aDlg.run() == RET_OK)
     {
-        aName = pDlg->GetName();
+        aName = aDlg.GetName();
         bool bDifferent = true;
 
         for( tools::Long i = 0; i < nCount && bDifferent; i++ )

Reply via email to