Related: tdf#154218 Use proper locale in SwUserFieldType::PutValue()

The cast to sal_uInt16 actually called the overloaded
DoubleToString(...,sal_uInt32) with the LanguageType value used as
format key number.

Change-Id: I74415ff5504369d437df8caab02ecb61eb853143
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150186
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit 5a6d03f656329263cc3be4ce0ea9a0ea2373606e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150198
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 9e490ef..fb3095c 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -348,7 +348,7 @@ void SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
            m_nValue = fVal;
            LanguageTag aContentLanguage(GetFieldTypeLanguage());
            m_aContentLang = aContentLanguage.getBcp47();
            m_aContent = DoubleToString(m_nValue, static_cast<sal_uInt16>(GetFieldTypeLanguage()));
            m_aContent = DoubleToString(m_nValue, aContentLanguage.getLanguageType());
        }
        break;
    case FIELD_PROP_PAR2: