summaryrefslogtreecommitdiff
path: root/fxjs/xfa/cjx_object.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-03 15:52:41 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-03 21:12:00 +0000
commitbf1cf346ba28a9eab0d2ea490868c51040ee2bc4 (patch)
treec1986792d22464cb308fb4d29980fea25c688362 /fxjs/xfa/cjx_object.cpp
parentfa50df5605a14ca4c9ba440506685981f1c8b04b (diff)
downloadpdfium-bf1cf346ba28a9eab0d2ea490868c51040ee2bc4.tar.xz
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 <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fxjs/xfa/cjx_object.cpp')
-rw-r--r--fxjs/xfa/cjx_object.cpp9
1 files changed, 5 insertions, 4 deletions
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()));
}
}