[Libreoffice-commits] core.git: basic/source comphelper/source connectivity/source dbaccess/source desktop/unx filter/source framework/source i18nlangtag/source i18npool/source include/rtl io/source linguistic/source linguistic/workben oox/source package/source sal/osl sal/qa scripting/source sc/source sd/source sfx2/source shell/source stoc/source svl/source svtools/source vcl/unx xmloff/source xmlscript/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Thu Mar 30 12:22:05 UTC 2017


 basic/source/basmgr/basmgr.cxx                             |    4 +-
 basic/source/classes/eventatt.cxx                          |    4 +-
 basic/source/runtime/methods.cxx                           |    6 +--
 basic/source/runtime/runtime.cxx                           |    2 -
 basic/source/sbx/sbxform.cxx                               |    8 ++---
 basic/source/sbx/sbxscan.cxx                               |    4 +-
 basic/source/uno/namecont.cxx                              |   20 ++++++-------
 comphelper/source/misc/accessibletexthelper.cxx            |    4 +-
 connectivity/source/commontools/dbtools.cxx                |    2 -
 connectivity/source/drivers/firebird/PreparedStatement.cxx |    2 -
 dbaccess/source/core/inc/composertools.hxx                 |    4 +-
 desktop/unx/source/start.c                                 |    6 +--
 filter/source/config/cache/filtercache.cxx                 |    8 ++---
 filter/source/placeware/exporter.cxx                       |    4 +-
 framework/source/layoutmanager/helpers.cxx                 |   10 +++---
 framework/source/uielement/fontmenucontroller.cxx          |    2 -
 i18nlangtag/source/isolang/isolang.cxx                     |    6 +--
 i18npool/source/breakiterator/breakiteratorImpl.cxx        |    2 -
 include/rtl/ustrbuf.hxx                                    |    6 +--
 io/source/connector/connector.cxx                          |    2 -
 linguistic/source/misc.cxx                                 |    2 -
 linguistic/workben/sspellimp.cxx                           |   20 ++++++-------
 oox/source/docprop/docprophandler.cxx                      |   16 +++++-----
 oox/source/ppt/animvariantcontext.cxx                      |   20 ++++++-------
 package/source/manifest/ManifestImport.cxx                 |    2 -
 package/source/zippackage/ZipPackage.cxx                   |    2 -
 package/source/zippackage/ZipPackageFolder.cxx             |    2 -
 package/source/zippackage/zipfileaccess.cxx                |    8 ++---
 sal/osl/unx/file_path_helper.cxx                           |    8 ++---
 sal/osl/unx/tempfile.cxx                                   |    2 -
 sal/osl/w32/file_url.cxx                                   |    2 -
 sal/qa/osl/file/osl_File.cxx                               |    6 +--
 sal/qa/osl/security/osl_Security.cxx                       |    4 +-
 sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx |    2 -
 sc/source/core/tool/addincol.cxx                           |    2 -
 sc/source/ui/unoobj/addruno.cxx                            |    4 +-
 sc/source/ui/unoobj/docuno.cxx                             |    2 -
 sc/source/ui/view/viewfunc.cxx                             |    2 -
 scripting/source/basprov/basprov.cxx                       |    6 +--
 scripting/source/dlgprov/dlgprov.cxx                       |    4 +-
 sd/source/filter/ppt/pptin.cxx                             |    2 -
 sd/source/filter/ppt/pptinanimations.cxx                   |   14 ++++-----
 sd/source/ui/animations/CustomAnimationList.cxx            |    4 +-
 sd/source/ui/slidesorter/controller/SlsClipboard.cxx       |    2 -
 sd/source/ui/view/frmview.cxx                              |    6 +--
 sd/source/ui/view/sdview2.cxx                              |    4 +-
 sfx2/source/appl/shutdowniconw32.cxx                       |    4 +-
 sfx2/source/bastyp/fltfnc.cxx                              |    2 -
 sfx2/source/dialog/filedlghelper.cxx                       |    4 +-
 shell/source/all/xml_parser.cxx                            |    2 -
 shell/source/win32/SysShExec.cxx                           |    2 -
 stoc/source/javavm/javavm.cxx                              |    4 +-
 svl/source/misc/inettype.cxx                               |    8 ++---
 svl/source/numbers/zforfind.cxx                            |   12 +++----
 svl/source/numbers/zforlist.cxx                            |    4 +-
 svtools/source/svrtf/svparser.cxx                          |    4 +-
 vcl/unx/gtk/a11y/atkaction.cxx                             |    2 -
 vcl/unx/gtk/a11y/atktextattributes.cxx                     |   10 +++---
 xmloff/source/draw/animationimport.cxx                     |   12 +++----
 xmloff/source/draw/ximpbody.cxx                            |    2 -
 xmloff/source/meta/xmlversion.cxx                          |    2 -
 xmloff/source/style/xmlbahdl.cxx                           |    2 -
 xmloff/source/text/XMLTextColumnsContext.cxx               |    2 -
 xmlscript/source/xml_helper/xml_impctx.cxx                 |    6 +--
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx            |    2 -
 65 files changed, 170 insertions(+), 170 deletions(-)

