Remove unused CFFL_Notify.
authorLei Zhang <thestig@chromium.org>
Tue, 20 Oct 2015 00:10:15 +0000 (17:10 -0700)
committerLei Zhang <thestig@chromium.org>
Tue, 20 Oct 2015 00:10:15 +0000 (17:10 -0700)
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1411963002 .

BUILD.gn
fpdfsdk/include/formfiller/FFL_Notify.h [deleted file]
fpdfsdk/src/formfiller/FFL_FormFiller.cpp
fpdfsdk/src/formfiller/FFL_Notify.cpp [deleted file]
pdfium.gyp

index ea53cae..f355ae4 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -731,7 +731,6 @@ static_library("formfiller") {
     "fpdfsdk/include/formfiller/FFL_FormFiller.h",
     "fpdfsdk/include/formfiller/FFL_IFormFiller.h",
     "fpdfsdk/include/formfiller/FFL_ListBox.h",
-    "fpdfsdk/include/formfiller/FFL_Notify.h",
     "fpdfsdk/include/formfiller/FFL_PushButton.h",
     "fpdfsdk/include/formfiller/FFL_RadioButton.h",
     "fpdfsdk/include/formfiller/FFL_TextField.h",
@@ -743,7 +742,6 @@ static_library("formfiller") {
     "fpdfsdk/src/formfiller/FFL_FormFiller.cpp",
     "fpdfsdk/src/formfiller/FFL_IFormFiller.cpp",
     "fpdfsdk/src/formfiller/FFL_ListBox.cpp",
-    "fpdfsdk/src/formfiller/FFL_Notify.cpp",
     "fpdfsdk/src/formfiller/FFL_PushButton.cpp",
     "fpdfsdk/src/formfiller/FFL_RadioButton.cpp",
     "fpdfsdk/src/formfiller/FFL_TextField.cpp",
diff --git a/fpdfsdk/include/formfiller/FFL_Notify.h b/fpdfsdk/include/formfiller/FFL_Notify.h
deleted file mode 100644 (file)
index ee9e81a..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_NOTIFY_H_
-#define FPDFSDK_INCLUDE_FORMFILLER_FFL_NOTIFY_H_
-
-#include "../../../core/include/fpdfdoc/fpdf_doc.h"
-#include "../../../core/include/fxcrt/fx_string.h"
-
-class CFFL_FormFiller;
-class CPDF_FormField;
-
-class CFFL_Notify {
- public:
-  CFFL_Notify(CFFL_FormFiller* pFormFiller);
-  virtual ~CFFL_Notify();
-
- public:
-  FX_BOOL OnSetFocus(FX_BOOL& bExit);
-  FX_BOOL OnMouseEnter(FX_BOOL& bExit);
-  FX_BOOL OnMouseDown(FX_BOOL& bExit);
-  FX_BOOL OnMouseUp(FX_BOOL& bExit);
-  FX_BOOL OnMouseExit(FX_BOOL& bExit);
-  FX_BOOL OnKillFocus(FX_BOOL& bExit);
-
-  FX_BOOL OnCalculate();
-  FX_BOOL OnFormat(int iCommitKey);
-  FX_BOOL OnValidate(CPDF_FormField* pFormField,
-                     CFX_WideString& strValue,
-                     CFX_WideString& strChange,
-                     const CFX_WideString& strChangeEx,
-                     FX_BOOL bKeyDown,
-                     FX_BOOL bModifier,
-                     FX_BOOL bShift,
-                     FX_BOOL& bRC);
-  FX_BOOL OnKeyStroke(CPDF_FormField* pFormField,
-                      int nCommitKey,
-                      CFX_WideString& strValue,
-                      CFX_WideString& strChange,
-                      const CFX_WideString& strChangeEx,
-                      FX_BOOL bKeyDown,
-                      FX_BOOL bModifier,
-                      FX_BOOL bShift,
-                      FX_BOOL bWillCommit,
-                      FX_BOOL bFieldFull,
-                      int& nSelStart,
-                      int& nSelEnd,
-                      FX_BOOL& bRC);
-
-  void BeforeNotify();
-  void AfterNotify();
-  FX_BOOL IsNotifying() const { return m_nNotifyFlag > 0; }
-
- private:
-  FX_BOOL DoAAction(CPDF_AAction::AActionType eAAT, FX_BOOL& bExit);
-  FX_BOOL FindAAction(CPDF_AAction::AActionType eAAT, CPDF_Action& action);
-  FX_BOOL FindAAction(CPDF_AAction aaction,
-                      CPDF_AAction::AActionType eAAT,
-                      CPDF_Action& action);
-  FX_BOOL ExecuteActionTree(CPDF_AAction::AActionType eAAT,
-                            CPDF_Action& action,
-                            FX_BOOL& bExit);
-  FX_BOOL ExecuteAction(CPDF_AAction::AActionType eAAT,
-                        CPDF_Action& action,
-                        FX_BOOL& bExit);
-
-  FX_BOOL m_bDoActioning;
-  int32_t m_nNotifyFlag;
-};
-
-#endif  // FPDFSDK_INCLUDE_FORMFILLER_FFL_NOTIFY_H_
index 40d5ede..38a5c49 100644 (file)
@@ -5,7 +5,6 @@
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
 #include "../../include/formfiller/FFL_FormFiller.h"
-#include "../../include/formfiller/FFL_Notify.h"
 #include "../../include/formfiller/FFL_CBA_Fontmap.h"
 
 #define GetRed(rgb) ((uint8_t)(rgb))
diff --git a/fpdfsdk/src/formfiller/FFL_Notify.cpp b/fpdfsdk/src/formfiller/FFL_Notify.cpp
deleted file mode 100644 (file)
index e348f8e..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright 2014 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 "../../include/formfiller/FormFiller.h"
-#include "../../include/formfiller/FFL_FormFiller.h"
-#include "../../include/formfiller/FFL_Notify.h"
-// #include "../../include/formfiller/FFL_ComboBox.h"
-// #include "../../include/formfiller/FFL_Module.h"
-
-/* -------------------------------- CFFL_Notify ------------------------------
- */
-
-//#pragma warning(disable: 4800)
-
-CFFL_Notify::CFFL_Notify(CFFL_FormFiller* pFormFiller)
-    : m_bDoActioning(FALSE), m_nNotifyFlag(0) {
-  ASSERT(pFormFiller != NULL);
-}
-
-CFFL_Notify::~CFFL_Notify() {}
-
-void CFFL_Notify::BeforeNotify() {
-  m_nNotifyFlag++;
-}
-
-void CFFL_Notify::AfterNotify() {
-  m_nNotifyFlag--;
-}
-
-FX_BOOL CFFL_Notify::OnMouseUp(FX_BOOL& bExit) {
-  BeforeNotify();
-  FX_BOOL bRet =
-      FALSE;  // DoAAction(CPDF_AAction::AActionType::ButtonUp, bExit);
-  AfterNotify();
-  return bRet;
-}
-
-FX_BOOL CFFL_Notify::OnMouseDown(FX_BOOL& bExit) {
-  BeforeNotify();
-  FX_BOOL bRet =
-      FALSE;  // DoAAction(CPDF_AAction::AActionType::ButtonDown, bExit);
-  AfterNotify();
-  return bRet;
-}
-
-FX_BOOL CFFL_Notify::OnMouseEnter(FX_BOOL& bExit) {
-  BeforeNotify();
-  FX_BOOL bRet =
-      FALSE;  // DoAAction(CPDF_AAction::AActionType::CursorEnter, bExit);
-  AfterNotify();
-  return bRet;
-}
-
-FX_BOOL CFFL_Notify::OnMouseExit(FX_BOOL& bExit) {
-  BeforeNotify();
-  FX_BOOL bRet =
-      FALSE;  // DoAAction(CPDF_AAction::AActionType::CursorExit, bExit);
-  AfterNotify();
-  return bRet;
-}
-
-FX_BOOL CFFL_Notify::OnSetFocus(FX_BOOL& bExit) {
-  BeforeNotify();
-  FX_BOOL bRet =
-      FALSE;  // DoAAction(CPDF_AAction::AActionType::GetFocus, bExit);
-  AfterNotify();
-  return bRet;
-}
-
-FX_BOOL CFFL_Notify::OnKillFocus(FX_BOOL& bExit) {
-  BeforeNotify();
-  FX_BOOL bRet =
-      FALSE;  // DoAAction(CPDF_AAction::AActionType::LoseFocus, bExit);
-  AfterNotify();
-  return bRet;
-}
-
-FX_BOOL CFFL_Notify::OnCalculate() {
-  return TRUE;
-}
-
-FX_BOOL CFFL_Notify::OnFormat(int iCommitKey) {
-  return TRUE;
-}
-
-FX_BOOL CFFL_Notify::OnKeyStroke(CPDF_FormField* pFormField,
-                                 int nCommitKey,
-                                 CFX_WideString& strValue,
-                                 CFX_WideString& strChange,
-                                 const CFX_WideString& strChangeEx,
-                                 FX_BOOL bKeyDown,
-                                 FX_BOOL bModifier,
-                                 FX_BOOL bShift,
-                                 FX_BOOL bWillCommit,
-                                 FX_BOOL bFieldFull,
-                                 int& nSelStart,
-                                 int& nSelEnd,
-                                 FX_BOOL& bRC) {
-  return TRUE;
-}
-
-FX_BOOL CFFL_Notify::OnValidate(CPDF_FormField* pFormField,
-                                CFX_WideString& strValue,
-                                CFX_WideString& strChange,
-                                const CFX_WideString& strChangeEx,
-                                FX_BOOL bKeyDown,
-                                FX_BOOL bModifier,
-                                FX_BOOL bShift,
-                                FX_BOOL& bRC) {
-  return TRUE;
-}
-
-FX_BOOL CFFL_Notify::DoAAction(CPDF_AAction::AActionType eAAT, FX_BOOL& bExit) {
-  if (m_bDoActioning)
-    return FALSE;
-
-  CPDF_Action action;
-  if (!FindAAction(eAAT, action))
-    return FALSE;
-
-  m_bDoActioning = TRUE;
-  ExecuteActionTree(eAAT, action, bExit);
-  m_bDoActioning = FALSE;
-  return TRUE;
-}
-
-FX_BOOL CFFL_Notify::ExecuteActionTree(CPDF_AAction::AActionType eAAT,
-                                       CPDF_Action& action,
-                                       FX_BOOL& bExit) {
-  if (!ExecuteAction(eAAT, action, bExit))
-    return FALSE;
-  if (bExit)
-    return TRUE;
-
-  for (int32_t i = 0, sz = action.GetSubActionsCount(); i < sz; i++) {
-    CPDF_Action subaction = action.GetSubAction(i);
-    if (!ExecuteActionTree(eAAT, subaction, bExit))
-      return FALSE;
-    if (bExit)
-      break;
-  }
-
-  return TRUE;
-}
-
-FX_BOOL CFFL_Notify::FindAAction(CPDF_AAction::AActionType eAAT,
-                                 CPDF_Action& action) {
-  return FALSE;
-}
-
-FX_BOOL CFFL_Notify::FindAAction(CPDF_AAction aaction,
-                                 CPDF_AAction::AActionType eAAT,
-                                 CPDF_Action& action) {
-  CPDF_Action MyAction;
-
-  if (aaction.ActionExist(eAAT)) {
-    MyAction = aaction.GetAction(eAAT);
-  } else
-    return FALSE;
-
-  if (MyAction.GetType() == CPDF_Action::Unknown)
-    return FALSE;
-
-  action = MyAction;
-
-  return TRUE;
-}
-
-FX_BOOL CFFL_Notify::ExecuteAction(CPDF_AAction::AActionType eAAT,
-                                   CPDF_Action& action,
-                                   FX_BOOL& bExit) {
-  return FALSE;
-}
-//#pragma warning(default: 4800)
index 2c11172..2785229 100644 (file)
         'fpdfsdk/include/formfiller/FFL_FormFiller.h',
         'fpdfsdk/include/formfiller/FFL_IFormFiller.h',
         'fpdfsdk/include/formfiller/FFL_ListBox.h',
-        'fpdfsdk/include/formfiller/FFL_Notify.h',
         'fpdfsdk/include/formfiller/FFL_PushButton.h',
         'fpdfsdk/include/formfiller/FFL_RadioButton.h',
         'fpdfsdk/include/formfiller/FFL_TextField.h',
         'fpdfsdk/src/formfiller/FFL_FormFiller.cpp',
         'fpdfsdk/src/formfiller/FFL_IFormFiller.cpp',
         'fpdfsdk/src/formfiller/FFL_ListBox.cpp',
-        'fpdfsdk/src/formfiller/FFL_Notify.cpp',
         'fpdfsdk/src/formfiller/FFL_PushButton.cpp',
         'fpdfsdk/src/formfiller/FFL_RadioButton.cpp',
         'fpdfsdk/src/formfiller/FFL_TextField.cpp',