diff options
author | Nicolas Pena <npm@chromium.org> | 2017-11-09 22:04:17 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-09 22:04:17 +0000 |
commit | c7056ca0027eb34ed9abf31338c4cd2ffff40528 (patch) | |
tree | 64cefa863bfab09587fd8b1efe3dba2a3b44870e | |
parent | 309fa59a2992706924913a63e7c847bc431159bc (diff) | |
download | pdfium-c7056ca0027eb34ed9abf31338c4cd2ffff40528.tar.xz |
Remove a couple of unused methods in CXFA_FFWidget
This CL removes two unused methods in CXFA_FFWidget and also the code
that becomes unused after removing those.
Change-Id: Ifa58a7cabc1750bb13942f86385414e8f5e0cce3
Reviewed-on: https://pdfium-review.googlesource.com/18310
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
-rw-r--r-- | BUILD.gn | 4 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.cpp | 19 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.h | 2 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_textlayout.cpp | 8 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_textlayout.h | 1 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_assistdata.cpp | 15 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_assistdata.h | 22 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_tooltipdata.cpp | 15 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_tooltipdata.h | 22 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.cpp | 5 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.h | 2 |
11 files changed, 0 insertions, 115 deletions
@@ -1788,8 +1788,6 @@ if (pdf_enable_xfa) { "xfa/fxfa/parser/cxfa_arcdata.h", "xfa/fxfa/parser/cxfa_arraynodelist.cpp", "xfa/fxfa/parser/cxfa_arraynodelist.h", - "xfa/fxfa/parser/cxfa_assistdata.cpp", - "xfa/fxfa/parser/cxfa_assistdata.h", "xfa/fxfa/parser/cxfa_attachnodelist.cpp", "xfa/fxfa/parser/cxfa_attachnodelist.h", "xfa/fxfa/parser/cxfa_binddata.cpp", @@ -1877,8 +1875,6 @@ if (pdf_enable_xfa) { "xfa/fxfa/parser/cxfa_thisproxy.h", "xfa/fxfa/parser/cxfa_timezoneprovider.cpp", "xfa/fxfa/parser/cxfa_timezoneprovider.h", - "xfa/fxfa/parser/cxfa_tooltipdata.cpp", - "xfa/fxfa/parser/cxfa_tooltipdata.h", "xfa/fxfa/parser/cxfa_traversestrategy_contentareacontainerlayoutitem.h", "xfa/fxfa/parser/cxfa_traversestrategy_contentlayoutitem.h", "xfa/fxfa/parser/cxfa_traversestrategy_layoutitem.h", diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index 708c666c3d..4f5c66ef7b 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp @@ -971,16 +971,6 @@ CXFA_WidgetAcc* CXFA_FFWidget::GetDataAcc() { return m_pDataAcc.Get(); } -bool CXFA_FFWidget::GetToolTip(WideString& wsToolTip) { - CXFA_AssistData assist = m_pDataAcc->GetAssistData(); - if (assist) { - CXFA_ToolTipData toolTipData = assist.GetToolTipData(); - if (toolTipData) - return toolTipData.GetTip(wsToolTip); - } - return GetCaptionText(wsToolTip); -} - void CXFA_FFWidget::RenderWidget(CXFA_Graphics* pGS, const CFX_Matrix& matrix, uint32_t dwStatus) { @@ -1038,15 +1028,6 @@ void CXFA_FFWidget::AddInvalidateRect() { m_pDocView->AddInvalidateRect(m_pPageView, rtWidget); } -bool CXFA_FFWidget::GetCaptionText(WideString& wsCap) { - CXFA_TextLayout* pCapTextlayout = m_pDataAcc->GetCaptionTextLayout(); - if (!pCapTextlayout) { - return false; - } - pCapTextlayout->GetText(wsCap); - return true; -} - bool CXFA_FFWidget::OnMouseEnter() { return false; } diff --git a/xfa/fxfa/cxfa_ffwidget.h b/xfa/fxfa/cxfa_ffwidget.h index 900369b823..b750a2db2b 100644 --- a/xfa/fxfa/cxfa_ffwidget.h +++ b/xfa/fxfa/cxfa_ffwidget.h @@ -146,7 +146,6 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem { void ModifyStatus(uint32_t dwAdded, uint32_t dwRemoved); CXFA_WidgetAcc* GetDataAcc(); - bool GetToolTip(WideString& wsToolTip); CXFA_FFDocView* GetDocView(); void SetDocView(CXFA_FFDocView* pDocView); @@ -154,7 +153,6 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem { CXFA_FFApp* GetApp(); IXFA_AppProvider* GetAppProvider(); void AddInvalidateRect(); - bool GetCaptionText(WideString& wsCap); bool IsFocused() const { return !!(m_dwStatus & XFA_WidgetStatus_Focused); } CFX_PointF Rotate2Normal(const CFX_PointF& point); CFX_Matrix GetRotateMatrix(); diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp index 331ea18798..9be3c4f5fa 100644 --- a/xfa/fxfa/cxfa_textlayout.cpp +++ b/xfa/fxfa/cxfa_textlayout.cpp @@ -240,14 +240,6 @@ void CXFA_TextLayout::InitBreak(CFX_CSSComputedStyle* pStyle, m_pBreak->SetCharSpace(pStyle->GetLetterSpacing().GetValue()); } -int32_t CXFA_TextLayout::GetText(WideString& wsText) { - GetTextDataNode(); - wsText.clear(); - if (!m_bRichText) - wsText = m_pTextDataNode->JSNode()->GetContent(false); - return wsText.GetLength(); -} - float CXFA_TextLayout::GetLayoutHeight() { if (!m_pLoader) return 0; diff --git a/xfa/fxfa/cxfa_textlayout.h b/xfa/fxfa/cxfa_textlayout.h index 5856826166..1811d964be 100644 --- a/xfa/fxfa/cxfa_textlayout.h +++ b/xfa/fxfa/cxfa_textlayout.h @@ -33,7 +33,6 @@ class CXFA_TextLayout { explicit CXFA_TextLayout(CXFA_TextProvider* pTextProvider); ~CXFA_TextLayout(); - int32_t GetText(WideString& wsText); float GetLayoutHeight(); float StartLayout(float fWidth = -1); bool DoLayout(int32_t iBlockIndex, diff --git a/xfa/fxfa/parser/cxfa_assistdata.cpp b/xfa/fxfa/parser/cxfa_assistdata.cpp deleted file mode 100644 index 051661f0c7..0000000000 --- a/xfa/fxfa/parser/cxfa_assistdata.cpp +++ /dev/null @@ -1,15 +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 - -#include "xfa/fxfa/parser/cxfa_assistdata.h" - -#include "xfa/fxfa/parser/cxfa_node.h" - -CXFA_AssistData::CXFA_AssistData(CXFA_Node* pNode) : CXFA_Data(pNode) {} - -CXFA_ToolTipData CXFA_AssistData::GetToolTipData() { - return CXFA_ToolTipData(m_pNode->GetChild(0, XFA_Element::ToolTip, false)); -} diff --git a/xfa/fxfa/parser/cxfa_assistdata.h b/xfa/fxfa/parser/cxfa_assistdata.h deleted file mode 100644 index 8b37473483..0000000000 --- a/xfa/fxfa/parser/cxfa_assistdata.h +++ /dev/null @@ -1,22 +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_ASSISTDATA_H_ -#define XFA_FXFA_PARSER_CXFA_ASSISTDATA_H_ - -#include "xfa/fxfa/parser/cxfa_data.h" -#include "xfa/fxfa/parser/cxfa_tooltipdata.h" - -class CXFA_Node; - -class CXFA_AssistData : public CXFA_Data { - public: - explicit CXFA_AssistData(CXFA_Node* pNode); - - CXFA_ToolTipData GetToolTipData(); -}; - -#endif // XFA_FXFA_PARSER_CXFA_ASSISTDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_tooltipdata.cpp b/xfa/fxfa/parser/cxfa_tooltipdata.cpp deleted file mode 100644 index 6e2ceb5abc..0000000000 --- a/xfa/fxfa/parser/cxfa_tooltipdata.cpp +++ /dev/null @@ -1,15 +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 - -#include "xfa/fxfa/parser/cxfa_tooltipdata.h" - -#include "xfa/fxfa/parser/cxfa_node.h" - -CXFA_ToolTipData::CXFA_ToolTipData(CXFA_Node* pNode) : CXFA_Data(pNode) {} - -bool CXFA_ToolTipData::GetTip(WideString& wsTip) { - return m_pNode->JSNode()->TryContent(wsTip, false, true); -} diff --git a/xfa/fxfa/parser/cxfa_tooltipdata.h b/xfa/fxfa/parser/cxfa_tooltipdata.h deleted file mode 100644 index 447bf8154f..0000000000 --- a/xfa/fxfa/parser/cxfa_tooltipdata.h +++ /dev/null @@ -1,22 +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_TOOLTIPDATA_H_ -#define XFA_FXFA_PARSER_CXFA_TOOLTIPDATA_H_ - -#include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" - -class CXFA_Node; - -class CXFA_ToolTipData : public CXFA_Data { - public: - explicit CXFA_ToolTipData(CXFA_Node* pNode); - - bool GetTip(WideString& wsTip); -}; - -#endif // XFA_FXFA_PARSER_CXFA_TOOLTIPDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index d131b310cc..679ef05212 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -359,11 +359,6 @@ CXFA_BindData CXFA_WidgetData::GetBindData() { m_pNode->JSNode()->GetProperty(0, XFA_Element::Bind, false)); } -CXFA_AssistData CXFA_WidgetData::GetAssistData() { - return CXFA_AssistData( - m_pNode->JSNode()->GetProperty(0, XFA_Element::Assist, false)); -} - bool CXFA_WidgetData::GetWidth(float& fWidth) { return TryMeasure(XFA_Attribute::W, fWidth); } diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index 6de00edea1..dd9e1d9a66 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -12,7 +12,6 @@ #include "core/fxcrt/fx_coordinates.h" #include "core/fxcrt/fx_string.h" #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_borderdata.h" #include "xfa/fxfa/parser/cxfa_calculatedata.h" @@ -49,7 +48,6 @@ class CXFA_WidgetData : public CXFA_Data { int32_t GetAccess(); int32_t GetRotate(); - CXFA_AssistData GetAssistData(); CXFA_BorderData GetBorderData(bool bModified); CXFA_CaptionData GetCaptionData(); CXFA_FontData GetFontData(bool bModified); |