From bf1cf346ba28a9eab0d2ea490868c51040ee2bc4 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 3 Jan 2018 15:52:41 -0500 Subject: Convert CXFA_StrokeData to CXFA_Stroke This CL changes CXFA_StrokeData to CXFA_Stroke and changes the inheritance form CXFA_DataData to CXFA_Node. The CXFA_EdgeData and CXFA_CornerData classes are removed and the node equivalents are changed to inherit from CXFA_Stroke. Change-Id: I8aa4365a8ed79c29c3a4c34879abe898a188b7de Reviewed-on: https://pdfium-review.googlesource.com/22151 Commit-Queue: dsinclair Reviewed-by: Henrique Nakashima --- fxjs/xfa/cjx_object.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'fxjs/xfa') diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index aa9a16956e..a6ae86ef9f 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp @@ -23,6 +23,7 @@ #include "xfa/fxfa/cxfa_ffwidget.h" #include "xfa/fxfa/parser/cxfa_border.h" #include "xfa/fxfa/parser/cxfa_document.h" +#include "xfa/fxfa/parser/cxfa_edge.h" #include "xfa/fxfa/parser/cxfa_filldata.h" #include "xfa/fxfa/parser/cxfa_layoutprocessor.h" #include "xfa/fxfa/parser/cxfa_measurement.h" @@ -1378,12 +1379,12 @@ void CJX_Object::Script_Som_BorderColor(CFXJSE_Value* pValue, std::tie(r, g, b) = StrToRGB(pValue->ToWideString()); FX_ARGB rgb = ArgbEncode(100, r, g, b); for (int32_t i = 0; i < iSize; ++i) - border->GetEdgeData(i).SetColor(rgb); + border->GetEdge(i)->SetColor(rgb); return; } - FX_ARGB color = border->GetEdgeData(0).GetColor(); + FX_ARGB color = border->GetEdge(0)->GetColor(); int32_t a; int32_t r; int32_t g; @@ -1401,14 +1402,14 @@ void CJX_Object::Script_Som_BorderWidth(CFXJSE_Value* pValue, CXFA_Border* border = widget_data_->GetBorder(true); if (bSetting) { - CXFA_Measurement thickness = border->GetEdgeData(0).GetMSThickness(); + CXFA_Measurement thickness = border->GetEdge(0)->GetMSThickness(); pValue->SetString(thickness.ToString().UTF8Encode().AsStringView()); return; } WideString wsThickness = pValue->ToWideString(); for (int32_t i = 0; i < border->CountEdges(); ++i) { - border->GetEdgeData(i).SetMSThickness( + border->GetEdge(i)->SetMSThickness( CXFA_Measurement(wsThickness.AsStringView())); } } -- cgit v1.2.3