diff options
Diffstat (limited to 'vcl/source/control/field.cxx')
-rw-r--r-- | vcl/source/control/field.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index e75a55b52c5c..abdcaa798bc6 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -29,6 +29,7 @@ #include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <vcl/uitest/uiobject.hxx> #include <strings.hrc> #include <svdata.hxx> @@ -640,6 +641,22 @@ sal_Int64 NumericFormatter::GetValueFromString(const OUString& rStr) const return mnLastValue; } +// currently used by online +void NumericFormatter::SetValueFromString(const OUString& rStr) +{ + sal_Int64 nValue; + + if (ImplNumericGetValue(rStr, nValue, GetDecimalDigits(), + Application::GetSettings().GetNeutroLocaleDataWrapper())) + { + SetValue(nValue); + } + else + { + SAL_WARN("vcl", "fail to convert the value: " << rStr ); + } +} + sal_Int64 NumericFormatter::GetValue() const { if (mbFormatting) //don't parse the entry if we're currently formatting what to put in it @@ -1715,6 +1732,11 @@ boost::property_tree::ptree MetricField::DumpAsPropertyTree() return aTree; } +FactoryFunction MetricField::GetUITestFactory() const +{ + return MetricFieldUIObject::create; +} + MetricBox::MetricBox(vcl::Window* pParent, WinBits nWinStyle) : ComboBox(pParent, nWinStyle) , MetricFormatter(this) |