From e83a915ebd3afaa897dbbf3e6cb3d2a2cb198595 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 3 Jan 2018 16:53:33 -0500 Subject: Fold CXFA_FontData into CXFA_Font This CL removes the CXFA_FontData wrapper and puts the functionality into CXFA_Font. Change-Id: Id7e3a71106816a05843a62645f5955a70f7eaeaa Reviewed-on: https://pdfium-review.googlesource.com/22113 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- fxjs/xfa/cjx_object.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fxjs/xfa/cjx_object.cpp') diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index 81a6c2e64e..a168bfbe15 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp @@ -25,6 +25,7 @@ #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_edge.h" #include "xfa/fxfa/parser/cxfa_fill.h" +#include "xfa/fxfa/parser/cxfa_font.h" #include "xfa/fxfa/parser/cxfa_layoutprocessor.h" #include "xfa/fxfa/parser/cxfa_measurement.h" #include "xfa/fxfa/parser/cxfa_node.h" @@ -1309,9 +1310,8 @@ void CJX_Object::Script_Som_FontColor(CFXJSE_Value* pValue, if (!widget_data_) return; - CXFA_FontData fontData = widget_data_->GetFontData(true); - CXFA_Node* pNode = fontData.GetNode(); - if (!pNode) + CXFA_Font* font = widget_data_->GetFont(true); + if (!font) return; if (bSetting) { @@ -1320,7 +1320,7 @@ void CJX_Object::Script_Som_FontColor(CFXJSE_Value* pValue, int32_t b; std::tie(r, g, b) = StrToRGB(pValue->ToWideString()); FX_ARGB color = ArgbEncode(0xff, r, g, b); - fontData.SetColor(color); + font->SetColor(color); return; } @@ -1328,7 +1328,7 @@ void CJX_Object::Script_Som_FontColor(CFXJSE_Value* pValue, int32_t r; int32_t g; int32_t b; - std::tie(a, r, g, b) = ArgbDecode(fontData.GetColor()); + std::tie(a, r, g, b) = ArgbDecode(font->GetColor()); pValue->SetString(ByteString::Format("%d,%d,%d", r, g, b).AsStringView()); } -- cgit v1.2.3