diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-22 09:45:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-22 14:51:12 +0100 |
commit | 27f15f1d50b1b67c940bf57e1581240011806159 (patch) | |
tree | d76949df5bf5e6437910c371520227895128d87e /sw/source/uibase/shells | |
parent | e531242f62d27000ab5fefd6d63023d4a1060c75 (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r-- | sw/source/uibase/shells/drwbassh.cxx | 15 | ||||
-rw-r--r-- | sw/source/uibase/shells/frmsh.cxx | 13 |
2 files changed, 9 insertions, 19 deletions
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()); } } } |