cui/source/dialogs/FontFeaturesDialog.cxx |   12 +-----------
 cui/source/inc/FontFeaturesDialog.hxx     |    5 +----
 cui/source/tabpages/chardlg.cxx           |   13 +++++++------
 3 files changed, 9 insertions(+), 21 deletions(-)

New commits:
commit 06528a4cd7b7355404872d427e924729ea1d9f9c
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Jan 19 19:51:44 2026 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Feb 24 00:14:41 2026 +0100

    name FontFeaturesDialog async
    
    Change-Id: I5d6ef3dbf0570b6cc78fe130d18774d28cf47f44
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197609
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200090
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index e0b299cc680d..26a1d529b84e 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -218,7 +218,7 @@ IMPL_LINK_NOARG(FontFeaturesDialog, ComboBoxSelectedHdl, 
weld::ComboBox&, void)
     updateFontPreview();
 }
 
-OUString FontFeaturesDialog::createFontNameWithFeatures()
+OUString FontFeaturesDialog::createFontNameWithFeatures() const
 {
     OUString sResultFontName;
     OUStringBuffer sNameSuffix;
@@ -262,16 +262,6 @@ OUString FontFeaturesDialog::createFontNameWithFeatures()
     return sResultFontName;
 }
 
-short FontFeaturesDialog::run()
-{
-    short nResult = GenericDialogController::run();
-    if (nResult == RET_OK)
-    {
-        m_sResultFontName = createFontNameWithFeatures();
-    }
-    return nResult;
-}
-
 } // end svx namespace
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/FontFeaturesDialog.hxx 
b/cui/source/inc/FontFeaturesDialog.hxx
index 00551fca3ac1..55ec6fa0db63 100644
--- a/cui/source/inc/FontFeaturesDialog.hxx
+++ b/cui/source/inc/FontFeaturesDialog.hxx
@@ -53,7 +53,6 @@ class FontFeaturesDialog : public 
weld::GenericDialogController
 private:
     std::vector<std::unique_ptr<FontFeatureItem>> m_aFeatureItems;
     OUString m_sFontName;
-    OUString m_sResultFontName;
 
     SvxFontPrevWindow m_aPreviewWindow;
     std::unique_ptr<weld::ScrolledWindow> m_xContentWindow;
@@ -66,7 +65,6 @@ private:
     std::unique_ptr<weld::CustomWeld> m_xPreviewWindow;
 
     void initialize();
-    OUString createFontNameWithFeatures();
 
     // returns the max height of a row
     int fillGrid(std::vector<vcl::font::Feature> const& rFontFeatures);
@@ -77,9 +75,8 @@ private:
 public:
     FontFeaturesDialog(weld::Window* pParent, OUString aFontName);
     ~FontFeaturesDialog() override;
-    virtual short run() override;
 
-    OUString const& getResultFontName() const { return m_sResultFontName; }
+    OUString createFontNameWithFeatures() const;
 
     void updateFontPreview();
 };
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 646fd8cf81a2..910eb2e535ef 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1152,12 +1152,13 @@ IMPL_LINK(SvxCharNamePage, FontFeatureButtonClicked, 
weld::Button&, rButton, voi
 
     if (!sFontName.isEmpty() && pNameBox)
     {
-        cui::FontFeaturesDialog aDialog(GetFrameWeld(), sFontName);
-        if (aDialog.run() == RET_OK)
-        {
-            pNameBox->set_entry_text(aDialog.getResultFontName());
-            UpdatePreview_Impl();
-        }
+        auto xDlg = std::make_shared<cui::FontFeaturesDialog>(GetFrameWeld(), 
sFontName);
+        weld::GenericDialogController::runAsync(xDlg, [xDlg, pNameBox, 
this](sal_Int32 nResult){
+            if (nResult == RET_OK) {
+                pNameBox->set_entry_text(xDlg->createFontNameWithFeatures());
+                UpdatePreview_Impl();
+            }
+        });
     }
 }
 

Reply via email to