diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-25 21:12:06 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-25 21:12:06 +0000 |
commit | bd59d07bba31ad0db0e7b3be96a3462381a2f50a (patch) | |
tree | 934f028bdb9768b30f1eafd6d9d81e04a53b25f7 /base/i18n/rtl.cc | |
parent | 938d6a34f7b50e7c9beb588a2a4b34adb03dcf15 (diff) | |
download | chromium_src-bd59d07bba31ad0db0e7b3be96a3462381a2f50a.zip chromium_src-bd59d07bba31ad0db0e7b3be96a3462381a2f50a.tar.gz chromium_src-bd59d07bba31ad0db0e7b3be96a3462381a2f50a.tar.bz2 |
wstring: remove wstring functions from base/i18n/rtl.h
And update callers.
BUG=23581
Review URL: http://codereview.chromium.org/6883140
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/i18n/rtl.cc')
-rw-r--r-- | base/i18n/rtl.cc | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/base/i18n/rtl.cc b/base/i18n/rtl.cc index 12b376d..2712a44 100644 --- a/base/i18n/rtl.cc +++ b/base/i18n/rtl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -157,12 +157,6 @@ TextDirection GetFirstStrongCharacterDirection(const string16& text) { return LEFT_TO_RIGHT; } -#if defined(WCHAR_T_IS_UTF32) -TextDirection GetFirstStrongCharacterDirection(const std::wstring& text) { - return GetFirstStrongCharacterDirection(WideToUTF16(text)); -} -#endif - #if defined(OS_WIN) bool AdjustStringForLocaleDirection(string16* text) { if (!IsRTL() || text->empty()) @@ -230,18 +224,6 @@ bool AdjustStringForLocaleDirection(string16* text) { #endif // !OS_WIN -#if defined(WCHAR_T_IS_UTF32) -bool AdjustStringForLocaleDirection(std::wstring* text) { - string16 temp = WideToUTF16(*text); - if (AdjustStringForLocaleDirection(&temp)) { - // We should only touch the output on success. - *text = UTF16ToWide(temp); - return true; - } - return false; -} -#endif - bool StringContainsStrongRTLChars(const string16& text) { const UChar* string = text.c_str(); size_t length = text.length(); @@ -263,12 +245,6 @@ bool StringContainsStrongRTLChars(const string16& text) { return false; } -#if defined(WCHAR_T_IS_UTF32) -bool StringContainsStrongRTLChars(const std::wstring& text) { - return StringContainsStrongRTLChars(WideToUTF16(text)); -} -#endif - void WrapStringWithLTRFormatting(string16* text) { if (text->empty()) return; @@ -280,19 +256,6 @@ void WrapStringWithLTRFormatting(string16* text) { text->push_back(kPopDirectionalFormatting); } -#if defined(WCHAR_T_IS_UTF32) -void WrapStringWithLTRFormatting(std::wstring* text) { - if (text->empty()) - return; - - // Inserting an LRE (Left-To-Right Embedding) mark as the first character. - text->insert(0, 1, static_cast<wchar_t>(kLeftToRightEmbeddingMark)); - - // Inserting a PDF (Pop Directional Formatting) mark as the last character. - text->push_back(static_cast<wchar_t>(kPopDirectionalFormatting)); -} -#endif - void WrapStringWithRTLFormatting(string16* text) { if (text->empty()) return; @@ -304,19 +267,6 @@ void WrapStringWithRTLFormatting(string16* text) { text->push_back(kPopDirectionalFormatting); } -#if defined(WCHAR_T_IS_UTF32) -void WrapStringWithRTLFormatting(std::wstring* text) { - if (text->empty()) - return; - - // Inserting an RLE (Right-To-Left Embedding) mark as the first character. - text->insert(0, 1, static_cast<wchar_t>(kRightToLeftEmbeddingMark)); - - // Inserting a PDF (Pop Directional Formatting) mark as the last character. - text->push_back(static_cast<wchar_t>(kPopDirectionalFormatting)); -} -#endif - void WrapPathWithLTRFormatting(const FilePath& path, string16* rtl_safe_path) { // Wrap the overall path with LRE-PDF pair which essentialy marks the |