New commits:
commit da56de9ac4824eb365af20b351719395e725be39
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Thu Mar 30 09:36:06 2017 +0200

    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/35893
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index c6225a615523..8e9e47025ca4 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -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)
         {
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index bb7b77c2ddf2..eea4b67060eb 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -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 );
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 3371d6eecd3f..304e6c76b482 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -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;
         }
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 19e380b7cba6..a2cab4a629a5 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -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, ".");
diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx
index f42b804d436f..748a083f7d82 100644
--- a/basic/source/sbx/sbxform.cxx
+++ b/basic/source/sbx/sbxform.cxx
@@ -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 );
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index b311c0336718..bee6af2a88b9 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -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;
                 }
             }
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 15d27b713cb2..a2bb84a8bcd2 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -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 );
diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx
index 49d6d9326442..13ab75e0f83b 100644
--- a/comphelper/source/misc/accessibletexthelper.cxx
+++ b/comphelper/source/misc/accessibletexthelper.cxx
@@ -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;
         }
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 341870bda331..a63e1cd6ffe7 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -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);
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index 8b01f51dc23f..91b434047db2 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -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)
     {
diff --git a/dbaccess/source/core/inc/composertools.hxx b/dbaccess/source/core/inc/composertools.hxx
index 70fb50fcb934..986f23948a66 100644
--- a/dbaccess/source/core/inc/composertools.hxx
+++ b/dbaccess/source/core/inc/composertools.hxx
@@ -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( " )" );
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index d191b48847e6..8503b9a13abf 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -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( "\\\\" ) );
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index 1b1f53232ccf..7a6b8ca41a91 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -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    )
diff --git a/filter/source/placeware/exporter.cxx b/filter/source/placeware/exporter.cxx
index 7b9bef9b8318..d655890172b5 100644
--- a/filter/source/placeware/exporter.cxx
+++ b/filter/source/placeware/exporter.cxx
@@ -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 );
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index a108baaa287f..1c9ae72bb649 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -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 );
     }
 }
 
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index ae090316b330..056ea97277ea 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -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
diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx
index 837fee440ef3..303b399e130b 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -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;
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 879b925374e1..25e3f367ac98 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -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();
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 1a39bd3fe19f..680572666ed8 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -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);
     }
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index 228977e3634d..8c6f2fe54776 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -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());
             }
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 392b2deec774..86dfb831ab2d 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -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;
diff --git a/linguistic/workben/sspellimp.cxx b/linguistic/workben/sspellimp.cxx
index a46b7aa7f552..c0127d57e426 100644
--- a/linguistic/workben/sspellimp.cxx
+++ b/linguistic/workben/sspellimp.cxx
@@ -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 >() );
diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx
index 6ff528df1e95..43fd8bc12de6 100644
--- a/oox/source/docprop/docprophandler.cxx
+++ b/oox/source/docprop/docprophandler.cxx
@@ -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;
                         }
                     }
