sw/source/core/access/AccessibilityIssue.cxx |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 48129cabb9a5636207d3b8f4f9fa4e4abac61b8a
Author:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
AuthorDate: Thu Sep 7 11:35:52 2023 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
CommitDate: Fri Sep 8 13:23:18 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>

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();
             }

Reply via email to