summaryrefslogtreecommitdiff
path: root/cppu/qa
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2016-03-13 09:18:00 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-05-03 19:26:06 +0000
commite16fa715c43dcdf836ce8c400b6d54eae87b627d (patch)
tree356eb41a6333db58a318a2b5da31a9c0893e90a8 /cppu/qa
parenta2aea8bac55cef23297573733ba28f563f5aa791 (diff)
Handle wchar_t as native C++11 type on windows
The option /Zc:wchar_t- prevented to use wchar_t as a built-in type according to the C++ standard. In Visual C++ 6.0 and earlier, wchar_t was not implemented as a built-in type, but was declared in wchar.h as a typedef for unsigned short. Now, years later after the end of life this outdated toolchain, there is no reason not to use native type. The only issue could be the ABI compatibility. But on a quick look at least, it looks like none of the mangled C++ symbols in the stable URE interface actually depend on wchar_t. We forgot to get rid of /Zc:wchar_t- in 5.1. Do that for LibreOffice 5.2, though. Change-Id: I8d6b380660859efa44c83c830734978d31d756a0 Reviewed-on: https://gerrit.libreoffice.org/22589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppu/qa')
-rw-r--r--cppu/qa/test_unotype.cxx60
1 files changed, 0 insertions, 60 deletions
diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index 0f2beb08e305..bbaaac75096b 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -235,12 +235,7 @@ void Test::testUnoType() {
}
void Test::testGetTypeFavourUnsigned() {
-#if defined SAL_W32 && !defined __MINGW32__ && !defined __clang__
- // cf. sal/types.h sal_Unicode
- CPPUNIT_ASSERT(typeid(sal_Unicode) == typeid(sal_uInt16));
-#else
CPPUNIT_ASSERT(typeid(sal_Unicode) != typeid(sal_uInt16));
-#endif
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourUnsigned(static_cast<cppu::UnoVoidType *>(nullptr)),
cppu::UnoType<cppu::UnoVoidType>::get());
@@ -284,16 +279,9 @@ void Test::testGetTypeFavourUnsigned() {
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourUnsigned(static_cast<cppu::UnoCharType *>(nullptr)),
cppu::UnoType<cppu::UnoCharType>::get());
-#if defined SAL_W32 && !defined __MINGW32__ && !defined __clang__
- // cf. sal/types.h sal_Unicode
- CPPUNIT_ASSERT_EQUAL(
- cppu::getTypeFavourUnsigned(static_cast<sal_Unicode *>(nullptr)),
- cppu::UnoType<cppu::UnoUnsignedShortType>::get());
-#else
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourUnsigned(static_cast<sal_Unicode *>(nullptr)),
cppu::UnoType<cppu::UnoCharType>::get());
-#endif
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourUnsigned(static_cast<OUString *>(nullptr)),
cppu::UnoType<OUString>::get());
@@ -330,22 +318,6 @@ void Test::testGetTypeFavourUnsigned() {
cppu::UnoType<
cppu::UnoSequenceType<
cppu::UnoSequenceType<cppu::UnoUnsignedShortType>>>::get());
-#if defined SAL_W32 && !defined __MINGW32__ && !defined __clang__
- // cf. sal/types.h sal_Unicode
- CPPUNIT_ASSERT_EQUAL(
- cppu::getTypeFavourUnsigned(
- static_cast<css::uno::Sequence<sal_Unicode> *>(nullptr)),
- cppu::UnoType<
- cppu::UnoSequenceType<cppu::UnoUnsignedShortType>>::get());
- CPPUNIT_ASSERT_EQUAL(
- cppu::getTypeFavourUnsigned(
- static_cast<
- css::uno::Sequence<
- css::uno::Sequence<sal_Unicode>> *>(nullptr)),
- cppu::UnoType<
- cppu::UnoSequenceType<
- cppu::UnoSequenceType<cppu::UnoUnsignedShortType>>>::get());
-#else
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourUnsigned(
static_cast<css::uno::Sequence<sal_Unicode> *>(nullptr)),
@@ -358,7 +330,6 @@ void Test::testGetTypeFavourUnsigned() {
cppu::UnoType<
cppu::UnoSequenceType<
cppu::UnoSequenceType<cppu::UnoCharType>>>::get());
-#endif
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourUnsigned(
static_cast<css::uno::TypeClass *>(nullptr)),
@@ -429,12 +400,7 @@ void Test::testGetTypeFavourUnsigned() {
}
void Test::testGetTypeFavourChar() {
-#if defined SAL_W32 && !defined __MINGW32__ && !defined __clang__
- // cf. sal/types.h sal_Unicode
- CPPUNIT_ASSERT(typeid(sal_Unicode) == typeid(sal_uInt16));
-#else
CPPUNIT_ASSERT(typeid(sal_Unicode) != typeid(sal_uInt16));
-#endif
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourChar(static_cast<cppu::UnoVoidType *>(nullptr)),
cppu::UnoType<cppu::UnoVoidType>::get());
@@ -454,16 +420,9 @@ void Test::testGetTypeFavourChar() {
cppu::getTypeFavourChar(
static_cast<cppu::UnoUnsignedShortType *>(nullptr)),
cppu::UnoType<cppu::UnoUnsignedShortType>::get());
-#if defined SAL_W32 && !defined __MINGW32__ && !defined __clang__
- // cf. sal/types.h sal_Unicode
- CPPUNIT_ASSERT_EQUAL(
- cppu::getTypeFavourChar(static_cast<sal_uInt16 *>(nullptr)),
- cppu::UnoType<cppu::UnoCharType>::get());
-#else
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourChar(static_cast<sal_uInt16 *>(nullptr)),
cppu::UnoType<cppu::UnoUnsignedShortType>::get());
-#endif
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourChar(static_cast<sal_Int32 *>(nullptr)),
cppu::UnoType<sal_Int32>::get());
@@ -503,19 +462,11 @@ void Test::testGetTypeFavourChar() {
cppu::UnoSequenceType<cppu::UnoUnsignedShortType> *>(nullptr)),
cppu::UnoType<
cppu::UnoSequenceType<cppu::UnoUnsignedShortType>>::get());
-#if defined SAL_W32 && !defined __MINGW32__ && !defined __clang__
- // cf. sal/types.h sal_Unicode
- CPPUNIT_ASSERT_EQUAL(
- cppu::getTypeFavourChar(
- static_cast<css::uno::Sequence<sal_uInt16> *>(nullptr)),
- cppu::UnoType<cppu::UnoSequenceType<cppu::UnoCharType>>::get());
-#else
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourChar(
static_cast<css::uno::Sequence<sal_uInt16> *>(nullptr)),
cppu::UnoType<
cppu::UnoSequenceType<cppu::UnoUnsignedShortType>>::get());
-#endif
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourChar(
static_cast<
@@ -525,16 +476,6 @@ void Test::testGetTypeFavourChar() {
cppu::UnoType<
cppu::UnoSequenceType<
cppu::UnoSequenceType<cppu::UnoUnsignedShortType>>>::get());
-#if defined SAL_W32 && !defined __MINGW32__ && !defined __clang__
- // cf. sal/types.h sal_Unicode
- CPPUNIT_ASSERT_EQUAL(
- cppu::getTypeFavourChar(
- static_cast<
- css::uno::Sequence<css::uno::Sequence<sal_uInt16>> *>(nullptr)),
- cppu::UnoType<
- cppu::UnoSequenceType<
- cppu::UnoSequenceType<cppu::UnoCharType>>>::get());
-#else
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourChar(
static_cast<
@@ -542,7 +483,6 @@ void Test::testGetTypeFavourChar() {
cppu::UnoType<
cppu::UnoSequenceType<
cppu::UnoSequenceType<cppu::UnoUnsignedShortType>>>::get());
-#endif
CPPUNIT_ASSERT_EQUAL(
cppu::getTypeFavourChar(
static_cast<css::uno::Sequence<sal_Unicode> *>(nullptr)),