From 0dbaa90e9f6777c5d2203cd18dc565670d6271c0 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 7 Nov 2017 18:32:30 +0000 Subject: Rename CXFA_Arc to CXFA_ArcData This CL renames the CXFA_Arc class to make it clear it's part of the data hierarchy. Change-Id: Ia4cc276a2829db7ff11e778fe639b5c5656bf23e Reviewed-on: https://pdfium-review.googlesource.com/17970 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- BUILD.gn | 2 +- xfa/fxfa/cxfa_ffarc.cpp | 9 ++++----- xfa/fxfa/parser/cxfa_arc.h | 19 ------------------- xfa/fxfa/parser/cxfa_arcdata.h | 19 +++++++++++++++++++ xfa/fxfa/parser/cxfa_value.cpp | 6 +++--- xfa/fxfa/parser/cxfa_value.h | 4 ++-- 6 files changed, 29 insertions(+), 30 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_arc.h create mode 100644 xfa/fxfa/parser/cxfa_arcdata.h diff --git a/BUILD.gn b/BUILD.gn index 39312a0106..a1ccd6996a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1785,7 +1785,7 @@ if (pdf_enable_xfa) { "xfa/fxfa/parser/cscript_logpseudomodel.h", "xfa/fxfa/parser/cscript_signaturepseudomodel.cpp", "xfa/fxfa/parser/cscript_signaturepseudomodel.h", - "xfa/fxfa/parser/cxfa_arc.h", + "xfa/fxfa/parser/cxfa_arcdata.h", "xfa/fxfa/parser/cxfa_arraynodelist.cpp", "xfa/fxfa/parser/cxfa_arraynodelist.h", "xfa/fxfa/parser/cxfa_assist.cpp", diff --git a/xfa/fxfa/cxfa_ffarc.cpp b/xfa/fxfa/cxfa_ffarc.cpp index 5929cb9001..ddfa1b0b0d 100644 --- a/xfa/fxfa/cxfa_ffarc.cpp +++ b/xfa/fxfa/cxfa_ffarc.cpp @@ -20,13 +20,12 @@ void CXFA_FFArc::RenderWidget(CXFA_Graphics* pGS, if (!value) return; - CXFA_Arc arcObj = value.GetArc(); - CFX_Matrix mtRotate = GetRotateMatrix(); - mtRotate.Concat(matrix); - CFX_RectF rtArc = GetRectWithoutRotate(); if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) XFA_RectWidthoutMargin(rtArc, mgWidget); - DrawBorder(pGS, arcObj, rtArc, mtRotate); + CFX_Matrix mtRotate = GetRotateMatrix(); + mtRotate.Concat(matrix); + + DrawBorder(pGS, value.GetArcData(), rtArc, mtRotate); } diff --git a/xfa/fxfa/parser/cxfa_arc.h b/xfa/fxfa/parser/cxfa_arc.h deleted file mode 100644 index e712d806a7..0000000000 --- a/xfa/fxfa/parser/cxfa_arc.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_FXFA_PARSER_CXFA_ARC_H_ -#define XFA_FXFA_PARSER_CXFA_ARC_H_ - -#include "xfa/fxfa/parser/cxfa_box.h" - -class CXFA_Node; - -class CXFA_Arc : public CXFA_Box { - public: - explicit CXFA_Arc(CXFA_Node* pNode) : CXFA_Box(pNode) {} -}; - -#endif // XFA_FXFA_PARSER_CXFA_ARC_H_ diff --git a/xfa/fxfa/parser/cxfa_arcdata.h b/xfa/fxfa/parser/cxfa_arcdata.h new file mode 100644 index 0000000000..60c32bad4e --- /dev/null +++ b/xfa/fxfa/parser/cxfa_arcdata.h @@ -0,0 +1,19 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef XFA_FXFA_PARSER_CXFA_ARCDATA_H_ +#define XFA_FXFA_PARSER_CXFA_ARCDATA_H_ + +#include "xfa/fxfa/parser/cxfa_box.h" + +class CXFA_Node; + +class CXFA_ArcData : public CXFA_Box { + public: + explicit CXFA_ArcData(CXFA_Node* pNode) : CXFA_Box(pNode) {} +}; + +#endif // XFA_FXFA_PARSER_CXFA_ARCDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_value.cpp b/xfa/fxfa/parser/cxfa_value.cpp index f2bdf64805..9b7040c33b 100644 --- a/xfa/fxfa/parser/cxfa_value.cpp +++ b/xfa/fxfa/parser/cxfa_value.cpp @@ -24,9 +24,9 @@ bool CXFA_Value::GetChildValueContent(WideString& wsContent) { return false; } -CXFA_Arc CXFA_Value::GetArc() { - return CXFA_Arc(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) - : nullptr); +CXFA_ArcData CXFA_Value::GetArcData() { + return CXFA_ArcData(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) + : nullptr); } CXFA_Line CXFA_Value::GetLine() { diff --git a/xfa/fxfa/parser/cxfa_value.h b/xfa/fxfa/parser/cxfa_value.h index 52df169ee4..513f37509b 100644 --- a/xfa/fxfa/parser/cxfa_value.h +++ b/xfa/fxfa/parser/cxfa_value.h @@ -8,7 +8,7 @@ #define XFA_FXFA_PARSER_CXFA_VALUE_H_ #include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_arc.h" +#include "xfa/fxfa/parser/cxfa_arcdata.h" #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_exdata.h" #include "xfa/fxfa/parser/cxfa_image.h" @@ -24,7 +24,7 @@ class CXFA_Value : public CXFA_Data { XFA_Element GetChildValueClassID(); bool GetChildValueContent(WideString& wsContent); - CXFA_Arc GetArc(); + CXFA_ArcData GetArcData(); CXFA_Line GetLine(); CXFA_Rectangle GetRectangle(); CXFA_Text GetText(); -- cgit v1.2.3