chart2/source/controller/main/ShapeController.cxx      |   14 +++------
 cui/source/factory/dlgfact.cxx                         |   20 +++++++-------
 cui/source/factory/dlgfact.hxx                         |   10 +++----
 cui/source/options/optcolor.cxx                        |    5 +--
 cui/source/options/tsaurls.cxx                         |    6 +---
 cui/source/tabpages/tpbitmap.cxx                       |    4 +-
 cui/source/tabpages/tpcolor.cxx                        |    2 -
 cui/source/tabpages/tpgradnt.cxx                       |    4 +-
 cui/source/tabpages/tphatch.cxx                        |    4 +-
 cui/source/tabpages/tplnedef.cxx                       |    4 +-
 cui/source/tabpages/tplneend.cxx                       |    4 +-
 cui/source/tabpages/tppattern.cxx                      |    4 +-
 include/svx/svxdlg.hxx                                 |   10 +++----
 sc/source/ui/drawfunc/drawsh5.cxx                      |   14 +++------
 sd/source/ui/docshell/docshel2.cxx                     |    5 +--
 sd/source/ui/func/fulinend.cxx                         |    2 -
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |   12 ++------
 sd/source/ui/view/drviews2.cxx                         |   15 +++-------
 sd/source/ui/view/drviewsb.cxx                         |    3 --
 sd/source/ui/view/drviewsc.cxx                         |    3 --
 sd/source/ui/view/sdview2.cxx                          |    2 -
 sw/source/core/access/AccessibilityIssue.cxx           |   24 ++++-------------
 sw/source/uibase/shells/drwbassh.cxx                   |   15 +++-------
 sw/source/uibase/shells/frmsh.cxx                      |   13 ++-------
 24 files changed, 78 insertions(+), 121 deletions(-)

New commits:
commit 27f15f1d50b1b67c940bf57e1581240011806159
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jan 22 09:45:16 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jan 22 14:51:12 2024 +0100

    simplify the getters in AbstractSvx*Dialog
    
    to look like getters elsewhere, which compose better
    
    Change-Id: I23277910d3fb3c08fa6e839f0fbec010915e951a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162362
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/source/controller/main/ShapeController.cxx 
b/chart2/source/controller/main/ShapeController.cxx
index 115229de0e57..f977259ce77b 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -217,8 +217,7 @@ void ShapeController::describeSupportedFeatures()
 
 IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxObjectNameDialog&, 
rDialog, bool )
 {
-    OUString aName;
-    rDialog.GetName( aName );
+    OUString aName = rDialog.GetName();
 
     if ( !aName.isEmpty() )
     {
@@ -408,12 +407,9 @@ void 
ShapeController::executeDispatch_ObjectTitleDescription()
         pFact->CreateSvxObjectTitleDescDialog(pChartWindow, aTitle, 
aDescription, isDecorative));
     if ( pDlg->Execute() == RET_OK )
     {
-        pDlg->GetTitle( aTitle );
-        pDlg->GetDescription( aDescription );
-        pDlg->IsDecorative(isDecorative);
-        pSelectedObj->SetTitle( aTitle );
-        pSelectedObj->SetDescription( aDescription );
-        pSelectedObj->SetDecorative(isDecorative);
+        pSelectedObj->SetTitle( pDlg->GetTitle() );
+        pSelectedObj->SetDescription( pDlg->GetDescription() );
+        pSelectedObj->SetDecorative(pDlg->IsDecorative());
     }
 }
 
@@ -439,7 +435,7 @@ void ShapeController::executeDispatch_RenameObject()
     pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
     if ( pDlg->Execute() == RET_OK )
     {
-        pDlg->GetName(aName);
+        aName = pDlg->GetName();
         if (pSelectedObj->GetName() != aName)
         {
             pSelectedObj->SetName( aName );
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ffb5fd301069..ec4532f2058d 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -546,9 +546,9 @@ tools::Long AbstractFmInputRecordNoDialog_Impl::GetValue() 
const
     return m_xDlg->GetNewDictionary();
 }
 
-void AbstractSvxNameDialog_Impl::GetName(OUString& rName)
+OUString AbstractSvxNameDialog_Impl::GetName()
 {
-    rName = m_xDlg->GetName();
+    return m_xDlg->GetName();
 }
 
 void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const 
Link<AbstractSvxNameDialog&,bool>& rLink )
@@ -594,9 +594,9 @@ IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl, 
CheckNameTooltipHdl, SvxNameDialog&,
     return aCheckNameTooltipHdl.Call(*this);
 }
 
