From 2166e986c2aa0e73ae4f2f5af149fa234574094f Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 7 Nov 2017 21:14:50 +0000 Subject: Rename CXFA_Rectangle to CXFA_RectangleData This CL renames CXFA_Rectangle to CXFA_RectangleData to signify it is part of the data hierarchy. Change-Id: Ie563b4304cb595d4b3bb0ffc5303549f1fb37b18 Reviewed-on: https://pdfium-review.googlesource.com/18011 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- xfa/fxfa/cxfa_ffrectangle.cpp | 3 +-- xfa/fxfa/parser/cxfa_rectangle.h | 19 ------------------- xfa/fxfa/parser/cxfa_rectangledata.h | 19 +++++++++++++++++++ xfa/fxfa/parser/cxfa_value.cpp | 6 +++--- xfa/fxfa/parser/cxfa_value.h | 4 ++-- 5 files changed, 25 insertions(+), 26 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_rectangle.h create mode 100644 xfa/fxfa/parser/cxfa_rectangledata.h (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/cxfa_ffrectangle.cpp b/xfa/fxfa/cxfa_ffrectangle.cpp index 7c6035cd07..5305d17950 100644 --- a/xfa/fxfa/cxfa_ffrectangle.cpp +++ b/xfa/fxfa/cxfa_ffrectangle.cpp @@ -21,7 +21,6 @@ void CXFA_FFRectangle::RenderWidget(CXFA_Graphics* pGS, if (!value) return; - CXFA_Rectangle rtObj = value.GetRectangle(); CFX_RectF rect = GetRectWithoutRotate(); if (CXFA_MarginData marginData = m_pDataAcc->GetMarginData()) XFA_RectWidthoutMargin(rect, marginData); @@ -29,5 +28,5 @@ void CXFA_FFRectangle::RenderWidget(CXFA_Graphics* pGS, CFX_Matrix mtRotate = GetRotateMatrix(); mtRotate.Concat(matrix); - DrawBorder(pGS, rtObj, rect, mtRotate); + DrawBorder(pGS, value.GetRectangleData(), rect, mtRotate); } diff --git a/xfa/fxfa/parser/cxfa_rectangle.h b/xfa/fxfa/parser/cxfa_rectangle.h deleted file mode 100644 index 07a4d7de70..0000000000 --- a/xfa/fxfa/parser/cxfa_rectangle.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_RECTANGLE_H_ -#define XFA_FXFA_PARSER_CXFA_RECTANGLE_H_ - -#include "xfa/fxfa/parser/cxfa_boxdata.h" - -class CXFA_Node; - -class CXFA_Rectangle : public CXFA_BoxData { - public: - explicit CXFA_Rectangle(CXFA_Node* pNode) : CXFA_BoxData(pNode) {} -}; - -#endif // XFA_FXFA_PARSER_CXFA_RECTANGLE_H_ diff --git a/xfa/fxfa/parser/cxfa_rectangledata.h b/xfa/fxfa/parser/cxfa_rectangledata.h new file mode 100644 index 0000000000..f0abadc3b6 --- /dev/null +++ b/xfa/fxfa/parser/cxfa_rectangledata.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_RECTANGLEDATA_H_ +#define XFA_FXFA_PARSER_CXFA_RECTANGLEDATA_H_ + +#include "xfa/fxfa/parser/cxfa_boxdata.h" + +class CXFA_Node; + +class CXFA_RectangleData : public CXFA_BoxData { + public: + explicit CXFA_RectangleData(CXFA_Node* pNode) : CXFA_BoxData(pNode) {} +}; + +#endif // XFA_FXFA_PARSER_CXFA_RECTANGLEDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_value.cpp b/xfa/fxfa/parser/cxfa_value.cpp index bad1681031..fcfaf6b9ce 100644 --- a/xfa/fxfa/parser/cxfa_value.cpp +++ b/xfa/fxfa/parser/cxfa_value.cpp @@ -34,9 +34,9 @@ CXFA_LineData CXFA_Value::GetLineData() { : nullptr); } -CXFA_Rectangle CXFA_Value::GetRectangle() { - return CXFA_Rectangle(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) - : nullptr); +CXFA_RectangleData CXFA_Value::GetRectangleData() { + return CXFA_RectangleData( + m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) : nullptr); } CXFA_Text CXFA_Value::GetText() { diff --git a/xfa/fxfa/parser/cxfa_value.h b/xfa/fxfa/parser/cxfa_value.h index d13d90fe8a..c6683238f5 100644 --- a/xfa/fxfa/parser/cxfa_value.h +++ b/xfa/fxfa/parser/cxfa_value.h @@ -13,7 +13,7 @@ #include "xfa/fxfa/parser/cxfa_exdata.h" #include "xfa/fxfa/parser/cxfa_imagedata.h" #include "xfa/fxfa/parser/cxfa_linedata.h" -#include "xfa/fxfa/parser/cxfa_rectangle.h" +#include "xfa/fxfa/parser/cxfa_rectangledata.h" #include "xfa/fxfa/parser/cxfa_text.h" class CXFA_Node; @@ -26,7 +26,7 @@ class CXFA_Value : public CXFA_Data { bool GetChildValueContent(WideString& wsContent); CXFA_ArcData GetArcData(); CXFA_LineData GetLineData(); - CXFA_Rectangle GetRectangle(); + CXFA_RectangleData GetRectangleData(); CXFA_Text GetText(); CXFA_ExData GetExData(); CXFA_ImageData GetImageData(); -- cgit v1.2.3