[Libreoffice-commits] core.git: include/vcl sfx2/source vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Feb 2 11:33:39 UTC 2020
include/vcl/layout.hxx | 30 ++++++-------------------
sfx2/source/notebookbar/DropdownBox.cxx | 1
sfx2/source/notebookbar/PriorityMergedHBox.cxx | 1
vcl/source/window/layout.cxx | 30 +++++++++++++++++++++++++
4 files changed, 40 insertions(+), 22 deletions(-)
New commits:
commit dc9bf7ca261e91adb32af3e51a51998a402a5752
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Feb 1 21:30:39 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Feb 2 12:33:04 2020 +0100
don't include vcl/button.hxx from vcl/layout.hxx
Change-Id: I16a1b392c33734ef89f26e7ff9318573e9bfce88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87817
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 7989c011cc7f..c7631e1308cb 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -11,7 +11,6 @@
#define INCLUDED_VCL_LAYOUT_HXX
#include <vcl/dllapi.h>
-#include <vcl/button.hxx>
#include <vcl/help.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/split.hxx>
@@ -459,34 +458,21 @@ private:
sal_Int32 m_nTopPadding;
};
+class DisclosureButton;
+class CheckBox;
+
class VclExpander final : public VclBin
{
public:
- VclExpander(vcl::Window *pParent)
- : VclBin(pParent)
- , m_bResizeTopLevel(true)
- , m_pDisclosureButton(VclPtr<DisclosureButton>::Create(this))
- {
- m_pDisclosureButton->SetToggleHdl(LINK(this, VclExpander, ClickHdl));
- m_pDisclosureButton->Show();
- }
- virtual ~VclExpander() override { disposeOnce(); }
+ VclExpander(vcl::Window *pParent);
+ virtual ~VclExpander() override;
virtual void dispose() override;
virtual vcl::Window *get_child() override;
virtual const vcl::Window *get_child() const override;
virtual bool set_property(const OString &rKey, const OUString &rValue) override;
- bool get_expanded() const
- {
- return m_pDisclosureButton->IsChecked();
- }
- void set_expanded(bool bExpanded)
- {
- m_pDisclosureButton->Check(bExpanded);
- }
- void set_label(const OUString& rLabel)
- {
- m_pDisclosureButton->SetText(rLabel);
- }
+ bool get_expanded() const;
+ void set_expanded(bool bExpanded);
+ void set_label(const OUString& rLabel);
virtual void StateChanged(StateChangedType nType) override;
void SetExpandedHdl( const Link<VclExpander&,void>& rLink ) { maExpandedHdl = rLink; }
private:
diff --git a/sfx2/source/notebookbar/DropdownBox.cxx b/sfx2/source/notebookbar/DropdownBox.cxx
index 104bb31ecb5a..450cae82a1e8 100644
--- a/sfx2/source/notebookbar/DropdownBox.cxx
+++ b/sfx2/source/notebookbar/DropdownBox.cxx
@@ -18,6 +18,7 @@
*/
#include <vcl/builderfactory.hxx>
+#include <vcl/button.hxx>
#include <vcl/layout.hxx>
#include "DropdownBox.hxx"
diff --git a/sfx2/source/notebookbar/PriorityMergedHBox.cxx b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
index faebfbcd4121..8a5bcd014c4d 100644
--- a/sfx2/source/notebookbar/PriorityMergedHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
@@ -18,6 +18,7 @@
*/
#include <vcl/builderfactory.hxx>
+#include <vcl/button.hxx>
#include <vcl/layout.hxx>
#include <bitmaps.hlst>
#include "PriorityHBox.hxx"
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 56c93c2c3b10..2426d056a542 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -10,6 +10,7 @@
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <o3tl/enumarray.hxx>
#include <o3tl/enumrange.hxx>
+#include <vcl/button.hxx>
#include <vcl/decoview.hxx>
#include <vcl/dialog.hxx>
#include <vcl/layout.hxx>
@@ -1541,6 +1542,35 @@ bool VclAlignment::set_property(const OString &rKey, const OUString &rValue)
return true;
}
+VclExpander::VclExpander(vcl::Window *pParent)
+ : VclBin(pParent)
+ , m_bResizeTopLevel(true)
+ , m_pDisclosureButton(VclPtr<DisclosureButton>::Create(this))
+{
+ m_pDisclosureButton->SetToggleHdl(LINK(this, VclExpander, ClickHdl));
+ m_pDisclosureButton->Show();
+}
+
+VclExpander::~VclExpander()
+{
+ disposeOnce();
+}
+
+bool VclExpander::get_expanded() const
+{
+ return m_pDisclosureButton->IsChecked();
+}
+
+void VclExpander::set_expanded(bool bExpanded)
+{
+ m_pDisclosureButton->Check(bExpanded);
+}
+
+void VclExpander::set_label(const OUString& rLabel)
+{
+ m_pDisclosureButton->SetText(rLabel);
+}
+
void VclExpander::dispose()
{
m_pDisclosureButton.disposeAndClear();
More information about the Libreoffice-commits
mailing list