Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Unified Diff: fpdfsdk/src/fpdfview.cpp

Issue 1137233002: Merge to XFA: Make (and verify) public/ files compile under C. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Test new XFA APIs. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | fpdfsdk/src/fpdfview_c_api_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfview.cpp
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 785267099957dedacd8cddc536373f9085979841..c5d8f32dca938206474d88bd0668887c361e7b61 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;
}
« no previous file with comments | « BUILD.gn ('k') | fpdfsdk/src/fpdfview_c_api_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698