summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-10-03 12:44:07 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-10-03 16:30:36 +0200
commit532a4dcba6ec6fe1bd88f3c2db77f05868167886 (patch)
tree82857bab5b8914677e0d17a4b668dfcb97b0467e /framework
parent372d2d78906aac32ddaf7eaa3c2037ea3d5af1ae (diff)
Replace more reinterpret_cast with SAL_W/SAL_U
Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc Reviewed-on: https://gerrit.libreoffice.org/43071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
index f0c2d11cbddb..135a708e069b 100644
--- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx
+++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
@@ -459,12 +459,11 @@ OUString SpinfieldToolbarController::impl_formatOutputString( double fValue )
aBuffer[0] = 0;
if ( m_bFloat )
- _snwprintf( reinterpret_cast<wchar_t *>(aBuffer), 128, reinterpret_cast<const wchar_t *>(m_aOutFormat.getStr()), fValue );
+ _snwprintf( SAL_W(aBuffer), SAL_N_ELEMENTS(aBuffer), SAL_W(m_aOutFormat.getStr()), fValue );
else
- _snwprintf( reinterpret_cast<wchar_t *>(aBuffer), 128, reinterpret_cast<const wchar_t *>(m_aOutFormat.getStr()), sal_Int32( fValue ));
+ _snwprintf( SAL_W(aBuffer), SAL_N_ELEMENTS(aBuffer), SAL_W(m_aOutFormat.getStr()), sal_Int32( fValue ));
- sal_Int32 nSize = rtl_ustr_getLength( aBuffer );
- return OUString( aBuffer, nSize );
+ return aBuffer;
#else
// Currently we have no support for a format string using sal_Unicode. wchar_t
// is 32 bit on Unix platform!