summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-02 15:30:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-02 21:54:03 +0200
commitfa8822c48e2a79589bebbd015b36d1da8b338cc2 (patch)
tree0e3c8c305f08a2dee687e540b4795e7de90ad20f /include
parent5d5a7293bf6a49b1828bdd9fdff989f0a9cd2e53 (diff)
weld SwTableWidthDlg
Change-Id: I272a783c9b7a8f725314e416fbd81217105ee5a6 Reviewed-on: https://gerrit.libreoffice.org/52266 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/svtools/unitconv.hxx2
-rw-r--r--include/vcl/weld.hxx14
2 files changed, 16 insertions, 0 deletions
diff --git a/include/svtools/unitconv.hxx b/include/svtools/unitconv.hxx
index 756c4fdfe9ab..6d663df72b1c 100644
--- a/include/svtools/unitconv.hxx
+++ b/include/svtools/unitconv.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_SVTOOLS_UNITCONV_HXX
#include <vcl/field.hxx>
+#include <vcl/weld.hxx>
#include <svtools/svtdllapi.h>
#include <svl/poolitem.hxx>
@@ -31,6 +32,7 @@ typedef long (*FUNC_CONVERT)(long);
// Functions -------------------------------------------------------------
+SVT_DLLPUBLIC void SetFieldUnit(weld::MetricSpinButton& rCtrl, FieldUnit eUnit, bool bAll = false);
SVT_DLLPUBLIC void SetFieldUnit( MetricField& rCtrl, FieldUnit eUnit, bool bAll = false );
SVT_DLLPUBLIC void SetFieldUnit( MetricBox& rCtrl, FieldUnit eUnit );
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index e791724c0a43..a5a6d75035fb 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -493,6 +493,20 @@ public:
max = ConvertValue(max, m_eSrcUnit, eDestUnit);
}
+ void set_min(int min, FieldUnit eValueUnit)
+ {
+ int dummy, max;
+ get_range(dummy, max, eValueUnit);
+ set_range(min, max, eValueUnit);
+ }
+
+ void set_max(int max, FieldUnit eValueUnit)
+ {
+ int min, dummy;
+ get_range(min, dummy, eValueUnit);
+ set_range(min, max, eValueUnit);
+ }
+
void set_increments(int step, int page, FieldUnit eValueUnit)
{
step = ConvertValue(step, eValueUnit, m_eSrcUnit);