diff options
author | Felix Kauselmann <licorn@gmail.com> | 2017-08-09 21:44:31 +0200 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-09 20:14:43 +0000 |
commit | 00334675c18a0203f313cceb670c970a77280f49 (patch) | |
tree | 431cc04539913358cedf9f1386b7dda0e3982562 /fpdfsdk/fpdfview.cpp | |
parent | d0f2dcd0802969494e991d8cef00b4bd81aefc8d (diff) | |
download | pdfium-00334675c18a0203f313cceb670c970a77280f49.tar.xz |
Add a build target and a proper export header for shared library builds.
This CL adds support for Chromium's component build feature to pdfium.
The export header stub in fpdfview.h is expanded to match Chromium's
export mechanisms and patterns (fixes pdfium:825).
A component/shared library build can be triggered by adding
is_component_build = true
as a gn argument. Please note that setting this will also affect some
of pdfiums dependencies like v8, which will be build as components
too.
Additionally, this CL provides a "pdf_source_set" template which
dynamically enables the use of "source_set" when building a complete
static library or a shared library to reduce build time.
When testing this it is recommended to only build the pdfium target as
most of pdfiums test rely on non-public functions which aren't exported
by the shared library.
Bug: pdfium:825,pdfium:826
Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752
Reviewed-on: https://pdfium-review.googlesource.com/8970
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r-- | fpdfsdk/fpdfview.cpp | 242 |
1 files changed, 124 insertions, 118 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index 57e4806d39..c9d6bee40e 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -439,11 +439,11 @@ FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy) { } } -DLLEXPORT void STDCALL FPDF_InitLibrary() { +FPDF_EXPORT void FPDF_CALLCONV FPDF_InitLibrary() { FPDF_InitLibraryWithConfig(nullptr); } -DLLEXPORT void STDCALL +FPDF_EXPORT void FPDF_CALLCONV FPDF_InitLibraryWithConfig(const FPDF_LIBRARY_CONFIG* cfg) { if (g_bLibraryInitialized) return; @@ -466,7 +466,7 @@ FPDF_InitLibraryWithConfig(const FPDF_LIBRARY_CONFIG* cfg) { g_bLibraryInitialized = true; } -DLLEXPORT void STDCALL FPDF_DestroyLibrary() { +FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() { if (!g_bLibraryInitialized) return; @@ -517,28 +517,29 @@ void ProcessParseError(CPDF_Parser::Error err) { SetLastError(err_code); } -DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, - FPDF_BOOL enable) { +FPDF_EXPORT void FPDF_CALLCONV FPDF_SetSandBoxPolicy(FPDF_DWORD policy, + FPDF_BOOL enable) { return FSDK_SetSandBoxPolicy(policy, enable); } #if defined(_WIN32) #if defined(PDFIUM_PRINT_TEXT_WITH_GDI) -DLLEXPORT void STDCALL +FPDF_EXPORT void FPDF_CALLCONV FPDF_SetTypefaceAccessibleFunc(PDFiumEnsureTypefaceCharactersAccessible func) { g_pdfium_typeface_accessible_func = func; } -DLLEXPORT void STDCALL FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi) { +FPDF_EXPORT void FPDF_CALLCONV FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi) { g_pdfium_print_text_with_gdi = !!use_gdi; } #endif // PDFIUM_PRINT_TEXT_WITH_GDI -DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintPostscriptLevel(int postscript_level) { +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FPDF_SetPrintPostscriptLevel(int postscript_level) { return postscript_level != 1 && FPDF_SetPrintMode(postscript_level); } -DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintMode(int mode) { +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_SetPrintMode(int mode) { if (mode < FPDF_PRINTMODE_EMF || mode > FPDF_PRINTMODE_POSTSCRIPT3) return FALSE; g_pdfium_print_mode = mode; @@ -546,8 +547,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintMode(int mode) { } #endif // defined(_WIN32) -DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, - FPDF_BYTESTRING password) { +FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV +FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BYTESTRING password) { // NOTE: the creation of the file needs to be by the embedder on the // other side of this API. return LoadDocumentImpl( @@ -556,8 +557,8 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, } #ifdef PDF_ENABLE_XFA -DLLEXPORT FPDF_BOOL STDCALL FPDF_HasXFAField(FPDF_DOCUMENT document, - int* docType) { +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_HasXFAField(FPDF_DOCUMENT document, + int* docType) { if (!document) return false; @@ -583,7 +584,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_HasXFAField(FPDF_DOCUMENT document, return true; } -DLLEXPORT FPDF_BOOL STDCALL FPDF_LoadXFA(FPDF_DOCUMENT document) { +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_LoadXFA(FPDF_DOCUMENT document) { return document && (static_cast<CPDFXFA_Context*>(document))->LoadXFADoc(); } #endif // PDF_ENABLE_XFA @@ -615,21 +616,20 @@ class CMemFile final : public IFX_SeekableReadStream { const FX_FILESIZE m_size; }; -DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument(const void* data_buf, - int size, - FPDF_BYTESTRING password) { +FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV +FPDF_LoadMemDocument(const void* data_buf, int size, FPDF_BYTESTRING password) { return LoadDocumentImpl(CMemFile::Create((uint8_t*)data_buf, size), password); } -DLLEXPORT FPDF_DOCUMENT STDCALL +FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_LoadCustomDocument(FPDF_FILEACCESS* pFileAccess, FPDF_BYTESTRING password) { return LoadDocumentImpl(pdfium::MakeRetain<CPDF_CustomAccess>(pFileAccess), password); } -DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc, - int* fileVersion) { +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_GetFileVersion(FPDF_DOCUMENT doc, + int* fileVersion) { if (!fileVersion) return false; @@ -648,7 +648,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc, // jabdelmalek: changed return type from uint32_t to build on Linux (and match // header). -DLLEXPORT unsigned long STDCALL FPDF_GetDocPermissions(FPDF_DOCUMENT document) { +FPDF_EXPORT unsigned long FPDF_CALLCONV +FPDF_GetDocPermissions(FPDF_DOCUMENT document) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); // https://bugs.chromium.org/p/pdfium/issues/detail?id=499 if (!pDoc) { @@ -662,7 +663,8 @@ DLLEXPORT unsigned long STDCALL FPDF_GetDocPermissions(FPDF_DOCUMENT document) { return pDoc->GetUserPermissions(); } -DLLEXPORT int STDCALL FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document) { +FPDF_EXPORT int FPDF_CALLCONV +FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pDoc || !pDoc->GetParser()) return -1; @@ -671,13 +673,13 @@ DLLEXPORT int STDCALL FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document) { return pDict ? pDict->GetIntegerFor("R") : -1; } -DLLEXPORT int STDCALL FPDF_GetPageCount(FPDF_DOCUMENT document) { +FPDF_EXPORT int FPDF_CALLCONV FPDF_GetPageCount(FPDF_DOCUMENT document) { UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document); return pDoc ? pDoc->GetPageCount() : 0; } -DLLEXPORT FPDF_PAGE STDCALL FPDF_LoadPage(FPDF_DOCUMENT document, - int page_index) { +FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDF_LoadPage(FPDF_DOCUMENT document, + int page_index) { UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document); if (!pDoc) return nullptr; @@ -698,12 +700,12 @@ DLLEXPORT FPDF_PAGE STDCALL FPDF_LoadPage(FPDF_DOCUMENT document, #endif // PDF_ENABLE_XFA } -DLLEXPORT double STDCALL FPDF_GetPageWidth(FPDF_PAGE page) { +FPDF_EXPORT double FPDF_CALLCONV FPDF_GetPageWidth(FPDF_PAGE page) { UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page); return pPage ? pPage->GetPageWidth() : 0.0; } -DLLEXPORT double STDCALL FPDF_GetPageHeight(FPDF_PAGE page) { +FPDF_EXPORT double FPDF_CALLCONV FPDF_GetPageHeight(FPDF_PAGE page) { UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page); return pPage ? pPage->GetPageHeight() : 0.0; } @@ -837,14 +839,14 @@ void RenderBitmap(CFX_RenderDevice* device, } // namespace -DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, - FPDF_PAGE page, - int start_x, - int start_y, - int size_x, - int size_y, - int rotate, - int flags) { +FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPage(HDC dc, + FPDF_PAGE page, + int start_x, + int start_y, + int size_x, + int size_y, + int rotate, + int flags) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage) return; @@ -934,14 +936,14 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, } #endif // defined(_WIN32) -DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, - FPDF_PAGE page, - int start_x, - int start_y, - int size_x, - int size_y, - int rotate, - int flags) { +FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, + FPDF_PAGE page, + int start_x, + int start_y, + int size_x, + int size_y, + int rotate, + int flags) { if (!bitmap) return; @@ -967,11 +969,12 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, pPage->SetRenderContext(nullptr); } -DLLEXPORT void STDCALL FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap, - FPDF_PAGE page, - const FS_MATRIX* matrix, - const FS_RECTF* clipping, - int flags) { +FPDF_EXPORT void FPDF_CALLCONV +FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap, + FPDF_PAGE page, + const FS_MATRIX* matrix, + const FS_RECTF* clipping, + int flags) { if (!bitmap) return; @@ -1010,9 +1013,9 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap, } #ifdef _SKIA_SUPPORT_ -DLLEXPORT FPDF_RECORDER STDCALL FPDF_RenderPageSkp(FPDF_PAGE page, - int size_x, - int size_y) { +FPDF_EXPORT FPDF_RECORDER FPDF_CALLCONV FPDF_RenderPageSkp(FPDF_PAGE page, + int size_x, + int size_y) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage) return nullptr; @@ -1029,7 +1032,7 @@ DLLEXPORT FPDF_RECORDER STDCALL FPDF_RenderPageSkp(FPDF_PAGE page, } #endif -DLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page) { +FPDF_EXPORT void FPDF_CALLCONV FPDF_ClosePage(FPDF_PAGE page) { UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page); if (!page) return; @@ -1062,24 +1065,24 @@ DLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page) { #endif // PDF_ENABLE_XFA } -DLLEXPORT void STDCALL FPDF_CloseDocument(FPDF_DOCUMENT document) { +FPDF_EXPORT void FPDF_CALLCONV FPDF_CloseDocument(FPDF_DOCUMENT document) { delete UnderlyingFromFPDFDocument(document); } -DLLEXPORT unsigned long STDCALL FPDF_GetLastError() { +FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetLastError() { return GetLastError(); } -DLLEXPORT void STDCALL FPDF_DeviceToPage(FPDF_PAGE page, - int start_x, - int start_y, - int size_x, - int size_y, - int rotate, - int device_x, - int device_y, - double* page_x, - double* page_y) { +FPDF_EXPORT void FPDF_CALLCONV FPDF_DeviceToPage(FPDF_PAGE page, + int start_x, + int start_y, + int size_x, + int size_y, + int rotate, + int device_x, + int device_y, + double* page_x, + double* page_y) { if (!page || !page_x || !page_y) return; UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page); @@ -1098,16 +1101,16 @@ DLLEXPORT void STDCALL FPDF_DeviceToPage(FPDF_PAGE page, #endif // PDF_ENABLE_XFA } -DLLEXPORT void STDCALL FPDF_PageToDevice(FPDF_PAGE page, - int start_x, - int start_y, - int size_x, - int size_y, - int rotate, - double page_x, - double page_y, - int* device_x, - int* device_y) { +FPDF_EXPORT void FPDF_CALLCONV FPDF_PageToDevice(FPDF_PAGE page, + int start_x, + int start_y, + int size_x, + int size_y, + int rotate, + double page_x, + double page_y, + int* device_x, + int* device_y) { if (!device_x || !device_y) return; UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page); @@ -1127,9 +1130,9 @@ DLLEXPORT void STDCALL FPDF_PageToDevice(FPDF_PAGE page, #endif // PDF_ENABLE_XFA } -DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_Create(int width, - int height, - int alpha) { +FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV FPDFBitmap_Create(int width, + int height, + int alpha) { auto pBitmap = pdfium::MakeRetain<CFX_DIBitmap>(); if (!pBitmap->Create(width, height, alpha ? FXDIB_Argb : FXDIB_Rgb32)) return nullptr; @@ -1137,11 +1140,11 @@ DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_Create(int width, return pBitmap.Leak(); } -DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, - int height, - int format, - void* first_scan, - int stride) { +FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV FPDFBitmap_CreateEx(int width, + int height, + int format, + void* first_scan, + int stride) { FXDIB_Format fx_format; switch (format) { case FPDFBitmap_Gray: @@ -1164,7 +1167,7 @@ DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, return pBitmap.Leak(); } -DLLEXPORT int STDCALL FPDFBitmap_GetFormat(FPDF_BITMAP bitmap) { +FPDF_EXPORT int FPDF_CALLCONV FPDFBitmap_GetFormat(FPDF_BITMAP bitmap) { if (!bitmap) return FPDFBitmap_Unknown; @@ -1184,12 +1187,12 @@ DLLEXPORT int STDCALL FPDFBitmap_GetFormat(FPDF_BITMAP bitmap) { } } -DLLEXPORT void STDCALL FPDFBitmap_FillRect(FPDF_BITMAP bitmap, - int left, - int top, - int width, - int height, - FPDF_DWORD color) { +FPDF_EXPORT void FPDF_CALLCONV FPDFBitmap_FillRect(FPDF_BITMAP bitmap, + int left, + int top, + int width, + int height, + FPDF_DWORD color) { if (!bitmap) return; @@ -1202,23 +1205,23 @@ DLLEXPORT void STDCALL FPDFBitmap_FillRect(FPDF_BITMAP bitmap, device.FillRect(&rect, color); } -DLLEXPORT void* STDCALL FPDFBitmap_GetBuffer(FPDF_BITMAP bitmap) { +FPDF_EXPORT void* FPDF_CALLCONV FPDFBitmap_GetBuffer(FPDF_BITMAP bitmap) { return bitmap ? CFXBitmapFromFPDFBitmap(bitmap)->GetBuffer() : nullptr; } -DLLEXPORT int STDCALL FPDFBitmap_GetWidth(FPDF_BITMAP bitmap) { +FPDF_EXPORT int FPDF_CALLCONV FPDFBitmap_GetWidth(FPDF_BITMAP bitmap) { return bitmap ? CFXBitmapFromFPDFBitmap(bitmap)->GetWidth() : 0; } -DLLEXPORT int STDCALL FPDFBitmap_GetHeight(FPDF_BITMAP bitmap) { +FPDF_EXPORT int FPDF_CALLCONV FPDFBitmap_GetHeight(FPDF_BITMAP bitmap) { return bitmap ? CFXBitmapFromFPDFBitmap(bitmap)->GetHeight() : 0; } -DLLEXPORT int STDCALL FPDFBitmap_GetStride(FPDF_BITMAP bitmap) { +FPDF_EXPORT int FPDF_CALLCONV FPDFBitmap_GetStride(FPDF_BITMAP bitmap) { return bitmap ? CFXBitmapFromFPDFBitmap(bitmap)->GetPitch() : 0; } -DLLEXPORT void STDCALL FPDFBitmap_Destroy(FPDF_BITMAP bitmap) { +FPDF_EXPORT void FPDF_CALLCONV FPDFBitmap_Destroy(FPDF_BITMAP bitmap) { CFX_RetainPtr<CFX_DIBitmap> destroyer; destroyer.Unleak(CFXBitmapFromFPDFBitmap(bitmap)); } @@ -1243,10 +1246,10 @@ void FPDF_RenderPage_Retail(CPDF_PageRenderContext* pContext, flags, bNeedToRestore, pause); } -DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, - int page_index, - double* width, - double* height) { +FPDF_EXPORT int FPDF_CALLCONV FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, + int page_index, + double* width, + double* height) { UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document); if (!pDoc) return false; @@ -1273,7 +1276,7 @@ DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, return true; } -DLLEXPORT FPDF_BOOL STDCALL +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT document) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pDoc) @@ -1282,7 +1285,8 @@ FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT document) { return viewRef.PrintScaling(); } -DLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document) { +FPDF_EXPORT int FPDF_CALLCONV +FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pDoc) return 1; @@ -1290,7 +1294,7 @@ DLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document) { return viewRef.NumCopies(); } -DLLEXPORT FPDF_PAGERANGE STDCALL +FPDF_EXPORT FPDF_PAGERANGE FPDF_CALLCONV FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pDoc) @@ -1299,7 +1303,7 @@ FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document) { return viewRef.PrintPageRange(); } -DLLEXPORT FPDF_DUPLEXTYPE STDCALL +FPDF_EXPORT FPDF_DUPLEXTYPE FPDF_CALLCONV FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pDoc) @@ -1315,10 +1319,11 @@ FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document) { return DuplexUndefined; } -DLLEXPORT unsigned long STDCALL FPDF_VIEWERREF_GetName(FPDF_DOCUMENT document, - FPDF_BYTESTRING key, - char* buffer, - unsigned long length) { +FPDF_EXPORT unsigned long FPDF_CALLCONV +FPDF_VIEWERREF_GetName(FPDF_DOCUMENT document, + FPDF_BYTESTRING key, + char* buffer, + unsigned long length) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pDoc) return 0; @@ -1334,7 +1339,8 @@ DLLEXPORT unsigned long STDCALL FPDF_VIEWERREF_GetName(FPDF_DOCUMENT document, return dwStringLen; } -DLLEXPORT FPDF_DWORD STDCALL FPDF_CountNamedDests(FPDF_DOCUMENT document) { +FPDF_EXPORT FPDF_DWORD FPDF_CALLCONV +FPDF_CountNamedDests(FPDF_DOCUMENT document) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pDoc) return 0; @@ -1355,8 +1361,8 @@ DLLEXPORT FPDF_DWORD STDCALL FPDF_CountNamedDests(FPDF_DOCUMENT document) { return count.ValueOrDie(); } -DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document, - FPDF_BYTESTRING name) { +FPDF_EXPORT FPDF_DEST FPDF_CALLCONV +FPDF_GetNamedDestByName(FPDF_DOCUMENT document, FPDF_BYTESTRING name) { if (!name || name[0] == 0) return nullptr; @@ -1369,7 +1375,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document, } #ifdef PDF_ENABLE_XFA -DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Init(FPDF_BSTR* str) { +FPDF_EXPORT FPDF_RESULT FPDF_CALLCONV FPDF_BStr_Init(FPDF_BSTR* str) { if (!str) return -1; @@ -1377,9 +1383,9 @@ DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Init(FPDF_BSTR* str) { return 0; } -DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Set(FPDF_BSTR* str, - FPDF_LPCSTR bstr, - int length) { +FPDF_EXPORT FPDF_RESULT FPDF_CALLCONV FPDF_BStr_Set(FPDF_BSTR* str, + FPDF_LPCSTR bstr, + int length) { if (!str) return -1; if (!bstr || !length) @@ -1408,7 +1414,7 @@ DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Set(FPDF_BSTR* str, return 0; } -DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str) { +FPDF_EXPORT FPDF_RESULT FPDF_CALLCONV FPDF_BStr_Clear(FPDF_BSTR* str) { if (!str) return -1; @@ -1421,10 +1427,10 @@ DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str) { } #endif // PDF_ENABLE_XFA -DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, - int index, - void* buffer, - long* buflen) { +FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDF_GetNamedDest(FPDF_DOCUMENT document, + int index, + void* buffer, + long* buflen) { if (!buffer) *buflen = 0; |