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

New commits:
commit fc6806c4be8585ce0d35a6b581bf8b3dbf858500
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Mon Apr 10 16:37:54 2023 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Mon Apr 10 23:59:28 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 <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index b24123c552d3..ebfe46fdb9e9 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -353,7 +353,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