summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-12 17:28:08 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-12 17:28:08 -0700
commitcf22eb8ac24d944aac08d6a17c12b8a3a602c6f5 (patch)
tree60da3c149c8587662c020c629c1d50ed7e4a859d /fpdfsdk/src/fpdfview.cpp
parent12df7f730cea21885c177254bb2b4e1b9e1bea59 (diff)
downloadpdfium-cf22eb8ac24d944aac08d6a17c12b8a3a602c6f5.tar.xz
Merge to XFA: Make (and verify) public/ files compile under C.
The following files needed adjustment beyond a mechanical merge: fpdfsdk/src/fpdfview.cpp public/fpdf_formfill.h samples/pdfium_test.cc testing/embedder_test.cpp Original Review URL: https://codereview.chromium.org/1130843003 BUG=pdfium:158 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1137233002
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 7852670999..c5d8f32dca 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -266,7 +266,7 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BY
return pDocument;
}
-DLLEXPORT FX_BOOL STDCALL FPDF_HasXFAField(FPDF_DOCUMENT document, int& docType)
+DLLEXPORT FX_BOOL STDCALL FPDF_HasXFAField(FPDF_DOCUMENT document, int* docType)
{
if (!document)
return FALSE;
@@ -290,9 +290,9 @@ DLLEXPORT FX_BOOL STDCALL FPDF_HasXFAField(FPDF_DOCUMENT document, int& docType)
FX_BOOL bDynamicXFA = pRoot->GetBoolean("NeedsRendering", FALSE);
if (bDynamicXFA)
- docType = DOCTYPE_DYNIMIC_XFA;
+ *docType = DOCTYPE_DYNIMIC_XFA;
else
- docType = DOCTYPE_STATIC_XFA;
+ *docType = DOCTYPE_STATIC_XFA;
return TRUE;
}
@@ -1011,10 +1011,10 @@ FPDF_RESULT FPDF_BStr_Clear(FPDF_BSTR* str)
return 0;
}
-DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, long& buflen)
+DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, long* buflen)
{
if (!buffer)
- buflen = 0;
+ *buflen = 0;
if (!document || index < 0) return NULL;
CPDF_Document* pDoc = ((CPDFXFA_Document*)document)->GetPDFDoc();
@@ -1051,12 +1051,12 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index,
CFX_ByteString utf16Name = wsName.UTF16LE_Encode();
unsigned int len = utf16Name.GetLength();
if (!buffer) {
- buflen = len;
- } else if (buflen >= len) {
+ *buflen = len;
+ } else if (*buflen >= len) {
memcpy(buffer, utf16Name.c_str(), len);
- buflen = len;
+ *buflen = len;
} else {
- buflen = -1;
+ *buflen = -1;
}
return (FPDF_DEST)pDestObj;
}