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 | |
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')
-rw-r--r-- | sw/source/core/access/AccessibilityIssue.cxx | 24 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwbassh.cxx | 15 | ||||
-rw-r--r-- | sw/source/uibase/shells/frmsh.cxx | 13 |
3 files changed, 16 insertions, 36 deletions
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()); } } } |