diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-05-12 16:37:19 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-05-25 09:27:15 +0200 |
commit | a8a32dde08753e03af53e21e4cf5d1e7a3fcc869 (patch) | |
tree | e07a49fd6144cc94cc55dadcfdf5f706e25d97de /toolkit | |
parent | 2573a11f0b240ae7852a8e10f2aef98845979c43 (diff) |
tdf#148706: map value prop in numericfield to text
Change-Id: Ifc37b0aa8dc657d7a7f05199c8132896d03eb437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134240
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 3bd7111fe29ce19a007915af87f1f9269d27d9ff)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134183
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/helper/formpdfexport.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx index aa5224e377f2..7e762a9ff152 100644 --- a/toolkit/source/helper/formpdfexport.cxx +++ b/toolkit/source/helper/formpdfexport.cxx @@ -314,10 +314,18 @@ namespace toolkitform Any aText; static constexpr OUStringLiteral FM_PROP_TEXT = u"Text"; static constexpr OUStringLiteral FM_PROP_LABEL = u"Label"; + static constexpr OUStringLiteral FM_PROP_VALUE = u"Value"; if ( xPSI->hasPropertyByName( FM_PROP_TEXT ) ) aText = xModelProps->getPropertyValue( FM_PROP_TEXT ); else if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) ) aText = xModelProps->getPropertyValue( FM_PROP_LABEL ); + else if ( xPSI->hasPropertyByName( FM_PROP_VALUE ) ) + { + double aValue; + if (xModelProps->getPropertyValue( FM_PROP_VALUE ) >>= aValue) + aText <<= OUString::number(aValue); + } + if ( aText.hasValue() ) { if( ! (aText >>= Descriptor->Text) ) { SAL_WARN("toolkit.helper", "describePDFControl: unable to assign aText to Descriptor->Text"); |