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 17:38:53 +0200
commitd5dcdd8d4ee805cebd94e015ca7b8ccb5571d121 (patch)
treea6985e99f3923ed7ec5be5af57f36e8c41cc7a67 /include
parentd2f5d382550b177e4eda73b6d39e7fef4ee4f9cd (diff)
weld SwFormatTablePage
Change-Id: Ia82fdd5666a4a59cf4e1867d295ecb1d336e10a2 Reviewed-on: https://gerrit.libreoffice.org/55424 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