Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Unified Diff: xfa/fgas/localization/fgas_locale.cpp

Issue 1979723003: Make CFX_WideString(const CFX_WideString&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Override Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fgas/localization/fgas_locale.h ('k') | xfa/fgas/localization/fgas_localeimp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/localization/fgas_locale.cpp
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index 2336b20ee3fe4f4af4de220932330a114cc1562b..851b687c4b5eb96255d8ae98e6732f850861839b 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -677,7 +677,7 @@ IFX_Locale* CFX_FormatString::GetTextFormat(const CFX_WideString& wsPattern,
while (ccf < iLenf && pStr[ccf] != ')') {
wsLCID += pStr[ccf++];
}
- pLocale = GetPatternLocale(wsLCID.AsStringC());
+ pLocale = GetPatternLocale(wsLCID);
} else if (pStr[ccf] == '{') {
bBrackOpen = TRUE;
break;
@@ -737,7 +737,7 @@ IFX_Locale* CFX_FormatString::GetNumericFormat(const CFX_WideString& wsPattern,
while (ccf < iLenf && pStr[ccf] != ')') {
wsLCID += pStr[ccf++];
}
- pLocale = GetPatternLocale(wsLCID.AsStringC());
+ pLocale = GetPatternLocale(wsLCID);
} else if (pStr[ccf] == '{') {
bBrackOpen = TRUE;
break;
@@ -2192,7 +2192,7 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat(
while (ccf < iLenf && pStr[ccf] != ')') {
wsLCID += pStr[ccf++];
}
- pLocale = GetPatternLocale(wsLCID.AsStringC());
+ pLocale = GetPatternLocale(wsLCID);
} else if (pStr[ccf] == '{') {
bBraceOpen = TRUE;
break;
@@ -2883,7 +2883,7 @@ FX_BOOL CFX_FormatString::FormatStrNum(const CFX_WideStringC& wsInputNum,
int32_t cc = 0, ccf = 0;
const FX_WCHAR* strf = wsNumFormat.c_str();
int lenf = wsNumFormat.GetLength();
- CFX_WideString wsSrcNum = wsInputNum;
+ CFX_WideString wsSrcNum(wsInputNum);
wsSrcNum.TrimLeft('0');
if (wsSrcNum.IsEmpty() || wsSrcNum[0] == '.') {
wsSrcNum.Insert(0, '0');
@@ -4269,7 +4269,7 @@ FX_BOOL CFX_FormatString::FormatDateTime(const CFX_WideString& wsSrcDateTime,
wsOutput);
}
} else {
- CFX_WideStringC wsSrcDate(wsSrcDateTime.c_str(), iT);
+ CFX_WideString wsSrcDate(wsSrcDateTime.c_str(), iT);
CFX_WideStringC wsSrcTime(wsSrcDateTime.c_str() + iT + 1,
wsSrcDateTime.GetLength() - iT - 1);
if (wsSrcDate.IsEmpty() || wsSrcTime.IsEmpty()) {
@@ -4345,10 +4345,7 @@ FX_BOOL CFX_FormatString::FormatNull(const CFX_WideString& wsPattern,
}
return TRUE;
}
-IFX_Locale* CFX_FormatString::GetPatternLocale(
- const CFX_WideStringC& wsLocale) {
- if (m_bUseLCID) {
- }
+IFX_Locale* CFX_FormatString::GetPatternLocale(const CFX_WideString& wsLocale) {
return m_pLocaleMgr->GetLocaleByName(wsLocale);
}
#define FXMATH_DECIMAL_SCALELIMIT 0x1c
« no previous file with comments | « xfa/fgas/localization/fgas_locale.h ('k') | xfa/fgas/localization/fgas_localeimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698