Kaydet (Commit) da56de9a authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Stephan Bergmann

remove type decorations on char literals

they are only needed where type deduction fails.
left them in defines for now.

Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09
Reviewed-on: https://gerrit.libreoffice.org/35893Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 8d1a56c2
......@@ -1485,8 +1485,8 @@ namespace
SbMethod* lcl_queryMacro( BasicManager* i_manager, OUString const& i_fullyQualifiedName )
{
sal_Int32 nLast = 0;
OUString sLibName = i_fullyQualifiedName.getToken( (sal_Int32)0, (sal_Unicode)'.', nLast );
OUString sModule = i_fullyQualifiedName.getToken( (sal_Int32)0, (sal_Unicode)'.', nLast );
OUString sLibName = i_fullyQualifiedName.getToken( (sal_Int32)0, '.', nLast );
OUString sModule = i_fullyQualifiedName.getToken( (sal_Int32)0, '.', nLast );
OUString sMacro;
if(nLast >= 0)
{
......
......@@ -192,9 +192,9 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
if( comphelper::string::getTokenCount(aMacro, '.') == 3 )
{
sal_Int32 nLast = 0;
OUString aFullLibName = aMacro.getToken( (sal_Int32)0, (sal_Unicode)'.', nLast );
OUString aFullLibName = aMacro.getToken( (sal_Int32)0, '.', nLast );
sal_Int32 nIndex = aFullLibName.indexOf( (sal_Unicode)':' );
sal_Int32 nIndex = aFullLibName.indexOf( ':' );
if (nIndex >= 0)
{
aLocation = aFullLibName.copy( 0, nIndex );
......
......@@ -2711,8 +2711,8 @@ RTLFUNC(IsMissing)
// Function looks for wildcards, removes them and always returns the pure path
OUString implSetupWildcard( const OUString& rFileParam, SbiRTLData* pRTLData )
{
static sal_Char cDelim1 = (sal_Char)'/';
static sal_Char cDelim2 = (sal_Char)'\\';
static sal_Char cDelim1 = '/';
static sal_Char cDelim2 = '\\';
static sal_Char cWild1 = '*';
static sal_Char cWild2 = '?';
......@@ -2807,7 +2807,7 @@ bool isRootDir( const OUString& aDirURLStr )
{
OUString aSeg1 = aDirURLObj.getName( 0, true,
INetURLObject::DecodeMechanism::WithCharset );
if( aSeg1[1] == (sal_Unicode)':' )
if( aSeg1[1] == ':' )
{
bRoot = true;
}
......
......@@ -2757,7 +2757,7 @@ void SbiRuntime::StepLOADNC( sal_uInt32 nOp1 )
// #57844 use localized function
OUString aStr = pImg->GetString( static_cast<short>( nOp1 ) );
// also allow , !!!
sal_Int32 iComma = aStr.indexOf((sal_Unicode)',');
sal_Int32 iComma = aStr.indexOf(',');
if( iComma >= 0 )
{
aStr = aStr.replaceAt(iComma, 1, ".");
......
......@@ -180,7 +180,7 @@ void SbxBasicFormater::StrRoundDigit( OUStringBuffer& sStrg, short nPos, bool& b
if( nPos==-1 )
{
ShiftString( sStrg, 0 );
sStrg[0] = (sal_Unicode)'1';
sStrg[0] = '1';
bOverflow = true;
}
else
......@@ -190,7 +190,7 @@ void SbxBasicFormater::StrRoundDigit( OUStringBuffer& sStrg, short nPos, bool& b
{
if( c2 == '9' )
{
sStrg[nPos] = (sal_Unicode)'0';
sStrg[nPos] = '0';
StrRoundDigit( sStrg, nPos - 1, bOverflow );
}
else
......@@ -201,7 +201,7 @@ void SbxBasicFormater::StrRoundDigit( OUStringBuffer& sStrg, short nPos, bool& b
else
{
ShiftString( sStrg,nPos+1 );
sStrg[nPos + 1] = (sal_Unicode)'1';
sStrg[nPos + 1] = '1';
bOverflow = true;
}
}
......@@ -218,7 +218,7 @@ void SbxBasicFormater::ParseBack( OUStringBuffer& sStrg, const OUString& sFormat
short nFormatPos )
{
for( sal_Int32 i = nFormatPos;
i>0 && sFormatStrg[ i ] == (sal_Unicode)'#' && sStrg[sStrg.getLength() - 1] == (sal_Unicode)'0';
i>0 && sFormatStrg[ i ] == '#' && sStrg[sStrg.getLength() - 1] == '0';
i-- )
{
sStrg.setLength(sStrg.getLength() - 1 );
......
......@@ -472,13 +472,13 @@ bool ImpConvStringExt( OUString& rSrc, SbxDataType eTargetType )
ImpGetIntntlSep( cDecimalSep, cThousandSep );
aNewString = rSrc;
if( cDecimalSep != (sal_Unicode)'.' )
if( cDecimalSep != '.' )
{
sal_Int32 nPos = aNewString.indexOf( cDecimalSep );
if( nPos != -1 )
{
sal_Unicode* pStr = const_cast<sal_Unicode*>(aNewString.getStr());
pStr[nPos] = (sal_Unicode)'.';
pStr[nPos] = '.';
bChanged = true;
}
}
......
......@@ -751,11 +751,11 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
{
if( nPass == 1 )
{
pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(0, (sal_Unicode)';') ));
pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(0, ';') ));
}
else
{
pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(1, (sal_Unicode)';') ));
pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(1, ';') ));
}
pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
pLibInfoInetObj->setExtension( "xlc" );
......@@ -775,7 +775,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
// Old variant?
if( !xInput.is() && nPass == 0 )
{
INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') );
INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, ';') );
aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
aLibInfoInetObj.setExtension( "xli" );
aFileName = aLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
......@@ -833,7 +833,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
}
else
{
aLibraryPath = maLibraryPath.getToken(1, (sal_Unicode)';');
aLibraryPath = maLibraryPath.getToken(1, ';');
}
INetURLObject aInetObj( aLibraryPath );
......@@ -848,7 +848,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
else if( rLib.bLink )
{
// Check "share" path
INetURLObject aShareInetObj( maLibraryPath.getToken(0, (sal_Unicode)';') );
INetURLObject aShareInetObj( maLibraryPath.getToken(0, ';') );
aShareInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
OUString aShareLibDirPath = aShareInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
......@@ -993,7 +993,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
if( meInitMode == DEFAULT )
{
INetURLObject aUserBasicInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') );
INetURLObject aUserBasicInetObj( maLibraryPath.getToken(1, ';') );
OUString aStandardStr("Standard");
INetURLObject aPrevUserBasicInetObj_1( aUserBasicInetObj );
......@@ -1347,7 +1347,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder( SfxLibrary* pLib, const OU
OUString aLibDirPath = pLib->maStorageURL;
if( aLibDirPath.isEmpty() )
{
INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') );
INetURLObject aInetObj( maLibraryPath.getToken(1, ';') );
aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
checkStorageURL( aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), pLib->maLibInfoFileURL,
pLib->maStorageURL, pLib->maUnexpandedStorageURL );
......@@ -2093,7 +2093,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
else
{
// Create Output stream
INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') );
INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, ';') );
aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
aLibInfoInetObj.setExtension( "xlc" );
OUString aLibInfoPath( aLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
......@@ -2286,7 +2286,7 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name )
catch(const Exception& ) {}
// Delete folder if empty
INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') );
INetURLObject aInetObj( maLibraryPath.getToken(1, ';') );
aInetObj.insertName( Name, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
......@@ -2545,7 +2545,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
OUString aLibDirPath = pImplLib->maStorageURL;
INetURLObject aDestInetObj( maLibraryPath.getToken(1, (sal_Unicode)';'));
INetURLObject aDestInetObj( maLibraryPath.getToken(1, ';'));
aDestInetObj.insertName( NewName, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
OUString aDestDirPath = aDestInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
......
......@@ -189,11 +189,11 @@ namespace comphelper
rBoundary.startPos = 0;
rBoundary.endPos = sText.getLength();
sal_Int32 nFound = sText.lastIndexOf( (sal_Unicode)'\n', nIndex );
sal_Int32 nFound = sText.lastIndexOf( '\n', nIndex );
if ( nFound != -1 )
rBoundary.startPos = nFound + 1;
nFound = sText.indexOf( (sal_Unicode)'\n', nIndex );
nFound = sText.indexOf( '\n', nIndex );
if ( nFound != -1 )
rBoundary.endPos = nFound + 1;
}
......
......@@ -891,7 +891,7 @@ void qualifiedNameComponents(const Reference< XDatabaseMetaData >& _rxConnMetaDa
if ( aNameComps.bSchemas )
{
sal_Int32 nIndex = sName.indexOf((sal_Unicode)'.');
sal_Int32 nIndex = sName.indexOf('.');
// OSL_ENSURE(-1 != nIndex, "QualifiedNameComponents : no schema separator!");
if ( nIndex != -1 )
_rSchema = sName.copy(0, nIndex);
......
......@@ -314,7 +314,7 @@ sal_Int64 toNumericWithoutDecimalPlace(const OUString& sSource)
// cut off leading 0 eventually ( eg. 0.567 -> .567)
(void)sSource.startsWith("0", &sNumber);
sal_Int32 nDotIndex = sNumber.indexOf((sal_Unicode)'.');
sal_Int32 nDotIndex = sNumber.indexOf('.');
if( nDotIndex < 0)
{
......
......@@ -96,8 +96,8 @@ namespace dbaccess
{
virtual void appendNonEmptyToNonEmpty( const OUString& lhs ) override
{
m_aBuffer.insert( 0, (sal_Unicode)' ' );
m_aBuffer.insert( 0, (sal_Unicode)'(' );
m_aBuffer.insert( 0, ' ' );
m_aBuffer.insert( 0, '(' );
m_aBuffer.append( " ) AND ( " );
m_aBuffer.append( lhs );
m_aBuffer.append( " )" );
......
......@@ -382,17 +382,17 @@ escape_path( rtl_uString *pToEscape )
sal_Unicode c = pToEscape->buffer[i];
switch ( c )
{
case (sal_Unicode)'\0':
case '\0':
rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
rtl_uString_getLength( pBuffer ),
RTL_CONSTASCII_STRINGPARAM( "\\0" ) );
break;
case (sal_Unicode)',':
case ',':
rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
rtl_uString_getLength( pBuffer ),
RTL_CONSTASCII_STRINGPARAM( "\\," ) );
break;
case (sal_Unicode)'\\':
case '\\':
rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
rtl_uString_getLength( pBuffer ),
RTL_CONSTASCII_STRINGPARAM( "\\\\" ) );
......
......@@ -2031,10 +2031,10 @@ void FilterCache::impl_interpretDataVal4Type(const OUString& sValue,
case 2: rItem[PROPNAME_CLIPBOARDFORMAT] <<= ::rtl::Uri::decode(sValue, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8);
break;
// URLPattern
case 3: rItem[PROPNAME_URLPATTERN] <<= comphelper::containerToSequence(impl_tokenizeString(sValue, (sal_Unicode)';'));
case 3: rItem[PROPNAME_URLPATTERN] <<= comphelper::containerToSequence(impl_tokenizeString(sValue, ';'));
break;
// Extensions
case 4: rItem[PROPNAME_EXTENSIONS] <<= comphelper::containerToSequence(impl_tokenizeString(sValue, (sal_Unicode)';'));
case 4: rItem[PROPNAME_EXTENSIONS] <<= comphelper::containerToSequence(impl_tokenizeString(sValue, ';'));
break;
}
}
......@@ -2069,7 +2069,7 @@ void FilterCache::impl_interpretDataVal4Filter(const OUString& sValue,
case 4: rItem[PROPNAME_FLAGS] <<= sValue.toInt32();
break;
// UserData
case 5: rItem[PROPNAME_USERDATA] <<= comphelper::containerToSequence(impl_tokenizeString(sValue, (sal_Unicode)';'));
case 5: rItem[PROPNAME_USERDATA] <<= comphelper::containerToSequence(impl_tokenizeString(sValue, ';'));
break;
// FileFormatVersion
case 6: rItem[PROPNAME_FILEFORMATVERSION] <<= sValue.toInt32();
......@@ -2154,7 +2154,7 @@ CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::containe
OUString sData;
OUStringList lData;
xItem->getByName( "Data" ) >>= sData;
lData = impl_tokenizeString(sData, (sal_Unicode)',');
lData = impl_tokenizeString(sData, ',');
if (
(sData.isEmpty()) ||
(lData.size()<1 )
......
......@@ -188,10 +188,10 @@ static void createSlideFile( const Reference< XComponent >& xDoc, PlacewareZipFi
aTemp = xDocProps->getTitle();
if( aTemp.isEmpty() )
{
sal_Int32 nPos1 = rURL.lastIndexOf( (sal_Unicode)'/' );
sal_Int32 nPos1 = rURL.lastIndexOf( '/' );
if( -1 != nPos1 )
{
sal_Int32 nPos2 = rURL.lastIndexOf( (sal_Unicode)'.' );
sal_Int32 nPos2 = rURL.lastIndexOf( '.' );
if( nPos2 > nPos1 )
{
aTemp = rURL.copy( nPos1 + 1, nPos2 - nPos1 - 1 );
......
......@@ -202,9 +202,9 @@ OUString getElementTypeFromResourceURL( const OUString& aResourceURL )
{
sal_Int32 nIndex = 0;
OUString aPathPart = aResourceURL.copy( aUIResourceURL.getLength() );
aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
aPathPart.getToken( 0, '/', nIndex );
return aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
return aPathPart.getToken( 0, '/', nIndex );
}
return aType;
......@@ -217,10 +217,10 @@ void parseResourceURL( const OUString& aResourceURL, OUString& aElementType, OUS
{
sal_Int32 nIndex = 0;
OUString aPathPart = aResourceURL.copy( aUIResourceURL.getLength() );
aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
aPathPart.getToken( 0, '/', nIndex );
aElementType = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
aElementName = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
aElementType = aPathPart.getToken( 0, '/', nIndex );
aElementName = aPathPart.getToken( 0, '/', nIndex );
}
}
......
......@@ -166,7 +166,7 @@ void SAL_CALL FontMenuController::itemActivated( const css::awt::MenuEvent& )
OUString aText = m_xPopupMenu->getItemText( nItemId );
// TODO: must be replaced by implementation of VCL, when available
sal_Int32 nIndex = aText.indexOf( (sal_Unicode)'~' );
sal_Int32 nIndex = aText.indexOf( '~' );
if ( nIndex >= 0 )
aText = aText.replaceAt( nIndex, 1, "" );
// TODO: must be replaced by implementation of VCL, when available
......
......@@ -1430,9 +1430,9 @@ LanguageType MsLangId::convertUnxByteStringToLanguage(
OString aCountry;
OString aAtString;
sal_Int32 nLangSepPos = rString.indexOf( (sal_Char)'_' );
sal_Int32 nCountrySepPos = rString.indexOf( (sal_Char)'.' );
sal_Int32 nAtPos = rString.indexOf( (sal_Char)'@' );
sal_Int32 nLangSepPos = rString.indexOf( '_' );
sal_Int32 nCountrySepPos = rString.indexOf( '.' );
sal_Int32 nAtPos = rString.indexOf( '@' );
if (nCountrySepPos < 0)
nCountrySepPos = nAtPos;
......
......@@ -575,7 +575,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale)
return xBI = listItem->xBI;
}
sal_Unicode under = (sal_Unicode)'_';
sal_Unicode under = '_';
sal_Int32 l = rLocale.Language.getLength();
sal_Int32 c = rLocale.Country.getLength();
......
......@@ -1504,7 +1504,7 @@ public:
@return The number of characters stripped
*/
sal_Int32 stripStart(sal_Unicode c = (sal_Unicode)' ')
sal_Int32 stripStart(sal_Unicode c = ' ')
{
sal_Int32 index;
for(index = 0; index < getLength() ; index++)
......@@ -1530,7 +1530,7 @@ public:
@return The number of characters stripped
*/
sal_Int32 stripEnd(sal_Unicode c = (sal_Unicode)' ')
sal_Int32 stripEnd(sal_Unicode c = ' ')
{
sal_Int32 result = getLength();
sal_Int32 index;
......@@ -1556,7 +1556,7 @@ public:
@return The number of characters stripped
*/
sal_Int32 strip(sal_Unicode c = (sal_Unicode)' ')
sal_Int32 strip(sal_Unicode c = ' ')
{
return stripStart(c) + stripEnd(c);
}
......
......@@ -150,7 +150,7 @@ namespace stoc_connector
throw ConnectionSetupException(message);
}
sal_Int32 index = sConnectionDescription.indexOf((sal_Unicode) ',');
sal_Int32 index = sConnectionDescription.indexOf(',');
r = xConnector->connect(sConnectionDescription.copy(index + 1).trim());
}
......
......@@ -698,7 +698,7 @@ bool IsNumeric( const OUString &rText )
for(sal_Int32 i = 0; i < nLen; ++i)
{
sal_Unicode cChar = rText[ i ];
if ( !((sal_Unicode)'0' <= cChar && cChar <= (sal_Unicode)'9') )
if ( !('0' <= cChar && cChar <= '9') )
{
bRes = false;
break;
......
......@@ -137,15 +137,15 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale & )
{
nRes = SpellFailure::IS_NEGATIVE_WORD;
}
else if (-1 != aTmp.indexOf( (sal_Unicode) 'x' ) ||
-1 != aTmp.indexOf( (sal_Unicode) 'X' ))
else if (-1 != aTmp.indexOf( 'x' ) ||
-1 != aTmp.indexOf( 'X' ))
{
nRes = SpellFailure::SPELLING_ERROR;
}
else
{
sal_Unicode cChar = aTmp.GetChar( 0 );
if (cChar == (sal_Unicode) 's' || cChar == (sal_Unicode) 'S')
if (cChar == 's' || cChar == 'S')
nRes = SpellFailure::CAPTION_ERROR;
}
}
......@@ -220,15 +220,15 @@ Reference< XSpellAlternatives >
xRes = new SpellAlternatives( aTmp, nLang,
SpellFailure::IS_NEGATIVE_WORD, css::uno::Sequence< OUString >() );
}
else if (-1 != aTmp.indexOf( (sal_Unicode) 'x' ) ||
-1 != aTmp.indexOf( (sal_Unicode) 'X' ))
else if (-1 != aTmp.indexOf( 'x' ) ||
-1 != aTmp.indexOf( 'X' ))
{
Sequence< OUString > aStr( 2 );
OUString *pStr = aStr.getArray();
String aAlt1( aTmp ),
aAlt2( aTmp );
aAlt1.SearchAndReplaceAll( (sal_Unicode) 'x', (sal_Unicode) 'u');
aAlt1.SearchAndReplaceAll( (sal_Unicode) 'X', (sal_Unicode) 'U');
aAlt1.SearchAndReplaceAll( 'x', 'u');
aAlt1.SearchAndReplaceAll( 'X', 'U');
aAlt2 = aAlt2.replaceAll("x", "").replaceAll("X", "");
pStr[0] = aAlt1;
pStr[1] = aAlt2;
......@@ -243,10 +243,10 @@ Reference< XSpellAlternatives >
else
{
sal_Unicode cChar = aTmp.GetChar( 0 );
if (cChar == (sal_Unicode) 's' || cChar == (sal_Unicode) 'S')
if (cChar == 's' || cChar == 'S')
{
sal_Unicode cNewChar = cChar == (sal_Unicode) 's' ?
(sal_Unicode) 'S': (sal_Unicode) 's';
sal_Unicode cNewChar = cChar == 's' ?
'S': 's';
aTmp.GetBufferAccess()[0] = cNewChar;
xRes = new SpellAlternatives( aTmp, nLang,
SpellFailure::CAPTION_ERROR, css::uno::Sequence< OUString >() );
......
......@@ -99,25 +99,25 @@ util::DateTime OOXMLDocPropHandler::GetDateTimeFromW3CDTF( const OUString& aChar
{
aOslDTime.Year = (sal_Int16)aChars.copy( 0, 4 ).toInt32();
if ( nLen >= 7 && aChars[4] == (sal_Unicode)'-' )
if ( nLen >= 7 && aChars[4] == '-' )
{
aOslDTime.Month = (sal_uInt16)aChars.copy( 5, 2 ).toInt32();
if ( nLen >= 10 && aChars[7] == (sal_Unicode)'-' )
if ( nLen >= 10 && aChars[7] == '-' )
{
aOslDTime.Day = (sal_uInt16)aChars.copy( 8, 2 ).toInt32();
if ( nLen >= 16 && aChars[10] == (sal_Unicode)'T' && aChars[13] == (sal_Unicode)':' )
if ( nLen >= 16 && aChars[10] == 'T' && aChars[13] == ':' )
{
aOslDTime.Hours = (sal_uInt16)aChars.copy( 11, 2 ).toInt32();
aOslDTime.Minutes = (sal_uInt16)aChars.copy( 14, 2 ).toInt32();
sal_Int32 nOptTime = 0;
if ( nLen >= 19 && aChars[16] == (sal_Unicode)':' )
if ( nLen >= 19 && aChars[16] == ':' )
{
aOslDTime.Seconds = (sal_uInt16)aChars.copy( 17, 2 ).toInt32();
nOptTime += 3;
if ( nLen >= 20 && aChars[19] == (sal_Unicode)'.' )
if ( nLen >= 20 && aChars[19] == '.' )
{
nOptTime += 1;
sal_Int32 digitPos = 20;
......@@ -158,12 +158,12 @@ util::DateTime OOXMLDocPropHandler::GetDateTimeFromW3CDTF( const OUString& aChar
sal_Int32 nModif = 0;
if ( nLen >= 16 + nOptTime + 6 )
{
if ( ( aChars[16 + nOptTime] == (sal_Unicode)'+' || aChars[16 + nOptTime] == (sal_Unicode)'-' )
&& aChars[16 + nOptTime + 3] == (sal_Unicode)':' )
if ( ( aChars[16 + nOptTime] == '+' || aChars[16 + nOptTime] == '-' )
&& aChars[16 + nOptTime + 3] == ':' )
{
nModif = aChars.copy( 16 + nOptTime + 1, 2 ).toInt32() * 3600;
nModif += aChars.copy( 16 + nOptTime + 4, 2 ).toInt32() * 60;
if ( aChars[16 + nOptTime] == (sal_Unicode)'-' )
if ( aChars[16 + nOptTime] == '-' )
nModif *= -1;
}
}
......
......@@ -68,28 +68,28 @@ namespace oox { namespace ppt {
{
switch(rString[nIndex + 4])
{
case (sal_Unicode)'h': // we found ppt_h
case 'h': // we found ppt_h
// if it was #ppt_h we already copied the #
// which we do not want in the target, so remove it
if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#'))
if(nIndex && (rString[nIndex - 1] == '#'))
{
sRes.remove(sRes.getLength() - 1, 1);
}
sRes.append("height");
bRet = true;
break;
case (sal_Unicode)'w':
if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#'))
case 'w':
if(nIndex && (rString[nIndex - 1] == '#'))
{
sRes.remove(sRes.getLength() - 1, 1);
}
sRes.append("width");
bRet = true;
break;
case (sal_Unicode)'x':
if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#'))
case 'x':
if(nIndex && (rString[nIndex - 1] == '#'))
{
sRes[sRes.getLength() - 1] = (sal_Unicode)'x';
sRes[sRes.getLength() - 1] = 'x';
}
else
{
......@@ -97,10 +97,10 @@ namespace oox { namespace ppt {
}
bRet = true;
break;
case (sal_Unicode)'y':
if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#'))
case 'y':
if(nIndex && (rString[nIndex - 1] == '#'))
{
sRes[sRes.getLength() - 1] = (sal_Unicode)'y';
sRes[sRes.getLength() - 1] = 'y';
}
else
{
......
......@@ -375,7 +375,7 @@ OUString ManifestImport::ConvertNameWithNamespace( const OUString& aName, const
OUString aNsAlias;
OUString aPureName = aName;
sal_Int32 nInd = aName.indexOf( ( sal_Unicode )':' );
sal_Int32 nInd = aName.indexOf( ':' );
if ( nInd != -1 && nInd < aName.getLength() ) {
aNsAlias = aName.copy( 0, nInd );
aPureName = aName.copy( nInd + 1 );
......
......@@ -443,7 +443,7 @@ void ZipPackage::parseContentType()
for ( nInd = 0; nInd < aContentTypeInfo[1].getLength(); nInd++ )
{
OUString aPath;
if ( aContentTypeInfo[1][nInd].First.toChar() == ( sal_Unicode )'/' )
if ( aContentTypeInfo[1][nInd].First.toChar() == '/' )
aPath = aContentTypeInfo[1][nInd].First.copy( 1 );
else
aPath = aContentTypeInfo[1][nInd].First;
......
......@@ -135,7 +135,7 @@ bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath )
void ZipPackageFolder::setChildStreamsTypeByExtension( const beans::StringPair& aPair )
{
OUString aExt;
if ( aPair.First.toChar() == (sal_Unicode)'.' )
if ( aPair.First.toChar() == '.' )
aExt = aPair.First;
else
aExt = "." + aPair.First;
......
......@@ -80,16 +80,16 @@ uno::Sequence< OUString > OZipFileAccess::GetPatternsFromString_Impl( const OUSt
const sal_Unicode* pString = aString.getStr();
while( *pString )
{
if ( *pString == (sal_Unicode)'\\' )
if ( *pString == '\\' )
{
pString++;
if ( *pString == (sal_Unicode)'\\' )
if ( *pString == '\\' )
{
aPattern[nInd] += "\\";
pString++;
}
else if ( *pString == (sal_Unicode)'*' )
else if ( *pString == '*' )
{
aPattern[nInd] += "*";
pString++;
......@@ -100,7 +100,7 @@ uno::Sequence< OUString > OZipFileAccess::GetPatternsFromString_Impl( const OUSt
aPattern[nInd] += "\\";
}
}
else if ( *pString == (sal_Unicode)'*' )
else if ( *pString == '*' )
{
aPattern.realloc( ( ++nInd ) + 1 );
pString++;
......
......@@ -24,9 +24,9 @@
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
const sal_Unicode FPH_CHAR_PATH_SEPARATOR = (sal_Unicode)'/';
const sal_Unicode FPH_CHAR_DOT = (sal_Unicode)'.';
const sal_Unicode FPH_CHAR_COLON = (sal_Unicode)':';
const sal_Unicode FPH_CHAR_PATH_SEPARATOR = '/';
const sal_Unicode FPH_CHAR_DOT = '.';
const sal_Unicode FPH_CHAR_COLON = ':';
inline const rtl::OUString FPH_PATH_SEPARATOR()
{ return rtl::OUString(FPH_CHAR_PATH_SEPARATOR); }
......@@ -47,7 +47,7 @@ void SAL_CALL osl_systemPathRemoveSeparator(rtl_uString* pustrPath)
while ((pustrPath->length > 1) && (pustrPath->buffer[pustrPath->length - 1] == FPH_CHAR_PATH_SEPARATOR))
{
pustrPath->length--;
pustrPath->buffer[pustrPath->length] = (sal_Unicode)'\0';
pustrPath->buffer[pustrPath->length] = '\0';
}
SAL_WARN_IF( !((0 == pustrPath->length) || (1 == pustrPath->length) ||
......
......@@ -206,7 +206,7 @@ static oslFileError osl_create_temp_file_impl_(
/* ensure that the last character is a '/' */
if ((sal_Unicode)'/' != puchr[len_base_dir - 1])
if ('/' != puchr[len_base_dir - 1])
{
rtl_uStringbuffer_insert_ascii(
&tmp_file_path,
......
......@@ -694,7 +694,7 @@ oslFileError osl_getSystemPathFromFileURL_( rtl_uString *strURL, rtl_uString **p
{
rtl_uString_newFromStr_WithLength( &strTempPath, aBuf, nNewLen );