[Libreoffice-commits] core.git: vcl/inc vcl/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 26 15:24:17 UTC 2020
vcl/inc/salvtables.hxx | 25 ++++++++++++++++++++++
vcl/source/app/salvtables.cxx | 47 ++++++++++++++++--------------------------
2 files changed, 43 insertions(+), 29 deletions(-)
New commits:
commit a1e458c8957e5e27a5fb8087da37b2472e4a804b
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Nov 26 10:55:12 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Nov 26 16:23:28 2020 +0100
Move SalInstanceExpander decl to header file
Change-Id: I5399f5aca07dd27dfc668cad66cf347936bbba7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106664
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 298f52f53637..9fe7a6a5dac5 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1672,4 +1672,29 @@ public:
virtual ~SalInstanceTreeView() override;
};
+class SalInstanceExpander : public SalInstanceContainer, public virtual weld::Expander
+{
+private:
+ VclPtr<VclExpander> m_xExpander;
+
+ DECL_LINK(ExpandedHdl, VclExpander&, void);
+
+public:
+ SalInstanceExpander(VclExpander* pExpander, SalInstanceBuilder* pBuilder, bool bTakeOwnership);
+
+ virtual void set_label(const OUString& rText) override;
+
+ virtual OUString get_label() const override;
+
+ virtual bool get_expanded() const override;
+
+ virtual void set_expanded(bool bExpand) override;
+
+ virtual bool has_focus() const override;
+
+ virtual void grab_focus() override;
+
+ virtual ~SalInstanceExpander() 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 c4ee05c86b84..0daf586ebb89 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5683,43 +5683,32 @@ IMPL_LINK(SalInstanceTextView, CursorListener, VclWindowEvent&, rEvent, void)
signal_cursor_position();
}
-namespace
-{
-class SalInstanceExpander : public SalInstanceContainer, public virtual weld::Expander
+SalInstanceExpander::SalInstanceExpander(VclExpander* pExpander, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
+ : SalInstanceContainer(pExpander, pBuilder, bTakeOwnership)
+ , m_xExpander(pExpander)
{
-private:
- VclPtr<VclExpander> m_xExpander;
-
- DECL_LINK(ExpandedHdl, VclExpander&, void);
-
-public:
- SalInstanceExpander(VclExpander* pExpander, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
- : SalInstanceContainer(pExpander, pBuilder, bTakeOwnership)
- , m_xExpander(pExpander)
- {
- m_xExpander->SetExpandedHdl(LINK(this, SalInstanceExpander, ExpandedHdl));
- }
+ m_xExpander->SetExpandedHdl(LINK(this, SalInstanceExpander, ExpandedHdl));
+}
- virtual void set_label(const OUString& rText) override { m_xExpander->set_label(rText); }
+void SalInstanceExpander::set_label(const OUString& rText) { m_xExpander->set_label(rText); }
- virtual OUString get_label() const override { return m_xExpander->get_label(); }
+OUString SalInstanceExpander::get_label() const { return m_xExpander->get_label(); }
- virtual bool get_expanded() const override { return m_xExpander->get_expanded(); }
+bool SalInstanceExpander::get_expanded() const { return m_xExpander->get_expanded(); }
- virtual void set_expanded(bool bExpand) override { m_xExpander->set_expanded(bExpand); }
+void SalInstanceExpander::set_expanded(bool bExpand) { m_xExpander->set_expanded(bExpand); }
- virtual bool has_focus() const override
- {
- return m_xExpander->get_label_widget()->HasFocus() || SalInstanceContainer::has_focus();
- }
+bool SalInstanceExpander::has_focus() const
+{
+ return m_xExpander->get_label_widget()->HasFocus() || SalInstanceContainer::has_focus();
+}
- virtual void grab_focus() override { return m_xExpander->get_label_widget()->GrabFocus(); }
+void SalInstanceExpander::grab_focus() { return m_xExpander->get_label_widget()->GrabFocus(); }
- virtual ~SalInstanceExpander() override
- {
- m_xExpander->SetExpandedHdl(Link<VclExpander&, void>());
- }
-};
+SalInstanceExpander::~SalInstanceExpander()
+{
+ m_xExpander->SetExpandedHdl(Link<VclExpander&, void>());
}
IMPL_LINK_NOARG(SalInstanceExpander, ExpandedHdl, VclExpander&, void) { signal_expanded(); }
More information about the Libreoffice-commits
mailing list