diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-04-04 14:57:45 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-04-04 16:12:11 +0000 |
commit | 9ac98e6e3488e434bf4864ecfb13a121784f640b (patch) | |
tree | b3c9cbf52126fee5864be12e9109f7413e7a0878 /sal/qa | |
parent | 6f995da5a652d993ab253b3363188cd18e289728 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/osl/security/osl_Security.cxx | 2 | ||||
-rw-r--r-- | sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx | 3 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_stringliterals.cxx | 3 |
3 files changed, 1 insertions, 7 deletions
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index d4f575122963..05ef80b62afc 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -403,7 +403,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *, SID_NAME_USE eSidType; DWORD dwErrorCode = 0; - LPCWSTR wszAccName = strUserName.getStr( ); + LPCWSTR wszAccName = SAL_W(strUserName.getStr( )); // Create buffers for the SID and the domain name. PSID pSid = static_cast<PSID>(new BYTE[dwSidBufferSize]); diff --git a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx index 287b3a0b2892..0d9cd2b82083 100644 --- a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx +++ b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx @@ -44,8 +44,6 @@ private: b2 = "1234567890123456"; CPPUNIT_ASSERT_EQUAL(s3, b2.toString()); CPPUNIT_ASSERT_EQUAL(sal_Int32(32), b2.getCapacity()); -#if !defined SAL_W32 - // sal_Unicode is still wchar_t not char16_t even for MSVC 2015 OUStringBuffer b3; b3 = u"123456789012345"; CPPUNIT_ASSERT_EQUAL(s1, b3.toString()); @@ -56,7 +54,6 @@ private: b3 = u"1234567890123456"; CPPUNIT_ASSERT_EQUAL(s3, b3.toString()); CPPUNIT_ASSERT_EQUAL(sal_Int32(32), b3.getCapacity()); -#endif OUStringBuffer b4; b4 = OUStringLiteral("1") + "23456789012345"; CPPUNIT_ASSERT_EQUAL(s1, b4.toString()); diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx index 49f2f16526d5..5b1b8ea83e04 100644 --- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx @@ -353,8 +353,6 @@ void test::oustring::StringLiterals::checkOUStringLiteral1() } void test::oustring::StringLiterals::checkUtf16() { -#if !defined SAL_W32 - // sal_Unicode is still wchar_t not char16_t even for MSVC 2015 rtl::OUString s1(u"abc"); CPPUNIT_ASSERT_EQUAL(rtl::OUString("abc"), s1); s1 = u"de"; @@ -420,7 +418,6 @@ void test::oustring::StringLiterals::checkUtf16() { CPPUNIT_ASSERT_EQUAL(rtl::OUString("abgababcdef"), b.toString()); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), b.indexOf(u"ab", 1)); CPPUNIT_ASSERT_EQUAL(sal_Int32(5), b.lastIndexOf(u"ab")); -#endif } }} // namespace |