summaryrefslogtreecommitdiffstats
path: root/app/l10n_util.cc
diff options
context:
space:
mode:
authorxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-16 17:21:13 +0000
committerxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-16 17:21:13 +0000
commit48c70517e3bb914c4157e27fb0d70492f4f76cbe (patch)
treea4f31a59aaf2f2133dacc5440b285b9e6070ae6b /app/l10n_util.cc
parent873043ae174de16897b9c9ff84ecd0e4f07ae516 (diff)
downloadchromium_src-48c70517e3bb914c4157e27fb0d70492f4f76cbe.zip
chromium_src-48c70517e3bb914c4157e27fb0d70492f4f76cbe.tar.gz
chromium_src-48c70517e3bb914c4157e27fb0d70492f4f76cbe.tar.bz2
This CL fixes issue 10860 - RTL: Hebrew file names should have forced LTR
directionality in download shelf. File names in download shelf are forced to be LTR in DownloadItemView and through ElideFileName(). BUG=http://crbug.com/10860 TEST=1. Open chrome with Hebrew UI. 2. Right click a link and chose Save As... (4th item from the top for non-Hebrew speakers) 3. In the save as dialog name the file קובץ.html 4. In the download shelf the filename should display as קובץ.html (not html.קובץ) Review URL: http://codereview.chromium.org/131001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/l10n_util.cc')
-rw-r--r--app/l10n_util.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/l10n_util.cc b/app/l10n_util.cc
index 2dd3cf2..f23de27 100644
--- a/app/l10n_util.cc
+++ b/app/l10n_util.cc
@@ -830,6 +830,12 @@ void WrapPathWithLTRFormatting(const FilePath& path,
rtl_safe_path->push_back(kPopDirectionalFormatting);
}
+std::wstring GetDisplayStringInLTRDirectionality(std::wstring* text) {
+ if (GetTextDirection() == RIGHT_TO_LEFT)
+ WrapStringWithLTRFormatting(text);
+ return *text;
+}
+
int DefaultCanvasTextAlignment() {
if (GetTextDirection() == LEFT_TO_RIGHT) {
return gfx::Canvas::TEXT_ALIGN_LEFT;