diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-10 19:43:36 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-10 19:43:36 +0000 |
commit | e844cccc8419dae40720aad57c3bcd7ced14a925 (patch) | |
tree | d4d8e172e82c1fbf32ccd5431886cfb186cbfb18 /fxjs | |
parent | 4712af9e8bad3ab7da7e8372806f5360131baf89 (diff) | |
download | pdfium-e844cccc8419dae40720aad57c3bcd7ced14a925.tar.xz |
Rename GetOrCreateBorder to GetOrCreateBorderIfPossible
This CL makes it explicit that GetOrCreateBorderIfPossible can return a
nullptr.
Change-Id: I41d5e7ee506e95d95349e1e06198e40e8afa073c
Reviewed-on: https://pdfium-review.googlesource.com/22672
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs')
-rw-r--r-- | fxjs/xfa/cjx_object.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index f1b863ddc1..8f528c8544 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp @@ -1322,7 +1322,7 @@ void CJX_Object::Script_Som_FontColor(CFXJSE_Value* pValue, void CJX_Object::Script_Som_FillColor(CFXJSE_Value* pValue, bool bSetting, XFA_Attribute eAttribute) { - CXFA_Border* border = ToNode(object_.Get())->GetOrCreateBorder(); + CXFA_Border* border = ToNode(object_.Get())->GetOrCreateBorderIfPossible(); CXFA_Fill* borderfill = border->GetOrCreateFill(); if (!borderfill) return; @@ -1350,7 +1350,7 @@ void CJX_Object::Script_Som_FillColor(CFXJSE_Value* pValue, void CJX_Object::Script_Som_BorderColor(CFXJSE_Value* pValue, bool bSetting, XFA_Attribute eAttribute) { - CXFA_Border* border = ToNode(object_.Get())->GetOrCreateBorder(); + CXFA_Border* border = ToNode(object_.Get())->GetOrCreateBorderIfPossible(); int32_t iSize = border->CountEdges(); if (bSetting) { int32_t r = 0; @@ -1377,7 +1377,7 @@ void CJX_Object::Script_Som_BorderColor(CFXJSE_Value* pValue, void CJX_Object::Script_Som_BorderWidth(CFXJSE_Value* pValue, bool bSetting, XFA_Attribute eAttribute) { - CXFA_Border* border = ToNode(object_.Get())->GetOrCreateBorder(); + CXFA_Border* border = ToNode(object_.Get())->GetOrCreateBorderIfPossible(); if (bSetting) { CXFA_Measurement thickness = border->GetEdge(0)->GetMSThickness(); pValue->SetString(thickness.ToString().UTF8Encode().AsStringView()); |