sal_Char->char in connectivity

Change-Id: Ie32cbef9b03d69044c401f79bc737cde6dd0ed5d
Reviewed-on: https://gerrit.libreoffice.org/85396
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2019-12-18 13:34:12 +02:00
parent feb5df31d4
commit 386bb99bf6
53 changed files with 116 additions and 117 deletions

View File

@@ -88,10 +88,10 @@ void SharedResourcesTest::testGetSourceStringWithSubstitutionThree()
void SharedResourcesTest::testGetSourceStringWithSubstitutionVector()
{
std::vector<std::pair<const sal_Char*, OUString>> aStringToSubstitutes;
aStringToSubstitutes.push_back(std::pair<const sal_Char*, OUString>("$sub0$", "vector0"));
aStringToSubstitutes.push_back(std::pair<const sal_Char*, OUString>("$sub1$", "vector1"));
aStringToSubstitutes.push_back(std::pair<const sal_Char*, OUString>("$sub2$", "vector2"));
std::vector<std::pair<const char*, OUString>> aStringToSubstitutes;
aStringToSubstitutes.push_back(std::pair<const char*, OUString>("$sub0$", "vector0"));
aStringToSubstitutes.push_back(std::pair<const char*, OUString>("$sub1$", "vector1"));
aStringToSubstitutes.push_back(std::pair<const char*, OUString>("$sub2$", "vector2"));
CPPUNIT_ASSERT_EQUAL(OUString("Three substitution vector0 vector1 vector2"),
m_aResource.getResourceStringWithSubstitution(

View File

@@ -893,7 +893,7 @@ extern "C"
{
SAL_DLLPUBLIC_EXPORT void* dbtools_component_getFactory(const sal_Char* implName, void* serviceManager, void* registryKey)
SAL_DLLPUBLIC_EXPORT void* dbtools_component_getFactory(const char* implName, void* serviceManager, void* registryKey)
{
return cppu::component_getFactoryHelper(implName, serviceManager, registryKey, entries);
}

View File

@@ -125,7 +125,7 @@ public:
// FUNCTION PARSER
typedef const sal_Char* StringIteratorT;
typedef const char* StringIteratorT;
struct ParserContext
{

View File

@@ -112,7 +112,7 @@ namespace dbtools
}
bool lcl_getDriverSetting( const sal_Char* _asciiName, const DatabaseMetaData_Impl& _metaData, Any& _out_setting )
bool lcl_getDriverSetting( const char* _asciiName, const DatabaseMetaData_Impl& _metaData, Any& _out_setting )
{
lcl_checkConnected( _metaData );
const ::comphelper::NamedValueCollection& rDriverMetaData = _metaData.aDriverConfig.getMetaData( _metaData.xConnectionMetaData->getURL() );
@@ -123,7 +123,7 @@ namespace dbtools
}
bool lcl_getConnectionSetting( const sal_Char* _asciiName, const DatabaseMetaData_Impl& _metaData, Any& _out_setting )
bool lcl_getConnectionSetting( const char* _asciiName, const DatabaseMetaData_Impl& _metaData, Any& _out_setting )
{
try
{

View File

@@ -572,7 +572,7 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable
}
bool getBooleanDataSourceSetting( const Reference< XConnection >& _rxConnection, const sal_Char* _pAsciiSettingName )
bool getBooleanDataSourceSetting( const Reference< XConnection >& _rxConnection, const char* _pAsciiSettingName )
{
bool bValue( false );
try
@@ -620,7 +620,7 @@ bool getDataSourceSetting( const Reference< XInterface >& _xChild, const OUStrin
return bIsPresent;
}
bool getDataSourceSetting( const Reference< XInterface >& _rxDataSource, const sal_Char* _pAsciiSettingsName,
bool getDataSourceSetting( const Reference< XInterface >& _rxDataSource, const char* _pAsciiSettingsName,
Any& /* [out] */ _rSettingsValue )
{
OUString sAsciiSettingsName = OUString::createFromAscii(_pAsciiSettingsName);

View File

@@ -91,7 +91,7 @@ namespace connectivity
/** substitutes a given placeholder in the given message with the given value
*/
void lcl_substitutePlaceholder(OUString& _rMessage, const sal_Char* _pPlaceholder, const o3tl::optional<OUString>& rParamValue)
void lcl_substitutePlaceholder(OUString& _rMessage, const char* _pPlaceholder, const o3tl::optional<OUString>& rParamValue)
{
size_t nPlaceholderLen( strlen( _pPlaceholder ) );
sal_Int32 nIndex = _rMessage.indexOfAsciiL( _pPlaceholder, nPlaceholderLen );

View File

@@ -98,7 +98,7 @@ namespace dbtools
}
void WarningsContainer::appendWarning( const OUString& _rWarning, const sal_Char* _pAsciiSQLState, const Reference< XInterface >& _rxContext )
void WarningsContainer::appendWarning( const OUString& _rWarning, const char* _pAsciiSQLState, const Reference< XInterface >& _rxContext )
{
appendWarning( SQLWarning( _rWarning, _rxContext, OUString::createFromAscii( _pAsciiSQLState ), 0, Any() ) );
}

View File

@@ -32,7 +32,7 @@ extern "C"
{
SAL_DLLPUBLIC_EXPORT void* dbpool2_component_getFactory(const sal_Char* _pImplName, void * _pServiceManager, void* /*_pRegistryKey*/)
SAL_DLLPUBLIC_EXPORT void* dbpool2_component_getFactory(const char* _pImplName, void * _pServiceManager, void* /*_pRegistryKey*/)
{
void* pRet = nullptr;

View File

@@ -103,7 +103,7 @@ void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r
{
if(m_aColumn.IsValid())
{
const sal_Char* pAdoPropertyName = nullptr;
const char* pAdoPropertyName = nullptr;
switch(nHandle)
{

View File

@@ -46,7 +46,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -77,7 +77,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* ado_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
{

View File

@@ -46,7 +46,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -79,7 +79,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* connectivity_calc_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
{

View File

@@ -1886,11 +1886,11 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
m_xColumns->getByIndex(i) >>= xCol;
OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!");
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
std::vector< std::pair<const sal_Char* , OUString > > aStringToSubstitutes;
aStringToSubstitutes.push_back(std::pair<const sal_Char* , OUString >("$columnname$", aColName));
aStringToSubstitutes.push_back(std::pair<const sal_Char* , OUString >("$precision$", OUString::number(nLen)));
aStringToSubstitutes.push_back(std::pair<const sal_Char* , OUString >("$scale$", OUString::number(nScale)));
aStringToSubstitutes.push_back(std::pair<const sal_Char* , OUString >("$value$", OStringToOUString(aDefaultValue,RTL_TEXTENCODING_UTF8)));
std::vector< std::pair<const char* , OUString > > aStringToSubstitutes;
aStringToSubstitutes.push_back(std::pair<const char* , OUString >("$columnname$", aColName));
aStringToSubstitutes.push_back(std::pair<const char* , OUString >("$precision$", OUString::number(nLen)));
aStringToSubstitutes.push_back(std::pair<const char* , OUString >("$scale$", OUString::number(nScale)));
aStringToSubstitutes.push_back(std::pair<const char* , OUString >("$value$", OStringToOUString(aDefaultValue,RTL_TEXTENCODING_UTF8)));
const OUString sError( getConnection()->getResources().getResourceStringWithSubstitution(
STR_INVALID_COLUMN_DECIMAL_VALUE

View File

@@ -46,7 +46,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -79,7 +79,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* dbase_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
{

View File

@@ -47,7 +47,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -81,7 +81,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* evoab2_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
{

View File

@@ -69,7 +69,7 @@ ORowSetValue OOp_Char::operate(const std::vector<ORowSetValue>& lhs) const
{
if ( !aIter->isNull() )
{
sal_Char c = static_cast<sal_Char>(static_cast<sal_Int32>(*aIter));
char c = static_cast<char>(static_cast<sal_Int32>(*aIter));
sRet.appendAscii(&c, 1);
}
@@ -150,7 +150,7 @@ ORowSetValue OOp_Space::operate(const ORowSetValue& lhs) const
if ( lhs.isNull() )
return lhs;
const sal_Char c = ' ';
const char c = ' ';
OUStringBuffer sRet;
sal_Int32 nCount = lhs;
for (sal_Int32 i=0; i < nCount; ++i)

View File

@@ -60,7 +60,7 @@ sal_Int64 SAL_CALL Clob::length()
{
uno::Sequence < sal_Int8 > aSegmentBytes;
bLastSegmRead = m_aBlob->readOneSegment( aSegmentBytes );
OUString sSegment ( reinterpret_cast< sal_Char *>( aSegmentBytes.getArray() ),
OUString sSegment ( reinterpret_cast< char *>( aSegmentBytes.getArray() ),
aSegmentBytes.getLength(),
RTL_TEXTENCODING_UTF8 );
@@ -92,7 +92,7 @@ OUString SAL_CALL Clob::getSubString(sal_Int64 nPosition,
if( bLastRead )
throw lang::IllegalArgumentException("nPosition out of range", *this, 0);
OUString sSegment ( reinterpret_cast< sal_Char *>( aSegmentBytes.getArray() ),
OUString sSegment ( reinterpret_cast< char *>( aSegmentBytes.getArray() ),
aSegmentBytes.getLength(),
RTL_TEXTENCODING_UTF8 );
sal_Int32 nStrLen = sSegment.getLength();
@@ -114,7 +114,7 @@ OUString SAL_CALL Clob::getSubString(sal_Int64 nPosition,
uno::Sequence < sal_Int8 > aSegmentBytes;
bool bLastRead = m_aBlob->readOneSegment( aSegmentBytes );
OUString sSegment ( reinterpret_cast< sal_Char *>( aSegmentBytes.getArray() ),
OUString sSegment ( reinterpret_cast< char *>( aSegmentBytes.getArray() ),
aSegmentBytes.getLength(),
RTL_TEXTENCODING_UTF8 );
sal_Int32 nStrLen = sSegment.getLength();

View File

@@ -48,7 +48,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -81,7 +81,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* firebird_sdbc_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void*)
{

View File

@@ -46,7 +46,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -79,7 +79,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* flat_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
{

View File

@@ -667,9 +667,9 @@ namespace connectivity
namespace
{
const sal_Char* lcl_getCollationForLocale( const OUString& _rLocaleString, bool _bAcceptCountryMismatch = false )
const char* lcl_getCollationForLocale( const OUString& _rLocaleString, bool _bAcceptCountryMismatch = false )
{
static const sal_Char* pTranslations[] =
static const char* pTranslations[] =
{
"af-ZA", "Afrikaans",
"am-ET", "Amharic",
@@ -768,7 +768,7 @@ namespace connectivity
};
OUString sLocaleString( _rLocaleString );
sal_Char nCompareTermination = 0;
char nCompareTermination = 0;
if ( _bAcceptCountryMismatch )
{
@@ -782,7 +782,7 @@ namespace connectivity
nCompareTermination = '-';
}
const sal_Char** pLookup = pTranslations;
const char** pLookup = pTranslations;
for ( ; *pLookup; pLookup +=2 )
{
sal_Int32 nCompareUntil = 0;

View File

@@ -47,7 +47,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -80,7 +80,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* hsqldb_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
{

View File

@@ -38,7 +38,7 @@ namespace connectivity { namespace hsqldb
}
LogFile::LogFile( JNIEnv* env, jstring streamName, const sal_Char* _pAsciiSuffix )
LogFile::LogFile( JNIEnv* env, jstring streamName, const char* _pAsciiSuffix )
: m_sFileName(StorageContainer::jstring2ustring(env,streamName) +
"." + OUString::createFromAscii( _pAsciiSuffix ) )
{
@@ -57,7 +57,7 @@ namespace connectivity { namespace hsqldb
}
void LogFile::writeString( const sal_Char* _pString, bool _bEndLine )
void LogFile::writeString( const char* _pString, bool _bEndLine )
{
FILE* pLogFile = getLogFile();
fwrite( _pString, sizeof( *_pString ), strlen( _pString ), pLogFile );

View File

@@ -34,10 +34,10 @@ namespace connectivity { namespace hsqldb
OUString m_sFileName;
public:
LogFile( JNIEnv* env, jstring streamName, const sal_Char* _pAsciiSuffix );
LogFile( JNIEnv* env, jstring streamName, const char* _pAsciiSuffix );
public:
void writeString( const sal_Char* _pString, bool _bEndLine = true );
void writeString( const char* _pString, bool _bEndLine = true );
void create() { getLogFile(); }
virtual void close();
@@ -48,17 +48,17 @@ namespace connectivity { namespace hsqldb
class OperationLogFile : public LogFile
{
public:
OperationLogFile( JNIEnv* env, jstring streamName, const sal_Char* _pAsciiSuffix )
OperationLogFile( JNIEnv* env, jstring streamName, const char* _pAsciiSuffix )
:LogFile( env, streamName, ( OString( _pAsciiSuffix ) += ".op" ).getStr() )
{
}
void logOperation( const sal_Char* _pOp )
void logOperation( const char* _pOp )
{
writeString( _pOp, true );
}
void logOperation( const sal_Char* _pOp, jlong _nLongArg )
void logOperation( const char* _pOp, jlong _nLongArg )
{
OString sLine( _pOp );
sLine += "( ";
@@ -92,7 +92,7 @@ namespace connectivity { namespace hsqldb
class DataLogFile : public LogFile
{
public:
DataLogFile( JNIEnv* env, jstring streamName, const sal_Char* _pAsciiSuffix )
DataLogFile( JNIEnv* env, jstring streamName, const char* _pAsciiSuffix )
:LogFile( env, streamName, _pAsciiSuffix )
{
}

View File

@@ -538,7 +538,7 @@ bool java_sql_DatabaseMetaData::impl_callBooleanMethod( const char* _pMethodName
{
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, _pMethodName );
bool out( java_lang_Object::callBooleanMethod(_pMethodName,_inout_MethodID) );
m_aLogger.log< const sal_Char*, bool>( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, _pMethodName, out );
m_aLogger.log< const char*, bool>( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, _pMethodName, out );
return out;
}
@@ -581,7 +581,7 @@ bool java_sql_DatabaseMetaData::impl_callBooleanMethodWithIntArg( const char* _p
bool out( callBooleanMethodWithIntArg(_pMethodName,_inout_MethodID,_nArgument) );
m_aLogger.log< const sal_Char*, bool >( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, _pMethodName, out );
m_aLogger.log< const char*, bool >( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, _pMethodName, out );
return out;
}
@@ -1001,7 +1001,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsConvert( sal_Int32 fromType
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
m_aLogger.log< const sal_Char*, bool >( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, pMethodName, out );
m_aLogger.log< const char*, bool >( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, pMethodName, out );
return out;
}
@@ -1343,7 +1343,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetConcurrency( sal_I
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
m_aLogger.log< const sal_Char*, bool >( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, pMethodName, out );
m_aLogger.log< const char*, bool >( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, pMethodName, out );
return out;
}

View File

@@ -46,7 +46,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -79,7 +79,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* jdbc_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
{

View File

@@ -85,7 +85,7 @@ bool MacabImplModule::isMacOSPresent()
namespace
{
template< typename FUNCTION >
void lcl_getFunctionFromModuleOrUnload( oslModule& _rModule, const sal_Char* _pAsciiSymbolName, FUNCTION& _rFunction )
void lcl_getFunctionFromModuleOrUnload( oslModule& _rModule, const char* _pAsciiSymbolName, FUNCTION& _rFunction )
{
_rFunction = nullptr;
if ( _rModule )

View File

@@ -47,7 +47,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -78,7 +78,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* macab_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void*)
{

View File

@@ -36,7 +36,7 @@ using namespace ::com::sun::star::container;
OColumnAlias::OColumnAlias( const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxORB )
{
static const sal_Char* s_pProgrammaticNames[] =
static const char* s_pProgrammaticNames[] =
{
"FirstName",
"LastName",

View File

@@ -42,7 +42,7 @@ namespace connectivity
,columnPosition( 0 )
{
}
AliasEntry( const sal_Char* _programmaticAsciiName, size_t _columnPosition )
AliasEntry( const char* _programmaticAsciiName, size_t _columnPosition )
:programmaticAsciiName( _programmaticAsciiName )
,columnPosition( _columnPosition )
{

View File

@@ -152,7 +152,7 @@ static Reference< XInterface > createInstance( const Reference< XMultiServiceFac
}
extern "C" SAL_DLLPUBLIC_EXPORT void* mozbootstrap_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
{

View File

@@ -33,7 +33,7 @@ typedef Reference<XSingleServiceFactory> (*createFactoryFunc)(
rtl_ModuleCount*);
extern "C" SAL_DLLPUBLIC_EXPORT void*
mysql_jdbc_component_getFactory(const sal_Char* pImplementationName, void* pServiceManager,
mysql_jdbc_component_getFactory(const char* pImplementationName, void* pServiceManager,
void* /*pRegistryKey*/)
{
if (!pServiceManager)

View File

@@ -87,7 +87,7 @@ void allocateSqlVar(void** mem, enum_field_types eType, unsigned nSize)
}
}
void throwFeatureNotImplementedException(const sal_Char* _pAsciiFeatureName,
void throwFeatureNotImplementedException(const char* _pAsciiFeatureName,
const css::uno::Reference<XInterface>& _rxContext)
{
const OUString sMessage
@@ -95,7 +95,7 @@ void throwFeatureNotImplementedException(const sal_Char* _pAsciiFeatureName,
throw SQLException(sMessage, _rxContext, "HYC00", 0, Any());
}
void throwInvalidArgumentException(const sal_Char* _pAsciiFeatureName,
void throwInvalidArgumentException(const char* _pAsciiFeatureName,
const css::uno::Reference<XInterface>& _rxContext)
{
const OUString sMessage

View File

@@ -93,10 +93,9 @@ void resetSqlVar(void** target, T* pValue, enum_field_types type, sal_Int32 nSiz
void allocateSqlVar(void** mem, enum_field_types eType, unsigned nSize = 0);
void throwFeatureNotImplementedException(
const sal_Char* _pAsciiFeatureName,
const css::uno::Reference<css::uno::XInterface>& _rxContext);
const char* _pAsciiFeatureName, const css::uno::Reference<css::uno::XInterface>& _rxContext);
void throwInvalidArgumentException(const sal_Char* _pAsciiFeatureName,
void throwInvalidArgumentException(const char* _pAsciiFeatureName,
const css::uno::Reference<css::uno::XInterface>& _rxContext);
void throwSQLExceptionWithMsg(const char* msg, unsigned int errorNum,

View File

@@ -43,7 +43,7 @@ struct ProviderRequest
Reference<XMultiServiceFactory> const xServiceManager;
OUString const sImplementationName;
ProviderRequest(void* pServiceManager, sal_Char const* pImplementationName)
ProviderRequest(void* pServiceManager, char const* pImplementationName)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
@@ -69,7 +69,7 @@ struct ProviderRequest
};
}
extern "C" SAL_DLLPUBLIC_EXPORT void* component_getFactory(const sal_Char* pImplementationName,
extern "C" SAL_DLLPUBLIC_EXPORT void* component_getFactory(const char* pImplementationName,
void* pServiceManager,
void* /* pRegistryKey */)
{

View File

@@ -47,7 +47,7 @@ struct ProviderRequest
ProviderRequest(
void* pServiceManager,
sal_Char const* pImplementationName
char const* pImplementationName
)
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
@@ -80,7 +80,7 @@ struct ProviderRequest
}
extern "C" SAL_DLLPUBLIC_EXPORT void* odbc_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
{

View File

@@ -710,7 +710,7 @@ extern "C"
{
SAL_DLLPUBLIC_EXPORT void * postgresql_sdbc_impl_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
const char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
}

View File

@@ -278,7 +278,7 @@ extern "C"
{
SAL_DLLPUBLIC_EXPORT void * postgresql_sdbc_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * )
const char * pImplName, void * pServiceManager, void * )
{
// need to extract the defaultcontext, because the way, sdbc
// bypasses the servicemanager, does not allow to use the

View File

@@ -55,10 +55,10 @@ namespace {
struct DefColumnMetaData
{
const sal_Char * columnName;
const sal_Char * tableName;
const sal_Char * schemaTableName;
const sal_Char * typeName;
const char * columnName;
const char * tableName;
const char * schemaTableName;
const char * typeName;
sal_Int32 type;
sal_Int32 precision;
sal_Int32 scale;

View File

@@ -483,7 +483,7 @@ void UpdateableResultSet::updateBytes( sal_Int32 columnIndex, const css::uno::Se
"pq_preparedstatement.setBytes: Error during converting bytesequence to an SQL conform string",
*this, OUString(), 1, Any() );
}
// buf.append( (const sal_Char *)escapedString, len -1 );
// buf.append( (const char *)escapedString, len -1 );
m_updateableField[columnIndex-1].value <<=
OUString( reinterpret_cast<char*>(escapedString), len, RTL_TEXTENCODING_ASCII_US );

View File

@@ -38,7 +38,7 @@ private:
OUString const sImplementationName;
public:
ProviderRequest(void* pServiceManager, sal_Char const* pImplementationName)
ProviderRequest(void* pServiceManager, char const* pImplementationName)
: xServiceManager(static_cast<lang::XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
@@ -65,7 +65,7 @@ public:
}
extern "C" SAL_DLLPUBLIC_EXPORT void*
connectivity_writer_component_getFactory(const sal_Char* pImplementationName, void* pServiceManager,
connectivity_writer_component_getFactory(const char* pImplementationName, void* pServiceManager,
void* /*pRegistryKey*/)
{
void* pRet = nullptr;

View File

@@ -67,7 +67,7 @@ namespace connectivity
OUString
getResourceStringWithSubstitution(
const char* pResId,
const sal_Char* _pAsciiPatternToReplace,
const char* _pAsciiPatternToReplace,
const OUString& _rStringToSubstitute
) const;
@@ -91,9 +91,9 @@ namespace connectivity
OUString
getResourceStringWithSubstitution(
const char* pResId,
const sal_Char* _pAsciiPatternToReplace1,
const char* _pAsciiPatternToReplace1,
const OUString& _rStringToSubstitute1,
const sal_Char* _pAsciiPatternToReplace2,
const char* _pAsciiPatternToReplace2,
const OUString& _rStringToSubstitute2
) const;
@@ -121,11 +121,11 @@ namespace connectivity
OUString
getResourceStringWithSubstitution(
const char* pResId,
const sal_Char* _pAsciiPatternToReplace1,
const char* _pAsciiPatternToReplace1,
const OUString& _rStringToSubstitute1,
const sal_Char* _pAsciiPatternToReplace2,
const char* _pAsciiPatternToReplace2,
const OUString& _rStringToSubstitute2,
const sal_Char* _pAsciiPatternToReplace3,
const char* _pAsciiPatternToReplace3,
const OUString& _rStringToSubstitute3
) const;
@@ -140,7 +140,7 @@ namespace connectivity
the string from the resource file, with applied string substitution
*/
OUString getResourceStringWithSubstitution( const char* pResId,
const std::vector< std::pair<const sal_Char* , OUString > >& _rStringToSubstitutes) const;
const std::vector< std::pair<const char* , OUString > >& _rStringToSubstitutes) const;
};

View File

@@ -30,7 +30,7 @@ extern "C"
{
SAL_DLLPUBLIC_EXPORT void* sdbc2_component_getFactory(const sal_Char* _pImplName, void * _pServiceManager, void* /*_pRegistryKey*/)
SAL_DLLPUBLIC_EXPORT void* sdbc2_component_getFactory(const char* _pImplName, void * _pServiceManager, void* /*_pRegistryKey*/)
{
void* pRet = nullptr;

View File

@@ -25,7 +25,7 @@
using namespace connectivity;
OSQLInternalNode::OSQLInternalNode(const sal_Char* pNewValue,
OSQLInternalNode::OSQLInternalNode(const char* pNewValue,
SQLNodeType eNodeType,
sal_uInt32 nNodeID)
: OSQLParseNode(pNewValue,eNodeType,nNodeID)

View File

@@ -59,7 +59,7 @@
# pragma GCC diagnostic ignored "-Wunused-function"
#endif
inline connectivity::OSQLInternalNode* newNode(const sal_Char* pNewValue,
inline connectivity::OSQLInternalNode* newNode(const char* pNewValue,
const connectivity::SQLNodeType eNodeType,
const sal_uInt32 nNodeID = 0);
@@ -4278,7 +4278,7 @@ using namespace ::dbtools;
connectivity::OSQLParser* xxx_pGLOBAL_SQLPARSER;
connectivity::OSQLInternalNode* newNode(const sal_Char* pNewValue,
connectivity::OSQLInternalNode* newNode(const char* pNewValue,
const connectivity::SQLNodeType eNodeType,
const sal_uInt32 nNodeID)
{
@@ -4786,7 +4786,7 @@ void OSQLParser::reduceLiteral(OSQLParseNode*& pLiteral, bool bAppendBlank)
}
void OSQLParser::error(const sal_Char *fmt)
void OSQLParser::error(const char *fmt)
{
if(m_sErrorMessage.isEmpty())
{

View File

@@ -72,8 +72,8 @@ using namespace connectivity;
// Pages generally are created from the Lexer
static sal_Int32 gatherString(int delim, sal_Int32 nTyp);
static sal_Int32 gatherName(const sal_Char*);
static sal_Int32 gatherNamePre(const sal_Char* );
static sal_Int32 gatherName(const char*);
static sal_Int32 gatherNamePre(const char* );
// has to be set before the parser starts
OSQLScanner* xxx_pGLOBAL_SQLSCAN = nullptr;
@@ -550,7 +550,7 @@ sal_Int32 gatherString(int delim, sal_Int32 nTyp)
}
else
{
sBuffer.append(static_cast<sal_Char>(ch));
sBuffer.append(static_cast<char>(ch));
}
}
@@ -558,7 +558,7 @@ sal_Int32 gatherString(int delim, sal_Int32 nTyp)
break;
else
{
sBuffer.append(static_cast<sal_Char>(ch));
sBuffer.append(static_cast<char>(ch));
}
}
YY_FATAL_ERROR("Unterminated name string");
@@ -604,7 +604,7 @@ sal_Int32 mapEnumToToken(IParseContext::InternationalKeyCode _eKeyCode )
* Valid Names or international keywords:
* As we have international keywords, we test first on them
*/
sal_Int32 gatherName(const sal_Char* text)
sal_Int32 gatherName(const char* text)
{
sal_Int32 nToken;
OSL_ENSURE(xxx_pGLOBAL_SQLSCAN,"You forgot to set the scanner!");
@@ -648,7 +648,7 @@ sal_Int32 gatherName(const sal_Char* text)
Valid Names or international keywords:
As we have international keywords, we test first on them
*/
sal_Int32 gatherNamePre(const sal_Char* text)
sal_Int32 gatherNamePre(const char* text)
{
sal_Int32 nToken;
OSL_ENSURE(xxx_pGLOBAL_SQLSCAN,"You forgot to set the scanner!");
@@ -784,7 +784,7 @@ sal_Int32 OSQLScanner::SQLyygetc(void)
}
//------------------------------------------------------------------------------
IParseContext::InternationalKeyCode OSQLScanner::getInternationalTokenID(const sal_Char* sToken) const
IParseContext::InternationalKeyCode OSQLScanner::getInternationalTokenID(const char* sToken) const
{
OSL_ENSURE(m_pContext, "OSQLScanner::getInternationalTokenID: No Context set");
return (m_bInternational) ? m_pContext->getIntlKeyCode(OString(sToken) ) : IParseContext::InternationalKeyCode::None;

View File

@@ -1991,7 +1991,7 @@ void OSQLParseTreeIterator::impl_appendError( IParseContext::ErrorCode _eError,
if ( _pReplaceToken1 )
{
bool bTwoTokens = ( _pReplaceToken2 != nullptr );
const sal_Char* pPlaceHolder1 = bTwoTokens ? "#1" : "#";
const char* pPlaceHolder1 = bTwoTokens ? "#1" : "#";
const OUString sPlaceHolder1 = OUString::createFromAscii( pPlaceHolder1 );
sErrorMessage = sErrorMessage.replaceFirst( sPlaceHolder1, *_pReplaceToken1 );

View File

@@ -1588,7 +1588,7 @@ OSQLParseNode* OSQLParser::buildDate(sal_Int32 _nType,OSQLParseNode*& pLiteral)
}
OSQLParseNode::OSQLParseNode(const sal_Char * pNewValue,
OSQLParseNode::OSQLParseNode(const char * pNewValue,
SQLNodeType eNewNodeType,
sal_uInt32 nNewNodeID)
:m_pParent(nullptr)

View File

@@ -104,7 +104,7 @@ namespace connectivity
namespace
{
size_t lcl_substitute( OUString& _inout_rString,
const sal_Char* _pAsciiPattern, const OUString& _rReplace )
const char* _pAsciiPattern, const OUString& _rReplace )
{
size_t nOccurrences = 0;
@@ -139,7 +139,7 @@ namespace connectivity
OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
const sal_Char* _pAsciiPatternToReplace, const OUString& _rStringToSubstitute ) const
const char* _pAsciiPatternToReplace, const OUString& _rStringToSubstitute ) const
{
OUString sString( SharedResources_Impl::getInstance().getResourceString(pResId) );
if ( !lcl_substitute( sString, _pAsciiPatternToReplace, _rStringToSubstitute ) )
@@ -149,8 +149,8 @@ namespace connectivity
OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
const sal_Char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1,
const sal_Char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2 ) const
const char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1,
const char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2 ) const
{
OUString sString( SharedResources_Impl::getInstance().getResourceString(pResId) );
if( !lcl_substitute( sString, _pAsciiPatternToReplace1, _rStringToSubstitute1 ) )
@@ -162,9 +162,9 @@ namespace connectivity
OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
const sal_Char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1,
const sal_Char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2,
const sal_Char* _pAsciiPatternToReplace3, const OUString& _rStringToSubstitute3 ) const
const char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1,
const char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2,
const char* _pAsciiPatternToReplace3, const OUString& _rStringToSubstitute3 ) const
{
OUString sString( SharedResources_Impl::getInstance().getResourceString(pResId) );
if( !lcl_substitute( sString, _pAsciiPatternToReplace1, _rStringToSubstitute1 ) )
@@ -177,7 +177,7 @@ namespace connectivity
}
OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
const std::vector< std::pair<const sal_Char* , OUString > >& _rStringToSubstitutes) const
const std::vector< std::pair<const char* , OUString > >& _rStringToSubstitutes) const
{
OUString sString( SharedResources_Impl::getInstance().getResourceString(pResId) );
for(const auto& [rPattern, rReplace] : _rStringToSubstitutes)

View File

@@ -90,7 +90,7 @@ public:
break;
if (osl_File_E_None != osl_readLine(handle , (sal_Sequence **) &seq))
break;
OString line( (const sal_Char *) seq.getConstArray(), seq.getLength() );
OString line( (const char *) seq.getConstArray(), seq.getLength() );
sal_Int32 nIndex = line.indexOf('=');
if (nIndex >= 1)
{

View File

@@ -315,7 +315,7 @@ namespace dbtools
*/
OOO_DLLPUBLIC_DBTOOLS bool getBooleanDataSourceSetting(
const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
const sal_Char* _pAsciiSettingName
const char* _pAsciiSettingName
);
/** check if a specific property is enabled in the info sequence
@@ -345,7 +345,7 @@ namespace dbtools
OOO_DLLPUBLIC_DBTOOLS
bool getDataSourceSetting(
const css::uno::Reference< css::uno::XInterface >& _rxDataSource,
const sal_Char* _pAsciiSettingsName,
const char* _pAsciiSettingsName,
css::uno::Any& /* [out] */ _rSettingsValue
);
OOO_DLLPUBLIC_DBTOOLS

View File

@@ -32,7 +32,7 @@ namespace connectivity
class OSQLInternalNode final : public OSQLParseNode
{
public:
OSQLInternalNode(const sal_Char* pNewValue,
OSQLInternalNode(const char* pNewValue,
SQLNodeType eNodeType,
sal_uInt32 nNodeID = 0);
OSQLInternalNode(const OString& _rNewValue,

View File

@@ -232,7 +232,7 @@ namespace connectivity
};
// must be ascii encoding for the value
OSQLParseNode(const sal_Char* _pValueStr,
OSQLParseNode(const char* _pValueStr,
SQLNodeType _eNodeType,
sal_uInt32 _nNodeID = 0);

View File

@@ -206,7 +206,7 @@ namespace connectivity
// returns the type for a parameter in a given function name
static sal_Int32 getFunctionParameterType(sal_uInt32 _nTokenId,sal_uInt32 _nPos);
void error(const sal_Char *fmt);
void error(const char *fmt);
static int SQLlex();
#ifdef YYBISON
void setParseTree(OSQLParseNode * pNewParseTree);

View File

@@ -63,7 +63,7 @@ namespace dbtools
*/
void appendWarning(
const OUString& _rWarning,
const sal_Char* _pAsciiSQLState,
const char* _pAsciiSQLState,
const css::uno::Reference< css::uno::XInterface >& _rxContext );
void appendWarning(const css::sdbc::SQLException& _rWarning);