From 50132e522702dd016b83ed12e91d065357fe0b59 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 7 Nov 2017 18:40:35 +0000 Subject: Rename CXFA_Border to CXFA_BorderData This CL renames CXFA_Border to CXFA_BorderData to make it clear it's part of the Data hierarchy. Change-Id: Icfe8dc07d527ba54413f073f5a444fb7b2a71271 Reviewed-on: https://pdfium-review.googlesource.com/17974 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_border.h | 19 ------------------- xfa/fxfa/parser/cxfa_borderdata.h | 19 +++++++++++++++++++ xfa/fxfa/parser/cxfa_widgetdata.cpp | 18 +++++++++--------- xfa/fxfa/parser/cxfa_widgetdata.h | 6 +++--- 4 files changed, 31 insertions(+), 31 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_border.h create mode 100644 xfa/fxfa/parser/cxfa_borderdata.h (limited to 'xfa/fxfa/parser') diff --git a/xfa/fxfa/parser/cxfa_border.h b/xfa/fxfa/parser/cxfa_border.h deleted file mode 100644 index 27b469cd2f..0000000000 --- a/xfa/fxfa/parser/cxfa_border.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_BORDER_H_ -#define XFA_FXFA_PARSER_CXFA_BORDER_H_ - -#include "xfa/fxfa/parser/cxfa_box.h" - -class CXFA_Node; - -class CXFA_Border : public CXFA_Box { - public: - explicit CXFA_Border(CXFA_Node* pNode) : CXFA_Box(pNode) {} -}; - -#endif // XFA_FXFA_PARSER_CXFA_BORDER_H_ diff --git a/xfa/fxfa/parser/cxfa_borderdata.h b/xfa/fxfa/parser/cxfa_borderdata.h new file mode 100644 index 0000000000..20e66562e5 --- /dev/null +++ b/xfa/fxfa/parser/cxfa_borderdata.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_BORDERDATA_H_ +#define XFA_FXFA_PARSER_CXFA_BORDERDATA_H_ + +#include "xfa/fxfa/parser/cxfa_box.h" + +class CXFA_Node; + +class CXFA_BorderData : public CXFA_Box { + public: + explicit CXFA_BorderData(CXFA_Node* pNode) : CXFA_Box(pNode) {} +}; + +#endif // XFA_FXFA_PARSER_CXFA_BORDERDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index 75de937944..ae857cb9c5 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -279,8 +279,8 @@ int32_t CXFA_WidgetData::GetRotate() { return iRotate / 90 * 90; } -CXFA_Border CXFA_WidgetData::GetBorder(bool bModified) { - return CXFA_Border( +CXFA_BorderData CXFA_WidgetData::GetBorderData(bool bModified) { + return CXFA_BorderData( m_pNode->JSNode()->GetProperty(0, XFA_Element::Border, bModified)); } @@ -387,9 +387,9 @@ bool CXFA_WidgetData::GetMaxHeight(float& fMaxHeight) { return TryMeasure(XFA_ATTRIBUTE_MaxH, fMaxHeight); } -CXFA_Border CXFA_WidgetData::GetUIBorder() { +CXFA_BorderData CXFA_WidgetData::GetUIBorderData() { CXFA_Node* pUIChild = GetUIChild(); - return CXFA_Border( + return CXFA_BorderData( pUIChild ? pUIChild->JSNode()->GetProperty(0, XFA_Element::Border, false) : nullptr); } @@ -403,8 +403,8 @@ CFX_RectF CXFA_WidgetData::GetUIMargin() { if (!mgUI) return CFX_RectF(); - CXFA_Border border = GetUIBorder(); - if (border && border.GetPresence() != XFA_ATTRIBUTEENUM_Visible) + CXFA_BorderData borderData = GetUIBorderData(); + if (borderData && borderData.GetPresence() != XFA_ATTRIBUTEENUM_Visible) return CFX_RectF(); float fLeftInset, fTopInset, fRightInset, fBottomInset; @@ -412,13 +412,13 @@ CFX_RectF CXFA_WidgetData::GetUIMargin() { bool bTop = mgUI.GetTopInset(fTopInset); bool bRight = mgUI.GetRightInset(fRightInset); bool bBottom = mgUI.GetBottomInset(fBottomInset); - if (border) { + if (borderData) { bool bVisible = false; float fThickness = 0; - border.Get3DStyle(bVisible, fThickness); + borderData.Get3DStyle(bVisible, fThickness); if (!bLeft || !bTop || !bRight || !bBottom) { std::vector strokes; - border.GetStrokes(&strokes); + borderData.GetStrokes(&strokes); if (!bTop) fTopInset = GetEdgeThickness(strokes, bVisible, 0); if (!bRight) diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index deeb51d9ce..f741a33858 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -14,7 +14,7 @@ #include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_assistdata.h" #include "xfa/fxfa/parser/cxfa_binddata.h" -#include "xfa/fxfa/parser/cxfa_border.h" +#include "xfa/fxfa/parser/cxfa_borderdata.h" #include "xfa/fxfa/parser/cxfa_calculate.h" #include "xfa/fxfa/parser/cxfa_caption.h" #include "xfa/fxfa/parser/cxfa_data.h" @@ -50,7 +50,7 @@ class CXFA_WidgetData : public CXFA_Data { int32_t GetRotate(); CXFA_AssistData GetAssistData(); - CXFA_Border GetBorder(bool bModified); + CXFA_BorderData GetBorderData(bool bModified); CXFA_Caption GetCaption(); CXFA_Font GetFont(bool bModified); CXFA_Margin GetMargin(); @@ -70,7 +70,7 @@ class CXFA_WidgetData : public CXFA_Data { bool GetMaxWidth(float& fMaxWidth); bool GetMaxHeight(float& fMaxHeight); - CXFA_Border GetUIBorder(); + CXFA_BorderData GetUIBorderData(); CFX_RectF GetUIMargin(); int32_t GetButtonHighlight(); bool GetButtonRollover(WideString& wsRollover, bool& bRichText); -- cgit v1.2.3