diff options
author | Henry Castro <hcastro@collabora.com> | 2020-04-22 18:22:33 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2020-04-28 04:53:40 +0200 |
commit | 08dbff244c6b58e34ca9658b7405b641fcaaffec (patch) | |
tree | f5d8dbb79558ec4c1b3e6b97c6703a9a87bda42a /include | |
parent | 5d6c71151e8c3ae710e4f57dccebf5f1073a399c (diff) |
lok: add MetricFieldUIObject class
Add new action "VALUE" to set the value number
for metric input controls
Change-Id: I5058260c2e1562cfc6d10508d5981d185c5f2212
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92738
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/field.hxx | 3 | ||||
-rw-r--r-- | include/vcl/uitest/uiobject.hxx | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx index 172c128c0f3e..c855fa8c69f3 100644 --- a/include/vcl/field.hxx +++ b/include/vcl/field.hxx @@ -155,6 +155,8 @@ public: sal_Int64 Normalize( sal_Int64 nValue ) const; sal_Int64 Denormalize( sal_Int64 nValue ) const; + virtual void SetValueFromString(const OUString& rStr); + protected: sal_Int64 mnFieldValue; sal_Int64 mnLastValue; @@ -519,6 +521,7 @@ public: virtual void dispose() override; virtual boost::property_tree::ptree DumpAsPropertyTree() override; + virtual FactoryFunction GetUITestFactory() const override; }; diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx index e56801af17f4..f5734e1a2949 100644 --- a/include/vcl/uitest/uiobject.hxx +++ b/include/vcl/uitest/uiobject.hxx @@ -381,6 +381,25 @@ protected: virtual OUString get_name() const override; }; +class UITEST_DLLPUBLIC MetricFieldUIObject : public SpinFieldUIObject +{ + VclPtr<MetricField> mxMetricField; + +public: + + MetricFieldUIObject(const VclPtr<MetricField>& xEdit); + virtual ~MetricFieldUIObject() override; + + virtual void execute(const OUString& rAction, + const StringMap& rParameters) override; + + static std::unique_ptr<UIObject> create(vcl::Window* pWindow); + +protected: + + virtual OUString get_name() const override; +}; + class UITEST_DLLPUBLIC TabControlUIObject : public WindowUIObject { private: |