include/vcl/weld.hxx                 |    2 +-
 sc/source/ui/miscdlgs/anyrefdg.cxx   |    3 ++-
 vcl/inc/jsdialog/jsdialogbuilder.hxx |    2 +-
 vcl/inc/qt5/QtInstanceDialog.hxx     |    2 +-
 vcl/inc/salvtables.hxx               |    2 +-
 vcl/jsdialog/jsdialogbuilder.cxx     |    4 ++--
 vcl/qt5/QtInstanceBuilder.cxx        |    1 +
 vcl/qt5/QtInstanceDialog.cxx         |    2 +-
 vcl/source/app/salvtables.cxx        |    7 +++----
 vcl/unx/gtk3/gtkinst.cxx             |   11 +++++------
 10 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 85e9c9cc3bc4ce4e11b9b9f29d2fcebef5266b52
Author:     Michael Weghorn <[email protected]>
AuthorDate: Mon Aug 11 10:52:23 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Mon Aug 11 23:03:50 2025 +0200

    tdf#130857 weld: Pass first Dialog::collapse param by ref
    
    Both, the GTK and the VCL implementations assume it's
    non-null. Make that more obvious in the weld::Dialog
    API by passing the param by ref.
    
    While at it, also rename variables in
    GtkInstanceDialog::collapse to use "Gtk" in their
    name, not "Vcl", as these are the GTK variants.
    
    Change-Id: Ic8d407dc0859c04f058eaeca232e48529723e063
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189355
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 4cb4dda6cd9e..f788b47ffe4f 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -663,7 +663,7 @@ public:
     virtual inline void set_default_response(int nResponse);
 
     // shrink the dialog down to shown just these widgets
-    virtual void collapse(weld::Widget* pEdit, weld::Widget* pButton) = 0;
+    virtual void collapse(weld::Widget& rEdit, weld::Widget* pButton) = 0;
     // undo previous dialog collapse
     virtual void undo_collapse() = 0;
 
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx 
b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 06fec4bb8cb9..cdf6c1866eae 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -382,7 +382,8 @@ void ScFormulaReferenceHelper::RefInputStart( 
formula::RefEdit* pEdit, formula::
         m_pDialog->set_title(m_pDialog->strip_mnemonic(sNewDialogText));
     }
 
-    m_pDialog->collapse(pEdit->GetWidget(), pButton ? pButton->GetWidget() : 
nullptr);
+    assert(pEdit && pEdit->GetWidget());
+    m_pDialog->collapse(*pEdit->GetWidget(), pButton ? pButton->GetWidget() : 
nullptr);
 
     // set button image
     if (pButton)
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 737bfe00097c..102b11668b72 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -414,7 +414,7 @@ public:
     JSDialog(JSDialogSender* pSender, ::Dialog* pDialog, SalInstanceBuilder* 
pBuilder,
              bool bTakeOwnership);
 
-    virtual void collapse(weld::Widget* pEdit, weld::Widget* pButton) override;
+    virtual void collapse(weld::Widget& rEdit, weld::Widget* pButton) override;
     virtual void undo_collapse() override;
     virtual void response(int response) override;
     virtual std::unique_ptr<weld::Button> weld_button_for_response(int 
response) override;
diff --git a/vcl/inc/qt5/QtInstanceDialog.hxx b/vcl/inc/qt5/QtInstanceDialog.hxx
index 8c20a9911b63..aa183cf18efb 100644
--- a/vcl/inc/qt5/QtInstanceDialog.hxx
+++ b/vcl/inc/qt5/QtInstanceDialog.hxx
@@ -37,7 +37,7 @@ public:
     virtual bool runAsync(std::shared_ptr<Dialog> const& rxSelf,
                           const std::function<void(sal_Int32)>& func) override;
 
-    virtual void collapse(weld::Widget*, weld::Widget*) override;
+    virtual void collapse(weld::Widget&, weld::Widget*) override;
 
     virtual void undo_collapse() override;
 
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 4ea60fd433ed..7670bbc16614 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -518,7 +518,7 @@ public:
     virtual bool runAsync(std::shared_ptr<Dialog> const& rxSelf,
                           const std::function<void(sal_Int32)>& rEndDialogFn) 
override;
 
