[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - vcl/inc vcl/jsdialog vcl/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 9 12:03:26 UTC 2021
vcl/inc/jsdialog/jsdialogbuilder.hxx | 8 ++++++++
vcl/inc/salvtables.hxx | 15 +++++++++++++++
vcl/jsdialog/jsdialogbuilder.cxx | 17 +++++++++++++++++
vcl/source/app/salvtables.cxx | 26 +++++++++-----------------
4 files changed, 49 insertions(+), 17 deletions(-)
New commits:
commit 8fb52d084e5ad9e9843568cdb8addf3593858908
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: Wed Jun 9 14:02:59 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>
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 0ca30d00c8b5..266d19272a18 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -252,6 +252,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,
@@ -600,4 +601,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 3a72d45e74be..d9129c32fb74 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,
@@ -1388,4 +1399,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: */
commit 5c1f4f0d43fcbc12a526a80643dc9ebb3871e623
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Jun 9 11:22:26 2021 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Jun 9 14:02:46 2021 +0200
Move SalInstanceFrame decl to header file
Change-Id: I43b10e2314b81dc490714ad9fb809c1324fe17c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116890
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 0b19f0729343..52b71320c332 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1797,4 +1797,19 @@ public:
virtual ~SalInstanceRadioButton() override;
};
+class SalInstanceFrame : public SalInstanceContainer, public virtual weld::Frame
+{
+private:
+ VclPtr<VclFrame> m_xFrame;
+
+public:
+ SalInstanceFrame(VclFrame* pFrame, SalInstanceBuilder* pBuilder, bool bTakeOwnership);
+
+ virtual void set_label(const OUString& rText) override;
+
+ virtual OUString get_label() const override;
+
+ virtual std::unique_ptr<weld::Label> weld_label_widget() const override;
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 7d7d28c6ec33..0501ff7fa359 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1954,27 +1954,19 @@ IMPL_LINK_NOARG(SalInstanceAssistant, UpdateRoadmap_Hdl, Timer*, void)
enable_notify_events();
}
-namespace
-{
-class SalInstanceFrame : public SalInstanceContainer, public virtual weld::Frame
+SalInstanceFrame::SalInstanceFrame(VclFrame* pFrame, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
+ : SalInstanceContainer(pFrame, pBuilder, bTakeOwnership)
+ , m_xFrame(pFrame)
{
-private:
- VclPtr<VclFrame> m_xFrame;
-
-public:
- SalInstanceFrame(VclFrame* pFrame, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
- : SalInstanceContainer(pFrame, pBuilder, bTakeOwnership)
- , m_xFrame(pFrame)
- {
- }
-
- virtual void set_label(const OUString& rText) override { m_xFrame->set_label(rText); }
+}
- virtual OUString get_label() const override { return m_xFrame->get_label(); }
+void SalInstanceFrame::set_label(const OUString& rText) { m_xFrame->set_label(rText); }
- virtual std::unique_ptr<weld::Label> weld_label_widget() const override;
-};
+OUString SalInstanceFrame::get_label() const { return m_xFrame->get_label(); }
+namespace
+{
class SalInstancePaned : public SalInstanceContainer, public virtual weld::Paned
{
private:
More information about the Libreoffice-commits
mailing list