summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_helpers.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-03 17:19:53 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-03 17:19:53 +0000
commit525147a1f6d6cd736a407d1e189ac25d2f4726e8 (patch)
treebdc818c52d902a5a4e8ce8a4f0ba29bd11007b05 /fpdfsdk/cpdfsdk_helpers.cpp
parentccd9421589922b8f35ee5330d7fdac7edea081db (diff)
downloadpdfium-525147a1f6d6cd736a407d1e189ac25d2f4726e8.tar.xz
Use strict types in FPDF API, try #3
Rather than messing with actual inheritence, add type-checking wrappers and just blatantly cast to incomplete types. Along the way, this points out places where we would downcast without checking, which I fix. Change-Id: Ieb303eb46ad8522dfe082454f1f10f247ffd52d5 Reviewed-on: https://pdfium-review.googlesource.com/32030 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_helpers.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_helpers.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/fpdfsdk/cpdfsdk_helpers.cpp b/fpdfsdk/cpdfsdk_helpers.cpp
index bffc6eb240..1b90497456 100644
--- a/fpdfsdk/cpdfsdk_helpers.cpp
+++ b/fpdfsdk/cpdfsdk_helpers.cpp
@@ -172,20 +172,12 @@ CPDF_Page* CPDFPageFromFPDFPage(FPDF_PAGE page) {
#endif // PDF_ENABLE_XFA
}
-CPDF_PageObject* CPDFPageObjectFromFPDFPageObject(FPDF_PAGEOBJECT page_object) {
- return static_cast<CPDF_PageObject*>(page_object);
-}
-
ByteString CFXByteStringFromFPDFWideString(FPDF_WIDESTRING wide_string) {
return WideString::FromUTF16LE(wide_string,
WideString::WStringLength(wide_string))
.UTF8Encode();
}
-CFX_DIBitmap* CFXBitmapFromFPDFBitmap(FPDF_BITMAP bitmap) {
- return static_cast<CFX_DIBitmap*>(bitmap);
-}
-
void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) {
CPDF_Annot::Subtype nAnnotSubtype = pPDFAnnot->GetSubtype();
if (nAnnotSubtype == CPDF_Annot::Subtype::THREED) {