summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-10-21 14:16:29 -0400
committerDan Sinclair <dsinclair@chromium.org>2015-10-21 14:16:29 -0400
commit704da531215c4f81279eb763192de398f7d03748 (patch)
tree57221c3a3a5222e878a54c68a0264fe72c062d92
parent1c77edb7b34e03787605b7965784cea38ef9f1d7 (diff)
downloadpdfium-704da531215c4f81279eb763192de398f7d03748.tar.xz
Remove FFL_Utils as it is unused.
None of the methods in this file are used and it is not included anywhere. Removing. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1417783004 .
-rw-r--r--BUILD.gn2
-rw-r--r--fpdfsdk/include/formfiller/FFL_Utils.h20
-rw-r--r--fpdfsdk/src/formfiller/FFL_Utils.cpp99
-rw-r--r--pdfium.gyp2
4 files changed, 0 insertions, 123 deletions
diff --git a/BUILD.gn b/BUILD.gn
index f355ae4fd8..e563e87ae7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -734,7 +734,6 @@ static_library("formfiller") {
"fpdfsdk/include/formfiller/FFL_PushButton.h",
"fpdfsdk/include/formfiller/FFL_RadioButton.h",
"fpdfsdk/include/formfiller/FFL_TextField.h",
- "fpdfsdk/include/formfiller/FFL_Utils.h",
"fpdfsdk/include/formfiller/FormFiller.h",
"fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp",
"fpdfsdk/src/formfiller/FFL_CheckBox.cpp",
@@ -745,7 +744,6 @@ static_library("formfiller") {
"fpdfsdk/src/formfiller/FFL_PushButton.cpp",
"fpdfsdk/src/formfiller/FFL_RadioButton.cpp",
"fpdfsdk/src/formfiller/FFL_TextField.cpp",
- "fpdfsdk/src/formfiller/FFL_Utils.cpp",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
diff --git a/fpdfsdk/include/formfiller/FFL_Utils.h b/fpdfsdk/include/formfiller/FFL_Utils.h
deleted file mode 100644
index 372a2b6837..0000000000
--- a/fpdfsdk/include/formfiller/FFL_Utils.h
+++ /dev/null
@@ -1,20 +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_UTILS_H_
-#define FPDFSDK_INCLUDE_FORMFILLER_FFL_UTILS_H_
-
-#include "../../../core/include/fpdfapi/fpdf_parser.h"
-
-class CFFL_Utils {
- public:
- static CPDF_Rect MaxRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2);
- static CPDF_Rect InflateRect(const CPDF_Rect& crRect, const FX_FLOAT& fSize);
- static CPDF_Rect DeflateRect(const CPDF_Rect& crRect, const FX_FLOAT& fSize);
- static FX_BOOL TraceObject(CPDF_Object* pObj);
-};
-
-#endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_UTILS_H_
diff --git a/fpdfsdk/src/formfiller/FFL_Utils.cpp b/fpdfsdk/src/formfiller/FFL_Utils.cpp
deleted file mode 100644
index 3c1edc8455..0000000000
--- a/fpdfsdk/src/formfiller/FFL_Utils.cpp
+++ /dev/null
@@ -1,99 +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 <algorithm>
-
-#include "../../include/formfiller/FormFiller.h"
-#include "../../include/formfiller/FFL_Utils.h"
-
-CPDF_Rect CFFL_Utils::MaxRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2) {
- CPDF_Rect rcRet;
-
- rcRet.left = std::min(rect1.left, rect2.left);
- rcRet.bottom = std::min(rect1.bottom, rect2.bottom);
- rcRet.right = std::max(rect1.right, rect2.right);
- rcRet.top = std::max(rect1.top, rect2.top);
-
- return rcRet;
-}
-
-CPDF_Rect CFFL_Utils::InflateRect(const CPDF_Rect& crRect,
- const FX_FLOAT& fSize) {
- CPDF_Rect crNew(crRect.left - fSize, crRect.bottom - fSize,
- crRect.right + fSize, crRect.top + fSize);
- crNew.Normalize();
- return crNew;
-}
-
-CPDF_Rect CFFL_Utils::DeflateRect(const CPDF_Rect& crRect,
- const FX_FLOAT& fSize) {
- CPDF_Rect crNew(crRect.left + fSize, crRect.bottom + fSize,
- crRect.right - fSize, crRect.top - fSize);
- crNew.Normalize();
- return crNew;
-}
-
-FX_BOOL CFFL_Utils::TraceObject(CPDF_Object* pObj) {
- if (!pObj)
- return FALSE;
-
- FX_DWORD dwObjNum = pObj->GetObjNum();
- switch (pObj->GetType()) {
- case PDFOBJ_ARRAY: {
- CPDF_Array* pArray = (CPDF_Array*)pObj;
- for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
- CPDF_Object* pElement = pArray->GetElementValue(i);
- TraceObject(pElement);
- }
- } break;
-
- case PDFOBJ_DICTIONARY: {
- CPDF_Dictionary* pDict = pObj->AsDictionary();
-
- FX_POSITION fPos = pDict->GetStartPos();
- CFX_ByteString csKey;
- do {
- CPDF_Object* pElement = pDict->GetNextElement(fPos, csKey);
- // TRACE(csKey + "\n");
- if (!pElement)
- break;
- TraceObject(pElement);
- } while (TRUE);
- } break;
-
- case PDFOBJ_STREAM: {
- CPDF_Stream* pStream = (CPDF_Stream*)pObj;
- CPDF_Dictionary* pDict = pStream->GetDict();
- TraceObject(pDict);
- } break;
-
- case PDFOBJ_REFERENCE: {
- CPDF_Object* pDirectObj = pObj->GetDirect();
- TraceObject(pDirectObj);
- } break;
-
- case PDFOBJ_BOOLEAN:
- break;
- case PDFOBJ_NUMBER:
- // TRACE("%d\n",(int32_t)pObj);
- break;
- case PDFOBJ_STRING:
- // TRACE(pObj->AsString()->GetString() + "\n");
- break;
- case PDFOBJ_NAME:
- // TRACE(pObj->AsName()->GetString() + "\n");
- break;
- case PDFOBJ_NULL:
- // case PDFOBJ_KEYWORD:
- // case PDFOBJ_EOF:
- default:
- break;
- }
- if (dwObjNum == 0)
- return FALSE;
-
- return TRUE;
-}
diff --git a/pdfium.gyp b/pdfium.gyp
index 27852290e7..2aba2a7156 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -698,7 +698,6 @@
'fpdfsdk/include/formfiller/FFL_PushButton.h',
'fpdfsdk/include/formfiller/FFL_RadioButton.h',
'fpdfsdk/include/formfiller/FFL_TextField.h',
- 'fpdfsdk/include/formfiller/FFL_Utils.h',
'fpdfsdk/include/formfiller/FormFiller.h',
'fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp',
'fpdfsdk/src/formfiller/FFL_CheckBox.cpp',
@@ -709,7 +708,6 @@
'fpdfsdk/src/formfiller/FFL_PushButton.cpp',
'fpdfsdk/src/formfiller/FFL_RadioButton.cpp',
'fpdfsdk/src/formfiller/FFL_TextField.cpp',
- 'fpdfsdk/src/formfiller/FFL_Utils.cpp',
],
},
{