summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-06 17:04:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-06-07 15:24:12 +0200
commit56e813e810c42fd7885521698a0e4dfaf5862038 (patch)
treebb1cf0766791b69dff28b0807cb390e324d6b8ed /include
parent08814a34e3a3841c316dfb27a07583049abc5195 (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')
-rw-r--r--include/svx/frmdirlbox.hxx23
-rw-r--r--include/vcl/weld.hxx1
2 files changed, 24 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 >
{
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 7caac3ec0686..cfec080ffc43 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -661,6 +661,7 @@ public:
void show(bool bShow = true) { m_xSpinButton->show(bShow); }
void hide() { m_xSpinButton->hide(); }
void set_digits(unsigned int digits) { m_xSpinButton->set_digits(digits); }
+ void set_accessible_name(const OUString& rName) { m_xSpinButton->set_accessible_name(rName); }
unsigned int get_digits() const { return m_xSpinButton->get_digits(); }
void save_value() { m_xSpinButton->save_value(); }
bool get_value_changed_from_saved() const