From 9ac98e6e3488e434bf4864ecfb13a121784f640b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 4 Apr 2017 14:57:45 +0200 Subject: Finally switch MSVC to sal_Unicode = char16_t, too There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- cli_ure/source/uno_bridge/cli_data.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli_ure/source/uno_bridge') diff --git a/cli_ure/source/uno_bridge/cli_data.cxx b/cli_ure/source/uno_bridge/cli_data.cxx index c325fc762bb0..24b3753ef61d 100644 --- a/cli_ure/source/uno_bridge/cli_data.cxx +++ b/cli_ure/source/uno_bridge/cli_data.cxx @@ -718,7 +718,7 @@ OUString mapCliString(System::String ^ data) { OSL_ASSERT(sizeof(wchar_t) == sizeof(sal_Unicode)); pin_ptr pdata= PtrToStringChars(data); - return OUString(pdata, const_cast(data)->Length); + return OUString(SAL_U(pdata), const_cast(data)->Length); } else { @@ -819,7 +819,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data, System::String ^s= safe_cast(cli_data); pin_ptr pdata= PtrToStringChars(s); rtl_uString_newFromStr_WithLength( (rtl_uString**) uno_data, - pdata, s->Length ); + SAL_U(pdata), s->Length ); } break; } @@ -1294,7 +1294,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data, rtl_uString** pStr= & ((rtl_uString**) & ((uno_Sequence*) seq.get())->elements)[i]; *pStr= NULL; - rtl_uString_newFromStr_WithLength( pStr, pdata, + rtl_uString_newFromStr_WithLength( pStr, SAL_U(pdata), arStr[i]->Length); } break; -- cgit