Kaydet (Commit) c14ed11d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clean up uses of SAL_U/SAL_W: basic

Change-Id: I755b3b781c42cc9af61c0b90621d2eb7f544df62
üst b35552f3
...@@ -139,14 +139,14 @@ void VBATest::testMiscOLEStuff() ...@@ -139,14 +139,14 @@ void VBATest::testMiscOLEStuff()
return; // can't do anything, skip test return; // can't do anything, skip test
const int nBufSize = 1024 * 4; const int nBufSize = 1024 * 4;
sal_Unicode sBuf[nBufSize]; wchar_t sBuf[nBufSize];
SQLGetInstalledDriversW( SAL_W(sBuf), nBufSize, nullptr ); SQLGetInstalledDriversW( sBuf, nBufSize, nullptr );
const sal_Unicode *pODBCDriverName = sBuf; const wchar_t *pODBCDriverName = sBuf;
bool bFound = false; bool bFound = false;
for (; wcslen( SAL_W(pODBCDriverName) ) != 0; pODBCDriverName += wcslen( SAL_W(pODBCDriverName) ) + 1 ) { for (; wcslen( pODBCDriverName ) != 0; pODBCDriverName += wcslen( pODBCDriverName ) + 1 ) {
if( wcscmp( SAL_W(pODBCDriverName), L"Microsoft Excel Driver (*.xls)" ) == 0 || if( wcscmp( pODBCDriverName, L"Microsoft Excel Driver (*.xls)" ) == 0 ||
wcscmp( SAL_W(pODBCDriverName), L"Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)" ) == 0 ) { wcscmp( pODBCDriverName, L"Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)" ) == 0 ) {
bFound = true; bFound = true;
break; break;
} }
...@@ -171,7 +171,8 @@ void VBATest::testMiscOLEStuff() ...@@ -171,7 +171,8 @@ void VBATest::testMiscOLEStuff()
sPath = sPath.replaceAll( "/", "\\" ); sPath = sPath.replaceAll( "/", "\\" );
aArgs[ 0 ] <<= sPath; 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 ) for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i )
{ {
......
...@@ -416,7 +416,8 @@ RTLFUNC(CurDir) ...@@ -416,7 +416,8 @@ RTLFUNC(CurDir)
wchar_t pBuffer[ _MAX_PATH ]; wchar_t pBuffer[ _MAX_PATH ];
if ( _wgetdcwd( nCurDir, pBuffer, _MAX_PATH ) != nullptr ) 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 else
{ {
......
...@@ -226,11 +226,15 @@ bool SbxDecimal::setString( OUString* pOUString ) ...@@ -226,11 +226,15 @@ bool SbxDecimal::setString( OUString* pOUString )
pBuffer[i] = ','; pBuffer[i] = ',';
i++; i++;
} }
hResult = VarDecFromStr( SAL_W(pBuffer.get()), nLANGID, 0, &maDec ); hResult = VarDecFromStr(
reinterpret_cast<wchar_t const *>(pBuffer.get()), nLANGID, 0,
&maDec );
} }
else 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 ); bRet = ( hResult == S_OK );
return bRet; return bRet;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment