summaryrefslogtreecommitdiffstats
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-10 10:13:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-10 10:13:41 +0200
commitc14ed11d77fcace619b9f63707c6c4dfc3309c6c (patch)
treeab7c499cc4b3ab7f86d33eb20fd22c44a2a7e461 /basic
parentFix typo: 'forgeround' in multiple files (diff)
downloadcore-c14ed11d77fcace619b9f63707c6c4dfc3309c6c.tar.gz
core-c14ed11d77fcace619b9f63707c6c4dfc3309c6c.zip
Clean up uses of SAL_U/SAL_W: basic
Change-Id: I755b3b781c42cc9af61c0b90621d2eb7f544df62
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/test_vba.cxx15
-rw-r--r--basic/source/runtime/methods.cxx3
-rw-r--r--basic/source/sbx/sbxdec.cxx8
3 files changed, 16 insertions, 10 deletions
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index db6267fb9f2f..6638bab883c9 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -139,14 +139,14 @@ void VBATest::testMiscOLEStuff()
return; // can't do anything, skip test
const int nBufSize = 1024 * 4;
- sal_Unicode sBuf[nBufSize];
- SQLGetInstalledDriversW( SAL_W(sBuf), nBufSize, nullptr );
+ wchar_t sBuf[nBufSize];
+ SQLGetInstalledDriversW( sBuf, nBufSize, nullptr );
- const sal_Unicode *pODBCDriverName = sBuf;
+ const wchar_t *pODBCDriverName = sBuf;
bool bFound = false;
- for (; wcslen( SAL_W(pODBCDriverName) ) != 0; pODBCDriverName += wcslen( SAL_W(pODBCDriverName) ) + 1 ) {
- if( wcscmp( SAL_W(pODBCDriverName), L"Microsoft Excel Driver (*.xls)" ) == 0 ||
- wcscmp( SAL_W(pODBCDriverName), L"Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)" ) == 0 ) {
+ for (; wcslen( pODBCDriverName ) != 0; pODBCDriverName += wcslen( pODBCDriverName ) + 1 ) {
+ if( wcscmp( pODBCDriverName, L"Microsoft Excel Driver (*.xls)" ) == 0 ||
+ wcscmp( pODBCDriverName, L"Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)" ) == 0 ) {
bFound = true;
break;
}
@@ -171,7 +171,8 @@ void VBATest::testMiscOLEStuff()
sPath = sPath.replaceAll( "/", "\\" );
aArgs[ 0 ] <<= sPath;
- aArgs[ 1 ] <<= OUString(pODBCDriverName);
+ aArgs[ 1 ] <<= OUString(
+ reinterpret_cast<sal_Unicode const *>(pODBCDriverName));
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i )
{
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 67c0534f6821..bc0da7541f4e 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -416,7 +416,8 @@ RTLFUNC(CurDir)
wchar_t pBuffer[ _MAX_PATH ];
if ( _wgetdcwd( nCurDir, pBuffer, _MAX_PATH ) != nullptr )
{
- rPar.Get(0)->PutString( OUString( SAL_U(pBuffer) ) );
+ rPar.Get(0)->PutString(
+ OUString( reinterpret_cast<sal_Unicode const *>(pBuffer) ) );
}
else
{
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index a7421647bd1b..fa82edd39178 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -226,11 +226,15 @@ bool SbxDecimal::setString( OUString* pOUString )
pBuffer[i] = ',';
i++;
}
- hResult = VarDecFromStr( SAL_W(pBuffer.get()), nLANGID, 0, &maDec );
+ hResult = VarDecFromStr(
+ reinterpret_cast<wchar_t const *>(pBuffer.get()), nLANGID, 0,
+ &maDec );
}
else
{
- hResult = VarDecFromStr( SAL_W(pOUString->getStr()), nLANGID, 0, &maDec );
+ hResult = VarDecFromStr(
+ reinterpret_cast<wchar_t const *>(pOUString->getStr()), nLANGID, 0,
+ &maDec );
}
bRet = ( hResult == S_OK );
return bRet;