diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-03-30 09:36:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-30 12:21:40 +0000 |
commit | da56de9ac4824eb365af20b351719395e725be39 (patch) | |
tree | f19ad159f5e12b9e62b2ee50f39016819b7a7c5c /linguistic | |
parent | 8d1a56c206e5c2ed6c331049198bb8ebc6176171 (diff) |
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@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/misc.cxx | 2 | ||||
-rw-r--r-- | linguistic/workben/sspellimp.cxx | 20 |
2 files changed, 11 insertions, 11 deletions
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 >() ); |