[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/inc vcl/jsdialog
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 2 10:46:20 UTC 2020
vcl/inc/jsdialog/jsdialogbuilder.hxx | 10 ++++++++++
vcl/jsdialog/jsdialogbuilder.cxx | 22 ++++++++++++++++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
New commits:
commit 5e33874cfa778e803a04eb088d3817803d12f01e
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Mar 18 09:46:03 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Jul 2 12:45:23 2020 +0200
jsdialog: regenerate JSON on dialog collapse
Change-Id: I407979546a7610630e8109b57db8c98c956baaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97735
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 883ac6ec70a5..79cd5ae41217 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -131,6 +131,16 @@ public:
}
};
+class VCL_DLLPUBLIC JSDialog : public JSWidget<SalInstanceDialog, ::Dialog>
+{
+public:
+ JSDialog(VclPtr<vcl::Window> aOwnedToplevel, ::Dialog* pDialog, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership);
+
+ virtual void collapse(weld::Widget* pEdit, weld::Widget* pButton) override;
+ virtual void undo_collapse() override;
+};
+
class JSLabel : public JSWidget<SalInstanceLabel, FixedText>
{
public:
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index a0b2ae652c72..56970d32f6f3 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -154,8 +154,8 @@ std::unique_ptr<weld::Dialog> JSInstanceBuilder::weld_dialog(const OString& id,
InsertWindowToMap(m_nWindowId);
- std::unique_ptr<weld::Dialog> pRet(pDialog ? new SalInstanceDialog(pDialog, this, false)
- : nullptr);
+ std::unique_ptr<weld::Dialog> pRet(
+ pDialog ? new JSDialog(m_aOwnedToplevel, pDialog, this, false) : nullptr);
if (bTakeOwnership && pDialog)
{
assert(!m_aOwnedToplevel && "only one toplevel per .ui allowed");
@@ -348,6 +348,24 @@ weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* pParen
return new JSMessageDialog(xMessageDialog, nullptr, true);
}
+JSDialog::JSDialog(VclPtr<vcl::Window> aOwnedToplevel, ::Dialog* pDialog,
+ SalInstanceBuilder* pBuilder, bool bTakeOwnership)
+ : JSWidget<SalInstanceDialog, ::Dialog>(aOwnedToplevel, pDialog, pBuilder, bTakeOwnership)
+{
+}
+
+void JSDialog::collapse(weld::Widget* pEdit, weld::Widget* pButton)
+{
+ SalInstanceDialog::collapse(pEdit, pButton);
+ notifyDialogState();
+}
+
+void JSDialog::undo_collapse()
+{
+ SalInstanceDialog::undo_collapse();
+ notifyDialogState();
+}
+
JSLabel::JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel,
SalInstanceBuilder* pBuilder, bool bTakeOwnership)
: JSWidget<SalInstanceLabel, FixedText>(aOwnedToplevel, pLabel, pBuilder, bTakeOwnership)
More information about the Libreoffice-commits
mailing list