sd/source/ui/inc/DrawViewShell.hxx                         |    4 -
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx     |   32 +++++--------
 sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx |    6 +-
 sd/source/ui/view/drviews2.cxx                             |   15 ++----
 sd/source/ui/view/drviewsb.cxx                             |    3 -
 sd/source/ui/view/sdview2.cxx                              |   13 ++---
 6 files changed, 34 insertions(+), 39 deletions(-)

New commits:
commit f52f784a9ea3e5ca61453998318f0151cf7f6e4c
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Feb 19 10:07:08 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Feb 19 14:29:42 2026 +0100

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

diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index ae24b8e4f288..304cbb762f25 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -24,8 +24,8 @@
 #include <com/sun/star/embed/XEmbeddedObject.hpp>
 #include <comphelper/sequenceashashmap.hxx>
 #include <tools/urlobj.hxx>
+#include <svtools/dlgname.hxx>
 #include <svx/svdoole2.hxx>
-#include <svx/svxdlg.hxx>
 #include <sfx2/docfile.hxx>
 #include <svx/svdundo.hxx>
 #include <svx/svdpagv.hxx>
@@ -885,17 +885,16 @@ bool View::GetExchangeList (std::vector<OUString> 
&rExchangeList,
                 OUString aTitle(SdResId(STR_TITLE_NAMEGROUP));
                 OUString aDesc(SdResId(STR_DESC_NAMEGROUP));
 
-                SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-                ScopedVclPtr<AbstractSvxNameDialog> 
pDlg(pFact->CreateSvxNameDialog(mpViewSh->GetFrameWeld(), aNewName, aDesc));
+                SvxNameDialog aDlg(mpViewSh->GetFrameWeld(), aNewName, aDesc);
 
-                pDlg->SetEditHelpId( HID_SD_NAMEDIALOG_OBJECT );
+                aDlg.SetEditHelpId(HID_SD_NAMEDIALOG_OBJECT);
 
                 bNameOK = false;
-                pDlg->SetText( aTitle );
+                aDlg.set_title(aTitle);
 
-                while( !bNameOK && pDlg->Execute() == RET_OK )
+                while (!bNameOK && aDlg.run() == RET_OK)
                 {
-                    aNewName = pDlg->GetName();
+                    aNewName = aDlg.GetName();
 
                     if( !mrDoc.GetObj( aNewName ) )
                         bNameOK = true;
commit f5293f1095a712324b7e911a256bbfeba63c673d
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Feb 19 10:04:48 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Feb 19 14:29:36 2026 +0100

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

diff --git a/sd/source/ui/inc/DrawViewShell.hxx 
b/sd/source/ui/inc/DrawViewShell.hxx
index dea836dd47c2..0130432afb2c 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -44,9 +44,9 @@ class SdrObject;
 class SdrPageView;
 class TransferableDataHelper;
 class TransferableClipboardListener;
-class AbstractSvxNameDialog;
 class SdrLayer;
 class SvxClipboardFormatItem;
+class SvxNameDialog;
 struct ESelection;
 class AbstractSvxObjectNameDialog;
 
@@ -398,7 +398,7 @@ protected:
                     DECL_DLLPRIVATE_LINK( ClipboardChanged, 
TransferableDataHelper*, void );
                     DECL_DLLPRIVATE_LINK( TabSplitHdl, TabBar *, void );
                     DECL_DLLPRIVATE_LINK( NameObjectHdl, 
AbstractSvxObjectNameDialog&, bool );
-                    DECL_DLLPRIVATE_LINK( RenameSlideHdl, 
AbstractSvxNameDialog&, bool );
+                    DECL_DLLPRIVATE_LINK(RenameSlideHdl, SvxNameDialog&, bool);
 
     void            DeleteActualPage();
     void            DeleteActualLayer();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index dfde8fed839e..ef087289f901 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -65,7 +65,7 @@
 #include <sfx2/zoomitem.hxx>
 #include <sfx2/lokhelper.hxx>
 #include <sfx2/lokunocmdlist.hxx>
-
+#include <svtools/dlgname.hxx>
 #include <svx/compressgraphicdialog.hxx>
 #include <svx/ClassificationDialog.hxx>
 #include <svx/ClassificationCommon.hxx>
@@ -1531,15 +1531,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                 }
                 else
                 {
-                    SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-                    ScopedVclPtr<AbstractSvxNameDialog> 
aNameDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aPageName, aDescr));
-                    aNameDlg->SetText( aTitle );
-                    aNameDlg->SetCheckNameHdl( LINK( this, DrawViewShell, 
RenameSlideHdl ) );
-                    aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
+                    SvxNameDialog aNameDlg(GetFrameWeld(), aPageName, aDescr);
+                    aNameDlg.set_title(aTitle);
+                    aNameDlg.SetCheckNameHdl(LINK(this, DrawViewShell, 
RenameSlideHdl));
+                    aNameDlg.SetEditHelpId(HID_SD_NAMEDIALOG_PAGE);
 
-                    if( aNameDlg->Execute() == RET_OK )
+                    if (aNameDlg.run() == RET_OK)
                     {
-                        OUString aNewName = aNameDlg->GetName();
+                        OUString aNewName = aNameDlg.GetName();
                         if (aNewName != aPageName)
                         {
                             bool bResult = RenameSlide( 
maTabControl->GetPageId(nPage), aNewName );
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index fdb619733f7d..d91d4c9351d5 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -20,6 +20,7 @@
 #include <svx/svdlayer.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/dispatch.hxx>
+#include <svtools/dlgname.hxx>
 #include <svx/fmshell.hxx>
 #include <svx/svxdlg.hxx>
 #include <osl/diagnose.h>
@@ -118,7 +119,7 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const 
OUString & rName  )
     return bSuccess;
 }
 
