summaryrefslogtreecommitdiff
path: root/vcl/jsdialog
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-05-18 17:07:30 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2021-07-26 15:55:34 +0200
commitbd96480dab1313d62d8b58f2f6cb09ea03022cf7 (patch)
treea4d0ff0afe9158d14b3fc01fe84479f898229098 /vcl/jsdialog
parent97370902a77f403c569720f30b556eaf0a4b777c (diff)
jsdialog: weld Container
Change-Id: I9516538cac8d2e42e0d029feaf84c3bc3a80151a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119499 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl/jsdialog')
-rw-r--r--vcl/jsdialog/jsdialogbuilder.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index fd9d152ae6ed..5a57e63dfbce 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -626,6 +626,17 @@ std::unique_ptr<weld::MessageDialog> JSInstanceBuilder::weld_message_dialog(cons
return pRet;
}
+std::unique_ptr<weld::Container> JSInstanceBuilder::weld_container(const OString& id)
+{
+ vcl::Window* pContainer = m_xBuilder->get<vcl::Window>(id);
+ auto pWeldWidget = std::make_unique<JSContainer>(this, pContainer, this, false);
+
+ if (pWeldWidget)
+ RememberWidget(id, pWeldWidget.get());
+
+ return pWeldWidget;
+}
+
std::unique_ptr<weld::Label> JSInstanceBuilder::weld_label(const OString& id)
{
::FixedText* pLabel = m_xBuilder->get<FixedText>(id);
@@ -860,6 +871,12 @@ void JSDialog::response(int response)
SalInstanceDialog::response(response);
}
+JSContainer::JSContainer(JSDialogSender* pSender, vcl::Window* pContainer,
+ SalInstanceBuilder* pBuilder, bool bTakeOwnership)
+ : JSWidget<SalInstanceContainer, vcl::Window>(pSender, pContainer, pBuilder, bTakeOwnership)
+{
+}
+
JSLabel::JSLabel(JSDialogSender* pSender, FixedText* pLabel, SalInstanceBuilder* pBuilder,
bool bTakeOwnership)
: JSWidget<SalInstanceLabel, FixedText>(pSender, pLabel, pBuilder, bTakeOwnership)