-void AbstractSvxObjectNameDialog_Impl::GetName(OUString& rName)
+OUString AbstractSvxObjectNameDialog_Impl::GetName()
 {
-    rName = m_xDlg->GetName();
+    return m_xDlg->GetName();
 }
 
 void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const 
Link<AbstractSvxObjectNameDialog&,bool>& rLink)
@@ -618,19 +618,19 @@ IMPL_LINK_NOARG(AbstractSvxObjectNameDialog_Impl, 
CheckNameHdl, SvxObjectNameDia
     return aCheckNameHdl.Call(*this);
 }
 
-void AbstractSvxObjectTitleDescDialog_Impl::GetTitle(OUString& rTitle)
+OUString AbstractSvxObjectTitleDescDialog_Impl::GetTitle()
 {
-    rTitle = m_xDlg->GetTitle();
+    return m_xDlg->GetTitle();
 }
 
-void AbstractSvxObjectTitleDescDialog_Impl::GetDescription(OUString& 
rDescription)
+OUString AbstractSvxObjectTitleDescDialog_Impl::GetDescription()
 {
-    rDescription = m_xDlg->GetDescription();
+    return m_xDlg->GetDescription();
 }
 
-void AbstractSvxObjectTitleDescDialog_Impl::IsDecorative(bool & rIsDecorative)
+bool AbstractSvxObjectTitleDescDialog_Impl::IsDecorative()
 {
-    rIsDecorative = m_xDlg->IsDecorative();
+    return m_xDlg->IsDecorative();
 }
 
 OUString AbstractSvxMultiPathDialog_Impl::GetPath() const
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 1da0ec35ec38..ec76db9490bf 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -265,7 +265,7 @@ 
DECL_ABSTDLG_CLASS(AbstractSvxNewDictionaryDialog,SvxNewDictionaryDialog)
 
 // AbstractSvxNameDialog_Impl
 DECL_ABSTDLG_CLASS(AbstractSvxNameDialog,SvxNameDialog)
-    virtual void    GetName( OUString& rName ) override ;
+    virtual OUString GetName() override;
     virtual void    SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& 
rLink ) override ;
     virtual void    SetCheckNameTooltipHdl( const Link<AbstractSvxNameDialog&, 
OUString>& rLink ) override ;
     virtual void    SetEditHelpId(const OUString&) override ;
@@ -285,7 +285,7 @@ class SvxObjectTitleDescDialog;
 
 // AbstractSvxObjectNameDialog_Impl
 DECL_ABSTDLG_CLASS(AbstractSvxObjectNameDialog,SvxObjectNameDialog)
-    virtual void GetName(OUString& rName) override ;
+    virtual OUString GetName() override;
     virtual void SetCheckNameHdl(const 
Link<AbstractSvxObjectNameDialog&,bool>& rLink) override;
 
 private:
@@ -295,9 +295,9 @@ private:
 
 // AbstractSvxObjectTitleDescDialog_Impl
 DECL_ABSTDLG_CLASS(AbstractSvxObjectTitleDescDialog,SvxObjectTitleDescDialog)
-    virtual void GetTitle(OUString& rName) override;
-    virtual void GetDescription(OUString& rName) override;
-    virtual void IsDecorative(bool & rIsDecorative) override;
+    virtual OUString GetTitle() override;
+    virtual OUString GetDescription() override;
+    virtual bool IsDecorative() override;
 };
 
 // AbstractSvxMultiPathDialog_Impl
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index f1e1b8a26b18..7bb8b2f44ea5 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -978,7 +978,7 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, 
weld::Button&, rButton, vo
         aNameDlg->SetCheckNameHdl( LINK(this, SvxColorOptionsTabPage, 
CheckNameHdl_Impl));
         if(RET_OK == aNameDlg->Execute())
         {
-            aNameDlg->GetName(sName);
+            sName = aNameDlg->GetName();
             pColorConfig->AddScheme(sName);
             pExtColorConfig->AddScheme(sName);
             m_xColorSchemeLB->append_text(sName);
@@ -1009,8 +1009,7 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, 
weld::Button&, rButton, vo
 
 IMPL_LINK(SvxColorOptionsTabPage, CheckNameHdl_Impl, AbstractSvxNameDialog&, 
rDialog, bool )
 {
-    OUString sName;
-    rDialog.GetName(sName);
+    OUString sName = rDialog.GetName();
     return !sName.isEmpty() && m_xColorSchemeLB->find_text(sName) == -1;
 }
 
diff --git a/cui/source/options/tsaurls.cxx b/cui/source/options/tsaurls.cxx
index b33c76c58d43..d0d9ef1c1c6c 100644
--- a/cui/source/options/tsaurls.cxx
+++ b/cui/source/options/tsaurls.cxx
@@ -88,17 +88,15 @@ void TSAURLsDialog::AddTSAURL(const OUString& rURL)
 
 IMPL_LINK_NOARG(TSAURLsDialog, AddHdl_Impl, weld::Button&, void)
 {
-    OUString aURL;
     OUString aDesc(m_xEnterAUrl->get_label());
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     ScopedVclPtr<AbstractSvxNameDialog> pDlg(
-        pFact->CreateSvxNameDialog(m_xDialog.get(), aURL, aDesc));
+        pFact->CreateSvxNameDialog(m_xDialog.get(), OUString(), aDesc));
 
     if (pDlg->Execute() == RET_OK)
     {
-        pDlg->GetName(aURL);
-        AddTSAURL(aURL);
+        AddTSAURL(pDlg->GetName());
         m_xOKBtn->set_sensitive(true);
     }
     m_xURLListBox->unselect_all();
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 390fe1c77112..2e142169b6af 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -527,7 +527,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, 
SvxPresetListBox*, void)
     bool bLoop = true;
     while( bLoop && pDlg->Execute() == RET_OK )
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
         sal_Int32 nBitmapPos = SearchBitmapList( aName );
         bool bValidBitmapName = (nBitmapPos == static_cast<sal_Int32>(nPos) ) 
|| (nBitmapPos == -1);
 
@@ -740,7 +740,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, 
weld::Button&, void)
 
         while( pDlg->Execute() == RET_OK )
         {
-            pDlg->GetName( aName );
+            aName = pDlg->GetName();
 
             bool bDifferent = true;
 
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 8df09ff09823..ccfe75232bef 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -350,7 +350,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
 
     while (pDlg->Execute() == RET_OK)
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
 
         bValidColorName = (FindInCustomColors(aName) == -1);
         if (bValidColorName)
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index df629a154ff4..2fb57742e0b3 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -342,7 +342,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
 
     while (pDlg->Execute() == RET_OK)
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
 
         bValidGradientName = (SearchGradientList(aName) == -1);
 
@@ -475,7 +475,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickRenameHdl_Impl, 
SvxPresetListBox*, void
     bool bLoop = true;
     while( bLoop && pDlg->Execute() == RET_OK )
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
         sal_Int32 nGradientPos = SearchGradientList(aName);
         bool bValidGradientName = (nGradientPos == 
static_cast<sal_Int32>(nPos) ) || (nGradientPos == -1);
 
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 879e68a0462c..ccfc12a7b445 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -422,7 +422,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
 
     while( pDlg->Execute() == RET_OK )
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
 
         bValidHatchName = (SearchHatchList(aName) == -1);
         if( bValidHatchName )
@@ -535,7 +535,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickRenameHdl_Impl, 
SvxPresetListBox*, void )
     bool bLoop = true;
     while( bLoop && pDlg->Execute() == RET_OK )
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
         sal_Int32 nHatchPos = SearchHatchList( aName );
         bool bValidHatchName = (nHatchPos == static_cast<sal_Int32>(nPos) ) || 
