[Libreoffice-commits] core.git: vcl/inc vcl/jsdialog

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 27 07:44:30 UTC 2021


 vcl/inc/jsdialog/jsdialogbuilder.hxx |    8 ++++++++
 vcl/jsdialog/jsdialogbuilder.cxx     |   17 +++++++++++++++++
 2 files changed, 25 insertions(+)

New commits:
commit e9aaab806d54d021801e86dc699642c0dc3fb1b0
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Jun 9 12:06:02 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jul 27 09:43:56 2021 +0200

    jsdialog: weld frame
    
    Change-Id: I863022b0b1efc741626b0ba4a8a6183c169eaa85
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116891
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119523
    Tested-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 254db3d1eeae..5199dd943439 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -253,6 +253,7 @@ public:
     virtual std::unique_ptr<weld::Expander> weld_expander(const OString& id) override;
     virtual std::unique_ptr<weld::IconView> weld_icon_view(const OString& id) override;
     virtual std::unique_ptr<weld::RadioButton> weld_radio_button(const OString& id) override;
+    virtual std::unique_ptr<weld::Frame> weld_frame(const OString& id) override;
 
     static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent,
                                                     VclMessageType eMessageType,
@@ -609,4 +610,11 @@ public:
     virtual void set_active(bool active) override;
 };
 
+class JSFrame : public JSWidget<SalInstanceFrame, ::VclFrame>
+{
+public:
+    JSFrame(JSDialogSender* pSender, ::VclFrame* pFrame, SalInstanceBuilder* pBuilder,
+            bool bTakeOwnership);
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index c8aa2d1d6d6c..af68f2c48319 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -862,6 +862,17 @@ std::unique_ptr<weld::RadioButton> JSInstanceBuilder::weld_radio_button(const OS
     return pWeldWidget;
 }
 
+std::unique_ptr<weld::Frame> JSInstanceBuilder::weld_frame(const OString& id)
+{
+    ::VclFrame* pFrame = m_xBuilder->get<::VclFrame>(id);
+    auto pWeldWidget = pFrame ? std::make_unique<JSFrame>(this, pFrame, this, false) : nullptr;
+
+    if (pWeldWidget)
+        RememberWidget(id, pWeldWidget.get());
+
+    return pWeldWidget;
+}
+
 weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* pParent,
                                                             VclMessageType eMessageType,
                                                             VclButtonsType eButtonType,
@@ -1390,4 +1401,10 @@ void JSRadioButton::set_active(bool active)
     sendUpdate();
 }
 
+JSFrame::JSFrame(JSDialogSender* pSender, ::VclFrame* pFrame, SalInstanceBuilder* pBuilder,
+                 bool bTakeOwnership)
+    : JSWidget<SalInstanceFrame, ::VclFrame>(pSender, pFrame, pBuilder, bTakeOwnership)
+{
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list