From 1944e3ddc0b2247de3138d2a441cd6999e21fd9a Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 5 Oct 2017 06:19:56 +0300 Subject: Rename and move SAL_U/W to o3tl::toU/W Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- framework/source/uielement/spinfieldtoolbarcontroller.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'framework') diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 135a708e069b..941dc21107f1 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -31,6 +31,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -459,9 +460,9 @@ OUString SpinfieldToolbarController::impl_formatOutputString( double fValue ) aBuffer[0] = 0; if ( m_bFloat ) - _snwprintf( SAL_W(aBuffer), SAL_N_ELEMENTS(aBuffer), SAL_W(m_aOutFormat.getStr()), fValue ); + _snwprintf( o3tl::toW(aBuffer), SAL_N_ELEMENTS(aBuffer), o3tl::toW(m_aOutFormat.getStr()), fValue ); else - _snwprintf( SAL_W(aBuffer), SAL_N_ELEMENTS(aBuffer), SAL_W(m_aOutFormat.getStr()), sal_Int32( fValue )); + _snwprintf( o3tl::toW(aBuffer), SAL_N_ELEMENTS(aBuffer), o3tl::toW(m_aOutFormat.getStr()), sal_Int32( fValue )); return aBuffer; #else -- cgit