(nHatchPos == -1);
 
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 66fea1aba4d0..702e8f2aafc0 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -512,7 +512,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
 
     while ( bLoop && pDlg->Execute() == RET_OK )
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
         bDifferent = true;
 
         for( tools::Long i = 0; i < nCount && bDifferent; i++ )
@@ -581,7 +581,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl, 
weld::Button&, void)
 
     while ( bLoop && pDlg->Execute() == RET_OK )
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
         bool bDifferent = true;
 
         for( tools::Long i = 0; i < nCount && bDifferent; i++ )
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index fe7bc13158ea..2d181a3f5cb9 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -293,7 +293,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl, 
weld::Button&, void)
 
         while( !bDifferent && bLoop && pDlg->Execute() == RET_OK )
         {
-            pDlg->GetName( aName );
+            aName = pDlg->GetName();
             bDifferent = true;
 
             for( tools::Long i = 0; i < nCount && bDifferent; i++ )
@@ -396,7 +396,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
 
         while ( bLoop && pDlg->Execute() == RET_OK )
         {
-            pDlg->GetName( aName );
+            aName = pDlg->GetName();
             bDifferent = true;
 
             for( tools::Long i = 0; i < nCount && bDifferent; i++ )
diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 4976a0a0edd3..9a37685951dd 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -341,7 +341,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, 
weld::Button&, void)
 
     while( pDlg->Execute() == RET_OK )
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
 
         bValidPatternName = (SearchPatternList(aName) == -1);
 
@@ -441,7 +441,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickRenameHdl_Impl, 
SvxPresetListBox*, void)
 
     while( bLoop && pDlg->Execute() == RET_OK )
     {
-        pDlg->GetName( aName );
+        aName = pDlg->GetName();
         sal_Int32 nPatternPos = SearchPatternList(aName);
         bool bValidPatternName = (nPatternPos == static_cast<sal_Int32>(nPos) 
) || (nPatternPos == -1);
 
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 41158ef2a415..1159c1ee02d9 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -162,7 +162,7 @@ class AbstractSvxNameDialog : public VclAbstractDialog
 protected:
     virtual ~AbstractSvxNameDialog() override = default;
 public:
-    virtual void    GetName( OUString& rName ) = 0;
+    virtual OUString GetName() = 0;
     virtual void    SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& 
rLink ) = 0;
     virtual void    SetCheckNameTooltipHdl( const 
Link<AbstractSvxNameDialog&,OUString>& rLink ) = 0;
     virtual void    SetEditHelpId(const OUString&) = 0;
@@ -175,7 +175,7 @@ class AbstractSvxObjectNameDialog :public VclAbstractDialog
 protected:
     virtual ~AbstractSvxObjectNameDialog() override = default;
 public:
-    virtual void GetName(OUString& rName) = 0;
+    virtual OUString GetName() = 0;
     virtual void SetCheckNameHdl(const 
Link<AbstractSvxObjectNameDialog&,bool>& rLink) = 0;
 };
 
@@ -184,9 +184,9 @@ class AbstractSvxObjectTitleDescDialog :public 
VclAbstractDialog
 protected:
     virtual ~AbstractSvxObjectTitleDescDialog() override = default;
 public:
-    virtual void GetTitle(OUString& rTitle) = 0;
-    virtual void GetDescription(OUString& rDescription) = 0;
-    virtual void IsDecorative(bool & rIsDecorative) = 0;
+    virtual OUString GetTitle() = 0;
+    virtual OUString GetDescription() = 0;
+    virtual bool IsDecorative() = 0;
 };
 
 /// Abstract class provides the get information from the numbering and 
