summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-14 13:43:51 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2018-08-14 22:26:00 +0200
commit5a56b72413d5f555c854e36d3bd2fd50ec21644c (patch)
treee1ff1398f766b6c72265457a26d794baa37230b7 /include
parent704133f7cb76b29a86d97d776b594c5ebf9a1123 (diff)
Resolves: tdf#119251 parse non-default units in user inputted values
Change-Id: I28f8338f5c318f2228b742e2e171d53820cb0cc8 Reviewed-on: https://gerrit.libreoffice.org/58985 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/field.hxx2
-rw-r--r--include/vcl/weld.hxx2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 8f4bf5b07219..682c136c8a25 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -241,6 +241,8 @@ public:
void SetCustomConvertHdl( const Link<MetricFormatter&,void>& rLink ) { maCustomConvertLink = rLink; }
static FieldUnit StringToMetric(const OUString &rMetricString);
+ static bool TextToValue(const OUString& rStr, double& rValue, sal_Int64 nBaseValue, sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper, FieldUnit eUnit);
+
protected:
sal_Int64 mnBaseValue;
FieldUnit meUnit;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 5cb39276ea62..17f2b5119049 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -569,6 +569,7 @@ protected:
DECL_LINK(spin_button_value_changed, weld::SpinButton&, void);
DECL_LINK(spin_button_output, weld::SpinButton&, void);
+ DECL_LINK(spin_button_input, int* result, bool);
void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
@@ -583,6 +584,7 @@ public:
{
update_width_chars();
m_xSpinButton->connect_output(LINK(this, MetricSpinButton, spin_button_output));
+ m_xSpinButton->connect_input(LINK(this, MetricSpinButton, spin_button_input));
m_xSpinButton->connect_value_changed(
LINK(this, MetricSpinButton, spin_button_value_changed));
}