diff --git a/oox/source/ppt/animvariantcontext.cxx b/oox/source/ppt/animvariantcontext.cxx
index 7cd57abd9819..f80fca009037 100644
--- a/oox/source/ppt/animvariantcontext.cxx
+++ b/oox/source/ppt/animvariantcontext.cxx
@@ -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
                         {
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
index ebf93bff36f0..ec34c750858f 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -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 );
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 97a216297382..4be31db59be5 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -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;
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index e7f0cca9813c..ca09ef5a6288 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -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;
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index f7c40f29a012..983bfa6579fc 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -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++;
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index 587d97ad6453..df90ca952be2 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -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) ||
diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx
index 4980448089fb..f02cd3dcb6a5 100644
--- a/sal/osl/unx/tempfile.cxx
+++ b/sal/osl/unx/tempfile.cxx
@@ -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,
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx
index ce61eb1cb085..c1b84cbf5a02 100644
--- a/sal/osl/w32/file_url.cxx
+++ b/sal/osl/w32/file_url.cxx
@@ -694,7 +694,7 @@ oslFileError osl_getSystemPathFromFileURL_( rtl_uString *strURL, rtl_uString **p
                     {
                         rtl_uString_newFromStr_WithLength( &strTempPath, aBuf, nNewLen );
                     }
-                    else if ( pDecodedURL[nSkip] == (sal_Unicode)'\\' && pDecodedURL[nSkip+1] == (sal_Unicode)'\\' )
+                    else if ( pDecodedURL[nSkip] == '\\' && pDecodedURL[nSkip+1] == '\\' )
                     {
                         /* it should be an UNC path, use the according prefix */
                         rtl_uString *strSuffix = nullptr;
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 8faad6e8c4d6..77ddcdede871 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -137,14 +137,14 @@ inline bool compareFileName( const ::rtl::OUString & ustr1, const ::rtl::OUStrin
 //on Windows, the separator is '\', so here change to '/', then compare
 #if defined(_WIN32)
     ::rtl::OUString ustr1new,ustr2new;
-    sal_Unicode reverseSlash = (sal_Unicode)'\\';
+    sal_Unicode reverseSlash = '\\';
 
     if (ustr1.lastIndexOf(reverseSlash) != -1)
-        ustr1new = ustr1.replace(reverseSlash,(sal_Unicode)'/');
+        ustr1new = ustr1.replace(reverseSlash,'/');
     else
         ustr1new = ustr1;
     if (ustr2.lastIndexOf(reverseSlash) != -1)
-        ustr2new = ustr2.replace(reverseSlash,(sal_Unicode)'/');
+        ustr2new = ustr2.replace(reverseSlash,'/');
     else
         ustr2new = ustr2;
     bOk = ustr1new.equalsIgnoreAsciiCase( ustr2new )  ;
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index 8cd5f1257f62..d4f575122963 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -98,12 +98,12 @@ namespace osl_Security
         }
 
         CPPUNIT_TEST_SUITE( logonUser );
-        if  ( !aStringForward.isEmpty() && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 && ( aStringForward.indexOf( ( sal_Unicode ) ' ' ) ==  aStringForward.lastIndexOf( ( sal_Unicode ) ' ' ) ) )
+        if  ( !aStringForward.isEmpty() && aStringForward.indexOf( ' ' ) != -1 && ( aStringForward.indexOf( ' ' ) ==  aStringForward.lastIndexOf( ' ' ) ) )
         /// if user name and passwd are forwarded
         {
             CPPUNIT_TEST( logonUser_user_pwd );
         }
-        if  ( !aStringForward.isEmpty() && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 && ( aStringForward.indexOf( ( sal_Unicode ) ' ' ) !=  aStringForward.lastIndexOf( ( sal_Unicode ) ' ' ) ) )
+        if  ( !aStringForward.isEmpty() && aStringForward.indexOf( ' ' ) != -1 && ( aStringForward.indexOf( ' ' ) !=  aStringForward.lastIndexOf( ' ' ) ) )
         /// if user name and passwd and file server are forwarded
         {
             CPPUNIT_TEST( logonUser_user_pwd_server );
diff --git a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx
index 13310768470c..7cc5c8fbb8cd 100644
--- a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx
+++ b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx
@@ -44,7 +44,7 @@ void test::oustringbuffer::ToString::testToString() {
     rtl::OUString str = sb.toString();
     CPPUNIT_ASSERT_EQUAL( rtl::OUString("test string"), str );
     // returned OUString must be independent from sb
-    sb.append( (sal_Unicode)'a' );
+    sb.append( 'a' );
     CPPUNIT_ASSERT_EQUAL( rtl::OUString("test string"), str );
     sb.setLength(0);
     CPPUNIT_ASSERT_EQUAL( rtl::OUString("test string"), str );
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 6878753deed6..c25bb8a6061b 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -574,7 +574,7 @@ void ScUnoAddInCollection::ReadConfiguration()
 void ScUnoAddInCollection::LoadComponent( const ScUnoAddInFuncData& rFuncData )
 {
     const OUString& aFullName = rFuncData.GetOriginalName();
-    sal_Int32 nPos = aFullName.lastIndexOf( (sal_Unicode) '.' );
+    sal_Int32 nPos = aFullName.lastIndexOf( '.' );
     if ( nPos > 0 )
     {
         OUString aServiceName = aFullName.copy( 0, nPos );
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 46087c12903e..04f760605948 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -187,13 +187,13 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const OUString& aPropert
             OUString aUIString(sRepresentation);
 
             //  cell or range: strip a single "." at the start
-            if ( aUIString[0]== (sal_Unicode) '.' )
+            if ( aUIString[0]== '.' )
                 aUIString = aUIString.copy( 1 );
 
             if ( bIsRange )
             {
                 //  range: also strip a "." after the last colon
-                sal_Int32 nColon = aUIString.lastIndexOf( (sal_Unicode) ':' );
+                sal_Int32 nColon = aUIString.lastIndexOf( ':' );
                 if ( nColon >= 0 && nColon < aUIString.getLength() - 1 &&
                      aUIString[nColon+1] == '.' )
                     aUIString = aUIString.replaceAt( nColon+1, 1, "" );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 4f43c9d77244..36a275c7d926 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1781,7 +1781,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
         while ( aIter != aIEnd )
         {
             OUString aBookmark = aIter->aBookmark;
-            if ( aBookmark.toChar() == (sal_Unicode) '#' )
+            if ( aBookmark.toChar() == '#' )
             {
                 //  try to resolve internal link
 
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 150a923902ab..43d661a12f2a 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2548,7 +2548,7 @@ void ScViewFunc::ChangeNumFmtDecimals( bool bIncrement )
 
         nPrecision = 0;
         // 'E' for exponential is fixed in Numberformatter
-        sal_Int32 nIndexE = aOut.indexOf((sal_Unicode)'E');
+        sal_Int32 nIndexE = aOut.indexOf('E');
         if ( nIndexE >= 0 )
         {
           sExponentialStandardFormat = aOut.copy( nIndexE ).replace( '-', '+' );
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index 4f7fa850df14..a66367c7382f 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -331,13 +331,13 @@ namespace basprov
             nIndex = sProjectName.getLength() + 1;
         }
         else
-            aLibrary = aDescription.getToken( 0, (sal_Unicode)'.', nIndex );
+            aLibrary = aDescription.getToken( 0, '.', nIndex );
         OUString aModule;
         if ( nIndex != -1 )
-            aModule = aDescription.getToken( 0, (sal_Unicode)'.', nIndex );
+            aModule = aDescription.getToken( 0, '.', nIndex );
         OUString aMethod;
         if ( nIndex != -1 )
-            aMethod = aDescription.getToken( 0, (sal_Unicode)'.', nIndex );
+            aMethod = aDescription.getToken( 0, '.', nIndex );
 
         if ( !aLibrary.isEmpty() && !aModule.isEmpty() && !aMethod.isEmpty() && !aLocation.isEmpty() )
         {
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index ccfd78801965..49c640503947 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -308,10 +308,10 @@ namespace dlgprov
 
             sal_Int32 nIndex = 0;
 
-            OUString sLibName = sDescription.getToken( 0, (sal_Unicode)'.', nIndex );
+            OUString sLibName = sDescription.getToken( 0, '.', nIndex );
             OUString sDlgName;
             if ( nIndex != -1 )
-                sDlgName = sDescription.getToken( 0, (sal_Unicode)'.', nIndex );
+                sDlgName = sDescription.getToken( 0, '.', nIndex );
 
             OUString sLocation = sfUri->getParameter( "location" );
 
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 35995897fa88..25ea2c450920 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -431,7 +431,7 @@ bool ImplSdPPTImport::Import()
                                             do
                                             {
                                                 aStringAry[nTokenCount] =
-                                                    OUStringToOString(aString.getToken( 0, (sal_Unicode)',', nPos ), RTL_TEXTENCODING_UTF8);
+                                                    OUStringToOString(aString.getToken( 0, ',', nPos ), RTL_TEXTENCODING_UTF8);
                                             }
                                             while ( ++nTokenCount < SAL_N_ELEMENTS(aStringAry) && nPos >= 0 );
 
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 7e67d544226e..74491b321742 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -758,18 +758,18 @@ bool AnimationImporter::convertAnimationValue( oox::ppt::MS_AttributeNames eAttr
                 aString = aString.copy( 4, aString.getLength() - 5 );
                 Color aColor;
                 sal_Int32 index = 0;
-                aColor.SetRed( (sal_uInt8)aString.getToken( 0, (sal_Unicode)',', index ).toInt32() );
-                aColor.SetGreen( (sal_uInt8)aString.getToken( 0, (sal_Unicode)',', index ).toInt32() );
-                aColor.SetRed( (sal_uInt8)aString.getToken( 0, (sal_Unicode)',', index ).toInt32() );
+                aColor.SetRed( (sal_uInt8)aString.getToken( 0, ',', index ).toInt32() );
+                aColor.SetGreen( (sal_uInt8)aString.getToken( 0, ',', index ).toInt32() );
+                aColor.SetRed( (sal_uInt8)aString.getToken( 0, ',', index ).toInt32() );
                 rValue <<= (sal_Int32)aColor.GetColor();
                 bRet = true;
             }
             else if( aString.startsWith( "hsl(" ) )
             {
                 sal_Int32 index = 0;
-                sal_Int32 nA = aString.getToken( 0, (sal_Unicode)',', index ).toInt32();
-                sal_Int32 nB = aString.getToken( 0, (sal_Unicode)',', index ).toInt32();
-                sal_Int32 nC = aString.getToken( 0, (sal_Unicode)',', index ).toInt32();
+                sal_Int32 nA = aString.getToken( 0, ',', index ).toInt32();
+                sal_Int32 nB = aString.getToken( 0, ',', index ).toInt32();
+                sal_Int32 nC = aString.getToken( 0, ',', index ).toInt32();
                 dump( "hsl(%ld", nA );
                 dump( ",%ld", nB );
                 dump( ",%ld)", nC );
@@ -1097,7 +1097,7 @@ void AnimationImporter::fillNode( Reference< XAnimationNode >& xNode, const Anim
                 sal_Int32 fromIndex = 0;
                 while(true)
                 {
-                    fromIndex = aString.indexOf( (sal_Unicode)';', fromIndex );
+                    fromIndex = aString.indexOf( ';', fromIndex );
                     if( fromIndex == -1 )
                         break;
 
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 2cac897a19a0..21e28d46a8e0 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -147,8 +147,8 @@ OUString getShapeDescription( const Reference< XShape >& xShape, bool bWithText
             {
                 aDescription += ": ";
 
-                aText = aText.replace( (sal_Unicode)'\n', (sal_Unicode)' ' );
-                aText = aText.replace( (sal_Unicode)'\r', (sal_Unicode)' ' );
+                aText = aText.replace( '\n', ' ' );
+                aText = aText.replace( '\r', ' ' );
 
                 aDescription += aText;
             }
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 5014da6d0ec6..ebc201d46505 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -515,7 +515,7 @@ std::shared_ptr<SdTransferable::UserData> Clipboard::CreateTransferableUserData
         if ( ! aDataHelper.GetINetBookmark(SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark))
             break;
         const OUString sURL (aINetBookmark.GetURL());
-        const sal_Int32 nIndex (sURL.indexOf((sal_Unicode)'#'));
+        const sal_Int32 nIndex (sURL.indexOf('#'));
         if (nIndex == -1)
             break;
         OUString sBookmark (sURL.copy(nIndex+1));
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 83455c409233..357623295654 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -472,13 +472,13 @@ static void createHelpLinesFromString( const OUString& rLines, SdrHelpLineList&
 
         switch( *pStr )
         {
-        case (sal_Unicode)'P':
+        case 'P':
             aNewHelpLine.SetKind( SdrHelpLineKind::Point );
             break;
-        case (sal_Unicode)'V':
+        case 'V':
             aNewHelpLine.SetKind( SdrHelpLineKind::Vertical );
             break;
-        case (sal_Unicode)'H':
+        case 'H':
             aNewHelpLine.SetKind( SdrHelpLineKind::Horizontal );
             break;
         default:
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 1c693043badd..0b1cab132db3 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -732,7 +732,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
 
                                 presentation::ClickAction eClickAction = presentation::ClickAction_DOCUMENT;
 
-                                sal_Int32 nIndex = aBookmark.indexOf( (sal_Unicode)'#' );
+                                sal_Int32 nIndex = aBookmark.indexOf( '#' );
                                 if( nIndex != -1 )
                                 {
                                     const OUString aDocName( aBookmark.copy( 0, nIndex ) );
@@ -815,7 +815,7 @@ IMPL_LINK( View, ExecuteNavigatorDrop, void*, p, void )
             aPos = pSdNavigatorDropEvent->mpTargetWindow->PixelToLogic( pSdNavigatorDropEvent->maPosPixel );
 
         const OUString aURL( aINetBookmark.GetURL() );
-        sal_Int32 nIndex = aURL.indexOf( (sal_Unicode)'#' );
+        sal_Int32 nIndex = aURL.indexOf( '#' );
         if( nIndex != -1 )
             aBookmark = aURL.copy( nIndex+1 );
 
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 1a1b794794a7..069d5faf802f 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -786,7 +786,7 @@ bool ShutdownIcon::IsQuickstarterInstalled()
     GetModuleFileNameW( nullptr, aPath, _MAX_PATH-1);
 
     OUString aOfficepath( reinterpret_cast<const sal_Unicode*>(aPath) );
-    int i = aOfficepath.lastIndexOf((sal_Char) '\\');
+    int i = aOfficepath.lastIndexOf('\\');
     if( i != -1 )
         aOfficepath = aOfficepath.copy(0, i);
 
@@ -802,7 +802,7 @@ void ShutdownIcon::EnableAutostartW32( const OUString &aShortcut )
     GetModuleFileNameW( nullptr, aPath, _MAX_PATH-1);
 
     OUString aOfficepath( reinterpret_cast<const sal_Unicode*>(aPath) );
-    int i = aOfficepath.lastIndexOf((sal_Char) '\\');
+    int i = aOfficepath.lastIndexOf('\\');
     if( i != -1 )
         aOfficepath = aOfficepath.copy(0, i);
 
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 96d1fa17caa8..e5b6f069163e 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -712,7 +712,7 @@ std::shared_ptr<const SfxFilter> SfxFilterMatcher::GetFilter4Extension( const OU
                 if (sExt.isEmpty())
                     continue;
 
-                if (sExt[0] != (sal_Unicode)'.')
+                if (sExt[0] != '.')
                     sExt = "." + sExt;
 
                 WildCard aCheck(sWildCard, ';');
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 17df1c910a04..75f6c16ca182 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2274,9 +2274,9 @@ FileDialogHelper::FileDialogHelper(
 {
     // the wildcard here is expected in form "*.extension"
     OUString aWildcard;
-    if ( aExtName.indexOf( (sal_Unicode)'*' ) != 0 )
+    if ( aExtName.indexOf( '*' ) != 0 )
     {
-        if ( !aExtName.isEmpty() && aExtName.indexOf( (sal_Unicode)'.' ) != 0 )
+        if ( !aExtName.isEmpty() && aExtName.indexOf( '.' ) != 0 )
             aWildcard = "*.";
         else
             aWildcard = "*";
diff --git a/shell/source/all/xml_parser.cxx b/shell/source/all/xml_parser.cxx
index 6f466477aaed..4214a2a4d194 100644
--- a/shell/source/all/xml_parser.cxx
+++ b/shell/source/all/xml_parser.cxx
@@ -34,7 +34,7 @@ namespace /* private */
 
     /*  Extracts the local part of tag without
         namespace decoration e.g. meta:creator -> creator */
-    const XML_Char COLON = (XML_Char)':';
+    const XML_Char COLON = ':';
 
     const XML_Char* get_local_name(const XML_Char* rawname)
     {
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 9e5fac4c9ee2..274f000f05bb 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -175,7 +175,7 @@ namespace
 
     const OUString    JUMP_MARK_HTM(".htm#");
     const OUString    JUMP_MARK_HTML(".html#");
-    const sal_Unicode HASH_MARK      = (sal_Unicode)'#';
+    const sal_Unicode HASH_MARK      = '#';
 
     bool has_jump_mark(const OUString& system_path, sal_Int32* jmp_mark_start = nullptr)
     {
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 224768d1f067..7c07453e8b82 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -331,7 +331,7 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
         if(nonProxies_name.is() && !nonProxies_name->getStringValue().isEmpty()) {
             OUString value = nonProxies_name->getStringValue();
             // replace the separator ";" by "|"
-            value = value.replace((sal_Unicode)';', (sal_Unicode)'|');
+            value = value.replace(';', '|');
 
             OUString httpNonProxyHosts = "http.nonProxyHosts=" + value;
             OUString ftpNonProxyHosts = "ftp.nonProxyHosts=" + value;
@@ -1435,7 +1435,7 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset)
                 for( C_IT i= Props.begin(); i != Props.end(); ++i)
                 {
                     OUString prop= *i;
-                    sal_Int32 index= prop.indexOf( (sal_Unicode)'=');
+                    sal_Int32 index= prop.indexOf( '=');
                     OUString propName= prop.copy( 0, index);
                     OUString propValue= prop.copy( index + 1);
 
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index f62b31f06b55..34d2ba238e86 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -638,7 +638,7 @@ INetContentType INetContentTypes::GetContentTypeFromURL(OUString const & rURL)
     if (!aToken.isEmpty())
     {
         if (aToken.equalsIgnoreAsciiCase(INETTYPE_URL_PROT_FILE))
-            if (rURL[ rURL.getLength() - 1 ] == (sal_Unicode)'/') // folder
+            if (rURL[ rURL.getLength() - 1 ] == '/') // folder
                 if (rURL.getLength() > RTL_CONSTASCII_LENGTH("file:///"))
                     if (WildCard("*/{*}/").Matches(rURL)) // special folder
                         eTypeID = CONTENT_TYPE_X_CNT_FSYSSPECIALFOLDER;
@@ -725,15 +725,15 @@ bool INetContentTypes::GetExtensionFromURL(OUString const & rURL,
     while (i >= 0)
     {
         nSlashPos = i;
-        i = rURL.indexOf((sal_Unicode)'/', i + 1);
+        i = rURL.indexOf('/', i + 1);
     }
     if (nSlashPos != 0)
     {
-        sal_Int32 nLastDotPos = i = rURL.indexOf((sal_Unicode)'.', nSlashPos);
+        sal_Int32 nLastDotPos = i = rURL.indexOf('.', nSlashPos);
         while (i >= 0)
         {
             nLastDotPos = i;
-            i = rURL.indexOf((sal_Unicode)'.', i + 1);
+            i = rURL.indexOf('.', i + 1);
         }
         if (nLastDotPos >- 0)
             rExtension = rURL.copy(nLastDotPos + 1);
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 97eba7241116..9c257130373f 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -1090,7 +1090,7 @@ bool ImpSvNumberInputScan::MayBeMonthDate()
         {
             // "-Jan-"
             const OUString& rM = sStrArray[ nNums[ 0 ] + 1 ];
-            if (rM.getLength() >= 3 && rM[0] == (sal_Unicode)'-' && rM[ rM.getLength() - 1] == (sal_Unicode)'-')
+            if (rM.getLength() >= 3 && rM[0] == '-' && rM[ rM.getLength() - 1] == '-')
             {
                 // Check year length assuming at least 3 digits (including
                 // leading zero). Two digit years 1..31 are out of luck here
@@ -1320,7 +1320,7 @@ bool ImpSvNumberInputScan::SkipDatePatternSeparator( sal_uInt16 nParticle, sal_I
             {
                 const sal_Int32 nLen = sStrArray[nNext].getLength();
                 bool bOk = (rPat.indexOf( sStrArray[nNext], nPat) == nPat);
-                if (!bOk && (nPat + nLen > rPat.getLength() && sStrArray[nNext][ nLen - 1 ] == (sal_Unicode)' '))
+                if (!bOk && (nPat + nLen > rPat.getLength() && sStrArray[nNext][ nLen - 1 ] == ' '))
                 {
                     // The same ugly trailing blanks check as in
                     // IsAcceptedDatePattern().
@@ -2130,7 +2130,7 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
                     if ( nTempDayOfWeek < 0 )
                     {
                         // abbreviated
-                        if ( rString[ nPos ] == (sal_Unicode)'.' )
+                        if ( rString[ nPos ] == '.' )
                         {
                             ++nPos;
                         }
@@ -2810,7 +2810,7 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
             {
                 if ( nTempDayOfWeek < 0 )
                 {   // short
-                    if ( rString[ nPos ] == (sal_Unicode)'.' )
+                    if ( rString[ nPos ] == '.' )
                     {
                         ++nPos;
                     }
@@ -2826,7 +2826,7 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
 
 #if NF_RECOGNIZE_ISO8601_TIMEZONES
     if (nPos == 0 && eScannedType == css::util::NumberFormat::DATETIME &&
-        rString.getLength() == 1 && rString[ 0 ] == (sal_Unicode)'Z' && MayBeIso8601())
+        rString.getLength() == 1 && rString[ 0 ] == 'Z' && MayBeIso8601())
     {
         // ISO 8601 timezone UTC yyyy-mm-ddThh:mmZ
         ++nPos;
@@ -3375,7 +3375,7 @@ void ImpSvNumberInputScan::InitText()
 void ImpSvNumberInputScan::ChangeIntl()
 {
     sal_Unicode cDecSep = pFormatter->GetNumDecimalSep()[0];
-    bDecSepInDateSeps = ( cDecSep == (sal_Unicode)'-' ||
+    bDecSepInDateSeps = ( cDecSep == '-' ||
                           cDecSep == pFormatter->GetDateSep()[0] );
     bTextInitialized = false;
     aUpperCurrSymbol.clear();
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 9dc90b41a4f5..086b02fe490d 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -4080,8 +4080,8 @@ OUString NfCurrencyEntry::BuildSymbolString(bool bBank,
     }
     else
     {
-        if ( aSymbol.indexOf( (sal_Unicode)'-' ) >= 0 ||
-             aSymbol.indexOf( (sal_Unicode)']' ) >= 0)
+        if ( aSymbol.indexOf( '-' ) >= 0 ||
+             aSymbol.indexOf( ']' ) >= 0)
         {
             aBuf.append('"').append(aSymbol).append('"');
         }
diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index f7bb5a8551f8..c01f93d1d4b6 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -313,7 +313,7 @@ sal_uInt32 SvParser::GetNextChar()
                                        "there is a converted character, but an error" );
                                     // There are still errors, but nothing we can
                                     // do
-                                    c = (sal_uInt32)'?';
+                                    c = '?';
                                     nChars = 1;
                                 }
                             }
@@ -391,7 +391,7 @@ sal_uInt32 SvParser::GetNextChar()
     }
 
     if ( ! rtl::isUnicodeCodePoint( c ) )
-        c = (sal_uInt32) '?' ;
+        c = '?' ;
 
     if( bErr )
     {
diff --git a/vcl/unx/gtk/a11y/atkaction.cxx b/vcl/unx/gtk/a11y/atkaction.cxx
index 98a85e94d77d..ad8e3a789038 100644
--- a/vcl/unx/gtk/a11y/atkaction.cxx
+++ b/vcl/unx/gtk/a11y/atkaction.cxx
@@ -235,7 +235,7 @@ action_wrapper_get_keybinding (AtkAction *action,
                     appendKeyStrokes( aRet,  xBinding->getAccessibleKeyBinding( n ) );
 
                     if( n < 2 )
-                        aRet.append( (sal_Char) ';' );
+                        aRet.append( ';' );
                 }
 
                 // !! FIXME !! remember keystroke in wrapper object ?
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index bf4ae6f28d32..1ee48d456c17 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -927,7 +927,7 @@ TabStopList2String( const uno::Any& rAny, bool default_tabs )
     {
         sal_Int32 indexOfTab = 0;
         sal_Int32 numberOfTabs = theTabStops.getLength();
-        sal_Unicode lastFillChar = (sal_Unicode) ' ';
+        sal_Unicode lastFillChar = ' ';
 
         for( ; indexOfTab < numberOfTabs; ++indexOfTab )
         {
@@ -965,19 +965,19 @@ TabStopList2String( const uno::Any& rAny, bool default_tabs )
                 lastFillChar = theTabStops[indexOfTab].FillChar;
                 switch (lastFillChar)
                 {
-                    case (sal_Unicode) ' ':
+                    case ' ':
                         lead_char = "blank ";
                         break;
 
-                    case (sal_Unicode) '.':
+                    case '.':
                         lead_char = "dotted ";
                         break;
 
-                    case (sal_Unicode) '-':
+                    case '-':
                         lead_char = "dashed ";
                         break;
 
-                    case (sal_Unicode) '_':
+                    case '_':
                         lead_char = "lined ";
                         break;
 
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index 28aac0cafbb3..fdbddbfafce8 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -471,7 +471,7 @@ Sequence< Any > AnimationsImportHelperImpl::convertValueSequence( XMLTokenEnum e
     // do we have any value at all?
     if( !rValue.isEmpty() )
     {
-        sal_Int32 nElements = count_codes( rValue, (sal_Unicode)';') + 1; // a non empty string has at least one value
+        sal_Int32 nElements = count_codes( rValue, ';') + 1; // a non empty string has at least one value
 
         // prepare the sequence
         aValues.realloc( nElements );
@@ -496,7 +496,7 @@ Any AnimationsImportHelperImpl::convertTiming( const OUString& rValue )
     if( !rValue.isEmpty() )
     {
         // count the values
-        sal_Int32 nElements = count_codes( rValue, (sal_Unicode)';' ) + 1; // a non empty string has at least one value
+        sal_Int32 nElements = count_codes( rValue, ';' ) + 1; // a non empty string has at least one value
 
         if( nElements == 1 )
         {
@@ -520,7 +520,7 @@ Any AnimationsImportHelperImpl::convertTiming( const OUString& rValue )
 
                 OUString aEventTrigger;
 
-                sal_Int32 nPos = rValue.indexOf( (sal_Unicode)'+' );
+                sal_Int32 nPos = rValue.indexOf( '+' );
                 if( nPos == -1 )
                 {
                     aEventTrigger = rValue;
@@ -533,7 +533,7 @@ Any AnimationsImportHelperImpl::convertTiming( const OUString& rValue )
                     aEvent.Offset = convertTiming( rValue.copy( nPos + 1 ) );
                 }
 
-                nPos = aEventTrigger.indexOf( (sal_Unicode)'.' );
+                nPos = aEventTrigger.indexOf( '.' );
                 if( nPos != -1 )
                 {
                     aEvent.Source <<= mrImport.getInterfaceToIdentifierMapper().getReference( aEventTrigger.copy( 0, nPos ) );
@@ -573,7 +573,7 @@ Sequence< double > AnimationsImportHelperImpl::convertKeyTimes( const OUString&
     sal_Int32 nElements = 0;
 
     if( !rValue.isEmpty() )
-        nElements = count_codes( rValue, (sal_Unicode)';' ) + 1; // a non empty string has at least one value
+        nElements = count_codes( rValue, ';' ) + 1; // a non empty string has at least one value
 
     Sequence< double > aKeyTimes( nElements );
 
@@ -593,7 +593,7 @@ Sequence< TimeFilterPair > AnimationsImportHelperImpl::convertTimeFilter( const
     sal_Int32 nElements = 0;
 
     if( !rValue.isEmpty() )
-        nElements = count_codes( rValue, (sal_Unicode)';' ) + 1; // a non empty string has at least one value
+        nElements = count_codes( rValue, ';' ) + 1; // a non empty string has at least one value
 
     Sequence< TimeFilterPair > aTimeFilter( nElements );
 
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
index 4de8a8754888..7ed381517d48 100644
--- a/xmloff/source/draw/ximpbody.cxx
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -189,7 +189,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
         uno::Reference< beans::XPropertySet > xProps( xShapeDrawPage, uno::UNO_QUERY );
         if( xProps.is() )
         {
-            sal_Int32 nIndex = maHREF.lastIndexOf( (sal_Unicode)'#' );
+            sal_Int32 nIndex = maHREF.lastIndexOf( '#' );
             if( nIndex != -1 )
             {
                 OUString aFileName( maHREF.copy( 0, nIndex ) );
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index e9abec403767..903ef8d7289c 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -226,7 +226,7 @@ bool XMLVersionContext::ParseISODateTimeString(
     bool bSuccess = true;
 
     OUString aDateStr, aTimeStr;
-    sal_Int32 nPos = rString.indexOf( (sal_Unicode) 'T' );
+    sal_Int32 nPos = rString.indexOf( 'T' );
     if ( nPos >= 0 )
     {
         aDateStr = rString.copy( 0, nPos );
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index bacc2bc1e9ee..06bf19bb1501 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -328,7 +328,7 @@ bool XMLDoublePercentPropHdl::importXML( const OUString& rStrImpValue, Any& rVal
 
     double fValue = 1.0;
 
-    if( rStrImpValue.indexOf( (sal_Unicode)'%' ) == -1 )
+    if( rStrImpValue.indexOf( '%' ) == -1 )
     {
         fValue = rStrImpValue.toDouble();
     }
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index 74321b4a0aa1..84821260e717 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -134,7 +134,7 @@ XMLTextColumnContext_Impl::XMLTextColumnContext_Impl(
         {
         case XML_TOK_COLUMN_WIDTH:
             {
-                sal_Int32 nPos = rValue.indexOf( (sal_Unicode)'*' );
+                sal_Int32 nPos = rValue.indexOf( '*' );
                 if( nPos != -1 && nPos+1 == rValue.getLength() )
                 {
                     OUString sTmp( rValue.copy( 0, nPos ) );
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 5ac08317b70f..5b3f8ae1156a 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -305,7 +305,7 @@ inline void DocumentHandlerImpl::popPrefix(
 inline void DocumentHandlerImpl::getElementName(
     OUString const & rQName, sal_Int32 * pUid, OUString * pLocalName )
 {
-    sal_Int32 nColonPos = rQName.indexOf( (sal_Unicode)':' );
+    sal_Int32 nColonPos = rQName.indexOf( ':' );
     *pLocalName = (nColonPos >= 0 ? rQName.copy( nColonPos +1 ) : rQName);
     *pUid = getUidByPrefix(
         nColonPos >= 0 ? rQName.copy( 0, nColonPos ) : OUString() );
@@ -495,7 +495,7 @@ void DocumentHandlerImpl::startElement(
                 pPrefixes[ nPos ]      = m_sXMLNS;
                 pLocalNames[ nPos ]    = aDefNamespacePrefix;
             }
-            else if ((sal_Unicode)':' == rQAttributeName[ 5 ]) // set prefix
+            else if (':' == rQAttributeName[ 5 ]) // set prefix
             {
                 OUString aPrefix( rQAttributeName.copy( 6 ) );
                 pushPrefix( aPrefix, xAttribs->getValueByIndex( nPos ) );
@@ -517,7 +517,7 @@ void DocumentHandlerImpl::startElement(
             SAL_WARN_IF(rQAttributeName.startsWith( "xmlns:" ), "xmlscript.xmlhelper", "### unexpected xmlns!" );
 
             // collect attribute's uid and current prefix
-            sal_Int32 nColonPos = rQAttributeName.indexOf( (sal_Unicode) ':' );
+            sal_Int32 nColonPos = rQAttributeName.indexOf( ':' );
             if (nColonPos >= 0)
             {
                 pPrefixes[ nPos ] = rQAttributeName.copy( 0, nColonPos );
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 5ed18a517253..f88f86119ff1 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -1199,7 +1199,7 @@ void ElementDescriptor::readEvents()
                     if ( descr.ScriptType == "StarBasic" )
                     {
                         // separate optional location
-                        sal_Int32 nIndex = descr.ScriptCode.indexOf( (sal_Unicode)':' );
+                        sal_Int32 nIndex = descr.ScriptCode.indexOf( ':' );
                         if (nIndex >= 0)
                         {
                             pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":location", descr.ScriptCode.copy( 0, nIndex ) );


More information about the Libreoffice-commits mailing list