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

Unified Diff: xfa/fxfa/parser/xfa_localevalue.cpp

Issue 1882213002: Cleanup various IFX_ text interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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/fxfa/app/xfa_textlayout.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_localevalue.cpp
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index 9bca7b71b98ebecc8313454d95996270c49abc2e..57c8054168dd3b50de72f6d4200f03b170ead358 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -6,6 +6,7 @@
#include "xfa/fxfa/parser/xfa_localevalue.h"
+#include "xfa/fgas/localization/fgas_localeimp.h"
#include "xfa/fxfa/fm2js/xfa_fm2jsapi.h"
#include "xfa/fxfa/parser/xfa_docdata.h"
#include "xfa/fxfa/parser/xfa_doclayout.h"
@@ -105,7 +106,10 @@ FX_BOOL CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
if (pLocale) {
m_pLocaleMgr->SetDefLocale(pLocale);
}
- IFX_FormatString* pFormat = IFX_FormatString::Create(m_pLocaleMgr, FALSE);
+ CFX_FormatString* pFormat = nullptr;
+ if (m_pLocaleMgr)
+ pFormat = new CFX_FormatString(m_pLocaleMgr, FALSE);
+
CFX_WideStringArray wsPatterns;
pFormat->SplitFormatString(wsPattern, wsPatterns);
FX_BOOL bRet = FALSE;
@@ -462,7 +466,11 @@ FX_BOOL CXFA_LocaleValue::FormatPatterns(CFX_WideString& wsResult,
XFA_VALUEPICTURE eValueType) const {
wsResult.Empty();
FX_BOOL bRet = FALSE;
- IFX_FormatString* pFormat = IFX_FormatString::Create(m_pLocaleMgr, FALSE);
+
+ CFX_FormatString* pFormat = nullptr;
+ if (m_pLocaleMgr)
+ pFormat = new CFX_FormatString(m_pLocaleMgr, FALSE);
+
CFX_WideStringArray wsPatterns;
pFormat->SplitFormatString(wsFormat, wsPatterns);
int32_t iCount = wsPatterns.GetSize();
@@ -486,7 +494,11 @@ FX_BOOL CXFA_LocaleValue::FormatSinglePattern(
}
wsResult.Empty();
FX_BOOL bRet = FALSE;
- IFX_FormatString* pFormat = IFX_FormatString::Create(m_pLocaleMgr, FALSE);
+
+ CFX_FormatString* pFormat = nullptr;
+ if (m_pLocaleMgr)
+ pFormat = new CFX_FormatString(m_pLocaleMgr, FALSE);
+
FX_LOCALECATEGORY eCategory = pFormat->GetCategory(wsFormat);
eCategory = XFA_ValugeCategory(eCategory, m_dwType);
switch (eCategory) {
@@ -793,7 +805,11 @@ FX_BOOL CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue,
if (pLocale) {
m_pLocaleMgr->SetDefLocale(pLocale);
}
- IFX_FormatString* pFormat = IFX_FormatString::Create(m_pLocaleMgr, FALSE);
+
+ CFX_FormatString* pFormat = nullptr;
+ if (m_pLocaleMgr)
+ pFormat = new CFX_FormatString(m_pLocaleMgr, FALSE);
+
CFX_WideStringArray wsPatterns;
pFormat->SplitFormatString(wsPattern, wsPatterns);
FX_BOOL bRet = FALSE;
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698