diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-06 17:04:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-07 15:24:12 +0200 |
commit | 56e813e810c42fd7885521698a0e4dfaf5862038 (patch) | |
tree | bb1cf0766791b69dff28b0807cb390e324d6b8ed /include/svx/frmdirlbox.hxx | |
parent | 08814a34e3a3841c316dfb27a07583049abc5195 (diff) |
weld SwFormatTablePage
Change-Id: Ia82fdd5666a4a59cf4e1867d295ecb1d336e10a2
Reviewed-on: https://gerrit.libreoffice.org/55418
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/svx/frmdirlbox.hxx')
-rw-r--r-- | include/svx/frmdirlbox.hxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx index 9c065160cb17..0a677f488f11 100644 --- a/include/svx/frmdirlbox.hxx +++ b/include/svx/frmdirlbox.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SVX_FRMDIRLBOX_HXX #include <vcl/lstbox.hxx> +#include <vcl/weld.hxx> #include <sfx2/itemconnect.hxx> #include <editeng/frmdir.hxx> #include <svx/svxdllapi.h> @@ -54,6 +55,28 @@ public: }; +class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFrameDirectionListBox +{ +private: + std::unique_ptr<weld::ComboBoxText> m_xControl; +public: + explicit SvxFrameDirectionListBox(weld::ComboBoxText* pControl) + : m_xControl(pControl) + { + } + + bool get_visible() const { return m_xControl->get_visible(); } + bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); } + SvxFrameDirection get_active_id() const { return static_cast<SvxFrameDirection>(m_xControl->get_active_id().toUInt32()); } + void set_active_id(SvxFrameDirection eDir) { m_xControl->set_active_id(OUString::number(static_cast<sal_uInt32>(eDir))); } + void save_value() { m_xControl->save_value(); } + /** Inserts a string with corresponding direction enum into the listbox. */ + void append(SvxFrameDirection eDirection, const OUString& rString) + { + m_xControl->append(OUString::number(static_cast<sal_uInt32>(eDirection)), rString); + } +}; + /** Wrapper for usage of a FrameDirectionListBox in item connections. */ class SAL_WARN_UNUSED SVX_DLLPUBLIC FrameDirectionListBoxWrapper : public sfx::SingleControlWrapper< FrameDirectionListBox, SvxFrameDirection > { |