diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-03 16:53:33 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-04 14:47:31 +0000 |
commit | e83a915ebd3afaa897dbbf3e6cb3d2a2cb198595 (patch) | |
tree | b9c632251a7500be1e0acfe6d18ce35003ca2785 /fxjs | |
parent | 45da0f2d84c97a9856492265a1fc706d04bdfccd (diff) | |
download | pdfium-e83a915ebd3afaa897dbbf3e6cb3d2a2cb198595.tar.xz |
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 <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs')
-rw-r--r-- | fxjs/xfa/cjx_object.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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()); } |