diff options
author | Henry Castro <hcastro@collabora.com> | 2020-05-06 14:06:27 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2020-05-10 18:34:55 +0200 |
commit | b2f67c6839142cf77bea53f6c79e20928b961be9 (patch) | |
tree | 24569d76c5680680e62d9248fa48476fe1d85f15 /include | |
parent | 701f62c023e7a8febe3f9d7294d0ca2bec8a13bc (diff) |
lok: add FormattedFieldUIObject class
Required by mobile device to set "VALUE" number
Change-Id: Ie18fa3c58b8ba107917a8b12a7b98c74a385975c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93585
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/fmtfield.hxx | 6 | ||||
-rw-r--r-- | include/vcl/uitest/formattedfielduiobject.hxx | 37 |
2 files changed, 43 insertions, 0 deletions
diff --git a/include/vcl/fmtfield.hxx b/include/vcl/fmtfield.hxx index 918682e258c6..c61aca9170c1 100644 --- a/include/vcl/fmtfield.hxx +++ b/include/vcl/fmtfield.hxx @@ -119,6 +119,8 @@ public: void SetTextValue(const OUString& rText); // The String is transformed to a double (with a formatter) and SetValue is called afterwards + // + void SetValueFromString(const OUString& rStr); bool IsEmptyFieldEnabled() const { return m_bEnableEmptyField; } void EnableEmptyField(bool bEnable); @@ -235,6 +237,10 @@ public: void UseInputStringForFormatting(); bool IsUsingInputStringForFormatting() const { return m_bUseInputStringForFormatting;} + virtual boost::property_tree::ptree DumpAsPropertyTree() override; + + virtual FactoryFunction GetUITestFactory() const override; + protected: virtual bool EventNotify(NotifyEvent& rNEvt) override; void impl_Modify(bool makeValueDirty = true); diff --git a/include/vcl/uitest/formattedfielduiobject.hxx b/include/vcl/uitest/formattedfielduiobject.hxx new file mode 100644 index 000000000000..2408fe753e1b --- /dev/null +++ b/include/vcl/uitest/formattedfielduiobject.hxx @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_VCL_UITEST_FORMATTEDFIELDUIOBJECT_HXX +#define INCLUDED_VCL_UITEST_FORMATTEDFIELDUIOBJECT_HXX + +#include <vcl/uitest/uiobject.hxx> + +class FormattedField; + +class UITEST_DLLPUBLIC FormattedFieldUIObject : public SpinFieldUIObject +{ + VclPtr<FormattedField> mxFormattedField; + +public: + FormattedFieldUIObject(const VclPtr<FormattedField>& xEdit); + virtual ~FormattedFieldUIObject() override; + + virtual void execute(const OUString& rAction, const StringMap& rParameters) override; + + virtual StringMap get_state() override; + + static std::unique_ptr<UIObject> create(vcl::Window* pWindow); + +protected: + virtual OUString get_name() const override; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |