summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfdoc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfdoc.cpp')
-rw-r--r--fpdfsdk/fpdfdoc.cpp113
1 files changed, 55 insertions, 58 deletions
diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp
index 8f81b3a840..b6088604fd 100644
--- a/fpdfsdk/fpdfdoc.cpp
+++ b/fpdfsdk/fpdfdoc.cpp
@@ -62,7 +62,7 @@ CPDF_LinkList* GetLinkList(CPDF_Page* page) {
} // namespace
-FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV
+DLLEXPORT FPDF_BOOKMARK STDCALL
FPDFBookmark_GetFirstChild(FPDF_DOCUMENT document, FPDF_BOOKMARK pDict) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
@@ -73,7 +73,7 @@ FPDFBookmark_GetFirstChild(FPDF_DOCUMENT document, FPDF_BOOKMARK pDict) {
return tree.GetFirstChild(bookmark).GetDict();
}
-FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV
+DLLEXPORT FPDF_BOOKMARK STDCALL
FPDFBookmark_GetNextSibling(FPDF_DOCUMENT document, FPDF_BOOKMARK pDict) {
if (!pDict)
return nullptr;
@@ -86,8 +86,9 @@ FPDFBookmark_GetNextSibling(FPDF_DOCUMENT document, FPDF_BOOKMARK pDict) {
return tree.GetNextSibling(bookmark).GetDict();
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFBookmark_GetTitle(FPDF_BOOKMARK pDict, void* buffer, unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDFBookmark_GetTitle(FPDF_BOOKMARK pDict,
+ void* buffer,
+ unsigned long buflen) {
if (!pDict)
return 0;
CPDF_Bookmark bookmark(ToDictionary(static_cast<CPDF_Object*>(pDict)));
@@ -95,8 +96,8 @@ FPDFBookmark_GetTitle(FPDF_BOOKMARK pDict, void* buffer, unsigned long buflen) {
return Utf16EncodeMaybeCopyAndReturnLength(title, buffer, buflen);
}
-FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV
-FPDFBookmark_Find(FPDF_DOCUMENT document, FPDF_WIDESTRING title) {
+DLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_Find(FPDF_DOCUMENT document,
+ FPDF_WIDESTRING title) {
if (!title || title[0] == 0)
return nullptr;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -109,8 +110,8 @@ FPDFBookmark_Find(FPDF_DOCUMENT document, FPDF_WIDESTRING title) {
return FindBookmark(tree, CPDF_Bookmark(), encodedTitle, &visited).GetDict();
}
-FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFBookmark_GetDest(FPDF_DOCUMENT document,
- FPDF_BOOKMARK pDict) {
+DLLEXPORT FPDF_DEST STDCALL FPDFBookmark_GetDest(FPDF_DOCUMENT document,
+ FPDF_BOOKMARK pDict) {
if (!pDict)
return nullptr;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -128,15 +129,14 @@ FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFBookmark_GetDest(FPDF_DOCUMENT document,
return action.GetDest(pDoc).GetObject();
}
-FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV
-FPDFBookmark_GetAction(FPDF_BOOKMARK pDict) {
+DLLEXPORT FPDF_ACTION STDCALL FPDFBookmark_GetAction(FPDF_BOOKMARK pDict) {
if (!pDict)
return nullptr;
CPDF_Bookmark bookmark(ToDictionary(static_cast<CPDF_Object*>(pDict)));
return bookmark.GetAction().GetDict();
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetType(FPDF_ACTION pDict) {
+DLLEXPORT unsigned long STDCALL FPDFAction_GetType(FPDF_ACTION pDict) {
if (!pDict)
return PDFACTION_UNSUPPORTED;
@@ -156,8 +156,8 @@ FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetType(FPDF_ACTION pDict) {
}
}
-FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFAction_GetDest(FPDF_DOCUMENT document,
- FPDF_ACTION pDict) {
+DLLEXPORT FPDF_DEST STDCALL FPDFAction_GetDest(FPDF_DOCUMENT document,
+ FPDF_ACTION pDict) {
if (!pDict)
return nullptr;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -167,8 +167,9 @@ FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFAction_GetDest(FPDF_DOCUMENT document,
return action.GetDest(pDoc).GetObject();
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFAction_GetFilePath(FPDF_ACTION pDict, void* buffer, unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDFAction_GetFilePath(FPDF_ACTION pDict,
+ void* buffer,
+ unsigned long buflen) {
unsigned long type = FPDFAction_GetType(pDict);
if (type != PDFACTION_REMOTEGOTO && type != PDFACTION_LAUNCH)
return 0;
@@ -181,11 +182,10 @@ FPDFAction_GetFilePath(FPDF_ACTION pDict, void* buffer, unsigned long buflen) {
return len;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFAction_GetURIPath(FPDF_DOCUMENT document,
- FPDF_ACTION pDict,
- void* buffer,
- unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document,
+ FPDF_ACTION pDict,
+ void* buffer,
+ unsigned long buflen) {
if (!pDict)
return 0;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -199,8 +199,8 @@ FPDFAction_GetURIPath(FPDF_DOCUMENT document,
return len;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FPDF_DEST pDict) {
+DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document,
+ FPDF_DEST pDict) {
if (!pDict)
return 0;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -210,14 +210,13 @@ FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FPDF_DEST pDict) {
return dest.GetPageIndex(pDoc);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFDest_GetLocationInPage(FPDF_DEST pDict,
- FPDF_BOOL* hasXVal,
- FPDF_BOOL* hasYVal,
- FPDF_BOOL* hasZoomVal,
- FS_FLOAT* x,
- FS_FLOAT* y,
- FS_FLOAT* zoom) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFDest_GetLocationInPage(FPDF_DEST pDict,
+ FPDF_BOOL* hasXVal,
+ FPDF_BOOL* hasYVal,
+ FPDF_BOOL* hasZoomVal,
+ FS_FLOAT* x,
+ FS_FLOAT* y,
+ FS_FLOAT* zoom) {
if (!pDict)
return false;
@@ -236,9 +235,9 @@ FPDFDest_GetLocationInPage(FPDF_DEST pDict,
return true;
}
-FPDF_EXPORT FPDF_LINK FPDF_CALLCONV FPDFLink_GetLinkAtPoint(FPDF_PAGE page,
- double x,
- double y) {
+DLLEXPORT FPDF_LINK STDCALL FPDFLink_GetLinkAtPoint(FPDF_PAGE page,
+ double x,
+ double y) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return nullptr;
@@ -254,9 +253,9 @@ FPDF_EXPORT FPDF_LINK FPDF_CALLCONV FPDFLink_GetLinkAtPoint(FPDF_PAGE page,
.GetDict();
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page,
- double x,
- double y) {
+DLLEXPORT int STDCALL FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page,
+ double x,
+ double y) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return -1;
@@ -272,8 +271,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page,
return z_order;
}
-FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFLink_GetDest(FPDF_DOCUMENT document,
- FPDF_LINK pDict) {
+DLLEXPORT FPDF_DEST STDCALL FPDFLink_GetDest(FPDF_DOCUMENT document,
+ FPDF_LINK pDict) {
if (!pDict)
return nullptr;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -290,7 +289,7 @@ FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFLink_GetDest(FPDF_DOCUMENT document,
return action.GetDest(pDoc).GetObject();
}
-FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFLink_GetAction(FPDF_LINK pDict) {
+DLLEXPORT FPDF_ACTION STDCALL FPDFLink_GetAction(FPDF_LINK pDict) {
if (!pDict)
return nullptr;
@@ -298,9 +297,9 @@ FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFLink_GetAction(FPDF_LINK pDict) {
return link.GetAction().GetDict();
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_Enumerate(FPDF_PAGE page,
- int* startPos,
- FPDF_LINK* linkAnnot) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page,
+ int* startPos,
+ FPDF_LINK* linkAnnot) {
if (!startPos || !linkAnnot)
return false;
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
@@ -323,8 +322,8 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_Enumerate(FPDF_PAGE page,
return false;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot,
- FS_RECTF* rect) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot,
+ FS_RECTF* rect) {
if (!linkAnnot || !rect)
return false;
CPDF_Dictionary* pAnnotDict =
@@ -337,7 +336,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot,
return true;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot) {
+DLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot) {
if (!linkAnnot)
return 0;
CPDF_Dictionary* pAnnotDict =
@@ -348,10 +347,9 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot) {
return static_cast<int>(pArray->GetCount() / 8);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot,
- int quadIndex,
- FS_QUADPOINTSF* quadPoints) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot,
+ int quadIndex,
+ FS_QUADPOINTSF* quadPoints) {
if (!linkAnnot || !quadPoints)
return false;
CPDF_Dictionary* pAnnotDict =
@@ -377,10 +375,10 @@ FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot,
return true;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetMetaText(FPDF_DOCUMENT document,
- FPDF_BYTESTRING tag,
- void* buffer,
- unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT document,
+ FPDF_BYTESTRING tag,
+ void* buffer,
+ unsigned long buflen) {
if (!tag)
return 0;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -394,11 +392,10 @@ FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetMetaText(FPDF_DOCUMENT document,
return Utf16EncodeMaybeCopyAndReturnLength(text, buffer, buflen);
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDF_GetPageLabel(FPDF_DOCUMENT document,
- int page_index,
- void* buffer,
- unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDF_GetPageLabel(FPDF_DOCUMENT document,
+ int page_index,
+ void* buffer,
+ unsigned long buflen) {
if (page_index < 0)
return 0;