summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-06-06 15:47:59 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-06 19:59:48 +0000
commit7dee685df0309401ad37c30c49a56d8523d1f8bb (patch)
tree4d565976050e1414edaddb8ec13ac5f44b62c255 /xfa/fxfa/parser
parentdb124cff7ebb0b751fe86ca447dbee31363a64be (diff)
downloadpdfium-7dee685df0309401ad37c30c49a56d8523d1f8bb.tar.xz
Convert CFGAS_FormatString to pointer out parameterschromium/3123
This CL changes all CFGAS_FormatString methods to use pointer out paramters instead of reference out parameters. Change-Id: Ic5b57f30e4be09233898b8f4e06f908a96afedc8 Reviewed-on: https://pdfium-review.googlesource.com/6272 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_localevalue.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/xfa/fxfa/parser/cxfa_localevalue.cpp b/xfa/fxfa/parser/cxfa_localevalue.cpp
index 113c8cc46e..983d1ef72f 100644
--- a/xfa/fxfa/parser/cxfa_localevalue.cpp
+++ b/xfa/fxfa/parser/cxfa_localevalue.cpp
@@ -114,7 +114,7 @@ bool CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
auto pFormat = pdfium::MakeUnique<CFGAS_FormatString>(m_pLocaleMgr);
std::vector<CFX_WideString> wsPatterns;
- pFormat->SplitFormatString(wsPattern, wsPatterns);
+ pFormat->SplitFormatString(wsPattern, &wsPatterns);
bool bRet = false;
int32_t iCount = pdfium::CollectionSize<int32_t>(wsPatterns);
@@ -134,16 +134,16 @@ bool CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
break;
case FX_LOCALECATEGORY_Num: {
CFX_WideString fNum;
- bRet = pFormat->ParseNum(wsValue, wsFormat, fNum);
+ bRet = pFormat->ParseNum(wsValue, wsFormat, &fNum);
if (!bRet)
- bRet = pFormat->FormatNum(wsValue, wsFormat, wsOutput);
+ bRet = pFormat->FormatNum(wsValue, wsFormat, &wsOutput);
break;
}
case FX_LOCALECATEGORY_Text:
- bRet = pFormat->ParseText(wsValue, wsFormat, wsOutput);
+ bRet = pFormat->ParseText(wsValue, wsFormat, &wsOutput);
wsOutput.clear();
if (!bRet)
- bRet = pFormat->FormatText(wsValue, wsFormat, wsOutput);
+ bRet = pFormat->FormatText(wsValue, wsFormat, &wsOutput);
break;
case FX_LOCALECATEGORY_Date: {
CFX_DateTime dt;
@@ -152,8 +152,8 @@ bool CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
bRet = pFormat->ParseDateTime(wsValue, wsFormat, FX_DATETIMETYPE_Date,
&dt);
if (!bRet) {
- bRet = pFormat->FormatDateTime(wsValue, wsFormat, wsOutput,
- FX_DATETIMETYPE_Date);
+ bRet = pFormat->FormatDateTime(wsValue, wsFormat,
+ FX_DATETIMETYPE_Date, &wsOutput);
}
}
break;
@@ -163,8 +163,8 @@ bool CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
bRet = pFormat->ParseDateTime(wsValue, wsFormat, FX_DATETIMETYPE_Time,
&dt);
if (!bRet) {
- bRet = pFormat->FormatDateTime(wsValue, wsFormat, wsOutput,
- FX_DATETIMETYPE_Time);
+ bRet = pFormat->FormatDateTime(wsValue, wsFormat,
+ FX_DATETIMETYPE_Time, &wsOutput);
}
break;
}
@@ -173,8 +173,8 @@ bool CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
bRet = pFormat->ParseDateTime(wsValue, wsFormat,
FX_DATETIMETYPE_DateTime, &dt);
if (!bRet) {
- bRet = pFormat->FormatDateTime(wsValue, wsFormat, wsOutput,
- FX_DATETIMETYPE_DateTime);
+ bRet = pFormat->FormatDateTime(wsValue, wsFormat,
+ FX_DATETIMETYPE_DateTime, &wsOutput);
}
break;
}
@@ -327,7 +327,7 @@ bool CXFA_LocaleValue::FormatPatterns(CFX_WideString& wsResult,
XFA_VALUEPICTURE eValueType) const {
auto pFormat = pdfium::MakeUnique<CFGAS_FormatString>(m_pLocaleMgr);
std::vector<CFX_WideString> wsPatterns;
- pFormat->SplitFormatString(wsFormat, wsPatterns);
+ pFormat->SplitFormatString(wsFormat, &wsPatterns);
wsResult.clear();
int32_t iCount = pdfium::CollectionSize<int32_t>(wsPatterns);
for (int32_t i = 0; i < iCount; i++) {
@@ -353,29 +353,29 @@ bool CXFA_LocaleValue::FormatSinglePattern(CFX_WideString& wsResult,
switch (eCategory) {
case FX_LOCALECATEGORY_Null:
if (m_wsValue.IsEmpty())
- bRet = pFormat->FormatNull(wsFormat, wsResult);
+ bRet = pFormat->FormatNull(wsFormat, &wsResult);
break;
case FX_LOCALECATEGORY_Zero:
if (m_wsValue == L"0")
- bRet = pFormat->FormatZero(wsFormat, wsResult);
+ bRet = pFormat->FormatZero(wsFormat, &wsResult);
break;
case FX_LOCALECATEGORY_Num:
- bRet = pFormat->FormatNum(m_wsValue, wsFormat, wsResult);
+ bRet = pFormat->FormatNum(m_wsValue, wsFormat, &wsResult);
break;
case FX_LOCALECATEGORY_Text:
- bRet = pFormat->FormatText(m_wsValue, wsFormat, wsResult);
+ bRet = pFormat->FormatText(m_wsValue, wsFormat, &wsResult);
break;
case FX_LOCALECATEGORY_Date:
- bRet = pFormat->FormatDateTime(m_wsValue, wsFormat, wsResult,
- FX_DATETIMETYPE_Date);
+ bRet = pFormat->FormatDateTime(m_wsValue, wsFormat, FX_DATETIMETYPE_Date,
+ &wsResult);
break;
case FX_LOCALECATEGORY_Time:
- bRet = pFormat->FormatDateTime(m_wsValue, wsFormat, wsResult,
- FX_DATETIMETYPE_Time);
+ bRet = pFormat->FormatDateTime(m_wsValue, wsFormat, FX_DATETIMETYPE_Time,
+ &wsResult);
break;
case FX_LOCALECATEGORY_DateTime:
- bRet = pFormat->FormatDateTime(m_wsValue, wsFormat, wsResult,
- FX_DATETIMETYPE_DateTime);
+ bRet = pFormat->FormatDateTime(m_wsValue, wsFormat,
+ FX_DATETIMETYPE_DateTime, &wsResult);
break;
default:
wsResult = m_wsValue;
@@ -619,7 +619,7 @@ bool CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue,
auto pFormat = pdfium::MakeUnique<CFGAS_FormatString>(m_pLocaleMgr);
std::vector<CFX_WideString> wsPatterns;
- pFormat->SplitFormatString(wsPattern, wsPatterns);
+ pFormat->SplitFormatString(wsPattern, &wsPatterns);
bool bRet = false;
int32_t iCount = pdfium::CollectionSize<int32_t>(wsPatterns);
for (int32_t i = 0; i < iCount && !bRet; i++) {
@@ -637,13 +637,13 @@ bool CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue,
break;
case FX_LOCALECATEGORY_Num: {
CFX_WideString fNum;
- bRet = pFormat->ParseNum(wsValue, wsFormat, fNum);
+ bRet = pFormat->ParseNum(wsValue, wsFormat, &fNum);
if (bRet)
m_wsValue = fNum;
break;
}
case FX_LOCALECATEGORY_Text:
- bRet = pFormat->ParseText(wsValue, wsFormat, m_wsValue);
+ bRet = pFormat->ParseText(wsValue, wsFormat, &m_wsValue);
break;
case FX_LOCALECATEGORY_Date: {
CFX_DateTime dt;