summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-15 14:51:42 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-15 14:51:42 -0700
commit86adb658843658969041a13bf6cf0cc950ffe8ed (patch)
tree374cd2cb1fa62dd95301d7a777c6e03bfbf8d780 /core
parentbb51c4fb6bc6095984c303c95e5336f83e66bc67 (diff)
downloadpdfium-86adb658843658969041a13bf6cf0cc950ffe8ed.tar.xz
Fix layering violation in CPDF_Document::FromFPDFDocument().
Make this a function in the fpdfsdk/ layer, rather than a method in the core/ layer. Nothing in core should know about public FPDF types. BUG=pdfium:217 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1396283006 .
Diffstat (limited to 'core')
-rw-r--r--core/include/fpdfapi/fpdf_parser.h3
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp4
2 files changed, 0 insertions, 7 deletions
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index b58cf14974..04c7d90f6f 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -7,7 +7,6 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
-#include "../../../public/fpdfview.h"
#include "../fxcrt/fx_system.h"
#include "fpdf_objects.h"
@@ -57,8 +56,6 @@ extern const FX_WORD PDFDocEncoding[256];
class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjects {
public:
- static CPDF_Document* FromFPDFDocument(FPDF_DOCUMENT document);
-
CPDF_Document();
explicit CPDF_Document(CPDF_Parser* pParser);
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
index b93cadd266..2dff766187 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
@@ -7,10 +7,6 @@
#include "../../../include/fpdfapi/fpdf_parser.h"
#include "../../../include/fpdfapi/fpdf_module.h"
-// static
-CPDF_Document* CPDF_Document::FromFPDFDocument(FPDF_DOCUMENT document) {
- return static_cast<CPDF_Document*>(document);
-}
CPDF_Document::CPDF_Document(CPDF_Parser* pParser)
: CPDF_IndirectObjects(pParser) {