sal_Char->char in scaddins..sdext

Change-Id: If2456800ace3696c2582e19a4c8612fee7d77f90
Reviewed-on: https://gerrit.libreoffice.org/85700
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2019-12-22 19:27:42 +01:00
parent 935763841f
commit 1376f86f3f
22 changed files with 68 additions and 68 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ using namespace sca::analysis;
using namespace std;
extern "C" SAL_DLLPUBLIC_EXPORT void* analysis_component_getFactory(
const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
const char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
{
void* pRet = nullptr;
@@ -319,8 +319,8 @@ OUString SAL_CALL AnalysisAddIn::getDisplayCategoryName( const OUString& aProgra
return aRet;
}
static const sal_Char* pLang[] = { "de", "en" };
static const sal_Char* pCoun[] = { "DE", "US" };
static const char* pLang[] = { "de", "en" };
static const char* pCoun[] = { "DE", "US" };
static const sal_uInt32 nNumOfLoc = SAL_N_ELEMENTS(pLang);
void AnalysisAddIn::InitDefLocales()
+5 -5
View File
@@ -687,9 +687,9 @@ double ConvertToDec( const OUString& aStr, sal_uInt16 nBase, sal_uInt16 nCharLim
}
static sal_Char GetMaxChar( sal_uInt16 nBase )
static char GetMaxChar( sal_uInt16 nBase )
{
const sal_Char* const c = "--123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const char* const c = "--123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
return c[ nBase ];
}
@@ -722,7 +722,7 @@ OUString ConvertFromDec( double fNum, double fMin, double fMax, sal_uInt16 nBase
else if( ( bNeg && nLen < nMaxPlaces ) || ( !bNeg && nLen < nPlaces ) )
{
sal_Int32 nLeft = nPlaces - nLen;
std::unique_ptr<sal_Char[]> p( new sal_Char[ nLeft + 1 ] );
std::unique_ptr<char[]> p( new char[ nLeft + 1 ] );
memset( p.get(), bNeg ? GetMaxChar( nBase ) : '0', nLeft );
p[ nLeft ] = 0x00;
aRet = OUString( p.get(), nLeft, RTL_TEXTENCODING_MS_1252 ) + aRet;
@@ -944,7 +944,7 @@ bool ParseDouble( const sal_Unicode*& rp, double& rRet )
OUString GetString( double f, bool bLeadingSign, sal_uInt16 nMaxDig )
{
const int nBuff = 256;
sal_Char aBuff[ nBuff + 1 ];
char aBuff[ nBuff + 1 ];
const char* pFormStr = bLeadingSign? "%+.*g" : "%.*g";
int nLen = snprintf( aBuff, nBuff, pFormStr, int( nMaxDig ), f );
// you never know which underlying implementation you get ...
@@ -2040,7 +2040,7 @@ void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars )
}
}
ConvertData::ConvertData(const sal_Char p[], double fC, ConvertDataClass e, bool bPrefSupport)
ConvertData::ConvertData(const char p[], double fC, ConvertDataClass e, bool bPrefSupport)
: fConst(fC)
, aName(p, strlen(p), RTL_TEXTENCODING_MS_1252)
, eClass(e)
+4 -4
View File
@@ -188,7 +188,7 @@ enum class FDCategory
struct FuncDataBase
{
const sal_Char* pIntName;
const char* pIntName;
const char* pUINameID; // resource ID to UI name
const char** pDescrID; // resource ID to description, parameter names and ~ description
bool const bDouble; // name already exist in Calc
@@ -509,7 +509,7 @@ protected:
bool const bPrefixSupport;
public:
ConvertData(
const sal_Char pUnitName[],
const char pUnitName[],
double fConvertConstant,
ConvertDataClass eClass,
bool bPrefSupport = false );
@@ -536,7 +536,7 @@ class ConvertDataLinear final : public ConvertData
double const fOffs;
public:
inline ConvertDataLinear(
const sal_Char pUnitName[],
const char pUnitName[],
double fConvertConstant,
double fConvertOffset,
ConvertDataClass eClass,
@@ -718,7 +718,7 @@ inline ConvertDataClass ConvertData::Class() const
return eClass;
}
inline ConvertDataLinear::ConvertDataLinear( const sal_Char p[], double fC, double fO, ConvertDataClass e,
inline ConvertDataLinear::ConvertDataLinear( const char p[], double fC, double fO, ConvertDataClass e,
bool bPrefSupport ) :
ConvertData( p, fC, e, bPrefSupport ),
fOffs( fO )
+3 -3
View File
@@ -94,7 +94,7 @@ static uno::Reference< uno::XInterface > ScaDateAddIn_CreateInstance(
extern "C" {
SAL_DLLPUBLIC_EXPORT void * date_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
const char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void* pRet = nullptr;
@@ -124,8 +124,8 @@ ScaDateAddIn::ScaDateAddIn()
{
}
static const sal_Char* pLang[] = { "de", "en" };
static const sal_Char* pCoun[] = { "DE", "US" };
static const char* pLang[] = { "de", "en" };
static const char* pCoun[] = { "DE", "US" };
static const sal_uInt32 nNumOfLoc = SAL_N_ELEMENTS( pLang );
void ScaDateAddIn::InitDefLocales()
+1 -1
View File
@@ -46,7 +46,7 @@ enum class ScaCategory
struct ScaFuncDataBase
{
const sal_Char* pIntName; // internal name (get***)
const char* pIntName; // internal name (get***)
const char* pUINameID; // resource ID to UI name
const char** pDescrID; // resource ID to description, parameter names and ~ description
const char** pCompListID; // list of valid names
+3 -3
View File
@@ -96,7 +96,7 @@ static uno::Reference< uno::XInterface > ScaPricingAddIn_CreateInstance(
extern "C" {
SAL_DLLPUBLIC_EXPORT void * pricing_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
const char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void* pRet = nullptr;
@@ -130,8 +130,8 @@ ScaPricingAddIn::~ScaPricingAddIn()
{
}
static const sal_Char* pLang[] = { "de", "en" };
static const sal_Char* pCoun[] = { "DE", "US" };
static const char* pLang[] = { "de", "en" };
static const char* pCoun[] = { "DE", "US" };
static const sal_uInt32 nNumOfLoc = SAL_N_ELEMENTS( pLang );
void ScaPricingAddIn::InitDefLocales()
+1 -1
View File
@@ -57,7 +57,7 @@ enum class ScaCategory
struct ScaFuncDataBase
{
const sal_Char* pIntName; // internal name (get***)
const char* pIntName; // internal name (get***)
const char* pUINameID; // resource ID to UI name
const char** pDescrID; // resource ID to description, parameter names and ~ description
// pCompName was originally meant to be able to load Excel documents that for
+1 -1
View File
@@ -517,7 +517,7 @@ namespace basprov
extern "C"
{
SAL_DLLPUBLIC_EXPORT void * basprov_component_getFactory(
const sal_Char * pImplName, void * pServiceManager,
const char * pImplName, void * pServiceManager,
void * pRegistryKey )
{
return ::cppu::component_getFactoryHelper(
+1 -1
View File
@@ -753,7 +753,7 @@ namespace dlgprov
extern "C"
{
SAL_DLLPUBLIC_EXPORT void * dlgprov_component_getFactory(
const sal_Char * pImplName, void * pServiceManager,
const char * pImplName, void * pServiceManager,
void * pRegistryKey )
{
return ::cppu::component_getFactoryHelper(
@@ -469,7 +469,7 @@ const Reference< XMultiServiceFactory >& xServiceManager )
extern "C"
{
SAL_DLLPUBLIC_EXPORT void* protocolhandler_component_getFactory( const sal_Char * pImplementationName ,
SAL_DLLPUBLIC_EXPORT void* protocolhandler_component_getFactory( const char * pImplementationName ,
void * pServiceManager ,
void * )
{
@@ -757,7 +757,7 @@ extern "C"
* @return a component factory
*/
SAL_DLLPUBLIC_EXPORT void * scriptframe_component_getFactory(
const sal_Char * pImplName,
const char * pImplName,
void * pServiceManager,
void * pRegistryKey )
{
@@ -283,7 +283,7 @@ Sequence< Locale > StringResourceImpl::getLocales( )
// XStringResourceManager
void StringResourceImpl::implCheckReadOnly( const sal_Char* pExceptionMsg )
void StringResourceImpl::implCheckReadOnly( const char* pExceptionMsg )
{
if( m_bReadOnly )
{
@@ -2694,7 +2694,7 @@ static const struct ::cppu::ImplementationEntry s_component_entries [] =
extern "C"
{
SAL_DLLPUBLIC_EXPORT void * stringresource_component_getFactory(
const sal_Char * pImplName, void * pServiceManager,
const char * pImplName, void * pServiceManager,
void * pRegistryKey )
{
return ::cppu::component_getFactoryHelper(
@@ -114,7 +114,7 @@ protected:
// Checks read only status and throws exception if it's true
/// @throws css::lang::NoSupportException
void implCheckReadOnly( const sal_Char* pExceptionMsg );
void implCheckReadOnly( const char* pExceptionMsg );
// Returns the LocalItem for a given locale, if it exists, otherwise NULL
// This method compares the locales exactly, no closest match search is performed
+1 -1
View File
@@ -98,7 +98,7 @@ void OdfEmitter::write( const OUString& rText )
const OString aStr = OUStringToOString(rText,RTL_TEXTENCODING_UTF8);
const sal_Int32 nLen( aStr.getLength() );
m_aBuf.realloc( nLen );
const sal_Char* pStr = aStr.getStr();
const char* pStr = aStr.getStr();
std::copy(pStr,pStr+nLen,m_aBuf.getArray());
m_xOutput->writeBytes(m_aBuf);
+23 -23
View File
@@ -157,27 +157,27 @@ PDFEntry* PDFName::clone() const
OUString PDFName::getFilteredName() const
{
OStringBuffer aFilter( m_aName.getLength() );
const sal_Char* pStr = m_aName.getStr();
const char* pStr = m_aName.getStr();
unsigned int nLen = m_aName.getLength();
for( unsigned int i = 0; i < nLen; i++ )
{
if( (i < nLen - 3) && pStr[i] == '#' )
{
sal_Char rResult = 0;
char rResult = 0;
i++;
if( pStr[i] >= '0' && pStr[i] <= '9' )
rResult = sal_Char( pStr[i]-'0' ) << 4;
rResult = char( pStr[i]-'0' ) << 4;
else if( pStr[i] >= 'a' && pStr[i] <= 'f' )
rResult = sal_Char( pStr[i]-'a' + 10 ) << 4;
rResult = char( pStr[i]-'a' + 10 ) << 4;
else if( pStr[i] >= 'A' && pStr[i] <= 'F' )
rResult = sal_Char( pStr[i]-'A' + 10 ) << 4;
rResult = char( pStr[i]-'A' + 10 ) << 4;
i++;
if( pStr[i] >= '0' && pStr[i] <= '9' )
rResult |= sal_Char( pStr[i]-'0' );
rResult |= char( pStr[i]-'0' );
else if( pStr[i] >= 'a' && pStr[i] <= 'f' )
rResult |= sal_Char( pStr[i]-'a' + 10 );
rResult |= char( pStr[i]-'a' + 10 );
else if( pStr[i] >= 'A' && pStr[i] <= 'F' )
rResult |= sal_Char( pStr[i]-'A' + 10 );
rResult |= char( pStr[i]-'A' + 10 );
aFilter.append( rResult );
}
else
@@ -204,7 +204,7 @@ bool PDFString::emit( EmitContext& rWriteContext ) const
reinterpret_cast<sal_uInt8 *>(const_cast<char *>(aFiltered.getStr())),
pEData->m_nDecryptObject, pEData->m_nDecryptGeneration );
// check for string or hex string
const sal_Char* pStr = aFiltered.getStr();
const char* pStr = aFiltered.getStr();
if( aFiltered.getLength() > 1 &&
( (static_cast<unsigned char>(pStr[0]) == 0xff && static_cast<unsigned char>(pStr[1]) == 0xfe) ||
(static_cast<unsigned char>(pStr[0]) == 0xfe && static_cast<unsigned char>(pStr[1]) == 0xff) ) )
@@ -247,10 +247,10 @@ OString PDFString::getFilteredString() const
int nLen = m_aString.getLength();
OStringBuffer aBuf( nLen );
const sal_Char* pStr = m_aString.getStr();
const char* pStr = m_aString.getStr();
if( *pStr == '(' )
{
const sal_Char* pRun = pStr+1;
const char* pRun = pStr+1;
while( pRun - pStr < nLen-1 )
{
if( *pRun == '\\' )
@@ -258,7 +258,7 @@ OString PDFString::getFilteredString() const
pRun++;
if( pRun - pStr < nLen )
{
sal_Char aEsc = 0;
char aEsc = 0;
if( *pRun == 'n' )
aEsc = '\n';
else if( *pRun == 'r' )
@@ -306,25 +306,25 @@ OString PDFString::getFilteredString() const
}
else if( *pStr == '<' )
{
const sal_Char* pRun = pStr+1;
const char* pRun = pStr+1;
while( *pRun != '>' && pRun - pStr < nLen )
{
sal_Char rResult = 0;
char rResult = 0;
if( *pRun >= '0' && *pRun <= '9' )
rResult = sal_Char( ( *pRun-'0' ) << 4 );
rResult = char( ( *pRun-'0' ) << 4 );
else if( *pRun >= 'a' && *pRun <= 'f' )
rResult = sal_Char( ( *pRun-'a' + 10 ) << 4 );
rResult = char( ( *pRun-'a' + 10 ) << 4 );
else if( *pRun >= 'A' && *pRun <= 'F' )
rResult = sal_Char( ( *pRun-'A' + 10 ) << 4 );
rResult = char( ( *pRun-'A' + 10 ) << 4 );
pRun++;
if( *pRun != '>' && pRun - pStr < nLen )
{
if( *pRun >= '0' && *pRun <= '9' )
rResult |= sal_Char( *pRun-'0' );
rResult |= char( *pRun-'0' );
else if( *pRun >= 'a' && *pRun <= 'f' )
rResult |= sal_Char( *pRun-'a' + 10 );
rResult |= char( *pRun-'a' + 10 );
else if( *pRun >= 'A' && *pRun <= 'F' )
rResult |= sal_Char( *pRun-'A' + 10 );
rResult |= char( *pRun-'A' + 10 );
}
pRun++;
aBuf.append( rResult );
@@ -1101,12 +1101,12 @@ static const sal_uInt8 nPadString[32] =
0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80, 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A
};
static void pad_or_truncate_to_32( const OString& rStr, sal_Char* pBuffer )
static void pad_or_truncate_to_32( const OString& rStr, char* pBuffer )
{
int nLen = rStr.getLength();
if( nLen > 32 )
nLen = 32;
const sal_Char* pStr = rStr.getStr();
const char* pStr = rStr.getStr();
memcpy( pBuffer, pStr, nLen );
int i = 0;
while( nLen < 32 )
@@ -1118,7 +1118,7 @@ static sal_uInt32 password_to_key( const OString& rPwd, sal_uInt8* pOutKey, PDFF
{
// see PDF reference 1.4 Algorithm 3.2
// encrypt pad string
sal_Char aPadPwd[ENCRYPTION_BUF_LEN];
char aPadPwd[ENCRYPTION_BUF_LEN];
pad_or_truncate_to_32( rPwd, aPadPwd );
::comphelper::Hash aDigest(::comphelper::HashType::MD5);
aDigest.update(reinterpret_cast<unsigned char const*>(aPadPwd), sizeof(aPadPwd));
+1 -1
View File
@@ -62,7 +62,7 @@ class StringEmitContext : public EmitContext
virtual bool write( const void* pBuf, unsigned int nLen ) throw() override
{
m_aBuf.append( static_cast<const sal_Char*>(pBuf), nLen );
m_aBuf.append( static_cast<const char*>(pBuf), nLen );
return true;
}
virtual unsigned int getCurPos() throw() override { return m_aBuf.getLength(); }
+4 -4
View File
@@ -77,8 +77,8 @@ namespace
struct ComponentDescription
{
const sal_Char* pAsciiServiceName;
const sal_Char* pAsciiImplementationName;
const char* pAsciiServiceName;
const char* pAsciiImplementationName;
ComponentFactory const pFactory;
ComponentDescription()
@@ -87,7 +87,7 @@ namespace
,pFactory( nullptr )
{
}
ComponentDescription( const sal_Char* _pAsciiServiceName, const sal_Char* _pAsciiImplementationName, ComponentFactory _pFactory )
ComponentDescription( const char* _pAsciiServiceName, const char* _pAsciiImplementationName, ComponentFactory _pFactory )
:pAsciiServiceName( _pAsciiServiceName )
,pAsciiImplementationName( _pAsciiImplementationName )
,pFactory( _pFactory )
@@ -110,7 +110,7 @@ namespace
}
extern "C" SAL_DLLPUBLIC_EXPORT void* pdfimport_component_getFactory(
const sal_Char* pImplementationName,
const char* pImplementationName,
SAL_UNUSED_PARAMETER void* /*pServiceManager*/,
SAL_UNUSED_PARAMETER void* /*pRegistryKey*/ )
{
+1 -1
View File
@@ -74,7 +74,7 @@ typedef ::cppu::WeakComponentImplHelper<
virtual void SAL_CALL writeBytes(const css::uno::Sequence< ::sal_Int8 >& aData) override
{
maBuffer.append(reinterpret_cast<const sal_Char *>(aData.getConstArray()), aData.getLength());
maBuffer.append(reinterpret_cast<const char *>(aData.getConstArray()), aData.getLength());
}
virtual void SAL_CALL flush() override
@@ -36,7 +36,7 @@ namespace pdfi
namespace
{
static const sal_Char aBase64EncodeTable[] =
static const char aBase64EncodeTable[] =
{ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
+6 -6
View File
@@ -204,15 +204,15 @@ public:
OString lcl_unescapeLineFeeds(const OString& i_rStr)
{
const size_t nOrigLen(sal::static_int_cast<size_t>(i_rStr.getLength()));
const sal_Char* const pOrig(i_rStr.getStr());
std::unique_ptr<sal_Char[]> pBuffer(new sal_Char[nOrigLen + 1]);
const char* const pOrig(i_rStr.getStr());
std::unique_ptr<char[]> pBuffer(new char[nOrigLen + 1]);
const sal_Char* pRead(pOrig);
sal_Char* pWrite(pBuffer.get());
const sal_Char* pCur(pOrig);
const char* pRead(pOrig);
char* pWrite(pBuffer.get());
const char* pCur(pOrig);
while ((pCur = strchr(pCur, '\\')) != nullptr)
{
const sal_Char cNext(pCur[1]);
const char cNext(pCur[1]);
if (cNext == 'n' || cNext == 'r' || cNext == '\\')
{
const size_t nLen(pCur - pRead);
@@ -48,7 +48,7 @@ static const struct ImplementationEntry gServiceEntries[] =
};
extern "C" SAL_DLLPUBLIC_EXPORT void * presenter_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
const char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , gServiceEntries);
}
+3 -3
View File
@@ -610,8 +610,8 @@ void LineDescriptorList::SplitText (
const OUString& rsText,
vector<OUString>& rTextParts)
{
const sal_Char cQuote ('\'');
const sal_Char cSeparator (',');
const char cQuote ('\'');
const char cSeparator (',');
sal_Int32 nIndex (0);
sal_Int32 nStart (0);
@@ -663,7 +663,7 @@ void LineDescriptorList::FormatText (
if (PresenterCanvasHelper::GetTextSize(
rxFont, *iPart).Width > nMaximalWidth)
{
const sal_Char cSpace (' ');
const char cSpace (' ');
sal_Int32 nIndex (0);
sal_Int32 nStart (0);