From 5938db731bd5f74182acb890102deee813635513 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 17 May 2022 13:43:17 +0200 Subject: tdf#105972: pdf form: export numeric and currency fields as number type Initial support for AFNumber_Format and AFNumber_Keystroke More info in https://experienceleague.adobe.com/docs/experience-manager-learn/assets/FormsAPIReference.pdf?lang=en This patch adds support for CurrencySymbol, DecimalAccuracy and PrependCurrencySymbol for now Change-Id: I8d6ffac51d576a8c243b9c6d5be2c3517bc0125a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134471 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- include/vcl/pdfwriter.hxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/vcl/pdfwriter.hxx') diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 44b6ec449b0e..74bf96255ebf 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -193,6 +193,11 @@ public: Signature }; + enum FormatType + { + Text, Number + }; + enum ErrorCode { // transparent object occurred and was draw opaque because @@ -379,13 +384,18 @@ public: bool Password; // visible echo off bool FileSelect; // field is a file selector sal_Int32 MaxLen; // maximum field length in characters, 0 means unlimited + FormatType Format; + OUString CurrencySymbol; + sal_Int32 DecimalAccuracy; + bool PrependCurrencySymbol; EditWidget() : AnyWidget( vcl::PDFWriter::Edit ), MultiLine( false ), Password( false ), FileSelect( false ), - MaxLen( 0 ) + MaxLen( 0 ), + Format( FormatType::Text ) {} virtual std::shared_ptr Clone() const override -- cgit