position dialog.
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx 
b/sc/source/ui/drawfunc/drawsh5.cxx
index 7c39afc2de0d..679d8a841a66 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -520,7 +520,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
                         if(RET_OK == pDlg->Execute())
                         {
                             ScDocShell* pDocSh = rViewData.GetDocShell();
-                            pDlg->GetName(aName);
+                            aName = pDlg->GetName();
 
                             if (aName != pSelected->GetName())
                             {
@@ -590,12 +590,9 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
                             ScDocShell* pDocSh = rViewData.GetDocShell();
 
                             // handle Title and Description
-                            pDlg->GetTitle(aTitle);
-                            pDlg->GetDescription(aDescription);
-                            pDlg->IsDecorative(isDecorative);
-                            pSelected->SetTitle(aTitle);
-                            pSelected->SetDescription(aDescription);
-                            pSelected->SetDecorative(isDecorative);
+                            pSelected->SetTitle(pDlg->GetTitle());
+                            pSelected->SetDescription(pDlg->GetDescription());
+                            pSelected->SetDecorative(pDlg->IsDecorative());
 
                             // ChartListenerCollectionNeedsUpdate is needed 
for Navigator update
                             
pDocSh->GetDocument().SetChartListenerCollectionNeedsUpdate( true );
@@ -647,8 +644,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
 
 IMPL_LINK( ScDrawShell, NameObjectHdl, AbstractSvxObjectNameDialog&, rDialog, 
bool )
 {
-    OUString aName;
-    rDialog.GetName( aName );
+    OUString aName = rDialog.GetName();
 
     ScDrawLayer* pModel = rViewData.GetDocument().GetDrawLayer();
     if ( !aName.isEmpty() && pModel )
diff --git a/sd/source/ui/docshell/docshel2.cxx 
b/sd/source/ui/docshell/docshel2.cxx
index 582afec0517a..958484c275f7 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -293,7 +293,7 @@ bool DrawDocShell::CheckPageName(weld::Window* pWin, 
OUString& rName)
 
         if( aNameDlg->Execute() == RET_OK )
         {
-            aNameDlg->GetName( rName );
+            rName = aNameDlg->GetName();
             bIsNameValid = IsNewPageNameValid( rName );
         }
     }
@@ -411,8 +411,7 @@ bool DrawDocShell::IsPageNameUnique( std::u16string_view 
rPageName ) const
 
 IMPL_LINK( DrawDocShell, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bool 
)
 {
-    OUString aNewName;
-    rDialog.GetName( aNewName );
+    OUString aNewName = rDialog.GetName();
     return IsNewPageNameValid( aNewName );
 }
 
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index 26ae109e0215..088e8e9d24c2 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -119,7 +119,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
     if( pDlg->Execute() != RET_OK )
         return;
 
-    pDlg->GetName( aName );
+    aName = pDlg->GetName();
     bDifferent = true;
 
     for( ::tools::Long i = 0; i < nCount && bDifferent; i++ )
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 
b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 0a713c06da8f..68097d53c13c 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -919,8 +919,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
         ScopedVclPtr<AbstractSvxNameDialog> 
aNameDlg(pFact->CreateSvxNameDialog(
                 pWin ? pWin->GetFrameWeld() : nullptr,
                 aPageName, aDescr));
-        OUString aOldName;
-        aNameDlg->GetName( aOldName );
+        OUString aOldName = aNameDlg->GetName();
         aNameDlg->SetText( aTitle );
         aNameDlg->SetCheckNameHdl( LINK( this, SlotManager, RenameSlideHdl ) );
         aNameDlg->SetCheckNameTooltipHdl( LINK( this, SlotManager, 
RenameSlideTooltipHdl ) );
@@ -928,8 +927,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
 
         if( aNameDlg->Execute() == RET_OK )
         {
-            OUString aNewName;
-            aNameDlg->GetName( aNewName );
+            OUString aNewName = aNameDlg->GetName();
             if (aNewName != aPageName)
             {
                 bool bResult =
@@ -938,8 +936,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
                 DBG_ASSERT( bResult, "Couldn't rename slide or page" );
             }
         }
-        OUString aNewName;
-        aNameDlg->GetName( aNewName );
+        OUString aNewName = aNameDlg->GetName();
         collectUIInformation({{"OldName", aOldName}, {"NewName", aNewName}}, 
"RENAME");
         aNameDlg.disposeAndClear();
     }
@@ -951,8 +948,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
 
 IMPL_LINK(SlotManager, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bool)
 {
-    OUString aNewName;
-    rDialog.GetName( aNewName );
+    OUString aNewName = rDialog.GetName();
 
     model::SharedPageDescriptor pDescriptor (
         
mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index b47fe474c68f..d7c57a0581bc 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -860,8 +860,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
                     if( aNameDlg->Execute() == RET_OK )
                     {
-                        OUString aNewName;
-                        aNameDlg->GetName( aNewName );
+                        OUString aNewName = aNameDlg->GetName();
                         if (aNewName != aPageName)
                         {
                             bool bResult = RenameSlide( 
maTabControl->GetPageId(nPage), aNewName );
@@ -2672,8 +2671,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
                 if(RET_OK == pDlg->Execute())
                 {
-                    pDlg->GetName(aName);
-                    pSelected->SetName(aName);
+                    pSelected->SetName(pDlg->GetName());
 
                     SdPage* pPage = GetActualPage();
                     if (pPage)
@@ -2707,12 +2705,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
                 if(RET_OK == pDlg->Execute())
                 {
-                    pDlg->GetTitle(aTitle);
-                    pDlg->GetDescription(aDescription);
-                    pDlg->IsDecorative(isDecorative);
-                    pSelected->SetTitle(aTitle);
-                    pSelected->SetDescription(aDescription);
-                    pSelected->SetDecorative(isDecorative);
+                    pSelected->SetTitle(pDlg->GetTitle());
+                    pSelected->SetDescription(pDlg->GetDescription());
+                    pSelected->SetDecorative(pDlg->IsDecorative());
                 }
             }
 
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index 6f6bba8555d5..b585185c09d0 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -119,8 +119,7 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const 
OUString & rName  )
 
 IMPL_LINK( DrawViewShell, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, 
bool )
 {
-    OUString aNewName;
-    rDialog.GetName( aNewName );
+    OUString aNewName = rDialog.GetName();
 
     SdPage* pCurrentPage = GetDoc()->GetSdPage( maTabControl->GetCurPagePos(), 
GetPageKind() );
 
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index 6be86e63cb8d..46ecb31d639b 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -62,8 +62,7 @@ void DrawViewShell::UpdateIMapDlg( SdrObject* pObj )
 
 IMPL_LINK( DrawViewShell, NameObjectHdl, AbstractSvxObjectNameDialog&, 
rDialog, bool )
 {
-    OUString aName;
-    rDialog.GetName( aName );
+    OUString aName = rDialog.GetName();
     return aName.isEmpty() || ( GetDoc() && !GetDoc()->GetObj( aName ) );
 }
 
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index af76e39afd4b..73880e91e064 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -882,7 +882,7 @@ bool View::GetExchangeList (std::vector<OUString> 
&rExchangeList,
 
                 while( !bNameOK && pDlg->Execute() == RET_OK )
                 {
-                    pDlg->GetName( aNewName );
+                    aNewName = pDlg->GetName();
 
                     if( !mrDoc.GetObj( aNewName ) )
                         bNameOK = true;
diff --git a/sw/source/core/access/AccessibilityIssue.cxx 
b/sw/source/core/access/AccessibilityIssue.cxx
index 53f5d906340e..ab1c77d70e6b 100644
--- a/sw/source/core/access/AccessibilityIssue.cxx
+++ b/sw/source/core/access/AccessibilityIssue.cxx
@@ -273,13 +273,9 @@ void AccessibilityIssue::quickFixIssue() const
 
                 if (pDlg->Execute() == RET_OK)
                 {
-                    pDlg->GetTitle(aTitle);
-                    pDlg->GetDescription(aDescription);
-                    pDlg->IsDecorative(isDecorative);
-
-                    m_pDoc->SetFlyFrameTitle(*pFlyFormat, aTitle);
-                    m_pDoc->SetFlyFrameDescription(*pFlyFormat, aDescription);
-                    m_pDoc->SetFlyFrameDecorative(*pFlyFormat, isDecorative);
+                    m_pDoc->SetFlyFrameTitle(*pFlyFormat, pDlg->GetTitle());
+                    m_pDoc->SetFlyFrameDescription(*pFlyFormat, 
pDlg->GetDescription());
+                    m_pDoc->SetFlyFrameDecorative(*pFlyFormat, 
pDlg->IsDecorative());
 
                     pWrtShell->SetModified();
                 }
@@ -305,13 +301,9 @@ void AccessibilityIssue::quickFixIssue() const
 
                 if (RET_OK == pDlg->Execute())
                 {
-                    pDlg->GetTitle(aTitle);
-                    pDlg->GetDescription(aDescription);
-                    pDlg->IsDecorative(isDecorative);
-
-                    pObj->SetTitle(aTitle);
-                    pObj->SetDescription(aDescription);
-                    pObj->SetDecorative(isDecorative);
+                    pObj->SetTitle(pDlg->GetTitle());
+                    pObj->SetDescription(pDlg->GetDescription());
+                    pObj->SetDecorative(pDlg->IsDecorative());
 
                     pWrtShell->SetModified();
                 }
@@ -335,9 +327,7 @@ void AccessibilityIssue::quickFixIssue() const
                     pShell->GetModel(), uno::UNO_QUERY_THROW);
                 const uno::Reference<document::XDocumentProperties> 
xDocumentProperties(
                     xDPS->getDocumentProperties());
-                OUString sName;
-                aNameDialog->GetName(sName);
-                xDocumentProperties->setTitle(sName);
+                xDocumentProperties->setTitle(aNameDialog->GetName());
 
                 
m_pDoc->getOnlineAccessibilityCheck()->resetAndQueueDocumentLevel();
             }
diff --git a/sw/source/uibase/shells/drwbassh.cxx 
b/sw/source/uibase/shells/drwbassh.cxx
index d5eec2132093..1789b3f374d4 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -596,7 +596,7 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
                 if(RET_OK == pDlg->Execute())
                 {
                     const OUString aOrigName = aName;
-                    pDlg->GetName(aName);
+                    aName = pDlg->GetName();
                     pSelected->SetName(aName);
                     pSh->SetModified();
 
@@ -631,13 +631,9 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
 
                 if(RET_OK == pDlg->Execute())
                 {
-                    pDlg->GetTitle(aTitle);
-                    pDlg->GetDescription(aDescription);
-                    pDlg->IsDecorative(isDecorative);
-
-                    pSelected->SetTitle(aTitle);
-                    pSelected->SetDescription(aDescription);
-                    pSelected->SetDecorative(isDecorative);
+                    pSelected->SetTitle(pDlg->GetTitle());
+                    pSelected->SetDescription(pDlg->GetDescription());
+                    pSelected->SetDecorative(pDlg->IsDecorative());
 
                     pSh->SetModified();
                 }
@@ -717,8 +713,7 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, 
AbstractSvxObjectNameDialog&
     OSL_ENSURE(rMarkList.GetMarkCount() == 1, "wrong draw selection");
     SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
     const OUString sCurrentName = pObj->GetName();
-    OUString sNewName;
-    rNameDialog.GetName(sNewName);
+    OUString sNewName = rNameDialog.GetName();
     bool bRet = false;
     if (sNewName.isEmpty() || sCurrentName == sNewName)
         bRet = true;
diff --git a/sw/source/uibase/shells/frmsh.cxx 
b/sw/source/uibase/shells/frmsh.cxx
index ac5ee0d80835..fa0dd795447c 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -680,8 +680,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
 
                 if ( pDlg->Execute() == RET_OK )
                 {
-                    pDlg->GetName(aName);
-                    rSh.SetFlyName(aName);
+                    rSh.SetFlyName(pDlg->GetName());
                 }
             }
         }
@@ -705,13 +704,9 @@ void SwFrameShell::Execute(SfxRequest &rReq)
 
                 if ( pDlg->Execute() == RET_OK )
                 {
-                    pDlg->GetDescription(aDescription);
-                    pDlg->GetTitle(aTitle);
-                    pDlg->IsDecorative(isDecorative);
-
-                    rSh.SetObjDescription(aDescription);
-                    rSh.SetObjTitle(aTitle);
-                    rSh.SetObjDecorative(isDecorative);
+                    rSh.SetObjDescription(pDlg->GetDescription());
+                    rSh.SetObjTitle(pDlg->GetTitle());
+                    rSh.SetObjDecorative(pDlg->IsDecorative());
                 }
             }
         }

Reply via email to