From ddfc3dcce42ad1dc805f29102f7d056a5809d489 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Thu, 20 Apr 2017 15:29:25 -0400 Subject: Let {Argb,Cmyk}Decode return tuples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic4e766d9417f9a9ece5f9e4269d0f96e1e91639b Reviewed-on: https://pdfium-review.googlesource.com/4392 Commit-Queue: Nicolás Peña Reviewed-by: Tom Sepez --- xfa/fxfa/parser/cxfa_node.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_node.cpp') diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index d6d2ece428..73fc88db8f 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -2054,8 +2054,11 @@ void CXFA_Node::Script_Som_BorderColor(CFXJSE_Value* pValue, } else { CXFA_Edge edge = border.GetEdge(0); FX_ARGB color = edge.GetColor(); - int32_t a, r, g, b; - ArgbDecode(color, a, r, g, b); + int32_t a; + int32_t r; + int32_t g; + int32_t b; + std::tie(a, r, g, b) = ArgbDecode(color); CFX_WideString strColor; strColor.Format(L"%d,%d,%d", r, g, b); pValue->SetString(strColor.UTF8Encode().AsStringC()); @@ -2113,7 +2116,7 @@ void CXFA_Node::Script_Som_FillColor(CFXJSE_Value* pValue, int32_t r; int32_t g; int32_t b; - ArgbDecode(color, a, r, g, b); + std::tie(a, r, g, b) = ArgbDecode(color); CFX_WideString wsColor; wsColor.Format(L"%d,%d,%d", r, g, b); pValue->SetString(wsColor.UTF8Encode().AsStringC()); @@ -2265,7 +2268,7 @@ void CXFA_Node::Script_Som_FontColor(CFXJSE_Value* pValue, int32_t r; int32_t g; int32_t b; - ArgbDecode(color, a, r, g, b); + std::tie(a, r, g, b) = ArgbDecode(color); CFX_WideString wsColor; wsColor.Format(L"%d,%d,%d", r, g, b); pValue->SetString(wsColor.UTF8Encode().AsStringC()); -- cgit v1.2.3