sw/source/core/access/AccessibilityIssue.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
New commits: commit 9cecc2927bdffcb6235a9d0baf649e14c6c7beb2 Author: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> AuthorDate: Thu Sep 7 11:35:52 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Sep 19 12:08:54 2023 +0200 tdf#157085 Make doc title dialog modal Change-Id: I7a7574c3ffaa45aeb9bb97d9a1963c52d5619d99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156658 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> (cherry picked from commit 48129cabb9a5636207d3b8f4f9fa4e4abac61b8a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156732 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/access/AccessibilityIssue.cxx b/sw/source/core/access/AccessibilityIssue.cxx index 080ce2ec7a9e..a915289f26ea 100644 --- a/sw/source/core/access/AccessibilityIssue.cxx +++ b/sw/source/core/access/AccessibilityIssue.cxx @@ -236,8 +236,11 @@ void AccessibilityIssue::quickFixIssue() const case IssueObject::DOCUMENT_TITLE: { OUString aDesc = SwResId(STR_ENTER_DOCUMENT_TITLE); - SvxNameDialog aNameDialog(m_pParent, "", aDesc); - if (aNameDialog.run() == RET_OK) + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + SwWrtShell* pWrtShell = m_pDoc->GetDocShell()->GetWrtShell(); + ScopedVclPtr<AbstractSvxNameDialog> aNameDialog( + pFact->CreateSvxNameDialog(pWrtShell->GetView().GetFrameWeld(), "", aDesc)); + if (aNameDialog->Execute() == RET_OK) { SwDocShell* pShell = m_pDoc->GetDocShell(); if (!pShell) @@ -247,7 +250,9 @@ void AccessibilityIssue::quickFixIssue() const pShell->GetModel(), uno::UNO_QUERY_THROW); const uno::Reference<document::XDocumentProperties> xDocumentProperties( xDPS->getDocumentProperties()); - xDocumentProperties->setTitle(aNameDialog.GetName()); + OUString sName; + aNameDialog->GetName(sName); + xDocumentProperties->setTitle(sName); m_pDoc->getOnlineAccessibilityCheck()->resetAndQueueDocumentLevel(); }