From bfa9a824a20f37c2dd7111012b46c929cf2ed8a0 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 9 Jun 2015 13:24:12 -0700 Subject: Merge to XFA: Use stdint.h types throughout PDFium. Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002 --- fpdfsdk/src/pdfwindow/PWL_Wnd.cpp | 72 +++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'fpdfsdk/src/pdfwindow/PWL_Wnd.cpp') diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp index 69535d7d85..c621508885 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp @@ -11,10 +11,10 @@ /* -------------------------- CPWL_Timer -------------------------- */ -static CFX_MapPtrTemplate& GetPWLTimeMap() +static CFX_MapPtrTemplate& GetPWLTimeMap() { // Leak the object at shutdown. - static auto timeMap = new CFX_MapPtrTemplate; + static auto timeMap = new CFX_MapPtrTemplate; return *timeMap; } @@ -32,7 +32,7 @@ CPWL_Timer::~CPWL_Timer() KillPWLTimer(); } -FX_INT32 CPWL_Timer::SetPWLTimer(FX_INT32 nElapse) +int32_t CPWL_Timer::SetPWLTimer(int32_t nElapse) { if (m_nTimerID != 0) KillPWLTimer(); m_nTimerID = m_pSystemHandler->SetTimer(nElapse, TimerProc); @@ -50,7 +50,7 @@ void CPWL_Timer::KillPWLTimer() } } -void CPWL_Timer::TimerProc(FX_INT32 idEvent) +void CPWL_Timer::TimerProc(int32_t idEvent) { CPWL_Timer* pTimer = NULL; if (GetPWLTimeMap().Lookup(idEvent, pTimer)) @@ -74,7 +74,7 @@ CPWL_TimerHandler::~CPWL_TimerHandler() if (m_pTimer) delete m_pTimer; } -void CPWL_TimerHandler::BeginTimer(FX_INT32 nElapse) +void CPWL_TimerHandler::BeginTimer(int32_t nElapse) { if (!m_pTimer) m_pTimer = new CPWL_Timer(this, GetSystemHandler()); @@ -134,7 +134,7 @@ public: FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const { if (pWnd) - for( FX_INT32 i=0,sz=m_aMousePath.GetSize(); i= 0; i --) + for (int32_t i = m_aChildren.GetSize()-1; i >= 0; i --) { if (CPWL_Wnd * pChild = m_aChildren[i]) { @@ -355,7 +355,7 @@ void CPWL_Wnd::InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rc CPDF_Rect SubArray[4]; rcOld.Substract4(rcNew,SubArray); - for (FX_INT32 i=0;i<4;i++) + for (int32_t i=0;i<4;i++) { if (SubArray[i].left == 0 && SubArray[i].right == 0 && @@ -366,7 +366,7 @@ void CPWL_Wnd::InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rc } rcNew.Substract4(rcOld,SubArray); - for (FX_INT32 j=0;j<4;j++) + for (int32_t j=0;j<4;j++) { if (SubArray[j].left == 0 && SubArray[j].right == 0 && @@ -423,7 +423,7 @@ void CPWL_Wnd::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream) void CPWL_Wnd::GetChildAppearanceStream(CFX_ByteTextBuf & sAppStream) { - for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i= 0; i --) + for (int32_t i = m_aChildren.GetSize()-1; i >= 0; i --) { if (CPWL_Wnd* pChild = m_aChildren.GetAt(i)) { @@ -634,7 +634,7 @@ void CPWL_Wnd::RemoveChild(CPWL_Wnd * pWnd) } } -void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam) +void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam) { switch (msg) { @@ -753,18 +753,18 @@ CPWL_Color CPWL_Wnd::GetTextStrokeColor() const return m_sPrivateParam.sTextStrokeColor; } -FX_INT32 CPWL_Wnd::GetBorderStyle() const +int32_t CPWL_Wnd::GetBorderStyle() const { return m_sPrivateParam.nBorderStyle; } -void CPWL_Wnd::SetBorderStyle(FX_INT32 nBorderStyle) +void CPWL_Wnd::SetBorderStyle(int32_t nBorderStyle) { if (HasFlag(PWS_BORDER)) m_sPrivateParam.nBorderStyle = nBorderStyle; } -FX_INT32 CPWL_Wnd::GetBorderWidth() const +int32_t CPWL_Wnd::GetBorderWidth() const { if (HasFlag(PWS_BORDER)) return m_sPrivateParam.dwBorderWidth; @@ -772,7 +772,7 @@ FX_INT32 CPWL_Wnd::GetBorderWidth() const return 0; } -FX_INT32 CPWL_Wnd::GetInnerBorderWidth() const +int32_t CPWL_Wnd::GetInnerBorderWidth() const { /* switch (GetBorderStyle()) @@ -785,7 +785,7 @@ FX_INT32 CPWL_Wnd::GetInnerBorderWidth() const return 0; } -void CPWL_Wnd::SetBorderWidth(FX_INT32 nBorderWidth) +void CPWL_Wnd::SetBorderWidth(int32_t nBorderWidth) { if (HasFlag(PWS_BORDER)) m_sPrivateParam.dwBorderWidth = nBorderWidth; @@ -861,7 +861,7 @@ void CPWL_Wnd::SetCapture() void CPWL_Wnd::ReleaseCapture() { - for (FX_INT32 i=0,sz=m_aChildren.GetSize(); iReleaseCapture(); @@ -918,7 +918,7 @@ void CPWL_Wnd::SetVisible(FX_BOOL bVisible) { if (IsValid()) { - for (FX_INT32 i=0,sz=m_aChildren.GetSize(); iGetCreationParam().eCursorType; + int32_t nCursorType = this->GetCreationParam().eCursorType; pSH->SetCursor(nCursorType); } } @@ -1063,7 +1063,7 @@ IFX_Edit_FontMap* CPWL_Wnd::GetFontMap() const return m_sPrivateParam.pFontMap; } -CPWL_Color CPWL_Wnd::GetBorderLeftTopColor(FX_INT32 nBorderStyle) const +CPWL_Color CPWL_Wnd::GetBorderLeftTopColor(int32_t nBorderStyle) const { CPWL_Color color; @@ -1086,7 +1086,7 @@ CPWL_Color CPWL_Wnd::GetBorderLeftTopColor(FX_INT32 nBorderStyle) const return color; } -CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(FX_INT32 nBorderStyle) const +CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(int32_t nBorderStyle) const { CPWL_Color color; @@ -1111,14 +1111,14 @@ CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(FX_INT32 nBorderStyle) const /* ----------------------------------------------------------------- */ -FX_INT32 CPWL_Wnd::GetTransparency() +int32_t CPWL_Wnd::GetTransparency() { return m_sPrivateParam.nTransparency; } -void CPWL_Wnd::SetTransparency(FX_INT32 nTransparency) +void CPWL_Wnd::SetTransparency(int32_t nTransparency) { - for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i