diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-14 08:16:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-14 08:17:32 +0200 |
commit | d366c9b20ec86f3fe521812a0c22def3bfd1f05e (patch) | |
tree | 4bd09438c8cd8f0dbcd0881fc923d56a0a721fc5 /editeng | |
parent | d2fa59e4025050c9b668ecff379d668f0db52639 (diff) |
remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/qa/lookuptree/lookuptree_test.cxx | 8 | ||||
-rw-r--r-- | editeng/source/editeng/eehtml.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/bulitem.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/flditem.cxx | 4 | ||||
-rw-r--r-- | editeng/source/items/svxfont.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/xmlcnitm.cxx | 2 | ||||
-rw-r--r-- | editeng/source/lookuptree/LatinLookupTree.cxx | 8 | ||||
-rw-r--r-- | editeng/source/lookuptree/LatinTreeNode.cxx | 4 | ||||
-rw-r--r-- | editeng/source/lookuptree/Trie.cxx | 8 |
9 files changed, 20 insertions, 20 deletions
diff --git a/editeng/qa/lookuptree/lookuptree_test.cxx b/editeng/qa/lookuptree/lookuptree_test.cxx index 4722bb16d278..ab2f814f4b12 100644 --- a/editeng/qa/lookuptree/lookuptree_test.cxx +++ b/editeng/qa/lookuptree/lookuptree_test.cxx @@ -182,9 +182,9 @@ void LookupTreeTest::testLookupTree() a->gotoNode( "ne" ); CPPUNIT_ASSERT_EQUAL( OUString("u"), a->suggestAutoCompletion() ); - a->advance( sal_Unicode('u') ); - a->advance( sal_Unicode('e') ); - a->advance( sal_Unicode('r') ); + a->advance( 'u' ); + a->advance( 'e' ); + a->advance( 'r' ); a->insert(); CPPUNIT_ASSERT ( a->suggestAutoCompletion().isEmpty() ); @@ -201,7 +201,7 @@ void LookupTreeTest::testLookupTree() OUString aQueryString = OStringToOUString( "H\xC3\xA4llo", RTL_TEXTENCODING_UTF8 ); a->insert( aQueryString ); a->returnToRoot(); - a->advance( sal_Unicode('H') ); + a->advance( 'H' ); OUString aAutocompletedString = a->suggestAutoCompletion(); OUString aExpectedString = OStringToOUString( "\xC3\xA4llo", RTL_TEXTENCODING_UTF8 ); diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index 7106ee45c858..b945521e8cff 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -178,7 +178,7 @@ void EditHTMLParser::NextToken( int nToken ) { // Each token represents a single line. maStyleSource.append(aToken); - maStyleSource.append(sal_Unicode('\n')); + maStyleSource.append('\n'); } break; case HTML_TEXTTOKEN: diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 5e1e37f71665..1f23708e6219 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -222,7 +222,7 @@ void SvxBulletItem::SetDefaults_Impl() nStart = 1; nStyle = BS_123; nJustify = BJ_HLEFT | BJ_VCENTER; - cSymbol = sal_Unicode(' '); + cSymbol = ' '; nScale = 75; } diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 1394c072ab14..8eb506a90a49 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -165,7 +165,7 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe if (!aPresentation.isEmpty()) aContent = aPresentation; - sal_Int32 nPos = aContent.lastIndexOf(sal_Unicode(' '), 0); + sal_Int32 nPos = aContent.lastIndexOf(' ', 0); if (nPos > 0) { aFirstName = aContent.copy(0, nPos); @@ -1255,7 +1255,7 @@ OUString SvxDateTimeField::GetFormatted( OUStringBuffer aBuf(aRet); if (!aRet.isEmpty()) - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append( SvxExtTimeField::GetFormatted(rTime, eTimeFormat, rFormatter, eLanguage)); diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 40f0420a6746..cd379cf06202 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -28,7 +28,7 @@ #include <editeng/svxfont.hxx> #include <editeng/escapementitem.hxx> -const sal_Unicode CH_BLANK = sal_Unicode(' '); // ' ' Space character +const sal_Unicode CH_BLANK = ' '; // ' ' Space character SvxFont::SvxFont() diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index d63487b33aae..8cd6de2fa38e 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -132,7 +132,7 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal return sal_False; pData = (AttributeData*)aAny.getValue(); - sal_Int32 pos = aName.indexOf( sal_Unicode(':') ); + sal_Int32 pos = aName.indexOf( ':' ); if( pos != -1 ) { const OUString aPrefix( aName.copy( 0, pos )); diff --git a/editeng/source/lookuptree/LatinLookupTree.cxx b/editeng/source/lookuptree/LatinLookupTree.cxx index 0762044ef0f7..cdc0a0b376a6 100644 --- a/editeng/source/lookuptree/LatinLookupTree.cxx +++ b/editeng/source/lookuptree/LatinLookupTree.cxx @@ -146,8 +146,8 @@ void LatinLookupTree::clear() bool LatinLookupTree::isSeparatedlyHandled(const sal_Unicode cKey) const { return - ( cKey >= sal_Unicode('a') && cKey <= sal_Unicode('z') ) - || ( cKey >= sal_Unicode('A') && cKey <= sal_Unicode('Z') ); + ( cKey >= 'a' && cKey <= 'z' ) + || ( cKey >= 'A' && cKey <= 'Z' ); } Node*& LatinLookupTree::getChildRef(const sal_Unicode cKey, bool bCreatePlaceholder) @@ -155,11 +155,11 @@ Node*& LatinLookupTree::getChildRef(const sal_Unicode cKey, bool bCreatePlacehol int pos = -1; // determine position in array if possible - if ( cKey >= sal_Unicode('a') && cKey <= sal_Unicode('z') ) + if ( cKey >= 'a' && cKey <= 'z' ) { pos = cKey - our_nLowerCaseA; } - else if ( cKey >= sal_Unicode('A') && cKey <= sal_Unicode('Z') ) + else if ( cKey >= 'A' && cKey <= 'Z' ) { pos = cKey - our_nUpperCaseA + 26; } diff --git a/editeng/source/lookuptree/LatinTreeNode.cxx b/editeng/source/lookuptree/LatinTreeNode.cxx index b68e039d1349..a7f10aa5dd5a 100644 --- a/editeng/source/lookuptree/LatinTreeNode.cxx +++ b/editeng/source/lookuptree/LatinTreeNode.cxx @@ -36,13 +36,13 @@ LatinTreeNode::~LatinTreeNode() bool LatinTreeNode::isSeparatedlyHandled(const sal_Unicode cKey) const { - return ( cKey >= sal_Unicode('a') && cKey <= sal_Unicode('z') ); + return ( cKey >= 'a' && cKey <= 'z' ); } Node*& LatinTreeNode::getChildRef(const sal_Unicode cKey, bool bCreatePlaceholder) { // determine position in array if possible - if ( cKey >= sal_Unicode('a') && cKey <= sal_Unicode('z') ) + if ( cKey >= 'a' && cKey <= 'z' ) { return m_pLeaves[cKey - LatinLookupTree::our_nLowerCaseA]; } diff --git a/editeng/source/lookuptree/Trie.cxx b/editeng/source/lookuptree/Trie.cxx index 4fbc19430bdb..9314069793ac 100644 --- a/editeng/source/lookuptree/Trie.cxx +++ b/editeng/source/lookuptree/Trie.cxx @@ -68,8 +68,8 @@ void TrieNode::markWord() void TrieNode::addNewChild(TrieNode* pChild) { - if (pChild->mCharacter >= sal_Unicode('a') && - pChild->mCharacter <= sal_Unicode('z')) + if (pChild->mCharacter >= 'a' && + pChild->mCharacter <= 'z') { mLatinArray[pChild->mCharacter - sal_Unicode('a')] = pChild; } @@ -81,8 +81,8 @@ void TrieNode::addNewChild(TrieNode* pChild) TrieNode* TrieNode::findChild(sal_Unicode aInputCharacter) { - if (aInputCharacter >= sal_Unicode('a') && - aInputCharacter <= sal_Unicode('z')) + if (aInputCharacter >= 'a' && + aInputCharacter <= 'z') { return mLatinArray[aInputCharacter - sal_Unicode('a')]; } |