-    virtual void collapse(weld::Widget* pEdit, weld::Widget* pButton) override;
+    virtual void collapse(weld::Widget& rEdit, weld::Widget* pButton) override;
 
     virtual void undo_collapse() override;
 
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 20dc77c10cdf..d9c75cd016df 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -959,9 +959,9 @@ JSDialog::JSDialog(JSDialogSender* pSender, ::Dialog* 
pDialog, SalInstanceBuilde
 {
 }
 
-void JSDialog::collapse(weld::Widget* pEdit, weld::Widget* pButton)
+void JSDialog::collapse(weld::Widget& rEdit, weld::Widget* pButton)
 {
-    SalInstanceDialog::collapse(pEdit, pButton);
+    SalInstanceDialog::collapse(rEdit, pButton);
     sendFullUpdate();
 }
 
diff --git a/vcl/qt5/QtInstanceDialog.cxx b/vcl/qt5/QtInstanceDialog.cxx
index 3c55731a7767..b449f6d20ab5 100644
--- a/vcl/qt5/QtInstanceDialog.cxx
+++ b/vcl/qt5/QtInstanceDialog.cxx
@@ -80,7 +80,7 @@ bool QtInstanceDialog::runAsync(std::shared_ptr<Dialog> 
const& rxSelf,
     return true;
 }
 
-void QtInstanceDialog::collapse(weld::Widget*, weld::Widget*)
+void QtInstanceDialog::collapse(weld::Widget&, weld::Widget*)
 {
     assert(false && "Not implemented yet");
 }
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 524aedf3c8f4..d03373b7a96c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1787,13 +1787,12 @@ bool 
SalInstanceDialog::runAsync(std::shared_ptr<Dialog> const& rxSelf,
     return m_xDialog->StartExecuteAsync(aCtx);
 }
 
-void SalInstanceDialog::collapse(weld::Widget* pEdit, weld::Widget* pButton)
+void SalInstanceDialog::collapse(weld::Widget& rEdit, weld::Widget* pButton)
 {
-    SalInstanceWidget* pVclEdit = dynamic_cast<SalInstanceWidget*>(pEdit);
-    assert(pVclEdit);
+    SalInstanceWidget& rVclEdit = dynamic_cast<SalInstanceWidget&>(rEdit);
     SalInstanceWidget* pVclButton = dynamic_cast<SalInstanceWidget*>(pButton);
 
-    vcl::Window* pRefEdit = pVclEdit->getWidget();
+    vcl::Window* pRefEdit = rVclEdit.getWidget();
     vcl::Window* pRefBtn = pVclButton ? pVclButton->getWidget() : nullptr;
 
     auto nOldEditWidth = pRefEdit->GetSizePixel().Width();
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index ca91bf6d1619..b51c24893707 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -7244,14 +7244,13 @@ public:
 #endif
     }
 
-    virtual void collapse(weld::Widget* pEdit, weld::Widget* pButton) override
+    virtual void collapse(weld::Widget& rEdit, weld::Widget* pButton) override
     {
-        GtkInstanceWidget* pVclEdit = dynamic_cast<GtkInstanceWidget*>(pEdit);
-        assert(pVclEdit);
-        GtkInstanceWidget* pVclButton = 
dynamic_cast<GtkInstanceWidget*>(pButton);
+        GtkInstanceWidget& rGtkEdit = dynamic_cast<GtkInstanceWidget&>(rEdit);
+        GtkInstanceWidget* pGtkButton = 
dynamic_cast<GtkInstanceWidget*>(pButton);
 
-        GtkWidget* pRefEdit = pVclEdit->getWidget();
-        GtkWidget* pRefBtn = pVclButton ? pVclButton->getWidget() : nullptr;
+        GtkWidget* pRefEdit = rGtkEdit.getWidget();
+        GtkWidget* pRefBtn = pGtkButton ? pGtkButton->getWidget() : nullptr;
 
         m_nOldEditWidth = gtk_widget_get_allocated_width(pRefEdit);
 
commit 1f52f6507798dba1624d08b01008b9c96d24e970
Author:     Michael Weghorn <[email protected]>
AuthorDate: Mon Aug 11 10:02:10 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Mon Aug 11 23:03:42 2025 +0200

    tdf#130857 qt weld: Support dialog to paste plain text as markdown
    
    This means that native Qt widgets are used for that dialog
    now when using the qt5 or qt6 VCL plugin and starting LO with
    environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
    
    The dialog was newly added in
    
        commit 8c49b50c20527a971fa5f74e09cc07eb1e8ead0f
        Author: Ujjawal Kumar <[email protected]>
        Date:   Tue Jul 29 16:55:55 2025 +0530
    
            tdf#162153 Introduce a new dialog for pasting plain text as Markdown
    
    and can be triggered by selecting some text in a Markdown
    document in a text editor, copying from there (Ctrl+C),
    then pasting into Writer (Ctrl+V).
    
    Change-Id: Iac1761e71169a322d67dcabecb7eb89ab00176c3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189349
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx
index 15d6c28186c9..1e51273205f6 100644
--- a/vcl/qt5/QtInstanceBuilder.cxx
+++ b/vcl/qt5/QtInstanceBuilder.cxx
@@ -186,6 +186,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& 
rUIFile, const weld::W
         u"svx/ui/docrecoverybrokendialog.ui"_ustr,
         u"svx/ui/docrecoveryrecoverdialog.ui"_ustr,
         u"svx/ui/docrecoverysavedialog.ui"_ustr,
+        u"svx/ui/dropdownfielddialog.ui"_ustr,
         u"svx/ui/fontworkgallerydialog.ui"_ustr,
         u"svx/ui/deletefooterdialog.ui"_ustr,
         u"svx/ui/deleteheaderdialog.ui"_ustr,

Reply via email to