From c3255f55954b2adc3edbd3269c0a8779f7d4b7ad Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 25 Mar 2016 14:52:27 -0700 Subject: Remove FX_DWORD from fpdfsdk/ and testing BUG= Review URL: https://codereview.chromium.org/1835693002 --- fpdfsdk/formfiller/cffl_formfiller.cpp | 12 +-- fpdfsdk/formfiller/cffl_formfiller.h | 8 +- fpdfsdk/formfiller/cffl_iformfiller.cpp | 18 ++--- fpdfsdk/formfiller/cffl_iformfiller.h | 16 ++-- fpdfsdk/formfiller/cffl_listbox.cpp | 2 +- fpdfsdk/formfiller/cffl_pushbutton.cpp | 2 +- fpdfsdk/formfiller/cffl_pushbutton.h | 2 +- fpdfsdk/fpdf_dataavail.cpp | 4 +- fpdfsdk/fpdf_ext.cpp | 4 +- fpdfsdk/fpdf_flatten.cpp | 10 +-- fpdfsdk/fpdf_sysfontinfo.cpp | 8 +- fpdfsdk/fpdf_transformpage.cpp | 2 +- fpdfsdk/fpdfdoc_unittest.cpp | 2 +- fpdfsdk/fpdfppo.cpp | 24 +++--- fpdfsdk/fpdfsave.cpp | 2 +- fpdfsdk/fpdfview.cpp | 22 +++--- fpdfsdk/fpdfxfa/fpdfxfa_app.cpp | 8 +- fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp | 12 +-- fpdfsdk/fpdfxfa/fpdfxfa_util.cpp | 2 +- fpdfsdk/fsdk_annothandler.cpp | 94 ++++++++++++------------ fpdfsdk/fsdk_baseannot.cpp | 6 +- fpdfsdk/fsdk_baseform.cpp | 10 +-- fpdfsdk/fsdk_mgr.cpp | 8 +- fpdfsdk/fxedit/fxet_ap.cpp | 2 +- fpdfsdk/fxedit/fxet_edit.cpp | 2 +- fpdfsdk/include/fpdfxfa/fpdfxfa_app.h | 6 +- fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h | 10 +-- fpdfsdk/include/fpdfxfa/fpdfxfa_util.h | 2 +- fpdfsdk/include/fsdk_annothandler.h | 126 ++++++++++++++++---------------- fpdfsdk/include/fsdk_baseannot.h | 4 +- fpdfsdk/include/fsdk_define.h | 16 ++-- fpdfsdk/include/fsdk_mgr.h | 10 +-- fpdfsdk/include/fx_systemhandler.h | 8 +- fpdfsdk/javascript/Document.cpp | 4 +- fpdfsdk/javascript/Field.cpp | 24 +++--- fpdfsdk/javascript/Field.h | 6 +- fpdfsdk/javascript/JS_GlobalData.cpp | 52 ++++++------- fpdfsdk/javascript/JS_Object.cpp | 4 +- fpdfsdk/javascript/JS_Object.h | 10 +-- fpdfsdk/javascript/JS_Value.cpp | 2 +- fpdfsdk/javascript/app.cpp | 4 +- fpdfsdk/pdfwindow/PWL_Button.cpp | 4 +- fpdfsdk/pdfwindow/PWL_Button.h | 4 +- fpdfsdk/pdfwindow/PWL_ComboBox.cpp | 16 ++-- fpdfsdk/pdfwindow/PWL_ComboBox.h | 16 ++-- fpdfsdk/pdfwindow/PWL_Edit.cpp | 14 ++-- fpdfsdk/pdfwindow/PWL_Edit.h | 20 ++--- fpdfsdk/pdfwindow/PWL_EditCtrl.cpp | 12 +-- fpdfsdk/pdfwindow/PWL_EditCtrl.h | 12 +-- fpdfsdk/pdfwindow/PWL_Icon.cpp | 2 +- fpdfsdk/pdfwindow/PWL_IconList.cpp | 12 +-- fpdfsdk/pdfwindow/PWL_IconList.h | 12 +-- fpdfsdk/pdfwindow/PWL_ListBox.cpp | 16 ++-- fpdfsdk/pdfwindow/PWL_ListBox.h | 16 ++-- fpdfsdk/pdfwindow/PWL_Note.cpp | 24 +++--- fpdfsdk/pdfwindow/PWL_Note.h | 24 +++--- fpdfsdk/pdfwindow/PWL_ScrollBar.cpp | 12 +-- fpdfsdk/pdfwindow/PWL_ScrollBar.h | 12 +-- fpdfsdk/pdfwindow/PWL_SpecialButton.cpp | 8 +- fpdfsdk/pdfwindow/PWL_SpecialButton.h | 8 +- fpdfsdk/pdfwindow/PWL_Utils.h | 2 +- fpdfsdk/pdfwindow/PWL_Wnd.cpp | 22 +++--- fpdfsdk/pdfwindow/PWL_Wnd.h | 44 +++++------ testing/libfuzzer/pdf_jpx_fuzzer.cc | 8 +- 64 files changed, 445 insertions(+), 445 deletions(-) diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp index 3333f7ae99..9ca8f05493 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.cpp +++ b/fpdfsdk/formfiller/cffl_formfiller.cpp @@ -78,7 +78,7 @@ void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) { + uint32_t dwFlags) { ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget"); if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { @@ -96,7 +96,7 @@ void CFFL_FormFiller::OnDrawDeactive(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) { + uint32_t dwFlags) { CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); } @@ -297,8 +297,8 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam() { cp.pProvider = this; cp.rcRectWnd = GetPDFWindowRect(); - FX_DWORD dwCreateFlags = PWS_BORDER | PWS_BACKGROUND | PWS_VISIBLE; - FX_DWORD dwFieldFlag = m_pWidget->GetFieldFlags(); + uint32_t dwCreateFlags = PWS_BORDER | PWS_BACKGROUND | PWS_VISIBLE; + uint32_t dwFieldFlag = m_pWidget->GetFieldFlags(); if (dwFieldFlag & FIELDFLAG_READONLY) { dwCreateFlags |= PWS_READONLY; } @@ -692,7 +692,7 @@ void CFFL_Button::OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) { + uint32_t dwFlags) { ASSERT(pPageView); CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; CPDF_FormControl* pCtrl = pWidget->GetFormControl(); @@ -723,6 +723,6 @@ void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) { + uint32_t dwFlags) { OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); } diff --git a/fpdfsdk/formfiller/cffl_formfiller.h b/fpdfsdk/formfiller/cffl_formfiller.h index b7d8a9dad6..9e9f4becf4 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.h +++ b/fpdfsdk/formfiller/cffl_formfiller.h @@ -29,12 +29,12 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler { CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags); + uint32_t dwFlags); virtual void OnDrawDeactive(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags); + uint32_t dwFlags); virtual void OnCreate(CPDFSDK_Annot* pAnnot); virtual void OnLoad(CPDFSDK_Annot* pAnnot); @@ -188,12 +188,12 @@ class CFFL_Button : public CFFL_FormFiller { CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) override; + uint32_t dwFlags) override; void OnDrawDeactive(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) override; + uint32_t dwFlags) override; protected: FX_BOOL m_bMouseIn; diff --git a/fpdfsdk/formfiller/cffl_iformfiller.cpp b/fpdfsdk/formfiller/cffl_iformfiller.cpp index 20dd5bb21b..75e57512df 100644 --- a/fpdfsdk/formfiller/cffl_iformfiller.cpp +++ b/fpdfsdk/formfiller/cffl_iformfiller.cpp @@ -57,7 +57,7 @@ void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) { + uint32_t dwFlags) { ASSERT(pPageView); CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; @@ -500,7 +500,7 @@ FX_BOOL CFFL_IFormFiller::IsFillingAllowed(CPDFSDK_Widget* pWidget) { CPDF_Page* pPage = pWidget->GetPDFPage(); CPDF_Document* pDocument = pPage->m_pDocument; - FX_DWORD dwPermissions = pDocument->GetUserPermissions(); + uint32_t dwPermissions = pDocument->GetUserPermissions(); return (dwPermissions & FPDFPERM_FILL_FORM) || (dwPermissions & FPDFPERM_ANNOT_FORM) || (dwPermissions & FPDFPERM_MODIFY); @@ -642,7 +642,7 @@ void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_bNotifying) { if (pWidget->GetAAction(CPDF_AAction::KeyStroke).GetDict()) { m_bNotifying = TRUE; @@ -674,7 +674,7 @@ void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_bNotifying) { if (pWidget->GetAAction(CPDF_AAction::Validate).GetDict()) { m_bNotifying = TRUE; @@ -704,7 +704,7 @@ void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_bNotifying) { ASSERT(pWidget); CPDFSDK_Document* pDocument = pPageView->GetSDKDocument(); @@ -719,7 +719,7 @@ void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_bNotifying) { ASSERT(pWidget); CPDFSDK_Document* pDocument = pPageView->GetSDKDocument(); @@ -816,7 +816,7 @@ void CFFL_IFormFiller::OnFull(CPDFSDK_Widget* pWidget, void CFFL_IFormFiller::OnPopupPreOpen(void* pPrivateData, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; ASSERT(pData); ASSERT(pData->pWidget); @@ -832,7 +832,7 @@ void CFFL_IFormFiller::OnPopupPreOpen(void* pPrivateData, void CFFL_IFormFiller::OnPopupPostOpen(void* pPrivateData, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; ASSERT(pData); ASSERT(pData->pWidget); @@ -933,7 +933,7 @@ void CFFL_IFormFiller::OnBeforeKeyStroke(void* pPrivateData, FX_BOOL bKeyDown, FX_BOOL& bRC, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; ASSERT(pData->pWidget); diff --git a/fpdfsdk/formfiller/cffl_iformfiller.h b/fpdfsdk/formfiller/cffl_iformfiller.h index d405b3381b..b01159475a 100644 --- a/fpdfsdk/formfiller/cffl_iformfiller.h +++ b/fpdfsdk/formfiller/cffl_iformfiller.h @@ -32,7 +32,7 @@ class CFFL_IFormFiller : public IPWL_Filler_Notify { CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags); + uint32_t dwFlags); virtual void OnCreate(CPDFSDK_Annot* pAnnot); virtual void OnLoad(CPDFSDK_Annot* pAnnot); @@ -96,21 +96,21 @@ class CFFL_IFormFiller : public IPWL_Filler_Notify { CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, - FX_DWORD nFlag); + uint32_t nFlag); void OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, - FX_DWORD nFlag); + uint32_t nFlag); void OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, - FX_DWORD nFlag); + uint32_t nFlag); void OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, - FX_DWORD nFlag); + uint32_t nFlag); void OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bReset, @@ -156,14 +156,14 @@ class CFFL_IFormFiller : public IPWL_Filler_Notify { FX_BOOL bKeyDown, FX_BOOL& bRC, FX_BOOL& bExit, - FX_DWORD nFlag) override; + uint32_t nFlag) override; #ifdef PDF_ENABLE_XFA void OnPopupPreOpen(void* pPrivateData, FX_BOOL& bExit, - FX_DWORD nFlag) override; + uint32_t nFlag) override; void OnPopupPostOpen(void* pPrivateData, FX_BOOL& bExit, - FX_DWORD nFlag) override; + uint32_t nFlag) override; void SetFocusAnnotTab(CPDFSDK_Annot* pWidget, FX_BOOL bSameField, FX_BOOL bNext); diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp index 85398e3306..b668b67edb 100644 --- a/fpdfsdk/formfiller/cffl_listbox.cpp +++ b/fpdfsdk/formfiller/cffl_listbox.cpp @@ -25,7 +25,7 @@ CFFL_ListBox::~CFFL_ListBox() { PWL_CREATEPARAM CFFL_ListBox::GetCreateParam() { PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam(); - FX_DWORD dwFieldFlag = m_pWidget->GetFieldFlags(); + uint32_t dwFieldFlag = m_pWidget->GetFieldFlags(); if (dwFieldFlag & FIELDFLAG_MULTISELECT) { cp.dwFlags |= PLBS_MULTIPLESEL; diff --git a/fpdfsdk/formfiller/cffl_pushbutton.cpp b/fpdfsdk/formfiller/cffl_pushbutton.cpp index 7a32cbda00..001560836f 100644 --- a/fpdfsdk/formfiller/cffl_pushbutton.cpp +++ b/fpdfsdk/formfiller/cffl_pushbutton.cpp @@ -33,6 +33,6 @@ void CFFL_PushButton::OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) { + uint32_t dwFlags) { CFFL_Button::OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); } diff --git a/fpdfsdk/formfiller/cffl_pushbutton.h b/fpdfsdk/formfiller/cffl_pushbutton.h index 0d9d82ea0a..ff53ce45ac 100644 --- a/fpdfsdk/formfiller/cffl_pushbutton.h +++ b/fpdfsdk/formfiller/cffl_pushbutton.h @@ -22,7 +22,7 @@ class CFFL_PushButton : public CFFL_Button { CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) override; + uint32_t dwFlags) override; }; #endif // FPDFSDK_FORMFILLER_CFFL_PUSHBUTTON_H_ diff --git a/fpdfsdk/fpdf_dataavail.cpp b/fpdfsdk/fpdf_dataavail.cpp index 6cef5fd37b..dc6efbc436 100644 --- a/fpdfsdk/fpdf_dataavail.cpp +++ b/fpdfsdk/fpdf_dataavail.cpp @@ -43,7 +43,7 @@ class CFPDF_FileAvailWrap : public IPDF_DataAvail::FileAvail { void Set(FX_FILEAVAIL* pfileAvail) { m_pfileAvail = pfileAvail; } // IPDF_DataAvail::FileAvail: - FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) override { + FX_BOOL IsDataAvail(FX_FILESIZE offset, uint32_t size) override { return m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size); } @@ -81,7 +81,7 @@ class CFPDF_DownloadHintsWrap : public IPDF_DataAvail::DownloadHints { public: // IFX_DownloadHints - void AddSegment(FX_FILESIZE offset, FX_DWORD size) override { + void AddSegment(FX_FILESIZE offset, uint32_t size) override { m_pDownloadHints->AddSegment(m_pDownloadHints, offset, size); } diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp index 810650fb7d..2541bddb50 100644 --- a/fpdfsdk/fpdf_ext.cpp +++ b/fpdfsdk/fpdf_ext.cpp @@ -123,7 +123,7 @@ FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) { } } - FX_DWORD nCount = pElement->CountChildren(); + uint32_t nCount = pElement->CountChildren(); for (i = 0; i < (int)nCount; i++) { CXML_Element::ChildType childType = pElement->GetChildType(i); if (childType == CXML_Element::Element) { @@ -135,7 +135,7 @@ FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) { return FALSE; } -void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code) { +void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) { // Security if (err_code == FPDF_ERR_SECURITY) { FPDF_UnSupportError(FPDF_UNSP_DOC_SECURITY); diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp index 3ad7c6ed38..c2ecbc84a6 100644 --- a/fpdfsdk/fpdf_flatten.cpp +++ b/fpdfsdk/fpdf_flatten.cpp @@ -94,7 +94,7 @@ int ParserAnnots(CPDF_Document* pSourceDoc, if (!pAnnots) return FLATTEN_NOTHINGTODO; - FX_DWORD dwSize = pAnnots->GetCount(); + uint32_t dwSize = pAnnots->GetCount(); for (int i = 0; i < (int)dwSize; i++) { CPDF_Dictionary* pAnnotDic = ToDictionary(pAnnots->GetElementValue(i)); if (!pAnnotDic) @@ -213,7 +213,7 @@ void SetPageContents(CFX_ByteString key, case CPDF_Object::STREAM: { pContentsArray = new CPDF_Array; CPDF_Stream* pContents = pContentsObj->AsStream(); - FX_DWORD dwObjNum = pDocument->AddIndirectObject(pContents); + uint32_t dwObjNum = pDocument->AddIndirectObject(pContents); CPDF_StreamAcc acc; acc.LoadAllData(pContents); CFX_ByteString sStream = "q\n"; @@ -237,7 +237,7 @@ void SetPageContents(CFX_ByteString key, if (!pContentsArray) return; - FX_DWORD dwObjNum = pDocument->AddIndirectObject(pContentsArray); + uint32_t dwObjNum = pDocument->AddIndirectObject(pContentsArray); pPage->SetAtReference("Contents", pDocument, dwObjNum); if (!key.IsEmpty()) { @@ -380,7 +380,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) { } CPDF_Stream* pNewXObject = new CPDF_Stream(NULL, 0, new CPDF_Dictionary); - FX_DWORD dwObjNum = pDocument->AddIndirectObject(pNewXObject); + uint32_t dwObjNum = pDocument->AddIndirectObject(pNewXObject); CPDF_Dictionary* pPageXObject = pRes->GetDictBy("XObject"); if (!pPageXObject) { pPageXObject = new CPDF_Dictionary; @@ -486,7 +486,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) { CFX_ByteString sFormName; sFormName.Format("F%d", i); - FX_DWORD dwObjNum = pDocument->AddIndirectObject(pObj); + uint32_t dwObjNum = pDocument->AddIndirectObject(pObj); pXObject->SetAtReference(sFormName, pDocument, dwObjNum); CPDF_StreamAcc acc; diff --git a/fpdfsdk/fpdf_sysfontinfo.cpp b/fpdfsdk/fpdf_sysfontinfo.cpp index 6394ef93f3..7fe4b08e46 100644 --- a/fpdfsdk/fpdf_sysfontinfo.cpp +++ b/fpdfsdk/fpdf_sysfontinfo.cpp @@ -45,10 +45,10 @@ class CFX_ExternalFontInfo final : public IFX_SystemFontInfo { return NULL; } - FX_DWORD GetFontData(void* hFont, - FX_DWORD table, + uint32_t GetFontData(void* hFont, + uint32_t table, uint8_t* buffer, - FX_DWORD size) override { + uint32_t size) override { if (m_pInfo->GetFontData) return m_pInfo->GetFontData(m_pInfo, hFont, table, buffer, size); return 0; @@ -57,7 +57,7 @@ class CFX_ExternalFontInfo final : public IFX_SystemFontInfo { FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override { if (!m_pInfo->GetFaceName) return FALSE; - FX_DWORD size = m_pInfo->GetFaceName(m_pInfo, hFont, NULL, 0); + uint32_t size = m_pInfo->GetFaceName(m_pInfo, hFont, NULL, 0); if (size == 0) return FALSE; char* buffer = FX_Alloc(char, size); diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp index d3d6fc290b..23118b4c3f 100644 --- a/fpdfsdk/fpdf_transformpage.cpp +++ b/fpdfsdk/fpdf_transformpage.cpp @@ -285,7 +285,7 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page, CFX_ByteTextBuf strClip; CPDF_ClipPath* pClipPath = (CPDF_ClipPath*)clipPath; - FX_DWORD i; + uint32_t i; for (i = 0; i < pClipPath->GetPathCount(); i++) { CPDF_Path path = pClipPath->GetPath(i); int iClipType = pClipPath->GetClipType(i); diff --git a/fpdfsdk/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp index 2c10281fbe..bf94aefa6e 100644 --- a/fpdfsdk/fpdfdoc_unittest.cpp +++ b/fpdfsdk/fpdfdoc_unittest.cpp @@ -48,7 +48,7 @@ using CPDF_TestPdfDocument = CPDF_TestDocument; class PDFDocTest : public testing::Test { public: struct DictObjInfo { - FX_DWORD num; + uint32_t num; CPDF_Dictionary* obj; }; diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp index efbe8f304a..7484a3e85f 100644 --- a/fpdfsdk/fpdfppo.cpp +++ b/fpdfsdk/fpdfppo.cpp @@ -22,7 +22,7 @@ class CPDF_PageOrganizer { public: - using ObjectNumberMap = std::map; + using ObjectNumberMap = std::map; CPDF_PageOrganizer(); ~CPDF_PageOrganizer(); @@ -36,7 +36,7 @@ class CPDF_PageOrganizer { FX_BOOL UpdateReference(CPDF_Object* pObj, CPDF_Document* pDoc, ObjectNumberMap* pObjNumberMap); - FX_DWORD GetNewObjId(CPDF_Document* pDoc, + uint32_t GetNewObjId(CPDF_Document* pDoc, ObjectNumberMap* pObjNumberMap, CPDF_Reference* pRef); }; @@ -74,7 +74,7 @@ FX_BOOL CPDF_PageOrganizer::PDFDocInit(CPDF_Document* pDestPDFDoc, pElement ? ToDictionary(pElement->GetDirect()) : nullptr; if (!pNewPages) { pNewPages = new CPDF_Dictionary; - FX_DWORD NewPagesON = pDestPDFDoc->AddIndirectObject(pNewPages); + uint32_t NewPagesON = pDestPDFDoc->AddIndirectObject(pNewPages); pNewRoot->SetAt("Pages", new CPDF_Reference(pDestPDFDoc, NewPagesON)); } @@ -86,7 +86,7 @@ FX_BOOL CPDF_PageOrganizer::PDFDocInit(CPDF_Document* pDestPDFDoc, CPDF_Array* pKeysArray = pNewPages->GetArrayBy("Kids"); if (!pKeysArray) { CPDF_Array* pNewKids = new CPDF_Array; - FX_DWORD Kidsobjnum = pDestPDFDoc->AddIndirectObject(pNewKids); + uint32_t Kidsobjnum = pDestPDFDoc->AddIndirectObject(pNewKids); pNewPages->SetAt("Kids", new CPDF_Reference(pDestPDFDoc, Kidsobjnum)); pNewPages->SetAt("Count", new CPDF_Number(0)); @@ -164,8 +164,8 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc, } // Update the reference - FX_DWORD dwOldPageObj = pSrcPageDict->GetObjNum(); - FX_DWORD dwNewPageObj = pCurPageDict->GetObjNum(); + uint32_t dwOldPageObj = pSrcPageDict->GetObjNum(); + uint32_t dwNewPageObj = pCurPageDict->GetObjNum(); (*pObjNumberMap)[dwOldPageObj] = dwNewPageObj; @@ -213,7 +213,7 @@ FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj, switch (pObj->GetType()) { case CPDF_Object::REFERENCE: { CPDF_Reference* pReference = pObj->AsReference(); - FX_DWORD newobjnum = GetNewObjId(pDoc, pObjNumberMap, pReference); + uint32_t newobjnum = GetNewObjId(pDoc, pObjNumberMap, pReference); if (newobjnum == 0) return FALSE; pReference->SetRef(pDoc, newobjnum); @@ -241,8 +241,8 @@ FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj, } case CPDF_Object::ARRAY: { CPDF_Array* pArray = pObj->AsArray(); - FX_DWORD count = pArray->GetCount(); - for (FX_DWORD i = 0; i < count; ++i) { + uint32_t count = pArray->GetCount(); + for (uint32_t i = 0; i < count; ++i) { CPDF_Object* pNextObj = pArray->GetElement(i); if (!pNextObj) return FALSE; @@ -269,14 +269,14 @@ FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj, return TRUE; } -FX_DWORD CPDF_PageOrganizer::GetNewObjId(CPDF_Document* pDoc, +uint32_t CPDF_PageOrganizer::GetNewObjId(CPDF_Document* pDoc, ObjectNumberMap* pObjNumberMap, CPDF_Reference* pRef) { if (!pRef) return 0; - FX_DWORD dwObjnum = pRef->GetRefObjNum(); - FX_DWORD dwNewObjNum = 0; + uint32_t dwObjnum = pRef->GetRefObjNum(); + uint32_t dwNewObjNum = 0; const auto it = pObjNumberMap->find(dwObjnum); if (it != pObjNumberMap->end()) dwNewObjNum = it->second; diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp index 98b914385e..147f147a65 100644 --- a/fpdfsdk/fpdfsave.cpp +++ b/fpdfsdk/fpdfsave.cpp @@ -138,7 +138,7 @@ bool SaveXFADocumentData(CPDFXFA_Document* pDocument, CPDF_StreamAcc streamAcc; streamAcc.LoadAllData(pTemplateStream); uint8_t* pData = (uint8_t*)streamAcc.GetData(); - FX_DWORD dwSize2 = streamAcc.GetSize(); + uint32_t dwSize2 = streamAcc.GetSize(); ScopedFileStream pTemplate(FX_CreateMemoryStream(pData, dwSize2)); pContext->UpdateChecksum(pTemplate.get()); } diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index c883f9ab7a..1406939e5d 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -153,15 +153,15 @@ FX_BOOL CFPDF_FileStream::Flush() { CPDF_CustomAccess::CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess) { m_FileAccess = *pFileAccess; #ifdef PDF_ENABLE_XFA - m_BufferOffset = (FX_DWORD)-1; + m_BufferOffset = (uint32_t)-1; #endif // PDF_ENABLE_XFA } #ifdef PDF_ENABLE_XFA -FX_BOOL CPDF_CustomAccess::GetByte(FX_DWORD pos, uint8_t& ch) { +FX_BOOL CPDF_CustomAccess::GetByte(uint32_t pos, uint8_t& ch) { if (pos >= m_FileAccess.m_FileLen) return FALSE; - if (m_BufferOffset == (FX_DWORD)-1 || pos < m_BufferOffset || + if (m_BufferOffset == (uint32_t)-1 || pos < m_BufferOffset || pos >= m_BufferOffset + 512) { // Need to read from file access m_BufferOffset = pos; @@ -176,9 +176,9 @@ FX_BOOL CPDF_CustomAccess::GetByte(FX_DWORD pos, uint8_t& ch) { return TRUE; } -FX_BOOL CPDF_CustomAccess::GetBlock(FX_DWORD pos, +FX_BOOL CPDF_CustomAccess::GetBlock(uint32_t pos, uint8_t* pBuf, - FX_DWORD size) { + uint32_t size) { if (pos + size > m_FileAccess.m_FileLen) return FALSE; return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, pos, pBuf, size); @@ -202,7 +202,7 @@ FX_BOOL CPDF_CustomAccess::ReadBlock(void* buffer, } // 0 bit: FPDF_POLICY_MACHINETIME_ACCESS -static FX_DWORD foxit_sandbox_policy = 0xFFFFFFFF; +static uint32_t foxit_sandbox_policy = 0xFFFFFFFF; void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable) { switch (policy) { @@ -282,7 +282,7 @@ int GetLastError() { #endif // _WIN32 void ProcessParseError(CPDF_Parser::Error err) { - FX_DWORD err_code = FPDF_ERR_SUCCESS; + uint32_t err_code = FPDF_ERR_SUCCESS; // Translate FPDFAPI error code to FPDFVIEW error code switch (err) { case CPDF_Parser::SUCCESS: @@ -390,7 +390,7 @@ class CMemFile final : public IFX_FileRead { FX_SAFE_FILESIZE newPos = pdfium::base::checked_cast(size); newPos += offset; - if (!newPos.IsValid() || newPos.ValueOrDie() > (FX_DWORD)m_size) { + if (!newPos.IsValid() || newPos.ValueOrDie() > (uint32_t)m_size) { return FALSE; } FXSYS_memcpy(buffer, m_pBuf + offset, size); @@ -458,7 +458,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc, return TRUE; } -// jabdelmalek: changed return type from FX_DWORD to build on Linux (and match +// jabdelmalek: changed return type from uint32_t to build on Linux (and match // header). DLLEXPORT unsigned long STDCALL FPDF_GetDocPermissions(FPDF_DOCUMENT document) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); @@ -466,11 +466,11 @@ DLLEXPORT unsigned long STDCALL FPDF_GetDocPermissions(FPDF_DOCUMENT document) { #ifndef PDF_ENABLE_XFA return 0; #else // PDF_ENABLE_XFA - return (FX_DWORD)-1; + return (uint32_t)-1; #endif // PDF_ENABLE_XFA CPDF_Dictionary* pDict = pDoc->GetParser()->GetEncryptDict(); - return pDict ? pDict->GetIntegerBy("P") : (FX_DWORD)-1; + return pDict ? pDict->GetIntegerBy("P") : (uint32_t)-1; } DLLEXPORT int STDCALL FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document) { diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp index ea3a1c97c4..cdc1949d46 100644 --- a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp +++ b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp @@ -134,7 +134,7 @@ void CPDFXFA_App::GetVersion(CFX_WideString& wsVersion) { wsVersion = JS_STR_VIEWERVERSION_XFA; } -void CPDFXFA_App::Beep(FX_DWORD dwType) { +void CPDFXFA_App::Beep(uint32_t dwType) { CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); if (pEnv) { pEnv->JS_appBeep(dwType); @@ -143,13 +143,13 @@ void CPDFXFA_App::Beep(FX_DWORD dwType) { int32_t CPDFXFA_App::MsgBox(const CFX_WideStringC& wsMessage, const CFX_WideStringC& wsTitle, - FX_DWORD dwIconType, - FX_DWORD dwButtonType) { + uint32_t dwIconType, + uint32_t dwButtonType) { CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); if (!pEnv) return -1; - FX_DWORD iconType = 0; + uint32_t iconType = 0; int iButtonType = 0; switch (dwIconType) { case XFA_MBICON_Error: diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp index cee81daa62..ac2e77becb 100644 --- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp +++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp @@ -233,7 +233,7 @@ FX_BOOL CPDFXFA_Document::GetChangeMark(IXFA_Doc* hDoc) { void CPDFXFA_Document::InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF& rt, - FX_DWORD dwFlags /* = 0 */) { + uint32_t dwFlags /* = 0 */) { if (!m_pXFADoc || !m_pSDKDoc) return; @@ -257,7 +257,7 @@ void CPDFXFA_Document::InvalidateRect(IXFA_PageView* pPageView, } void CPDFXFA_Document::InvalidateRect(IXFA_Widget* hWidget, - FX_DWORD dwFlags /* = 0 */) { + uint32_t dwFlags /* = 0 */) { if (!hWidget) return; @@ -355,7 +355,7 @@ FX_BOOL CPDFXFA_Document::GetPopupPos(IXFA_Widget* hWidget, rcAnchor.bottom = rtAnchor.top; int t1, t2, t; - FX_DWORD dwPos; + uint32_t dwPos; FX_FLOAT fPoupHeight; switch (nRotate) { case 90: { @@ -489,7 +489,7 @@ FX_BOOL CPDFXFA_Document::PopupMenu(IXFA_Widget* hWidget, } void CPDFXFA_Document::PageViewEvent(IXFA_PageView* pPageView, - FX_DWORD dwFlags) { + uint32_t dwFlags) { CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); if (!pEnv) return; @@ -526,7 +526,7 @@ void CPDFXFA_Document::PageViewEvent(IXFA_PageView* pPageView, void CPDFXFA_Document::WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, - FX_DWORD dwEvent, + uint32_t dwEvent, void* pParam, void* pAdditional) { if (m_iDocType != DOCTYPE_DYNAMIC_XFA || !hWidget) @@ -788,7 +788,7 @@ void CPDFXFA_Document::SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget) { void CPDFXFA_Document::Print(IXFA_Doc* hDoc, int32_t nStartPage, int32_t nEndPage, - FX_DWORD dwOptions) { + uint32_t dwOptions) { if (hDoc != m_pXFADoc) return; diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp index 7cabe0fb80..49efceb8e4 100644 --- a/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp +++ b/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp @@ -14,7 +14,7 @@ std::vector* CXFA_FWLAdapterTimerMgr::s_TimerArray = nullptr; FWL_ERR CXFA_FWLAdapterTimerMgr::Start(IFWL_Timer* pTimer, - FX_DWORD dwElapse, + uint32_t dwElapse, FWL_HTIMER& hTimer, FX_BOOL bImmediately) { if (!m_pEnv) diff --git a/fpdfsdk/fsdk_annothandler.cpp b/fpdfsdk/fsdk_annothandler.cpp index aef902c5a4..f32c87cf1f 100644 --- a/fpdfsdk/fsdk_annothandler.cpp +++ b/fpdfsdk/fsdk_annothandler.cpp @@ -141,7 +141,7 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) { + uint32_t dwFlags) { ASSERT(pAnnot); if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { @@ -159,7 +159,7 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnDraw(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown( CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { ASSERT(pAnnot); @@ -171,7 +171,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown( FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonUp( CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { ASSERT(pAnnot); @@ -183,7 +183,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonUp( FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDblClk( CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { ASSERT(pAnnot); @@ -195,7 +195,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDblClk( FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseMove( CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { ASSERT(pAnnot); @@ -207,7 +207,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseMove( FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseWheel( CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, short zDelta, const CFX_FloatPoint& point) { ASSERT(pAnnot); @@ -221,7 +221,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseWheel( FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonDown( CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { ASSERT(pAnnot); @@ -233,7 +233,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonDown( FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonUp( CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { ASSERT(pAnnot); @@ -245,7 +245,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonUp( void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { ASSERT(pAnnot); if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) @@ -254,7 +254,7 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { ASSERT(pAnnot); if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) @@ -262,8 +262,8 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView, } FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot, - FX_DWORD nChar, - FX_DWORD nFlags) { + uint32_t nChar, + uint32_t nFlags) { if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { return pAnnotHandler->OnChar(pAnnot, nChar, nFlags); } @@ -300,7 +300,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnKeyUp(CPDFSDK_Annot* pAnnot, } FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { ASSERT(pAnnot); if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { @@ -314,7 +314,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, } FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { ASSERT(pAnnot); if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) return pAnnotHandler->OnKillFocus(pAnnot, nFlag); @@ -415,7 +415,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { CPDF_Page* pPage = pWidget->GetPDFPage(); CPDF_Document* pDocument = pPage->m_pDocument; - FX_DWORD dwPermissions = pDocument->GetUserPermissions(); + uint32_t dwPermissions = pDocument->GetUserPermissions(); return (dwPermissions & FPDFPERM_FILL_FORM) || (dwPermissions & FPDFPERM_ANNOT_FORM); } @@ -463,7 +463,7 @@ void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) { + uint32_t dwFlags) { CFX_ByteString sSubType = pAnnot->GetSubType(); if (sSubType == BFFT_SIGNATURE) { @@ -478,7 +478,7 @@ void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, void CPDFSDK_BFAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { CFX_ByteString sSubType = pAnnot->GetSubType(); if (sSubType == BFFT_SIGNATURE) { @@ -489,7 +489,7 @@ void CPDFSDK_BFAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, } void CPDFSDK_BFAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { CFX_ByteString sSubType = pAnnot->GetSubType(); if (sSubType == BFFT_SIGNATURE) { @@ -500,7 +500,7 @@ void CPDFSDK_BFAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView, } FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { CFX_ByteString sSubType = pAnnot->GetSubType(); @@ -515,7 +515,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { CFX_ByteString sSubType = pAnnot->GetSubType(); @@ -530,7 +530,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { CFX_ByteString sSubType = pAnnot->GetSubType(); @@ -545,7 +545,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { CFX_ByteString sSubType = pAnnot->GetSubType(); @@ -560,7 +560,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, short zDelta, const CFX_FloatPoint& point) { CFX_ByteString sSubType = pAnnot->GetSubType(); @@ -577,7 +577,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { CFX_ByteString sSubType = pAnnot->GetSubType(); @@ -591,7 +591,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, } FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { CFX_ByteString sSubType = pAnnot->GetSubType(); @@ -605,8 +605,8 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, } FX_BOOL CPDFSDK_BFAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, - FX_DWORD nChar, - FX_DWORD nFlags) { + uint32_t nChar, + uint32_t nFlags) { CFX_ByteString sSubType = pAnnot->GetSubType(); if (sSubType == BFFT_SIGNATURE) { @@ -678,7 +678,7 @@ void CPDFSDK_BFAnnotHandler::OnLoad(CPDFSDK_Annot* pAnnot) { } FX_BOOL CPDFSDK_BFAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { CFX_ByteString sSubType = pAnnot->GetSubType(); if (sSubType == BFFT_SIGNATURE) { @@ -690,7 +690,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, return TRUE; } FX_BOOL CPDFSDK_BFAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { CFX_ByteString sSubType = pAnnot->GetSubType(); if (sSubType == BFFT_SIGNATURE) { @@ -751,7 +751,7 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) { + uint32_t dwFlags) { ASSERT(pPageView != NULL); ASSERT(pAnnot != NULL); @@ -827,14 +827,14 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, if (!pWidgetHandler) return FALSE; - FX_DWORD dwHitTest = + uint32_t dwHitTest = pWidgetHandler->OnHitTest(pAnnot->GetXFAWidget(), point.x, point.y); return (dwHitTest != FWL_WGTHITTEST_Unknown); } void CPDFSDK_XFAAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!pPageView || !pAnnot) return; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); @@ -843,7 +843,7 @@ void CPDFSDK_XFAAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, void CPDFSDK_XFAAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!pPageView || !pAnnot) return; @@ -853,7 +853,7 @@ void CPDFSDK_XFAAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -865,7 +865,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -877,7 +877,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -889,7 +889,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -901,7 +901,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, short zDelta, const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) @@ -914,7 +914,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -926,7 +926,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -938,7 +938,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -949,8 +949,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView, } FX_BOOL CPDFSDK_XFAAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, - FX_DWORD nChar, - FX_DWORD nFlags) { + uint32_t nChar, + uint32_t nFlags) { if (!pAnnot) return FALSE; @@ -982,12 +982,12 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, } FX_BOOL CPDFSDK_XFAAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { return TRUE; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) { + uint32_t nFlag) { return TRUE; } @@ -1048,8 +1048,8 @@ IXFA_WidgetHandler* CPDFSDK_XFAAnnotHandler::GetXFAWidgetHandler( #define FWL_KEYFLAG_RButton (1 << 4) #define FWL_KEYFLAG_MButton (1 << 5) -FX_DWORD CPDFSDK_XFAAnnotHandler::GetFWLFlags(FX_DWORD dwFlag) { - FX_DWORD dwFWLFlag = 0; +uint32_t CPDFSDK_XFAAnnotHandler::GetFWLFlags(uint32_t dwFlag) { + uint32_t dwFWLFlag = 0; if (dwFlag & FWL_EVENTFLAG_ControlKey) dwFWLFlag |= FWL_KEYFLAG_Ctrl; diff --git a/fpdfsdk/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp index 3979c0ff56..ea4e060737 100644 --- a/fpdfsdk/fsdk_baseannot.cpp +++ b/fpdfsdk/fsdk_baseannot.cpp @@ -622,11 +622,11 @@ FX_SYSTEMTIME CPDFSDK_BAAnnot::GetModifiedDate() const { return systime; } -void CPDFSDK_BAAnnot::SetFlags(FX_DWORD nFlags) { +void CPDFSDK_BAAnnot::SetFlags(uint32_t nFlags) { m_pAnnot->GetAnnotDict()->SetAtInteger("F", nFlags); } -FX_DWORD CPDFSDK_BAAnnot::GetFlags() const { +uint32_t CPDFSDK_BAAnnot::GetFlags() const { return m_pAnnot->GetAnnotDict()->GetIntegerBy("F"); } @@ -884,7 +884,7 @@ FX_BOOL CPDFSDK_BAAnnot::CreateFormFiller() { return TRUE; } FX_BOOL CPDFSDK_BAAnnot::IsVisible() const { - FX_DWORD nFlags = GetFlags(); + uint32_t nFlags = GetFlags(); return !((nFlags & ANNOTFLAG_INVISIBLE) || (nFlags & ANNOTFLAG_HIDDEN) || (nFlags & ANNOTFLAG_NOVIEW)); } diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp index c34ea49303..5dd27f845f 100644 --- a/fpdfsdk/fsdk_baseform.cpp +++ b/fpdfsdk/fsdk_baseform.cpp @@ -1551,7 +1551,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) { pEdit->SetPlateRect(rcClient); pEdit->SetAlignmentH(pControl->GetControlAlignment()); - FX_DWORD dwFieldFlags = pField->GetFieldFlags(); + uint32_t dwFieldFlags = pField->GetFieldFlags(); FX_BOOL bMultiLine = (dwFieldFlags >> 12) & 1; if (bMultiLine) { @@ -2371,7 +2371,7 @@ FX_BOOL CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action) { ASSERT(pControl); if (CPDFSDK_Widget* pWidget = GetWidget(pControl)) { - FX_DWORD nFlags = pWidget->GetFlags(); + uint32_t nFlags = pWidget->GetFlags(); nFlags &= ~ANNOTFLAG_INVISIBLE; nFlags &= ~ANNOTFLAG_NOVIEW; if (bHide) @@ -2396,7 +2396,7 @@ FX_BOOL CPDFSDK_InterForm::DoAction_SubmitForm(const CPDF_Action& action) { CPDF_Dictionary* pActionDict = action.GetDict(); if (pActionDict->KeyExist("Fields")) { CPDF_ActionFields af(&action); - FX_DWORD dwFlags = action.GetFlags(); + uint32_t dwFlags = action.GetFlags(); std::vector fieldObjects = af.GetAllFields(); std::vector fields = GetFieldFromObjects(fieldObjects); if (!fields.empty()) { @@ -2452,7 +2452,7 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, return FALSE; CFX_ByteTextBuf fdfEncodedData; - for (FX_DWORD i = 0; i < pFields->GetCount(); i++) { + for (uint32_t i = 0; i < pFields->GetCount(); i++) { CPDF_Dictionary* pField = pFields->GetDictAt(i); if (!pField) continue; @@ -2569,7 +2569,7 @@ FX_BOOL CPDFSDK_InterForm::DoAction_ResetForm(const CPDF_Action& action) { return m_pInterForm->ResetForm(true); CPDF_ActionFields af(&action); - FX_DWORD dwFlags = action.GetFlags(); + uint32_t dwFlags = action.GetFlags(); std::vector fieldObjects = af.GetAllFields(); std::vector fields = GetFieldFromObjects(fieldObjects); diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp index 91bafb10de..83de4e84f9 100644 --- a/fpdfsdk/fsdk_mgr.cpp +++ b/fpdfsdk/fsdk_mgr.cpp @@ -97,16 +97,16 @@ class CFX_SystemHandler : public IFX_SystemHandler { uint8_t nCharset) override; int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) override; void KillTimer(int32_t nID) override; - FX_BOOL IsSHIFTKeyDown(FX_DWORD nFlag) override { + FX_BOOL IsSHIFTKeyDown(uint32_t nFlag) override { return m_pEnv->FFI_IsSHIFTKeyDown(nFlag); } - FX_BOOL IsCTRLKeyDown(FX_DWORD nFlag) override { + FX_BOOL IsCTRLKeyDown(uint32_t nFlag) override { return m_pEnv->FFI_IsCTRLKeyDown(nFlag); } - FX_BOOL IsALTKeyDown(FX_DWORD nFlag) override { + FX_BOOL IsALTKeyDown(uint32_t nFlag) override { return m_pEnv->FFI_IsALTKeyDown(nFlag); } - FX_BOOL IsINSERTKeyDown(FX_DWORD nFlag) override { + FX_BOOL IsINSERTKeyDown(uint32_t nFlag) override { return m_pEnv->FFI_IsINSERTKeyDown(nFlag); } FX_SYSTEMTIME GetLocalTime() override; diff --git a/fpdfsdk/fxedit/fxet_ap.cpp b/fpdfsdk/fxedit/fxet_ap.cpp index 8d57e412f1..c17a2caaf6 100644 --- a/fpdfsdk/fxedit/fxet_ap.cpp +++ b/fpdfsdk/fxedit/fxet_ap.cpp @@ -18,7 +18,7 @@ CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap, if (SubWord > 0) { Word = SubWord; } else { - FX_DWORD dwCharCode = + uint32_t dwCharCode = pPDFFont->IsUnicodeCompatible() ? pPDFFont->CharCodeFromUnicode(Word) : pFontMap->CharCodeFromUnicode(nFontIndex, Word); diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp index b568440abe..3d7e485f35 100644 --- a/fpdfsdk/fxedit/fxet_edit.cpp +++ b/fpdfsdk/fxedit/fxet_edit.cpp @@ -103,7 +103,7 @@ int32_t CFX_Edit_Provider::GetCharWidth(int32_t nFontIndex, uint16_t word, int32_t nWordStyle) { if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex)) { - FX_DWORD charcode = word; + uint32_t charcode = word; if (pPDFFont->IsUnicodeCompatible()) charcode = pPDFFont->CharCodeFromUnicode(word); diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h index 9d1b1cef62..f96ed3b177 100644 --- a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h +++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h @@ -50,11 +50,11 @@ class CPDFXFA_App : public IXFA_AppProvider { wsFoxitName = L"Foxit"; } - void Beep(FX_DWORD dwType) override; + void Beep(uint32_t dwType) override; int32_t MsgBox(const CFX_WideStringC& wsMessage, const CFX_WideStringC& wsTitle, - FX_DWORD dwIconType, - FX_DWORD dwButtonType) override; + uint32_t dwIconType, + uint32_t dwButtonType) override; void Response(CFX_WideString& wsAnswer, const CFX_WideStringC& wsQuestion, const CFX_WideStringC& wsTitle, diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h index 5186fe51ab..98ed6fdbe4 100644 --- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h +++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h @@ -49,9 +49,9 @@ class CPDFXFA_Document : public IXFA_DocProvider { // used in dynamic xfa, dwFlags refer to XFA_INVALIDATE_XXX macros. virtual void InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF& rt, - FX_DWORD dwFlags = 0); + uint32_t dwFlags = 0); // used in static xfa, dwFlags refer to XFA_INVALIDATE_XXX macros. - virtual void InvalidateRect(IXFA_Widget* hWidget, FX_DWORD dwFlags = 0); + virtual void InvalidateRect(IXFA_Widget* hWidget, uint32_t dwFlags = 0); // show or hide caret virtual void DisplayCaret(IXFA_Widget* hWidget, FX_BOOL bVisible, @@ -67,11 +67,11 @@ class CPDFXFA_Document : public IXFA_DocProvider { const CFX_RectF* pRectExclude = NULL); // dwFlags XFA_PAGEVIEWEVENT_Added, XFA_PAGEVIEWEVENT_Removing - virtual void PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags); + virtual void PageViewEvent(IXFA_PageView* pPageView, uint32_t dwFlags); // dwEvent refer to XFA_WIDGETEVENT_XXX virtual void WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, - FX_DWORD dwEvent, + uint32_t dwEvent, void* pParam = NULL, void* pAdditional = NULL); @@ -104,7 +104,7 @@ class CPDFXFA_Document : public IXFA_DocProvider { virtual void Print(IXFA_Doc* hDoc, int32_t nStartPage, int32_t nEndPage, - FX_DWORD dwOptions); + uint32_t dwOptions); // LayoutPseudo method virtual int32_t AbsPageCountInBatch(IXFA_Doc* hDoc) { return 0; } diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_util.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_util.h index f4c73c65c2..e0c508baa5 100644 --- a/fpdfsdk/include/fpdfxfa/fpdfxfa_util.h +++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_util.h @@ -23,7 +23,7 @@ class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr { public: CXFA_FWLAdapterTimerMgr(CPDFDoc_Environment* pEnv) : m_pEnv(pEnv) {} virtual FWL_ERR Start(IFWL_Timer* pTimer, - FX_DWORD dwElapse, + uint32_t dwElapse, FWL_HTIMER& hTimer, FX_BOOL bImmediately = TRUE); virtual FWL_ERR Stop(FWL_HTIMER hTimer); diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h index f94d7d0592..637fdfc387 100644 --- a/fpdfsdk/include/fsdk_annothandler.h +++ b/fpdfsdk/include/fsdk_annothandler.h @@ -61,14 +61,14 @@ class IPDFSDK_AnnotHandler { CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) = 0; + uint32_t dwFlags) = 0; virtual void OnDrawSleep(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, const CFX_FloatRect& rcWindow, - FX_DWORD dwFlags) = 0; + uint32_t dwFlags) = 0; virtual void OnCreate(CPDFSDK_Annot* pAnnot) = 0; @@ -80,56 +80,56 @@ class IPDFSDK_AnnotHandler { virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) = 0; + uint32_t nFlag) = 0; virtual void OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) = 0; + uint32_t nFlag) = 0; virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) = 0; virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) = 0; virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) = 0; virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) = 0; virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, short zDelta, const CFX_FloatPoint& point) = 0; virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) = 0; virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) = 0; virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) = 0; // by wjm. virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, - FX_DWORD nChar, - FX_DWORD nFlags) = 0; + uint32_t nChar, + uint32_t nFlags) = 0; virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0; virtual FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0; virtual void OnDeSelected(CPDFSDK_Annot* pAnnot) = 0; virtual void OnSelected(CPDFSDK_Annot* pAnnot) = 0; - virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0; - virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0; + virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) = 0; + virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) = 0; #ifdef PDF_ENABLE_XFA virtual FX_BOOL OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, CPDFSDK_Annot* pNewAnnot) = 0; @@ -162,67 +162,67 @@ class CPDFSDK_BFAnnotHandler : public IPDFSDK_AnnotHandler { CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags) override; + uint32_t dwFlags) override; void OnDrawSleep(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, const CFX_FloatRect& rcWindow, - FX_DWORD dwFlags) override {} + uint32_t dwFlags) override {} void OnCreate(CPDFSDK_Annot* pAnnot) override; void OnLoad(CPDFSDK_Annot* pAnnot) override; void OnDelete(CPDFSDK_Annot* pAnnot) override {} void OnRelease(CPDFSDK_Annot* pAnnot) override {} void OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) override; + uint32_t nFlag) override; void OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag) override; + uint32_t nFlag) override; FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) override; FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) override; FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) override; FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) override; FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, short zDelta, const CFX_FloatPoint& point) override; FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) override; FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) override; FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point) override { return FALSE; } FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, - FX_DWORD nChar, - FX_DWORD nFlags) override; + uint32_t nChar, + uint32_t nFlags) override; FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; void OnDeSelected(CPDFSDK_Annot* pAnnot) override {} void OnSelected(CPDFSDK_Annot* pAnnot) override {} - FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) override; - FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) override; + FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) override; + FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) override; #ifdef PDF_ENABLE_XFA FX_BOOL OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, CPDFSDK_Annot* pNewAnnot) override { @@ -272,14 +272,14 @@ class CPDFSDK_XFAAnnotHandler : public IPDFSDK_AnnotHandler { CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags); + uint32_t dwFlags); virtual void OnDrawSleep(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, const CFX_FloatRect& rcWindow, - FX_DWORD dwFlags) {} + uint32_t dwFlags) {} virtual void OnCreate(CPDFSDK_Annot* pAnnot) {} @@ -291,62 +291,62 @@ class CPDFSDK_XFAAnnotHandler : public IPDFSDK_AnnotHandler { virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag); + uint32_t nFlag); virtual void OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlag); + uint32_t nFlag); virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, short zDelta, const CFX_FloatPoint& point); virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); // by wjm. virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, - FX_DWORD nChar, - FX_DWORD nFlags); + uint32_t nChar, + uint32_t nFlags); virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); virtual FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); virtual void OnDeSelected(CPDFSDK_Annot* pAnnot) {} virtual void OnSelected(CPDFSDK_Annot* pAnnot) {} - virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); - virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); + virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); + virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); virtual FX_BOOL OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, CPDFSDK_Annot* pNewAnnot); private: IXFA_WidgetHandler* GetXFAWidgetHandler(CPDFSDK_Annot* pAnnot); - FX_DWORD GetFWLFlags(FX_DWORD dwFlag); + uint32_t GetFWLFlags(uint32_t dwFlag); private: CPDFDoc_Environment* m_pApp; @@ -381,56 +381,56 @@ class CPDFSDK_AnnotHandlerMgr { CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, - FX_DWORD dwFlags); + uint32_t dwFlags); virtual void Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags); + uint32_t nFlags); virtual void Annot_OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags); + uint32_t nFlags); virtual FX_BOOL Annot_OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL Annot_OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL Annot_OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL Annot_OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL Annot_OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, short zDelta, const CFX_FloatPoint& point); virtual FX_BOOL Annot_OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL Annot_OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - FX_DWORD nFlags, + uint32_t nFlags, const CFX_FloatPoint& point); virtual FX_BOOL Annot_OnChar(CPDFSDK_Annot* pAnnot, - FX_DWORD nChar, - FX_DWORD nFlags); + uint32_t nChar, + uint32_t nFlags); virtual FX_BOOL Annot_OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); virtual FX_BOOL Annot_OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); - virtual FX_BOOL Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); - virtual FX_BOOL Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); + virtual FX_BOOL Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); + virtual FX_BOOL Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); #ifdef PDF_ENABLE_XFA virtual FX_BOOL Annot_OnChangeFocus(CPDFSDK_Annot* pSetAnnot, diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h index 2024c2ca2d..dc2c1a9691 100644 --- a/fpdfsdk/include/fsdk_baseannot.h +++ b/fpdfsdk/include/fsdk_baseannot.h @@ -148,8 +148,8 @@ class CPDFSDK_BAAnnot : public CPDFSDK_Annot { void SetModifiedDate(const FX_SYSTEMTIME& st); FX_SYSTEMTIME GetModifiedDate() const; - void SetFlags(FX_DWORD nFlags); - FX_DWORD GetFlags() const; + void SetFlags(uint32_t nFlags); + uint32_t GetFlags() const; void SetAppState(const CFX_ByteString& str); CFX_ByteString GetAppState() const; diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h index 4af327fc93..706880ab72 100644 --- a/fpdfsdk/include/fsdk_define.h +++ b/fpdfsdk/include/fsdk_define.h @@ -25,13 +25,13 @@ // Convert a #FX_ARGB to a #FX_COLORREF. #define FX_ARGBTOCOLORREF(argb) \ - ((((FX_DWORD)argb & 0x00FF0000) >> 16) | ((FX_DWORD)argb & 0x0000FF00) | \ - (((FX_DWORD)argb & 0x000000FF) << 16)) + ((((uint32_t)argb & 0x00FF0000) >> 16) | ((uint32_t)argb & 0x0000FF00) | \ + (((uint32_t)argb & 0x000000FF) << 16)) // Convert a #FX_COLORREF to a #FX_ARGB. #define FX_COLORREFTOARGB(rgb) \ - ((FX_DWORD)0xFF000000 | (((FX_DWORD)rgb & 0x000000FF) << 16) | \ - ((FX_DWORD)rgb & 0x0000FF00) | (((FX_DWORD)rgb & 0x00FF0000) >> 16)) + ((uint32_t)0xFF000000 | (((uint32_t)rgb & 0x000000FF) << 16) | \ + ((uint32_t)rgb & 0x0000FF00) | (((uint32_t)rgb & 0x00FF0000) >> 16)) typedef unsigned int FX_UINT; class CRenderContext; @@ -49,15 +49,15 @@ class CPDF_CustomAccess final : public IFX_FileRead { #ifdef PDF_ENABLE_XFA virtual CFX_ByteString GetFullPath() { return ""; } - virtual FX_BOOL GetByte(FX_DWORD pos, uint8_t& ch); - virtual FX_BOOL GetBlock(FX_DWORD pos, uint8_t* pBuf, FX_DWORD size); + virtual FX_BOOL GetByte(uint32_t pos, uint8_t& ch); + virtual FX_BOOL GetBlock(uint32_t pos, uint8_t* pBuf, uint32_t size); #endif // PDF_ENABLE_XFA private: FPDF_FILEACCESS m_FileAccess; #ifdef PDF_ENABLE_XFA uint8_t m_Buffer[512]; - FX_DWORD m_BufferOffset; + uint32_t m_BufferOffset; #endif // PDF_ENABLE_XFA }; @@ -124,7 +124,7 @@ void FPDF_RenderPage_Retail(CRenderContext* pContext, FX_BOOL bNeedToRestore, IFSDK_PAUSE_Adapter* pause); -void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code); +void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code); void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot); void ProcessParseError(CPDF_Parser::Error err); diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h index 17340753ea..3b8c951e0e 100644 --- a/fpdfsdk/include/fsdk_mgr.h +++ b/fpdfsdk/include/fsdk_mgr.h @@ -103,19 +103,19 @@ class CPDFDoc_Environment final { m_pInfo->FFI_OnChange(m_pInfo); } - FX_BOOL FFI_IsSHIFTKeyDown(FX_DWORD nFlag) const { + FX_BOOL FFI_IsSHIFTKeyDown(uint32_t nFlag) const { return (nFlag & FWL_EVENTFLAG_ShiftKey) != 0; } - FX_BOOL FFI_IsCTRLKeyDown(FX_DWORD nFlag) const { + FX_BOOL FFI_IsCTRLKeyDown(uint32_t nFlag) const { return (nFlag & FWL_EVENTFLAG_ControlKey) != 0; } - FX_BOOL FFI_IsALTKeyDown(FX_DWORD nFlag) const { + FX_BOOL FFI_IsALTKeyDown(uint32_t nFlag) const { return (nFlag & FWL_EVENTFLAG_AltKey) != 0; } - FX_BOOL FFI_IsINSERTKeyDown(FX_DWORD nFlag) const { return FALSE; } + FX_BOOL FFI_IsINSERTKeyDown(uint32_t nFlag) const { return FALSE; } FPDF_PAGE FFI_GetPage(FPDF_DOCUMENT document, int nPageIndex) { if (m_pInfo && m_pInfo->FFI_GetPage) @@ -398,7 +398,7 @@ class CPDFDoc_Environment final { return L""; } - void FFI_PageEvent(int iPageCount, FX_DWORD dwEventType) const { + void FFI_PageEvent(int iPageCount, uint32_t dwEventType) const { if (m_pInfo && m_pInfo->FFI_PageEvent) m_pInfo->FFI_PageEvent(m_pInfo, iPageCount, dwEventType); } diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h index 6619f3ed04..dc225df0a2 100644 --- a/fpdfsdk/include/fx_systemhandler.h +++ b/fpdfsdk/include/fx_systemhandler.h @@ -92,10 +92,10 @@ class IFX_SystemHandler { virtual int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) = 0; virtual void KillTimer(int32_t nID) = 0; - virtual FX_BOOL IsSHIFTKeyDown(FX_DWORD nFlag) = 0; - virtual FX_BOOL IsCTRLKeyDown(FX_DWORD nFlag) = 0; - virtual FX_BOOL IsALTKeyDown(FX_DWORD nFlag) = 0; - virtual FX_BOOL IsINSERTKeyDown(FX_DWORD nFlag) = 0; + virtual FX_BOOL IsSHIFTKeyDown(uint32_t nFlag) = 0; + virtual FX_BOOL IsCTRLKeyDown(uint32_t nFlag) = 0; + virtual FX_BOOL IsALTKeyDown(uint32_t nFlag) = 0; + virtual FX_BOOL IsINSERTKeyDown(uint32_t nFlag) = 0; virtual FX_SYSTEMTIME GetLocalTime() = 0; diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp index 9b3df6154a..0b793db049 100644 --- a/fpdfsdk/javascript/Document.cpp +++ b/fpdfsdk/javascript/Document.cpp @@ -1460,7 +1460,7 @@ int Document::CountWords(CPDF_TextObject* pTextObj) { FX_BOOL bIsLatin = FALSE; for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { - FX_DWORD charcode = static_cast(-1); + uint32_t charcode = static_cast(-1); FX_FLOAT kerning; pTextObj->GetCharInfo(i, charcode, kerning); @@ -1493,7 +1493,7 @@ CFX_WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj, FX_BOOL bIsLatin = FALSE; for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { - FX_DWORD charcode = static_cast(-1); + uint32_t charcode = static_cast(-1); FX_FLOAT kerning; pTextObj->GetCharInfo(i, charcode, kerning); diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp index 814d2e86fa..4ac7081291 100644 --- a/fpdfsdk/javascript/Field.cpp +++ b/fpdfsdk/javascript/Field.cpp @@ -947,7 +947,7 @@ FX_BOOL Field::currentValueIndices(IJS_Context* cc, if (!m_bCanSet) return FALSE; - CFX_ArrayTemplate array; + CFX_ArrayTemplate array; if (vp.GetType() == CJS_Value::VT_number) { int iSelecting = 0; @@ -1002,7 +1002,7 @@ FX_BOOL Field::currentValueIndices(IJS_Context* cc, void Field::SetCurrentValueIndices(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, - const CFX_ArrayTemplate& array) { + const CFX_ArrayTemplate& array) { ASSERT(pDocument); std::vector FieldArray = @@ -1010,7 +1010,7 @@ void Field::SetCurrentValueIndices(CPDFSDK_Document* pDocument, for (CPDF_FormField* pFormField : FieldArray) { int nFieldType = pFormField->GetFieldType(); if (nFieldType == FIELDTYPE_COMBOBOX || nFieldType == FIELDTYPE_LISTBOX) { - FX_DWORD dwFieldFlags = pFormField->GetFieldFlags(); + uint32_t dwFieldFlags = pFormField->GetFieldFlags(); pFormField->ClearSelection(TRUE); for (int i = 0, sz = array.GetSize(); i < sz; i++) { @@ -1209,7 +1209,7 @@ FX_BOOL Field::display(IJS_Context* cc, if (!pWidget) return FALSE; - FX_DWORD dwFlag = pWidget->GetFlags(); + uint32_t dwFlag = pWidget->GetFlags(); if (ANNOTFLAG_INVISIBLE & dwFlag || ANNOTFLAG_HIDDEN & dwFlag) { vp << (int32_t)1; @@ -1244,7 +1244,7 @@ void Field::SetDisplay(CPDFSDK_Document* pDocument, ASSERT(pFormControl); if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormControl)) { - FX_DWORD dwFlag = pWidget->GetFlags(); + uint32_t dwFlag = pWidget->GetFlags(); switch (number) { case 0: dwFlag &= (~ANNOTFLAG_INVISIBLE); @@ -1285,7 +1285,7 @@ void Field::SetDisplay(CPDFSDK_Document* pDocument, if (CPDF_FormControl* pFormControl = pFormField->GetControl(nControlIndex)) { if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormControl)) { - FX_DWORD dwFlag = pWidget->GetFlags(); + uint32_t dwFlag = pWidget->GetFlags(); switch (number) { case 0: dwFlag &= (~ANNOTFLAG_INVISIBLE); @@ -1525,7 +1525,7 @@ FX_BOOL Field::hidden(IJS_Context* cc, if (!pWidget) return FALSE; - FX_DWORD dwFlags = pWidget->GetFlags(); + uint32_t dwFlags = pWidget->GetFlags(); if (ANNOTFLAG_INVISIBLE & dwFlags || ANNOTFLAG_HIDDEN & dwFlags) vp << true; @@ -1549,7 +1549,7 @@ void Field::SetHidden(CPDFSDK_Document* pDocument, for (int i = 0, sz = pFormField->CountControls(); i < sz; ++i) { if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormField->GetControl(i))) { - FX_DWORD dwFlags = pWidget->GetFlags(); + uint32_t dwFlags = pWidget->GetFlags(); if (b) { dwFlags &= (~ANNOTFLAG_INVISIBLE); @@ -1577,7 +1577,7 @@ void Field::SetHidden(CPDFSDK_Document* pDocument, if (CPDF_FormControl* pFormControl = pFormField->GetControl(nControlIndex)) { if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormControl)) { - FX_DWORD dwFlags = pWidget->GetFlags(); + uint32_t dwFlags = pWidget->GetFlags(); if (b) { dwFlags &= (~ANNOTFLAG_INVISIBLE); @@ -1964,7 +1964,7 @@ FX_BOOL Field::print(IJS_Context* cc, for (int i = 0, sz = pFormField->CountControls(); i < sz; ++i) { if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormField->GetControl(i))) { - FX_DWORD dwFlags = pWidget->GetFlags(); + uint32_t dwFlags = pWidget->GetFlags(); if (bVP) dwFlags |= ANNOTFLAG_PRINT; else @@ -1985,7 +1985,7 @@ FX_BOOL Field::print(IJS_Context* cc, if (CPDF_FormControl* pFormControl = pFormField->GetControl(m_nFormControlIndex)) { if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormControl)) { - FX_DWORD dwFlags = pWidget->GetFlags(); + uint32_t dwFlags = pWidget->GetFlags(); if (bVP) dwFlags |= ANNOTFLAG_PRINT; else @@ -3428,7 +3428,7 @@ void Field::AddDelay_Color(enum FIELD_PROP prop, const CPWL_Color& color) { } void Field::AddDelay_WordArray(enum FIELD_PROP prop, - const CFX_ArrayTemplate& array) { + const CFX_ArrayTemplate& array) { CJS_DelayData* pNewData = new CJS_DelayData; pNewData->sFieldName = m_FieldName; pNewData->nControlIndex = m_nFormControlIndex; diff --git a/fpdfsdk/javascript/Field.h b/fpdfsdk/javascript/Field.h index c3045632df..5f5be10c26 100644 --- a/fpdfsdk/javascript/Field.h +++ b/fpdfsdk/javascript/Field.h @@ -84,7 +84,7 @@ struct CJS_DelayData { CFX_WideString widestring; CFX_FloatRect rect; CPWL_Color color; - CFX_ArrayTemplate wordarray; + CFX_ArrayTemplate wordarray; CJS_WideStringArray widestringarray; }; @@ -344,7 +344,7 @@ class Field : public CJS_EmbedObj { static void SetCurrentValueIndices(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, - const CFX_ArrayTemplate& array); + const CFX_ArrayTemplate& array); static void SetDefaultStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex); @@ -477,7 +477,7 @@ class Field : public CJS_EmbedObj { void AddDelay_Rect(enum FIELD_PROP prop, const CFX_FloatRect& rect); void AddDelay_Color(enum FIELD_PROP prop, const CPWL_Color& color); void AddDelay_WordArray(enum FIELD_PROP prop, - const CFX_ArrayTemplate& array); + const CFX_ArrayTemplate& array); void AddDelay_WideStringArray(enum FIELD_PROP prop, const CJS_WideStringArray& array); diff --git a/fpdfsdk/javascript/JS_GlobalData.cpp b/fpdfsdk/javascript/JS_GlobalData.cpp index 3376ccdc61..2c2ec1d5c1 100644 --- a/fpdfsdk/javascript/JS_GlobalData.cpp +++ b/fpdfsdk/javascript/JS_GlobalData.cpp @@ -328,19 +328,19 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() { ASSERT(wVersion <= 2); - FX_DWORD dwCount = *((FX_DWORD*)p); - p += sizeof(FX_DWORD); + uint32_t dwCount = *((uint32_t*)p); + p += sizeof(uint32_t); - FX_DWORD dwSize = *((FX_DWORD*)p); - p += sizeof(FX_DWORD); + uint32_t dwSize = *((uint32_t*)p); + p += sizeof(uint32_t); - if (dwSize == nLength - sizeof(uint16_t) * 2 - sizeof(FX_DWORD) * 2) { + if (dwSize == nLength - sizeof(uint16_t) * 2 - sizeof(uint32_t) * 2) { for (int32_t i = 0, sz = dwCount; i < sz; i++) { if (p > pBuffer + nLength) break; - FX_DWORD dwNameLen = *((FX_DWORD*)p); - p += sizeof(FX_DWORD); + uint32_t dwNameLen = *((uint32_t*)p); + p += sizeof(uint32_t); if (p + dwNameLen > pBuffer + nLength) break; @@ -356,8 +356,8 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() { double dData = 0; switch (wVersion) { case 1: { - FX_DWORD dwData = *((FX_DWORD*)p); - p += sizeof(FX_DWORD); + uint32_t dwData = *((uint32_t*)p); + p += sizeof(uint32_t); dData = dwData; } break; case 2: { @@ -375,8 +375,8 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() { SetGlobalVariablePersistent(sEntry, TRUE); } break; case JS_GLOBALDATA_TYPE_STRING: { - FX_DWORD dwLength = *((FX_DWORD*)p); - p += sizeof(FX_DWORD); + uint32_t dwLength = *((uint32_t*)p); + p += sizeof(uint32_t); if (p + dwLength > pBuffer + nLength) break; @@ -398,7 +398,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() { } void CJS_GlobalData::SaveGlobalPersisitentVariables() { - FX_DWORD nCount = 0; + uint32_t nCount = 0; CFX_BinaryBuf sData; for (int i = 0, sz = m_arrayGlobalData.GetSize(); i < sz; i++) { @@ -421,9 +421,9 @@ void CJS_GlobalData::SaveGlobalPersisitentVariables() { sFile.AppendBlock(&wType, sizeof(uint16_t)); uint16_t wVersion = 2; sFile.AppendBlock(&wVersion, sizeof(uint16_t)); - sFile.AppendBlock(&nCount, sizeof(FX_DWORD)); - FX_DWORD dwSize = sData.GetSize(); - sFile.AppendBlock(&dwSize, sizeof(FX_DWORD)); + sFile.AppendBlock(&nCount, sizeof(uint32_t)); + uint32_t dwSize = sData.GetSize(); + sFile.AppendBlock(&dwSize, sizeof(uint32_t)); sFile.AppendBlock(sData.GetBuffer(), sData.GetSize()); @@ -451,8 +451,8 @@ void CJS_GlobalData::MakeByteString(const CFX_ByteString& name, uint16_t wType = (uint16_t)pData->nType; switch (wType) { case JS_GLOBALDATA_TYPE_NUMBER: { - FX_DWORD dwNameLen = (FX_DWORD)name.GetLength(); - sData.AppendBlock(&dwNameLen, sizeof(FX_DWORD)); + uint32_t dwNameLen = (uint32_t)name.GetLength(); + sData.AppendBlock(&dwNameLen, sizeof(uint32_t)); sData.AppendString(name); sData.AppendBlock(&wType, sizeof(uint16_t)); @@ -460,8 +460,8 @@ void CJS_GlobalData::MakeByteString(const CFX_ByteString& name, sData.AppendBlock(&dData, sizeof(double)); } break; case JS_GLOBALDATA_TYPE_BOOLEAN: { - FX_DWORD dwNameLen = (FX_DWORD)name.GetLength(); - sData.AppendBlock(&dwNameLen, sizeof(FX_DWORD)); + uint32_t dwNameLen = (uint32_t)name.GetLength(); + sData.AppendBlock(&dwNameLen, sizeof(uint32_t)); sData.AppendString(name); sData.AppendBlock(&wType, sizeof(uint16_t)); @@ -469,20 +469,20 @@ void CJS_GlobalData::MakeByteString(const CFX_ByteString& name, sData.AppendBlock(&wData, sizeof(uint16_t)); } break; case JS_GLOBALDATA_TYPE_STRING: { - FX_DWORD dwNameLen = (FX_DWORD)name.GetLength(); - sData.AppendBlock(&dwNameLen, sizeof(FX_DWORD)); + uint32_t dwNameLen = (uint32_t)name.GetLength(); + sData.AppendBlock(&dwNameLen, sizeof(uint32_t)); sData.AppendString(name); sData.AppendBlock(&wType, sizeof(uint16_t)); - FX_DWORD dwDataLen = (FX_DWORD)pData->sData.GetLength(); - sData.AppendBlock(&dwDataLen, sizeof(FX_DWORD)); + uint32_t dwDataLen = (uint32_t)pData->sData.GetLength(); + sData.AppendBlock(&dwDataLen, sizeof(uint32_t)); sData.AppendString(pData->sData); } break; case JS_GLOBALDATA_TYPE_NULL: { - FX_DWORD dwNameLen = (FX_DWORD)name.GetLength(); - sData.AppendBlock(&dwNameLen, sizeof(FX_DWORD)); + uint32_t dwNameLen = (uint32_t)name.GetLength(); + sData.AppendBlock(&dwNameLen, sizeof(uint32_t)); sData.AppendString(name); - sData.AppendBlock(&wType, sizeof(FX_DWORD)); + sData.AppendBlock(&wType, sizeof(uint32_t)); } break; default: break; diff --git a/fpdfsdk/javascript/JS_Object.cpp b/fpdfsdk/javascript/JS_Object.cpp index e6af576339..9bfa857cb9 100644 --- a/fpdfsdk/javascript/JS_Object.cpp +++ b/fpdfsdk/javascript/JS_Object.cpp @@ -97,8 +97,8 @@ CJS_Timer::CJS_Timer(CJS_EmbedObj* pObj, CJS_Runtime* pRuntime, int nType, const CFX_WideString& script, - FX_DWORD dwElapse, - FX_DWORD dwTimeOut) + uint32_t dwElapse, + uint32_t dwTimeOut) : m_nTimerID(0), m_pEmbedObj(pObj), m_bProcessing(false), diff --git a/fpdfsdk/javascript/JS_Object.h b/fpdfsdk/javascript/JS_Object.h index 983b713744..da15199e34 100644 --- a/fpdfsdk/javascript/JS_Object.h +++ b/fpdfsdk/javascript/JS_Object.h @@ -80,14 +80,14 @@ class CJS_Timer : public CJS_Runtime::Observer { CJS_Runtime* pRuntime, int nType, const CFX_WideString& script, - FX_DWORD dwElapse, - FX_DWORD dwTimeOut); + uint32_t dwElapse, + uint32_t dwTimeOut); ~CJS_Timer() override; void KillJSTimer(); int GetType() const { return m_nType; } - FX_DWORD GetTimeOut() const { return m_dwTimeOut; } + uint32_t GetTimeOut() const { return m_dwTimeOut; } CJS_Runtime* GetRuntime() const { return m_bValid ? m_pRuntime : nullptr; } CFX_WideString GetJScript() const { return m_swJScript; } @@ -100,14 +100,14 @@ class CJS_Timer : public CJS_Runtime::Observer { // CJS_Runtime::Observer void OnDestroyed() override; - FX_DWORD m_nTimerID; + uint32_t m_nTimerID; CJS_EmbedObj* const m_pEmbedObj; bool m_bProcessing; bool m_bValid; // data const int m_nType; // 0:Interval; 1:TimeOut - const FX_DWORD m_dwTimeOut; + const uint32_t m_dwTimeOut; const CFX_WideString m_swJScript; CJS_Runtime* const m_pRuntime; CPDFDoc_Environment* const m_pApp; diff --git a/fpdfsdk/javascript/JS_Value.cpp b/fpdfsdk/javascript/JS_Value.cpp index 5e403a524b..1d57833247 100644 --- a/fpdfsdk/javascript/JS_Value.cpp +++ b/fpdfsdk/javascript/JS_Value.cpp @@ -17,7 +17,7 @@ #include "fpdfsdk/javascript/JS_Define.h" #include "fpdfsdk/javascript/JS_Object.h" -static const FX_DWORD g_nan[2] = {0, 0x7FF80000}; +static const uint32_t g_nan[2] = {0, 0x7FF80000}; static double GetNan() { return *(double*)g_nan; } diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp index 2f81791dc7..41fa15259a 100644 --- a/fpdfsdk/javascript/app.cpp +++ b/fpdfsdk/javascript/app.cpp @@ -383,7 +383,7 @@ FX_BOOL app::setInterval(IJS_Context* cc, } CJS_Runtime* pRuntime = pContext->GetJSRuntime(); - FX_DWORD dwInterval = params.size() > 1 ? params[1].ToInt() : 1000; + uint32_t dwInterval = params.size() > 1 ? params[1].ToInt() : 1000; CPDFDoc_Environment* pApp = pRuntime->GetReaderApp(); ASSERT(pApp); @@ -421,7 +421,7 @@ FX_BOOL app::setTimeOut(IJS_Context* cc, return TRUE; } - FX_DWORD dwTimeOut = params.size() > 1 ? params[1].ToInt() : 1000; + uint32_t dwTimeOut = params.size() > 1 ? params[1].ToInt() : 1000; CPDFDoc_Environment* pApp = pRuntime->GetReaderApp(); ASSERT(pApp); diff --git a/fpdfsdk/pdfwindow/PWL_Button.cpp b/fpdfsdk/pdfwindow/PWL_Button.cpp index 851b5541f1..baf9ef0f26 100644 --- a/fpdfsdk/pdfwindow/PWL_Button.cpp +++ b/fpdfsdk/pdfwindow/PWL_Button.cpp @@ -21,7 +21,7 @@ void CPWL_Button::OnCreate(PWL_CREATEPARAM& cp) { } FX_BOOL CPWL_Button::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonDown(point, nFlag); m_bMouseDown = TRUE; @@ -30,7 +30,7 @@ FX_BOOL CPWL_Button::OnLButtonDown(const CFX_FloatPoint& point, return TRUE; } -FX_BOOL CPWL_Button::OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) { +FX_BOOL CPWL_Button::OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) { CPWL_Wnd::OnLButtonUp(point, nFlag); ReleaseCapture(); diff --git a/fpdfsdk/pdfwindow/PWL_Button.h b/fpdfsdk/pdfwindow/PWL_Button.h index 1fffa36d41..809b0614ca 100644 --- a/fpdfsdk/pdfwindow/PWL_Button.h +++ b/fpdfsdk/pdfwindow/PWL_Button.h @@ -17,8 +17,8 @@ class CPWL_Button : public CPWL_Wnd { // CPWL_Wnd CFX_ByteString GetClassName() const override; void OnCreate(PWL_CREATEPARAM& cp) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; protected: FX_BOOL m_bMouseDown; diff --git a/fpdfsdk/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/pdfwindow/PWL_ComboBox.cpp index 1428e6bf1a..c07233f499 100644 --- a/fpdfsdk/pdfwindow/PWL_ComboBox.cpp +++ b/fpdfsdk/pdfwindow/PWL_ComboBox.cpp @@ -22,7 +22,7 @@ #define IsFloatEqual(fa, fb) IsFloatZero((fa) - (fb)) FX_BOOL CPWL_CBListBox::OnLButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonUp(point, nFlag); if (m_bMouseDown) { @@ -47,7 +47,7 @@ FX_BOOL CPWL_CBListBox::OnLButtonUp(const CFX_FloatPoint& point, FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(uint16_t nChar, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_pList) return FALSE; @@ -93,7 +93,7 @@ FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(uint16_t nChar, FX_BOOL CPWL_CBListBox::OnCharWithExit(uint16_t nChar, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_pList) return FALSE; @@ -178,7 +178,7 @@ void CPWL_CBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, } FX_BOOL CPWL_CBButton::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonDown(point, nFlag); SetCapture(); @@ -192,7 +192,7 @@ FX_BOOL CPWL_CBButton::OnLButtonDown(const CFX_FloatPoint& point, } FX_BOOL CPWL_CBButton::OnLButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonUp(point, nFlag); ReleaseCapture(); @@ -517,7 +517,7 @@ void CPWL_ComboBox::SetPopup(FX_BOOL bPopup) { } } -FX_BOOL CPWL_ComboBox::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_ComboBox::OnKeyDown(uint16_t nChar, uint32_t nFlag) { if (!m_pList) return FALSE; if (!m_pEdit) @@ -576,7 +576,7 @@ FX_BOOL CPWL_ComboBox::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) { return FALSE; } -FX_BOOL CPWL_ComboBox::OnChar(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_ComboBox::OnChar(uint16_t nChar, uint32_t nFlag) { if (!m_pList) return FALSE; @@ -603,7 +603,7 @@ FX_BOOL CPWL_ComboBox::OnChar(uint16_t nChar, FX_DWORD nFlag) { } void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { switch (msg) { diff --git a/fpdfsdk/pdfwindow/PWL_ComboBox.h b/fpdfsdk/pdfwindow/PWL_ComboBox.h index 6d376e1895..02f9d1380a 100644 --- a/fpdfsdk/pdfwindow/PWL_ComboBox.h +++ b/fpdfsdk/pdfwindow/PWL_ComboBox.h @@ -23,10 +23,10 @@ class CPWL_CBListBox : public CPWL_ListBox { ~CPWL_CBListBox() override {} // CPWL_ListBox - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; - FX_BOOL OnKeyDownWithExit(uint16_t nChar, FX_BOOL& bExit, FX_DWORD nFlag); - FX_BOOL OnCharWithExit(uint16_t nChar, FX_BOOL& bExit, FX_DWORD nFlag); + FX_BOOL OnKeyDownWithExit(uint16_t nChar, FX_BOOL& bExit, uint32_t nFlag); + FX_BOOL OnCharWithExit(uint16_t nChar, FX_BOOL& bExit, uint32_t nFlag); }; #define PWL_COMBOBOX_BUTTON_WIDTH 13 @@ -40,8 +40,8 @@ class CPWL_CBButton : public CPWL_Wnd { void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; }; class CPWL_ComboBox : public CPWL_Wnd { @@ -54,10 +54,10 @@ class CPWL_ComboBox : public CPWL_Wnd { // CPWL_Wnd: CFX_ByteString GetClassName() const override; void OnCreate(PWL_CREATEPARAM& cp) override; - FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; - FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag) override; + FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag) override; void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0) override; void CreateChildWnd(const PWL_CREATEPARAM& cp) override; diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index b75c72f149..f53f263470 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -467,7 +467,7 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice, } } -FX_BOOL CPWL_Edit::OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) { +FX_BOOL CPWL_Edit::OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) { CPWL_Wnd::OnLButtonDown(point, nFlag); if (HasFlag(PES_TEXTOVERFLOW) || ClientHitTest(point)) { @@ -484,7 +484,7 @@ FX_BOOL CPWL_Edit::OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) { } FX_BOOL CPWL_Edit::OnLButtonDblClk(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonDblClk(point, nFlag); if (HasFlag(PES_TEXTOVERFLOW) || ClientHitTest(point)) { @@ -503,7 +503,7 @@ FX_BOOL CPWL_Edit::OnLButtonDblClk(const CFX_FloatPoint& point, #define WM_PWLEDIT_SELECTALL 0x07 #define WM_PWLEDIT_SUGGEST 0x08 -FX_BOOL CPWL_Edit::OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) { +FX_BOOL CPWL_Edit::OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) { if (m_bMouseDown) return FALSE; @@ -862,7 +862,7 @@ void CPWL_Edit::EnableSpellCheck(FX_BOOL bEnabled) { RemoveFlag(PES_SPELLCHECK); } -FX_BOOL CPWL_Edit::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_Edit::OnKeyDown(uint16_t nChar, uint32_t nFlag) { if (m_bMouseDown) return TRUE; @@ -903,7 +903,7 @@ FX_BOOL CPWL_Edit::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) { *If the event is swallowed, implementation may do other unexpected things, which *is not the control means to do. */ -FX_BOOL CPWL_Edit::IsProceedtoOnChar(uint16_t nKeyCode, FX_DWORD nFlag) { +FX_BOOL CPWL_Edit::IsProceedtoOnChar(uint16_t nKeyCode, uint32_t nFlag) { FX_BOOL bCtrl = IsCTRLpressed(nFlag); FX_BOOL bAlt = IsALTpressed(nFlag); if (bCtrl && !bAlt) { @@ -931,7 +931,7 @@ FX_BOOL CPWL_Edit::IsProceedtoOnChar(uint16_t nKeyCode, FX_DWORD nFlag) { } } -FX_BOOL CPWL_Edit::OnChar(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_Edit::OnChar(uint16_t nChar, uint32_t nFlag) { if (m_bMouseDown) return TRUE; @@ -983,7 +983,7 @@ FX_BOOL CPWL_Edit::OnChar(uint16_t nChar, FX_DWORD nFlag) { FX_BOOL CPWL_Edit::OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { if (HasFlag(PES_MULTILINE)) { CFX_FloatPoint ptScroll = GetScrollPos(); diff --git a/fpdfsdk/pdfwindow/PWL_Edit.h b/fpdfsdk/pdfwindow/PWL_Edit.h index 025cf2bf59..58793e3395 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.h +++ b/fpdfsdk/pdfwindow/PWL_Edit.h @@ -31,14 +31,14 @@ class IPWL_Filler_Notify { FX_BOOL bKeyDown, FX_BOOL& bRC, FX_BOOL& bExit, - FX_DWORD nFlag) = 0; + uint32_t nFlag) = 0; #ifdef PDF_ENABLE_XFA virtual void OnPopupPreOpen(void* pPrivateData, FX_BOOL& bExit, - FX_DWORD nFlag) = 0; + uint32_t nFlag) = 0; virtual void OnPopupPostOpen(void* pPrivateData, FX_BOOL& bExit, - FX_DWORD nFlag) = 0; + uint32_t nFlag) = 0; #endif // PDF_ENABLE_XFA }; @@ -56,14 +56,14 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify { void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; FX_BOOL OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag) override; - FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; - FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; + uint32_t nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag) override; + FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag) override; CFX_FloatRect GetFocusRect() const override; void OnSetFocus() override; void OnKillFocus() override; @@ -154,7 +154,7 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify { FX_BOOL bArabic) const; public: - FX_BOOL IsProceedtoOnChar(uint16_t nKeyCode, FX_DWORD nFlag); + FX_BOOL IsProceedtoOnChar(uint16_t nKeyCode, uint32_t nFlag); private: IPWL_Filler_Notify* m_pFillerNotify; diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp index 865495a463..fe9dab98e0 100644 --- a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp +++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp @@ -72,7 +72,7 @@ void CPWL_EditCtrl::RePosChildWnd() { } void CPWL_EditCtrl::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam); @@ -142,7 +142,7 @@ FX_FLOAT CPWL_EditCtrl::GetFontSize() const { return m_pEdit->GetFontSize(); } -FX_BOOL CPWL_EditCtrl::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_EditCtrl::OnKeyDown(uint16_t nChar, uint32_t nFlag) { if (m_bMouseDown) return TRUE; @@ -217,7 +217,7 @@ FX_BOOL CPWL_EditCtrl::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) { return bRet; } -FX_BOOL CPWL_EditCtrl::OnChar(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_EditCtrl::OnChar(uint16_t nChar, uint32_t nFlag) { if (m_bMouseDown) return TRUE; @@ -292,7 +292,7 @@ FX_BOOL CPWL_EditCtrl::OnChar(uint16_t nChar, FX_DWORD nFlag) { } FX_BOOL CPWL_EditCtrl::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonDown(point, nFlag); if (ClientHitTest(point)) { @@ -309,7 +309,7 @@ FX_BOOL CPWL_EditCtrl::OnLButtonDown(const CFX_FloatPoint& point, } FX_BOOL CPWL_EditCtrl::OnLButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonUp(point, nFlag); if (m_bMouseDown) { @@ -325,7 +325,7 @@ FX_BOOL CPWL_EditCtrl::OnLButtonUp(const CFX_FloatPoint& point, } FX_BOOL CPWL_EditCtrl::OnMouseMove(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnMouseMove(point, nFlag); if (m_bMouseDown) diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/pdfwindow/PWL_EditCtrl.h index a61705648d..6d35ce9537 100644 --- a/fpdfsdk/pdfwindow/PWL_EditCtrl.h +++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.h @@ -103,13 +103,13 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify { // CPWL_Wnd void OnCreate(PWL_CREATEPARAM& cp) override; void OnCreated() override; - FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; - FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag) override; + FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag) override; void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0) override; void CreateChildWnd(const PWL_CREATEPARAM& cp) override; diff --git a/fpdfsdk/pdfwindow/PWL_Icon.cpp b/fpdfsdk/pdfwindow/PWL_Icon.cpp index fb75665ef6..560f8e0e32 100644 --- a/fpdfsdk/pdfwindow/PWL_Icon.cpp +++ b/fpdfsdk/pdfwindow/PWL_Icon.cpp @@ -133,7 +133,7 @@ void CPWL_Icon::GetIconPosition(FX_FLOAT& fLeft, FX_FLOAT& fBottom) { CPDF_Array* pA = m_pIconFit->GetDict() ? m_pIconFit->GetDict()->GetArrayBy("A") : NULL; if (pA) { - FX_DWORD dwCount = pA->GetCount(); + uint32_t dwCount = pA->GetCount(); if (dwCount > 0) fLeft = pA->GetNumberAt(0); if (dwCount > 1) diff --git a/fpdfsdk/pdfwindow/PWL_IconList.cpp b/fpdfsdk/pdfwindow/PWL_IconList.cpp index a61bded33b..951b6821f4 100644 --- a/fpdfsdk/pdfwindow/PWL_IconList.cpp +++ b/fpdfsdk/pdfwindow/PWL_IconList.cpp @@ -165,7 +165,7 @@ void CPWL_IconList_Content::CreateChildWnd(const PWL_CREATEPARAM& cp) { } FX_BOOL CPWL_IconList_Content::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { SetFocus(); SetCapture(); @@ -179,7 +179,7 @@ FX_BOOL CPWL_IconList_Content::OnLButtonDown(const CFX_FloatPoint& point, } FX_BOOL CPWL_IconList_Content::OnLButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { m_bMouseDown = FALSE; ReleaseCapture(); @@ -187,7 +187,7 @@ FX_BOOL CPWL_IconList_Content::OnLButtonUp(const CFX_FloatPoint& point, } FX_BOOL CPWL_IconList_Content::OnMouseMove(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { if (m_bMouseDown) { int32_t nItemIndex = FindItemIndex(point); SetSelect(nItemIndex); @@ -197,7 +197,7 @@ FX_BOOL CPWL_IconList_Content::OnMouseMove(const CFX_FloatPoint& point, return TRUE; } -FX_BOOL CPWL_IconList_Content::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_IconList_Content::OnKeyDown(uint16_t nChar, uint32_t nFlag) { switch (nChar) { case FWL_VKEY_Up: if (m_nSelectIndex > 0) { @@ -375,7 +375,7 @@ void CPWL_IconList::OnCreated() { } void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam); @@ -464,7 +464,7 @@ void CPWL_IconList::SetIconFillColor(const CPWL_Color& color) { FX_BOOL CPWL_IconList::OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CFX_FloatPoint ptScroll = m_pListContent->GetScrollPos(); CFX_FloatRect rcScroll = m_pListContent->GetScrollArea(); CFX_FloatRect rcContents = m_pListContent->GetClientRect(); diff --git a/fpdfsdk/pdfwindow/PWL_IconList.h b/fpdfsdk/pdfwindow/PWL_IconList.h index b9fb2e5c34..53648d47e0 100644 --- a/fpdfsdk/pdfwindow/PWL_IconList.h +++ b/fpdfsdk/pdfwindow/PWL_IconList.h @@ -75,10 +75,10 @@ class CPWL_IconList_Content : public CPWL_ListCtrl { protected: // CPWL_ListCtrl void CreateChildWnd(const PWL_CREATEPARAM& cp) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag) override; private: CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const; @@ -112,12 +112,12 @@ class CPWL_IconList : public CPWL_Wnd { // CPWL_Wnd FX_BOOL OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag) override; + uint32_t nFlag) override; void OnCreated() override; void RePosChildWnd() override; void CreateChildWnd(const PWL_CREATEPARAM& cp) override; void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0) override; diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp index 244796b81a..d39d8419a6 100644 --- a/fpdfsdk/pdfwindow/PWL_ListBox.cpp +++ b/fpdfsdk/pdfwindow/PWL_ListBox.cpp @@ -203,7 +203,7 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice, } } -FX_BOOL CPWL_ListBox::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_ListBox::OnKeyDown(uint16_t nChar, uint32_t nFlag) { CPWL_Wnd::OnKeyDown(nChar, nFlag); if (!m_pList) @@ -250,7 +250,7 @@ FX_BOOL CPWL_ListBox::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) { return TRUE; } -FX_BOOL CPWL_ListBox::OnChar(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_ListBox::OnChar(uint16_t nChar, uint32_t nFlag) { CPWL_Wnd::OnChar(nChar, nFlag); if (!m_pList) @@ -266,7 +266,7 @@ FX_BOOL CPWL_ListBox::OnChar(uint16_t nChar, FX_DWORD nFlag) { } FX_BOOL CPWL_ListBox::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonDown(point, nFlag); if (ClientHitTest(point)) { @@ -281,7 +281,7 @@ FX_BOOL CPWL_ListBox::OnLButtonDown(const CFX_FloatPoint& point, return TRUE; } -FX_BOOL CPWL_ListBox::OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) { +FX_BOOL CPWL_ListBox::OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) { CPWL_Wnd::OnLButtonUp(point, nFlag); if (m_bMouseDown) { @@ -299,7 +299,7 @@ void CPWL_ListBox::SetHoverSel(FX_BOOL bHoverSel) { m_bHoverSel = bHoverSel; } -FX_BOOL CPWL_ListBox::OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) { +FX_BOOL CPWL_ListBox::OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag) { CPWL_Wnd::OnMouseMove(point, nFlag); if (m_bHoverSel && !IsCaptureMouse() && ClientHitTest(point)) { @@ -316,7 +316,7 @@ FX_BOOL CPWL_ListBox::OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) { } void CPWL_ListBox::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam); @@ -367,7 +367,7 @@ void CPWL_ListBox::RePosChildWnd() { void CPWL_ListBox::OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL& bExit, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_pFillerNotify) return; @@ -517,7 +517,7 @@ CFX_FloatRect CPWL_ListBox::GetListRect() const { FX_BOOL CPWL_ListBox::OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_pList) return FALSE; diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.h b/fpdfsdk/pdfwindow/PWL_ListBox.h index 067aa2f731..caee22578b 100644 --- a/fpdfsdk/pdfwindow/PWL_ListBox.h +++ b/fpdfsdk/pdfwindow/PWL_ListBox.h @@ -59,17 +59,17 @@ class CPWL_ListBox : public CPWL_Wnd { void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; - FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; - FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag) override; + FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag) override; FX_BOOL OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag) override; + uint32_t nFlag) override; void KillFocus() override; void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0) override; void RePosChildWnd() override; @@ -79,7 +79,7 @@ class CPWL_ListBox : public CPWL_Wnd { virtual CFX_WideString GetText() const; - void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL& bExit, FX_DWORD nFlag); + void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL& bExit, uint32_t nFlag); void AddString(const FX_WCHAR* str); void SetTopVisibleIndex(int32_t nItemIndex); diff --git a/fpdfsdk/pdfwindow/PWL_Note.cpp b/fpdfsdk/pdfwindow/PWL_Note.cpp index a2ff7c4a7a..db7d1a5670 100644 --- a/fpdfsdk/pdfwindow/PWL_Note.cpp +++ b/fpdfsdk/pdfwindow/PWL_Note.cpp @@ -152,7 +152,7 @@ void CPWL_Note_Edit::OnKillFocus() { } void CPWL_Note_Edit::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { if (m_bEnableNotify) { @@ -333,7 +333,7 @@ void CPWL_Note_CloseBox::DrawThisAppearance(CFX_RenderDevice* pDevice, } FX_BOOL CPWL_Note_CloseBox::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { SetBorderStyle(PBS_INSET); InvalidateRect(NULL); @@ -343,7 +343,7 @@ FX_BOOL CPWL_Note_CloseBox::OnLButtonDown(const CFX_FloatPoint& point, } FX_BOOL CPWL_Note_CloseBox::OnLButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { m_bMouseDown = FALSE; SetBorderStyle(PBS_BEVELED); @@ -466,7 +466,7 @@ IPWL_NoteItem* CPWL_Note_Contents::GetHitNoteItem(const CFX_FloatPoint& point) { } void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { switch (msg) { @@ -527,7 +527,7 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, } FX_BOOL CPWL_Note_Contents::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { if (CPWL_Wnd::OnLButtonDown(point, nFlag)) return TRUE; @@ -912,7 +912,7 @@ FX_FLOAT CPWL_NoteItem::GetItemRightMargin() { } FX_BOOL CPWL_NoteItem::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_pContents->WndHitTest(m_pContents->ParentToChild(point))) { SetNoteFocus(FALSE); } @@ -923,7 +923,7 @@ FX_BOOL CPWL_NoteItem::OnLButtonDown(const CFX_FloatPoint& point, } FX_BOOL CPWL_NoteItem::OnRButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { if (!m_pContents->WndHitTest(m_pContents->ParentToChild(point))) { SetNoteFocus(FALSE); PopupNoteItemMenu(point); @@ -935,7 +935,7 @@ FX_BOOL CPWL_NoteItem::OnRButtonUp(const CFX_FloatPoint& point, } void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { switch (msg) { @@ -1302,7 +1302,7 @@ CFX_WideString CPWL_Note::GetAuthorName() const { FX_BOOL CPWL_Note::OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CFX_FloatPoint ptScroll = m_pContents->GetScrollPos(); CFX_FloatRect rcScroll = m_pContents->GetScrollArea(); CFX_FloatRect rcContents = m_pContents->GetClientRect(); @@ -1337,7 +1337,7 @@ FX_BOOL CPWL_Note::OnMouseWheel(short zDelta, } void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { switch (msg) { @@ -1462,7 +1462,7 @@ void CPWL_Note::SetBkColor(const CPWL_Color& color) { m_pRBBox->SetTextColor(sTextColor); } -FX_BOOL CPWL_Note::OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) { +FX_BOOL CPWL_Note::OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) { if (m_pOptions->WndHitTest(m_pOptions->ParentToChild(point))) { if (IPWL_NoteNotify* pNotify = GetNoteNotify()) { int32_t x, y; @@ -1479,7 +1479,7 @@ FX_BOOL CPWL_Note::OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) { return CPWL_Wnd::OnLButtonDown(point, nFlag); } -FX_BOOL CPWL_Note::OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) { +FX_BOOL CPWL_Note::OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) { return CPWL_Wnd::OnRButtonUp(point, nFlag); } diff --git a/fpdfsdk/pdfwindow/PWL_Note.h b/fpdfsdk/pdfwindow/PWL_Note.h index e8fdbb89f7..1068999134 100644 --- a/fpdfsdk/pdfwindow/PWL_Note.h +++ b/fpdfsdk/pdfwindow/PWL_Note.h @@ -104,8 +104,8 @@ class CPWL_Note_CloseBox : public CPWL_Button { // CPWL_Button void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; private: FX_BOOL m_bMouseDown; @@ -146,7 +146,7 @@ class CPWL_Note_Edit : public CPWL_Edit { FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) override; void SetText(const FX_WCHAR* csText) override; void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0) override; void RePosChildWnd() override; @@ -203,10 +203,10 @@ class CPWL_Note_Contents : public CPWL_ListCtrl { // CPWL_ListCtrl CFX_ByteString GetClassName() const override; void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; void CreateChildWnd(const PWL_CREATEPARAM& cp) override; private: @@ -253,13 +253,13 @@ class CPWL_NoteItem : public CPWL_Wnd, public IPWL_NoteItem { protected: // CPWL_Wnd - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; CFX_ByteString GetClassName() const override; void RePosChildWnd() override; void CreateChildWnd(const PWL_CREATEPARAM& cp) override; void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0) override; FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) override; @@ -316,15 +316,15 @@ class CPWL_Note : public CPWL_NoteItem { FX_BOOL IsTopItem() const override { return TRUE; } const CPWL_Note* GetNote() const override; IPWL_NoteNotify* GetNoteNotify() const override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; FX_BOOL OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag) override; + uint32_t nFlag) override; void RePosChildWnd() override; void CreateChildWnd(const PWL_CREATEPARAM& cp) override; void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0) override; diff --git a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp index d87f6b5a36..9db2aea35b 100644 --- a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp +++ b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp @@ -541,7 +541,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, } FX_BOOL CPWL_SBButton::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonDown(point, nFlag); if (CPWL_Wnd* pParent = GetParentWindow()) @@ -554,7 +554,7 @@ FX_BOOL CPWL_SBButton::OnLButtonDown(const CFX_FloatPoint& point, } FX_BOOL CPWL_SBButton::OnLButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonUp(point, nFlag); if (CPWL_Wnd* pParent = GetParentWindow()) @@ -567,7 +567,7 @@ FX_BOOL CPWL_SBButton::OnLButtonUp(const CFX_FloatPoint& point, } FX_BOOL CPWL_SBButton::OnMouseMove(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnMouseMove(point, nFlag); if (CPWL_Wnd* pParent = GetParentWindow()) { @@ -702,7 +702,7 @@ void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice, } FX_BOOL CPWL_ScrollBar::OnLButtonDown(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonDown(point, nFlag); if (HasFlag(PWS_AUTOTRANSPARENT)) { @@ -758,7 +758,7 @@ FX_BOOL CPWL_ScrollBar::OnLButtonDown(const CFX_FloatPoint& point, } FX_BOOL CPWL_ScrollBar::OnLButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { CPWL_Wnd::OnLButtonUp(point, nFlag); if (HasFlag(PWS_AUTOTRANSPARENT)) { @@ -775,7 +775,7 @@ FX_BOOL CPWL_ScrollBar::OnLButtonUp(const CFX_FloatPoint& point, } void CPWL_ScrollBar::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam); diff --git a/fpdfsdk/pdfwindow/PWL_ScrollBar.h b/fpdfsdk/pdfwindow/PWL_ScrollBar.h index 1603469ef5..c03b20dbbc 100644 --- a/fpdfsdk/pdfwindow/PWL_ScrollBar.h +++ b/fpdfsdk/pdfwindow/PWL_ScrollBar.h @@ -43,9 +43,9 @@ class CPWL_SBButton : public CPWL_Wnd { void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag) override; protected: PWL_SCROLLBAR_TYPE m_eScrollBarType; @@ -101,10 +101,10 @@ class CPWL_ScrollBar : public CPWL_Wnd { void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; - FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0) override; void CreateChildWnd(const PWL_CREATEPARAM& cp) override; diff --git a/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp b/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp index e79865efcf..b0b944e5aa 100644 --- a/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp +++ b/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp @@ -38,7 +38,7 @@ bool CPWL_CheckBox::IsChecked() const { } FX_BOOL CPWL_CheckBox::OnLButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { if (IsReadOnly()) return FALSE; @@ -46,7 +46,7 @@ FX_BOOL CPWL_CheckBox::OnLButtonUp(const CFX_FloatPoint& point, return TRUE; } -FX_BOOL CPWL_CheckBox::OnChar(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_CheckBox::OnChar(uint16_t nChar, uint32_t nFlag) { SetCheck(!IsChecked()); return TRUE; } @@ -60,7 +60,7 @@ CFX_ByteString CPWL_RadioButton::GetClassName() const { } FX_BOOL CPWL_RadioButton::OnLButtonUp(const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { if (IsReadOnly()) return FALSE; @@ -76,7 +76,7 @@ bool CPWL_RadioButton::IsChecked() const { return m_bChecked; } -FX_BOOL CPWL_RadioButton::OnChar(uint16_t nChar, FX_DWORD nFlag) { +FX_BOOL CPWL_RadioButton::OnChar(uint16_t nChar, uint32_t nFlag) { SetCheck(TRUE); return TRUE; } diff --git a/fpdfsdk/pdfwindow/PWL_SpecialButton.h b/fpdfsdk/pdfwindow/PWL_SpecialButton.h index 5aaf19b3a8..eaaba26c68 100644 --- a/fpdfsdk/pdfwindow/PWL_SpecialButton.h +++ b/fpdfsdk/pdfwindow/PWL_SpecialButton.h @@ -26,8 +26,8 @@ class CPWL_CheckBox : public CPWL_Button { // CPWL_Button CFX_ByteString GetClassName() const override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag) override; void SetCheck(bool bCheck); bool IsChecked() const; @@ -43,8 +43,8 @@ class CPWL_RadioButton : public CPWL_Button { // CPWL_Button CFX_ByteString GetClassName() const override; - FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; + FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag) override; void SetCheck(bool bCheck); bool IsChecked() const; diff --git a/fpdfsdk/pdfwindow/PWL_Utils.h b/fpdfsdk/pdfwindow/PWL_Utils.h index fed1528294..6917083661 100644 --- a/fpdfsdk/pdfwindow/PWL_Utils.h +++ b/fpdfsdk/pdfwindow/PWL_Utils.h @@ -27,7 +27,7 @@ T PWL_MAX(const T& i, const T& j) { #define PWL_WIN2PDF(color) ((FX_FLOAT)((FX_FLOAT)color / 255.0f)) #define PWL_MAKEDWORD(low, high) \ - ((FX_DWORD)((uint16_t)(low) | (FX_DWORD)(((uint16_t)(high)) << 16))) + ((uint32_t)((uint16_t)(low) | (uint32_t)(((uint16_t)(high)) << 16))) #define PWL_GETLOWWORD(dword) ((uint16_t)(dword)) #define PWL_GETHIGHWORD(dword) ((uint16_t)(dword >> 16)) diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp index 66ad6317c3..cb0955cb5f 100644 --- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp +++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp @@ -407,7 +407,7 @@ void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) { } #define PWL_IMPLEMENT_KEY_METHOD(key_method_name) \ - FX_BOOL CPWL_Wnd::key_method_name(uint16_t nChar, FX_DWORD nFlag) { \ + FX_BOOL CPWL_Wnd::key_method_name(uint16_t nChar, uint32_t nFlag) { \ if (IsValid() && IsVisible() && IsEnabled()) { \ if (IsWndCaptureKeyboard(this)) { \ for (int32_t i = 0, sz = m_aChildren.GetSize(); i < sz; i++) { \ @@ -424,7 +424,7 @@ void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) { #define PWL_IMPLEMENT_MOUSE_METHOD(mouse_method_name) \ FX_BOOL CPWL_Wnd::mouse_method_name(const CFX_FloatPoint& point, \ - FX_DWORD nFlag) { \ + uint32_t nFlag) { \ if (IsValid() && IsVisible() && IsEnabled()) { \ if (IsWndCaptureMouse(this)) { \ for (int32_t i = 0, sz = m_aChildren.GetSize(); i < sz; i++) { \ @@ -468,7 +468,7 @@ PWL_IMPLEMENT_MOUSE_METHOD(OnMouseMove) FX_BOOL CPWL_Wnd::OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag) { + uint32_t nFlag) { if (IsValid() && IsVisible() && IsEnabled()) { SetCursor(); if (IsWndCaptureKeyboard(this)) { @@ -501,7 +501,7 @@ void CPWL_Wnd::RemoveChild(CPWL_Wnd* pWnd) { } void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam, intptr_t lParam) { switch (msg) { @@ -549,15 +549,15 @@ CFX_FloatPoint CPWL_Wnd::GetCenterPoint() const { (rcClient.top + rcClient.bottom) * 0.5f); } -FX_BOOL CPWL_Wnd::HasFlag(FX_DWORD dwFlags) const { +FX_BOOL CPWL_Wnd::HasFlag(uint32_t dwFlags) const { return (m_sPrivateParam.dwFlags & dwFlags) != 0; } -void CPWL_Wnd::RemoveFlag(FX_DWORD dwFlags) { +void CPWL_Wnd::RemoveFlag(uint32_t dwFlags) { m_sPrivateParam.dwFlags &= ~dwFlags; } -void CPWL_Wnd::AddFlag(FX_DWORD dwFlags) { +void CPWL_Wnd::AddFlag(uint32_t dwFlags) { m_sPrivateParam.dwFlags |= dwFlags; } @@ -1006,7 +1006,7 @@ void CPWL_Wnd::OnEnabled() {} void CPWL_Wnd::OnDisabled() {} -FX_BOOL CPWL_Wnd::IsCTRLpressed(FX_DWORD nFlag) const { +FX_BOOL CPWL_Wnd::IsCTRLpressed(uint32_t nFlag) const { if (IFX_SystemHandler* pSystemHandler = GetSystemHandler()) { return pSystemHandler->IsCTRLKeyDown(nFlag); } @@ -1014,7 +1014,7 @@ FX_BOOL CPWL_Wnd::IsCTRLpressed(FX_DWORD nFlag) const { return FALSE; } -FX_BOOL CPWL_Wnd::IsSHIFTpressed(FX_DWORD nFlag) const { +FX_BOOL CPWL_Wnd::IsSHIFTpressed(uint32_t nFlag) const { if (IFX_SystemHandler* pSystemHandler = GetSystemHandler()) { return pSystemHandler->IsSHIFTKeyDown(nFlag); } @@ -1022,7 +1022,7 @@ FX_BOOL CPWL_Wnd::IsSHIFTpressed(FX_DWORD nFlag) const { return FALSE; } -FX_BOOL CPWL_Wnd::IsALTpressed(FX_DWORD nFlag) const { +FX_BOOL CPWL_Wnd::IsALTpressed(uint32_t nFlag) const { if (IFX_SystemHandler* pSystemHandler = GetSystemHandler()) { return pSystemHandler->IsALTKeyDown(nFlag); } @@ -1030,7 +1030,7 @@ FX_BOOL CPWL_Wnd::IsALTpressed(FX_DWORD nFlag) const { return FALSE; } -FX_BOOL CPWL_Wnd::IsINSERTpressed(FX_DWORD nFlag) const { +FX_BOOL CPWL_Wnd::IsINSERTpressed(uint32_t nFlag) const { if (IFX_SystemHandler* pSystemHandler = GetSystemHandler()) { return pSystemHandler->IsINSERTKeyDown(nFlag); } diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.h b/fpdfsdk/pdfwindow/PWL_Wnd.h index 394e82d9a6..d07adba092 100644 --- a/fpdfsdk/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/pdfwindow/PWL_Wnd.h @@ -233,7 +233,7 @@ struct PWL_CREATEPARAM { IFX_Edit_FontMap* pFontMap; // required for text window IPWL_Provider* pProvider; // required for self coordinate IPWL_FocusHandler* pFocusHandler; // optional - FX_DWORD dwFlags; // optional + uint32_t dwFlags; // optional CPWL_Color sBackgroundColor; // optional FX_HWND hAttachedWnd; // required for no-reader framework IPWL_SpellCheck* pSpellCheck; // required for spellchecking @@ -298,21 +298,21 @@ class CPWL_Wnd : public CPWL_TimerHandler { void DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device); - virtual FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag); - virtual FX_BOOL OnKeyUp(uint16_t nChar, FX_DWORD nFlag); - virtual FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag); - virtual FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag); - virtual FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag); - virtual FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag); - virtual FX_BOOL OnMButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag); - virtual FX_BOOL OnMButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag); - virtual FX_BOOL OnMButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag); - virtual FX_BOOL OnRButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag); - virtual FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag); - virtual FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag); + virtual FX_BOOL OnKeyUp(uint16_t nChar, uint32_t nFlag); + virtual FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag); + virtual FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, uint32_t nFlag); + virtual FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag); + virtual FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag); + virtual FX_BOOL OnMButtonDblClk(const CFX_FloatPoint& point, uint32_t nFlag); + virtual FX_BOOL OnMButtonDown(const CFX_FloatPoint& point, uint32_t nFlag); + virtual FX_BOOL OnMButtonUp(const CFX_FloatPoint& point, uint32_t nFlag); + virtual FX_BOOL OnRButtonDown(const CFX_FloatPoint& point, uint32_t nFlag); + virtual FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag); + virtual FX_BOOL OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag); virtual FX_BOOL OnMouseWheel(short zDelta, const CFX_FloatPoint& point, - FX_DWORD nFlag); + uint32_t nFlag); virtual void SetFocus(); virtual void KillFocus(); @@ -320,7 +320,7 @@ class CPWL_Wnd : public CPWL_TimerHandler { void ReleaseCapture(); virtual void OnNotify(CPWL_Wnd* pWnd, - FX_DWORD msg, + uint32_t msg, intptr_t wParam = 0, intptr_t lParam = 0); virtual void SetTextColor(const CPWL_Color& color); @@ -348,9 +348,9 @@ class CPWL_Wnd : public CPWL_TimerHandler { CFX_FloatPoint GetCenterPoint() const; int32_t GetBorderWidth() const; FX_BOOL IsVisible() const { return m_bVisible; } - FX_BOOL HasFlag(FX_DWORD dwFlags) const; - void AddFlag(FX_DWORD dwFlags); - void RemoveFlag(FX_DWORD dwFlags); + FX_BOOL HasFlag(uint32_t dwFlags) const; + void AddFlag(uint32_t dwFlags); + void RemoveFlag(uint32_t dwFlags); const CFX_FloatRect& GetClipRect() const; CPWL_Wnd* GetParentWindow() const; int32_t GetBorderStyle() const; @@ -434,10 +434,10 @@ class CPWL_Wnd : public CPWL_TimerHandler { FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd* pWnd) const; const CPWL_Wnd* GetRootWnd() const; - FX_BOOL IsCTRLpressed(FX_DWORD nFlag) const; - FX_BOOL IsSHIFTpressed(FX_DWORD nFlag) const; - FX_BOOL IsALTpressed(FX_DWORD nFlag) const; - FX_BOOL IsINSERTpressed(FX_DWORD nFlag) const; + FX_BOOL IsCTRLpressed(uint32_t nFlag) const; + FX_BOOL IsSHIFTpressed(uint32_t nFlag) const; + FX_BOOL IsALTpressed(uint32_t nFlag) const; + FX_BOOL IsINSERTpressed(uint32_t nFlag) const; private: void AddChild(CPWL_Wnd* pWnd); diff --git a/testing/libfuzzer/pdf_jpx_fuzzer.cc b/testing/libfuzzer/pdf_jpx_fuzzer.cc index 8e16f24abc..12d2061445 100644 --- a/testing/libfuzzer/pdf_jpx_fuzzer.cc +++ b/testing/libfuzzer/pdf_jpx_fuzzer.cc @@ -21,9 +21,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (!decoder) return 0; - FX_DWORD width; - FX_DWORD height; - FX_DWORD components; + uint32_t width; + uint32_t height; + uint32_t components; g_module.GetImageInfo(decoder.get(), &width, &height, &components); FXDIB_Format format; @@ -43,7 +43,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; std::vector output_offsets(components); - for (FX_DWORD i = 0; i < components; ++i) + for (uint32_t i = 0; i < components; ++i) output_offsets[i] = i; g_module.Decode(decoder.get(), bitmap->GetBuffer(), bitmap->GetPitch(), -- cgit v1.2.3