sw/source/core/fields/usrfld.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eea22152b7544268c5fa2765030ff75cd74ddb3b
Author:     Eike Rathke <[email protected]>
AuthorDate: Mon Apr 10 16:37:54 2023 +0200
Commit:     Adolfo Jayme Barrientos <[email protected]>
CommitDate: Tue Apr 11 08:03:48 2023 +0200

    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 <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 5a6d03f656329263cc3be4ce0ea9a0ea2373606e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150198
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 9e490efd03c2..fb3095ced9bc 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:

Reply via email to