From 7dee685df0309401ad37c30c49a56d8523d1f8bb Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 6 Jun 2017 15:47:59 -0400 Subject: Convert CFGAS_FormatString to pointer out parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Nicolás Peña --- xfa/fxfa/parser/cxfa_localevalue.cpp | 50 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'xfa/fxfa') 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(m_pLocaleMgr); std::vector wsPatterns; - pFormat->SplitFormatString(wsPattern, wsPatterns); + pFormat->SplitFormatString(wsPattern, &wsPatterns); bool bRet = false; int32_t iCount = pdfium::CollectionSize(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(m_pLocaleMgr); std::vector wsPatterns; - pFormat->SplitFormatString(wsFormat, wsPatterns); + pFormat->SplitFormatString(wsFormat, &wsPatterns); wsResult.clear(); int32_t iCount = pdfium::CollectionSize(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(m_pLocaleMgr); std::vector wsPatterns; - pFormat->SplitFormatString(wsPattern, wsPatterns); + pFormat->SplitFormatString(wsPattern, &wsPatterns); bool bRet = false; int32_t iCount = pdfium::CollectionSize(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; -- cgit v1.2.3