diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-05-12 16:37:19 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-05-13 10:40:19 +0200 |
commit | 3bd7111fe29ce19a007915af87f1f9269d27d9ff (patch) | |
tree | 21563f398fc1ab798ae75ae27a5f9b613457ed35 /toolkit | |
parent | eac2e7520de09d019c07b63f9f89d865c20b1e4e (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>
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 80008f03ca3b..1c7757553676 100644 --- a/toolkit/source/helper/formpdfexport.cxx +++ b/toolkit/source/helper/formpdfexport.cxx @@ -313,10 +313,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"); |