-IMPL_LINK( DrawViewShell, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, 
bool )
+IMPL_LINK(DrawViewShell, RenameSlideHdl, SvxNameDialog&, rDialog, bool)
 {
     OUString aNewName = rDialog.GetName();
 
commit 3f967c4d1dcd04b00efdc070430ad25bfae7b2ff
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Feb 19 09:57:36 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Feb 19 14:29:29 2026 +0100

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

diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 
b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 00976414946b..6964bd34f054 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -65,11 +65,11 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/sidebar/Sidebar.hxx>
 #include <svx/svxids.hrc>
-#include <svx/svxdlg.hxx>
 #include <svl/intitem.hxx>
 #include <svl/stritem.hxx>
 #include <svl/whiter.hxx>
 #include <svl/itempool.hxx>
+#include <svtools/dlgname.hxx>
 #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
 #include <com/sun/star/drawing/XDrawPages.hpp>
 #include <osl/diagnose.h>
@@ -933,20 +933,17 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
     }
     else
     {
-        SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
         vcl::Window* pWin = mrSlideSorter.GetContentWindow();
-        ScopedVclPtr<AbstractSvxNameDialog> 
aNameDlg(pFact->CreateSvxNameDialog(
-                pWin ? pWin->GetFrameWeld() : nullptr,
-                aPageName, aDescr));
-        OUString aOldName = aNameDlg->GetName();
-        aNameDlg->SetText( aTitle );
-        aNameDlg->SetCheckNameHdl( LINK( this, SlotManager, RenameSlideHdl ) );
-        aNameDlg->SetCheckNameTooltipHdl( LINK( this, SlotManager, 
RenameSlideTooltipHdl ) );
-        aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
-
-        if( aNameDlg->Execute() == RET_OK )
+        SvxNameDialog aNameDlg(pWin ? pWin->GetFrameWeld() : nullptr, 
aPageName, aDescr);
+        OUString aOldName = aNameDlg.GetName();
+        aNameDlg.set_title(aTitle);
+        aNameDlg.SetCheckNameHdl(LINK(this, SlotManager, RenameSlideHdl));
+        aNameDlg.SetCheckNameTooltipHdl(LINK(this, SlotManager, 
RenameSlideTooltipHdl));
+        aNameDlg.SetEditHelpId(HID_SD_NAMEDIALOG_PAGE);
+
+        if (aNameDlg.run() == RET_OK)
         {
-            OUString aNewName = aNameDlg->GetName();
+            OUString aNewName = aNameDlg.GetName();
             if (aNewName != aPageName)
             {
                 bool bResult =
@@ -955,9 +952,8 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
                 DBG_ASSERT( bResult, "Couldn't rename slide or page" );
             }
         }
-        OUString aNewName = aNameDlg->GetName();
-        collectUIInformation({{"OldName", aOldName}, {"NewName", aNewName}}, 
u"RENAME"_ustr);
-        aNameDlg.disposeAndClear();
+        OUString aNewName = aNameDlg.GetName();
+        collectUIInformation({ { "OldName", aOldName }, { "NewName", aNewName 
} }, u"RENAME"_ustr);
     }
     // Tell the slide sorter about the name change (necessary for
     // accessibility.)
@@ -965,7 +961,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
             (pSelectedPage->GetPageNum()-1)/2, aPageName);
 }
 
-IMPL_LINK(SlotManager, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bool)
+IMPL_LINK(SlotManager, RenameSlideHdl, SvxNameDialog&, rDialog, bool)
 {
     OUString aNewName = rDialog.GetName();
 
@@ -979,7 +975,7 @@ IMPL_LINK(SlotManager, RenameSlideHdl, 
AbstractSvxNameDialog&, rDialog, bool)
         || (mrSlideSorter.GetViewShell().GetDocSh()->IsNewPageNameValid( 
aNewName ) );
 }
 
-IMPL_STATIC_LINK_NOARG(SlotManager, RenameSlideTooltipHdl, 
AbstractSvxNameDialog&, OUString)
+IMPL_STATIC_LINK_NOARG(SlotManager, RenameSlideTooltipHdl, SvxNameDialog&, 
OUString)
 {
     return SdResId(STR_TOOLTIP_RENAME);
 }
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx 
b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
index 57de8422ac40..128fffe52de2 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
@@ -22,9 +22,9 @@
 #include <tools/link.hxx>
 #include <rtl/ustring.hxx>
 
-class AbstractSvxNameDialog;
 class SfxItemSet;
 class SfxRequest;
+class SvxNameDialog;
 
 namespace sd::slidesorter
 {
@@ -77,8 +77,8 @@ private:
         drviews2.cxx.
     */
     void RenameSlide(const SfxRequest& rRequest);
-    DECL_LINK(RenameSlideHdl, AbstractSvxNameDialog&, bool);
-    DECL_STATIC_LINK(SlotManager, RenameSlideTooltipHdl, 
AbstractSvxNameDialog&, OUString);
+    DECL_LINK(RenameSlideHdl, SvxNameDialog&, bool);
+    DECL_STATIC_LINK(SlotManager, RenameSlideTooltipHdl, SvxNameDialog&, 
OUString);
     bool RenameSlideFromDrawViewShell(sal_uInt16 nPageId, const OUString& 
rName);
 
     /** Handle SID_INSERTPAGE slot calls.

Reply via email to