diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-10-20 10:59:12 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-12-29 12:01:26 +0100 |
commit | d34047e02e947bcdba555065804a2f772cdd75f2 (patch) | |
tree | 8b9f82087b6977b96ffd70c48212ec7fadf8c03f /vcl/jsdialog | |
parent | 0cb4bc34deef43dc18c73daa0344c92717115456 (diff) |
jsdialog: weld Image widget
Change-Id: Iaf900da5d6256b1aa441dc0dad07ba967f88b085
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123877
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127671
Tested-by: Jenkins
Diffstat (limited to 'vcl/jsdialog')
-rw-r--r-- | vcl/jsdialog/jsdialogbuilder.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index a9ed9b34678c..9792ce9dd1aa 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1055,6 +1055,18 @@ std::unique_ptr<weld::Widget> JSInstanceBuilder::weld_widget(const OString& id) return pWeldWidget; } +std::unique_ptr<weld::Image> JSInstanceBuilder::weld_image(const OString& id) +{ + FixedImage* pImage = m_xBuilder->get<FixedImage>(id); + + auto pWeldWidget = pImage ? std::make_unique<JSImage>(this, pImage, this, false) : nullptr; + + if (pWeldWidget) + RememberWidget(id, pWeldWidget.get()); + + return pWeldWidget; +} + weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType, VclButtonsType eButtonType, @@ -1680,4 +1692,10 @@ JSBox::JSBox(JSDialogSender* pSender, VclBox* pBox, SalInstanceBuilder* pBuilder { } +JSImage::JSImage(JSDialogSender* pSender, FixedImage* pImage, SalInstanceBuilder* pBuilder, + bool bTakeOwnership) + : JSWidget<SalInstanceImage, FixedImage>(pSender, pImage, pBuilder, bTakeOwnership) +{ +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |