diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-12 16:55:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-12 16:55:56 -0700 |
commit | 17f382a50a7c4e5b6f14f76027a15de4ac17bc4c (patch) | |
tree | 337f45c03f9a6f40d30dc0820f29575fd55034b0 /xfa/fxfa/parser/xfa_localevalue.cpp | |
parent | f1accf62715942e3f833fa57d0e6e1b70f51bae6 (diff) | |
download | pdfium-17f382a50a7c4e5b6f14f76027a15de4ac17bc4c.tar.xz |
Cleanup various IFX_ text interfaces.
This CL removes IFX_ArabicChar, IFX_RTFBreak, IFX_TxtBreak, IFX_WordBreak,
IFX_FormatString, and IFX_GSUBTable. References were updated to be the concrete
classes.
The CFX_GSUBTable was also removed as it is unused.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1882213002
Diffstat (limited to 'xfa/fxfa/parser/xfa_localevalue.cpp')
-rw-r--r-- | xfa/fxfa/parser/xfa_localevalue.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp index 9bca7b71b9..57c8054168 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; |