diff options
Diffstat (limited to 'xfa')
126 files changed, 1043 insertions, 1043 deletions
diff --git a/xfa/fde/css/fde_csscache.cpp b/xfa/fde/css/fde_csscache.cpp index 4b7dd4b302..49934aee6d 100644 --- a/xfa/fde/css/fde_csscache.cpp +++ b/xfa/fde/css/fde_csscache.cpp @@ -112,13 +112,13 @@ FDE_CSSTagCache::FDE_CSSTagCache(FDE_CSSTagCache* parent, FX_POSITION pos = pTag->GetFirstAttribute(); while (pos != NULL) { pTag->GetNextAttribute(pos, wsName, wsValue); - FX_DWORD dwNameHash = + uint32_t dwNameHash = FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength(), TRUE); - static const FX_DWORD s_dwIDHash = FX_HashCode_String_GetW(L"id", 2, TRUE); - static const FX_DWORD s_dwClassHash = + static const uint32_t s_dwIDHash = FX_HashCode_String_GetW(L"id", 2, TRUE); + static const uint32_t s_dwClassHash = FX_HashCode_String_GetW(L"class", 5, TRUE); if (dwNameHash == s_dwClassHash) { - FX_DWORD dwHash = + uint32_t dwHash = FX_HashCode_String_GetW(wsValue.GetPtr(), wsValue.GetLength()); dwClassHashs.Add(dwHash); } else if (dwNameHash == s_dwIDHash) { diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp index e2dff57008..6abe5a7a26 100644 --- a/xfa/fde/css/fde_cssdatatable.cpp +++ b/xfa/fde/css/fde_cssdatatable.cpp @@ -87,9 +87,9 @@ CFX_FloatRect FDE_CSSBoundaryToRect(IFDE_CSSBoundaryStyle* pBoundStyle, } return rect; } -FX_DWORD FDE_CSSFontStyleToFDE(IFDE_CSSFontStyle* pFontStyle) { +uint32_t FDE_CSSFontStyleToFDE(IFDE_CSSFontStyle* pFontStyle) { FXSYS_assert(pFontStyle != NULL); - FX_DWORD dwFontStyle = FX_FONTSTYLE_Normal; + uint32_t dwFontStyle = FX_FONTSTYLE_Normal; if (pFontStyle->GetFontStyle() == FDE_CSSFONTSTYLE_Italic) { dwFontStyle |= FX_FONTSTYLE_Italic; } @@ -560,10 +560,10 @@ FDE_LPCCSSPERSUDOTABLE FDE_GetCSSPersudoByEnum(FDE_CSSPERSUDO ePersudo) { FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const FX_WCHAR* pszName, int32_t iLength) { FXSYS_assert(pszName != NULL && iLength > 0); - FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE); + uint32_t dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE); int32_t iEnd = FDE_CSSPROPERTY_MAX - 1; int32_t iMid, iStart = 0; - FX_DWORD dwMid; + uint32_t dwMid; do { iMid = (iStart + iEnd) / 2; dwMid = g_FDE_CSSProperties[iMid].dwHash; @@ -584,10 +584,10 @@ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName( const FX_WCHAR* pszName, int32_t iLength) { FXSYS_assert(pszName != NULL && iLength > 0); - FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE); + uint32_t dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE); int32_t iEnd = FDE_CSSPROPERTYVALUE_MAX - 1; int32_t iMid, iStart = 0; - FX_DWORD dwMid; + uint32_t dwMid; do { iMid = (iStart + iEnd) / 2; dwMid = g_FDE_CSSPropertyValues[iMid].dwHash; @@ -651,10 +651,10 @@ FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* pszName, FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const FX_WCHAR* pszName, int32_t iLength) { FXSYS_assert(pszName != NULL && iLength > 0); - FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE); + uint32_t dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE); int32_t iEnd = sizeof(g_FDE_CSSColors) / sizeof(FDE_CSSCOLORTABLE) - 1; int32_t iMid, iStart = 0; - FX_DWORD dwMid; + uint32_t dwMid; do { iMid = (iStart + iEnd) / 2; dwMid = g_FDE_CSSColors[iMid].dwHash; diff --git a/xfa/fde/css/fde_cssdeclaration.cpp b/xfa/fde/css/fde_cssdeclaration.cpp index 1340dae2c5..5517d85cb2 100644 --- a/xfa/fde/css/fde_cssdeclaration.cpp +++ b/xfa/fde/css/fde_cssdeclaration.cpp @@ -119,18 +119,18 @@ FX_BOOL CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs, } bImportant = TRUE; } - const FX_DWORD dwType = pArgs->pProperty->dwType; + const uint32_t dwType = pArgs->pProperty->dwType; switch (dwType & 0x0F) { case FDE_CSSVALUETYPE_Primitive: { - static const FX_DWORD g_ValueGuessOrder[] = { + static const uint32_t g_ValueGuessOrder[] = { FDE_CSSVALUETYPE_MaybeNumber, FDE_CSSVALUETYPE_MaybeEnum, FDE_CSSVALUETYPE_MaybeColor, FDE_CSSVALUETYPE_MaybeURI, FDE_CSSVALUETYPE_MaybeFunction, FDE_CSSVALUETYPE_MaybeString, }; static const int32_t g_ValueGuessCount = - sizeof(g_ValueGuessOrder) / sizeof(FX_DWORD); + sizeof(g_ValueGuessOrder) / sizeof(uint32_t); for (int32_t i = 0; i < g_ValueGuessCount; ++i) { - const FX_DWORD dwMatch = dwType & g_ValueGuessOrder[i]; + const uint32_t dwMatch = dwType & g_ValueGuessOrder[i]; if (dwMatch == 0) { continue; } @@ -539,7 +539,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty( FX_WCHAR separator = (pArgs->pProperty->eName == FDE_CSSPROPERTY_FontFamily) ? ',' : ' '; CFDE_CSSValueListParser parser(pszValue, iValueLen, separator); - const FX_DWORD dwType = pArgs->pProperty->dwType; + const uint32_t dwType = pArgs->pProperty->dwType; FDE_CSSPRIMITIVETYPE eType; CFDE_CSSValueArray list; while (parser.NextValue(eType, pszValue, iValueLen)) { diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp index ebf2d262c1..39d0df04c7 100644 --- a/xfa/fde/css/fde_cssstyleselector.cpp +++ b/xfa/fde/css/fde_cssstyleselector.cpp @@ -85,9 +85,9 @@ FDE_CSSTEXTEMPHASISMARK CFDE_CSSComputedStyle::GetTextEmphasisMark() const { } FDE_CSSRuleData::FDE_CSSRuleData(IFDE_CSSSelector* pSel, IFDE_CSSDeclaration* pDecl, - FX_DWORD dwPos) + uint32_t dwPos) : pSelector(pSel), pDeclaration(pDecl), dwPriority(dwPos), pNext(NULL) { - static const FX_DWORD s_Specific[5] = {0x00010000, 0x00010000, 0x00100000, + static const uint32_t s_Specific[5] = {0x00010000, 0x00010000, 0x00100000, 0x00100000, 0x01000000}; for (; pSel != NULL; pSel = pSel->GetNextSelector()) { FDE_CSSSELECTORTYPE eType = pSel->GetType(); @@ -106,12 +106,12 @@ void CFDE_CSSRuleCollection::Clear() { m_iSelectors = 0; } void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets, - FX_DWORD dwMediaList, + uint32_t dwMediaList, IFX_FontMgr* pFontMgr) { int32_t iSheets = sheets.GetSize(); for (int32_t i = 0; i < iSheets; ++i) { IFDE_CSSStyleSheet* pSheet = sheets.GetAt(i); - if (FX_DWORD dwMatchMedia = pSheet->GetMediaList() & dwMediaList) { + if (uint32_t dwMatchMedia = pSheet->GetMediaList() & dwMediaList) { int32_t iRules = pSheet->CountRules(); for (int32_t j = 0; j < iRules; j++) { AddRulesFrom(pSheet, pSheet->GetRule(j), dwMatchMedia, pFontMgr); @@ -121,7 +121,7 @@ void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets, } void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet, IFDE_CSSRule* pRule, - FX_DWORD dwMediaList, + uint32_t dwMediaList, IFX_FontMgr* pFontMgr) { switch (pRule->GetType()) { case FDE_CSSRULETYPE_Style: { @@ -179,7 +179,7 @@ void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet, } } void CFDE_CSSRuleCollection::AddRuleTo(CFX_MapPtrToPtr& map, - FX_DWORD dwKey, + uint32_t dwKey, IFDE_CSSSelector* pSel, IFDE_CSSDeclaration* pDecl) { void* pKey = (void*)(uintptr_t)dwKey; @@ -298,7 +298,7 @@ void CFDE_CSSStyleSelector::SetStylePriority( FDE_CSSSTYLESHEETPRIORITY ePriority) { m_ePriorities[ePriority] = eType; } -void CFDE_CSSStyleSelector::UpdateStyleIndex(FX_DWORD dwMediaList) { +void CFDE_CSSStyleSelector::UpdateStyleIndex(uint32_t dwMediaList) { Reset(); m_pRuleDataStore = FX_CreateAllocator(FX_ALLOCTYPE_Static, 1024, 0); FXSYS_assert(m_pRuleDataStore != NULL); @@ -372,7 +372,7 @@ void CFDE_CSSStyleSelector::MatchRules(FDE_CSSTagCache* pCache, FX_BOOL CFDE_CSSStyleSelector::MatchSelector(FDE_CSSTagCache* pCache, IFDE_CSSSelector* pSel, FDE_CSSPERSUDO ePersudoType) { - FX_DWORD dwHash; + uint32_t dwHash; while (pSel != NULL && pCache != NULL) { switch (pSel->GetType()) { case FDE_CSSSELECTORTYPE_Descendant: @@ -433,14 +433,14 @@ void CFDE_CSSStyleSelector::ComputeStyle( } CFDE_CSSDeclaration* pDecl = NULL; CFX_WideStringC wsAttri, wsValue; - FX_DWORD dwAttriHash; + uint32_t dwAttriHash; do { pTag->GetNextAttribute(pos, wsAttri, wsValue); dwAttriHash = FX_HashCode_String_GetW(wsAttri.GetPtr(), wsAttri.GetLength(), TRUE); - static const FX_DWORD s_dwStyleHash = + static const uint32_t s_dwStyleHash = FX_HashCode_String_GetW(L"style", 5, TRUE); - static const FX_DWORD s_dwAlignHash = + static const uint32_t s_dwAlignHash = FX_HashCode_String_GetW(L"align", 5, TRUE); if (dwAttriHash == s_dwStyleHash) { if (pDecl == NULL) { @@ -1743,8 +1743,8 @@ FDE_CSSWHITESPACE CFDE_CSSStyleSelector::ToWhiteSpace( return FDE_CSSWHITESPACE_Normal; } } -FX_DWORD CFDE_CSSStyleSelector::ToTextDecoration(IFDE_CSSValueList* pValue) { - FX_DWORD dwDecoration = 0; +uint32_t CFDE_CSSStyleSelector::ToTextDecoration(IFDE_CSSValueList* pValue) { + uint32_t dwDecoration = 0; for (int32_t i = pValue->CountValues() - 1; i >= 0; --i) { IFDE_CSSPrimitiveValue* pPrimitive = (IFDE_CSSPrimitiveValue*)pValue->GetValue(i); diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp index e0f8fa6cdf..bc27545dca 100644 --- a/xfa/fde/css/fde_cssstylesheet.cpp +++ b/xfa/fde/css/fde_cssstylesheet.cpp @@ -49,7 +49,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream( const CFX_WideString& szUrl, IFX_Stream* pStream, uint16_t wCodePage, - FX_DWORD dwMediaList) { + uint32_t dwMediaList) { CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList); if (!pStyleSheet->LoadFromStream(szUrl, pStream, wCodePage)) { pStyleSheet->Release(); @@ -62,7 +62,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer( const FX_WCHAR* pBuffer, int32_t iBufSize, uint16_t wCodePage, - FX_DWORD dwMediaList) { + uint32_t dwMediaList) { CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList); if (!pStyleSheet->LoadFromBuffer(szUrl, pBuffer, iBufSize, wCodePage)) { pStyleSheet->Release(); @@ -70,7 +70,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer( } return pStyleSheet; } -CFDE_CSSStyleSheet::CFDE_CSSStyleSheet(FX_DWORD dwMediaList) +CFDE_CSSStyleSheet::CFDE_CSSStyleSheet(uint32_t dwMediaList) : m_wCodePage(FX_CODEPAGE_UTF8), m_wRefCount(1), m_dwMediaList(dwMediaList), @@ -106,11 +106,11 @@ void CFDE_CSSStyleSheet::Reset() { m_pAllocator = NULL; } } -FX_DWORD CFDE_CSSStyleSheet::AddRef() { +uint32_t CFDE_CSSStyleSheet::AddRef() { return ++m_wRefCount; } -FX_DWORD CFDE_CSSStyleSheet::Release() { - FX_DWORD dwRefCount = --m_wRefCount; +uint32_t CFDE_CSSStyleSheet::Release() { + uint32_t dwRefCount = --m_wRefCount; if (dwRefCount == 0) { delete this; } @@ -188,7 +188,7 @@ FX_BOOL CFDE_CSSStyleSheet::LoadFromSyntax(IFDE_CSSSyntaxParser* pSyntax) { } FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadMediaRule( IFDE_CSSSyntaxParser* pSyntax) { - FX_DWORD dwMediaList = 0; + uint32_t dwMediaList = 0; CFDE_CSSMediaRule* pMediaRule = NULL; for (;;) { switch (pSyntax->DoSyntaxParse()) { diff --git a/xfa/fde/css/fde_csssyntax.cpp b/xfa/fde/css/fde_csssyntax.cpp index 2d0d972f77..8a905f69b4 100644 --- a/xfa/fde/css/fde_csssyntax.cpp +++ b/xfa/fde/css/fde_csssyntax.cpp @@ -30,7 +30,7 @@ CFDE_CSSSyntaxParser::CFDE_CSSSyntaxParser() m_iStreamPos(0), m_iPlaneSize(0), m_iTextDatLen(0), - m_dwCheck((FX_DWORD)-1), + m_dwCheck((uint32_t)-1), m_eMode(FDE_CSSSYNTAXMODE_RuleSet), m_eStatus(FDE_CSSSYNTAXSTATUS_None) {} CFDE_CSSSyntaxParser::~CFDE_CSSSyntaxParser() { @@ -69,7 +69,7 @@ void CFDE_CSSSyntaxParser::Reset(FX_BOOL bOnlyDeclaration) { m_pStream = NULL; m_iStreamPos = 0; m_iTextDatLen = 0; - m_dwCheck = (FX_DWORD)-1; + m_dwCheck = (uint32_t)-1; m_eStatus = FDE_CSSSYNTAXSTATUS_None; m_eMode = bOnlyDeclaration ? FDE_CSSSYNTAXMODE_PropertyName : FDE_CSSSYNTAXMODE_RuleSet; diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp index ab62999118..1338dc4a8e 100644 --- a/xfa/fde/fde_gedevice.cpp +++ b/xfa/fde/fde_gedevice.cpp @@ -158,7 +158,7 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush* pBrush, FXTEXT_CHARPOS* pCurCP = NULL; int32_t iCurCount = 0; #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ - FX_DWORD dwFontStyle = pFont->GetFontStyles(); + uint32_t dwFontStyle = pFont->GetFontStyles(); CFX_Font FxFont; CFX_SubstFont SubstFxFont; FxFont.SetSubstFont(&SubstFxFont); diff --git a/xfa/fde/fde_iterator.cpp b/xfa/fde/fde_iterator.cpp index 50018b7942..097be1d01f 100644 --- a/xfa/fde/fde_iterator.cpp +++ b/xfa/fde/fde_iterator.cpp @@ -27,14 +27,14 @@ FX_BOOL CFDE_VisualSetIterator::AttachCanvas(IFDE_CanvasSet* pCanvas) { } return m_CanvasStack.Push(canvas) == 0; } -FX_BOOL CFDE_VisualSetIterator::FilterObjects(FX_DWORD dwObjects) { +FX_BOOL CFDE_VisualSetIterator::FilterObjects(uint32_t dwObjects) { if (m_CanvasStack.GetSize() == 0) { return FALSE; } while (m_CanvasStack.GetSize() > 1) { m_CanvasStack.Pop(); } - m_dwFilter = dwObjects & ~(FX_DWORD)FDE_VISUALOBJ_Widget; + m_dwFilter = dwObjects & ~(uint32_t)FDE_VISUALOBJ_Widget; if (dwObjects & FDE_VISUALOBJ_Widget) { m_dwFilter |= 0xFF00; } @@ -72,10 +72,10 @@ FDE_HVISUALOBJ CFDE_VisualSetIterator::GetNext(IFDE_VisualSet*& pVisualSet, m_CanvasStack.Push(canvas); break; } - FX_DWORD dwObj = + uint32_t dwObj = (eType == FDE_VISUALOBJ_Widget) - ? (FX_DWORD)((IFDE_WidgetSet*)pVisualSet)->GetWidgetType(hObj) - : (FX_DWORD)eType; + ? (uint32_t)((IFDE_WidgetSet*)pVisualSet)->GetWidgetType(hObj) + : (uint32_t)eType; if ((m_dwFilter & dwObj) != 0) { if (ppCanvasSet) { *ppCanvasSet = pCanvas->pCanvas; diff --git a/xfa/fde/fde_render.cpp b/xfa/fde/fde_render.cpp index 7d86a7b53e..17bf20afbd 100644 --- a/xfa/fde/fde_render.cpp +++ b/xfa/fde/fde_render.cpp @@ -48,7 +48,7 @@ void FDE_GetPageMatrix(CFX_Matrix& pageMatrix, const CFX_RectF& docPageRect, const CFX_Rect& devicePageRect, int32_t iRotate, - FX_DWORD dwCoordinatesType) { + uint32_t dwCoordinatesType) { FXSYS_assert(iRotate >= 0 && iRotate <= 3); FX_BOOL bFlipX = (dwCoordinatesType & 0x01) != 0; FX_BOOL bFlipY = (dwCoordinatesType & 0x02) != 0; diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp index a7b10749e6..a0753c450e 100644 --- a/xfa/fde/tto/fde_textout.cpp +++ b/xfa/fde/tto/fde_textout.cpp @@ -23,7 +23,7 @@ struct FDE_TTOPIECE { public: int32_t iStartChar; int32_t iChars; - FX_DWORD dwCharStyles; + uint32_t dwCharStyles; CFX_RectF rtPiece; }; typedef FDE_TTOPIECE* FDE_LPTTOPIECE; @@ -55,7 +55,7 @@ class CFDE_TextOut : public IFDE_TextOut, public CFX_Target { virtual void SetFont(IFX_Font* pFont); virtual void SetFontSize(FX_FLOAT fFontSize); virtual void SetTextColor(FX_ARGB color); - virtual void SetStyles(FX_DWORD dwStyles); + virtual void SetStyles(uint32_t dwStyles); virtual void SetTabWidth(FX_FLOAT fTabWidth); virtual void SetEllipsisString(const CFX_WideString& wsEllipsis); virtual void SetParagraphBreakChar(FX_WCHAR wch); @@ -113,7 +113,7 @@ class CFDE_TextOut : public IFDE_TextOut, public CFX_Target { protected: void CalcTextSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF& rect); - FX_BOOL RetrieveLineWidth(FX_DWORD dwBreakStatus, + FX_BOOL RetrieveLineWidth(uint32_t dwBreakStatus, FX_FLOAT& fStartPos, FX_FLOAT& fWidth, FX_FLOAT& fHeight); @@ -129,7 +129,7 @@ class CFDE_TextOut : public IFDE_TextOut, public CFX_Target { void Reload(const CFX_RectF& rect); void ReloadLinePiece(CFDE_TTOLine* pLine, const CFX_RectF& rect); - FX_BOOL RetriecePieces(FX_DWORD dwBreakStatus, + FX_BOOL RetriecePieces(uint32_t dwBreakStatus, int32_t& iStartChar, int32_t& iPieceWidths, FX_BOOL bReload, @@ -160,8 +160,8 @@ class CFDE_TextOut : public IFDE_TextOut, public CFX_Target { int32_t m_iEllChars; FX_WCHAR m_wParagraphBkChar; FX_ARGB m_TxtColor; - FX_DWORD m_dwStyles; - FX_DWORD m_dwTxtBkStyles; + uint32_t m_dwStyles; + uint32_t m_dwTxtBkStyles; CFX_WideString m_wsEllipsis; FX_BOOL m_bElliChanged; int32_t m_iEllipsisWidth; @@ -241,7 +241,7 @@ void CFDE_TextOut::SetFontSize(FX_FLOAT fFontSize) { void CFDE_TextOut::SetTextColor(FX_ARGB color) { m_TxtColor = color; } -void CFDE_TextOut::SetStyles(FX_DWORD dwStyles) { +void CFDE_TextOut::SetStyles(uint32_t dwStyles) { m_dwStyles = dwStyles; m_dwTxtBkStyles = 0; if (dwStyles & FDE_TTOSTYLE_SingleLine) { @@ -407,7 +407,7 @@ void CFDE_TextOut::CalcTextSize(const FX_WCHAR* pwsStr, FX_FLOAT fWidth = 0.0f; FX_FLOAT fHeight = 0.0f; FX_FLOAT fStartPos = bVertical ? rect.bottom() : rect.right(); - FX_DWORD dwBreakStatus = 0; + uint32_t dwBreakStatus = 0; FX_WCHAR wPreChar = 0; FX_WCHAR wch; FX_WCHAR wBreak = 0; @@ -474,7 +474,7 @@ void CFDE_TextOut::SetLineWidth(CFX_RectF& rect) { m_pTxtBreak->SetLineWidth(fLineWidth); } } -FX_BOOL CFDE_TextOut::RetrieveLineWidth(FX_DWORD dwBreakStatus, +FX_BOOL CFDE_TextOut::RetrieveLineWidth(uint32_t dwBreakStatus, FX_FLOAT& fStartPos, FX_FLOAT& fWidth, FX_FLOAT& fHeight) { @@ -628,7 +628,7 @@ void CFDE_TextOut::LoadEllipsis() { ExpandBuffer(iLength, 1); const FX_WCHAR* pStr = (const FX_WCHAR*)m_wsEllipsis; int32_t* pCharWidths = m_pEllCharWidths; - FX_DWORD dwBreakStatus; + uint32_t dwBreakStatus; FX_WCHAR wch; while (iLength-- > 0) { wch = *pStr++; @@ -682,7 +682,7 @@ void CFDE_TextOut::LoadText(const FX_WCHAR* pwsStr, int32_t iStartChar = 0; int32_t iChars = 0; int32_t iPieceWidths = 0; - FX_DWORD dwBreakStatus; + uint32_t dwBreakStatus; FX_WCHAR wch; FX_BOOL bRet = FALSE; while (iTxtLength-- > 0) { @@ -726,7 +726,7 @@ void CFDE_TextOut::LoadText(const FX_WCHAR* pwsStr, m_pTxtBreak->Reset(); m_wsText.ReleaseBuffer(iLength); } -FX_BOOL CFDE_TextOut::RetriecePieces(FX_DWORD dwBreakStatus, +FX_BOOL CFDE_TextOut::RetriecePieces(uint32_t dwBreakStatus, int32_t& iStartChar, int32_t& iPieceWidths, FX_BOOL bReload, @@ -883,7 +883,7 @@ void CFDE_TextOut::ReloadLinePiece(CFDE_TTOLine* pLine, const CFX_RectF& rect) { m_fLinePos = bVertical ? pPiece->rtPiece.left : pPiece->rtPiece.top; int32_t iPieceCount = pLine->GetSize(); int32_t iPieceIndex = 0; - FX_DWORD dwBreakStatus = 0; + uint32_t dwBreakStatus = 0; FX_WCHAR wch; while (iPieceIndex < iPieceCount) { int32_t iStar = iStartChar; diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp index 3e0c87f821..fef11a9080 100644 --- a/xfa/fde/xml/fde_xml_imp.cpp +++ b/xfa/fde/xml/fde_xml_imp.cpp @@ -1102,7 +1102,7 @@ CFDE_XMLDOMParser::~CFDE_XMLDOMParser() { m_ws2.Empty(); } int32_t CFDE_XMLDOMParser::DoParser(IFX_Pause* pPause) { - FX_DWORD dwRet; + uint32_t dwRet; int32_t iCount = 0; while (TRUE) { dwRet = m_pParser->DoSyntaxParse(); @@ -1220,7 +1220,7 @@ CFDE_XMLSAXParser::~CFDE_XMLSAXParser() { m_ws2.Empty(); } int32_t CFDE_XMLSAXParser::DoParser(IFX_Pause* pPause) { - FX_DWORD dwRet = 0; + uint32_t dwRet = 0; int32_t iCount = 0; while (TRUE) { dwRet = m_pParser->DoSyntaxParse(); @@ -1499,7 +1499,7 @@ void CFDE_XMLSyntaxParser::Init(IFX_Stream* pStream, m_iParsedBytes = m_iParsedChars = 0; m_iBufferChars = 0; } -FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse() { +uint32_t CFDE_XMLSyntaxParser::DoSyntaxParse() { if (m_dwStatus == FDE_XMLSYNTAXSTATUS_Error || m_dwStatus == FDE_XMLSYNTAXSTATUS_EOS) { return m_dwStatus; @@ -1508,7 +1508,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse() { int32_t iStreamLength = m_pStream->GetLength(); int32_t iPos; FX_WCHAR ch; - FX_DWORD dwStatus = FDE_XMLSYNTAXSTATUS_None; + uint32_t dwStatus = FDE_XMLSYNTAXSTATUS_None; while (TRUE) { if (m_pStart >= m_pEnd) { if (m_bEOS || m_iCurrentPos >= iStreamLength) { @@ -1814,7 +1814,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse() { break; } m_SkipStack.Pop(); - FX_DWORD* pDWord = m_SkipStack.GetTopElement(); + uint32_t* pDWord = m_SkipStack.GetTopElement(); if (pDWord == NULL) { m_dwMode = FDE_XMLSYNTAXMODE_Text; } else { @@ -1845,7 +1845,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse() { default: if (ch == m_SkipChar) { m_SkipStack.Pop(); - FX_DWORD* pDWord = m_SkipStack.GetTopElement(); + uint32_t* pDWord = m_SkipStack.GetTopElement(); if (pDWord == NULL) { if (m_iDataLength >= 9) { CFX_WideString wsHeader; @@ -1993,20 +1993,20 @@ int32_t CFDE_XMLSyntaxParser::GetStatus() const { return m_iParsedBytes * 100 / iStreamLength; } static int32_t FX_GetUTF8EncodeLength(const FX_WCHAR* pSrc, int32_t iSrcLen) { - FX_DWORD unicode = 0; + uint32_t unicode = 0; int32_t iDstNum = 0; while (iSrcLen-- > 0) { unicode = *pSrc++; int nbytes = 0; - if ((FX_DWORD)unicode < 0x80) { + if ((uint32_t)unicode < 0x80) { nbytes = 1; - } else if ((FX_DWORD)unicode < 0x800) { + } else if ((uint32_t)unicode < 0x800) { nbytes = 2; - } else if ((FX_DWORD)unicode < 0x10000) { + } else if ((uint32_t)unicode < 0x10000) { nbytes = 3; - } else if ((FX_DWORD)unicode < 0x200000) { + } else if ((uint32_t)unicode < 0x200000) { nbytes = 4; - } else if ((FX_DWORD)unicode < 0x4000000) { + } else if ((uint32_t)unicode < 0x4000000) { nbytes = 5; } else { nbytes = 6; diff --git a/xfa/fee/fde_txtedtengine.cpp b/xfa/fee/fde_txtedtengine.cpp index 3afd20cf80..d397afd7e3 100644 --- a/xfa/fee/fde_txtedtengine.cpp +++ b/xfa/fee/fde_txtedtengine.cpp @@ -1053,7 +1053,7 @@ void CFDE_TxtEdtEngine::UpdatePages() { } } void CFDE_TxtEdtEngine::UpdateTxtBreak() { - FX_DWORD dwStyle = m_pTextBreak->GetLayoutStyles(); + uint32_t dwStyle = m_pTextBreak->GetLayoutStyles(); if (m_Param.dwMode & FDE_TEXTEDITMODE_MultiLines) { dwStyle &= ~FX_TXTLAYOUTSTYLE_SingleLine; } else { @@ -1100,7 +1100,7 @@ void CFDE_TxtEdtEngine::UpdateTxtBreak() { dwStyle &= ~FX_TXTLAYOUTSTYLE_ArabicShapes; } m_pTextBreak->SetLayoutStyles(dwStyle); - FX_DWORD dwAligment = 0; + uint32_t dwAligment = 0; if (m_Param.dwAlignment & FDE_TEXTEDITALIGN_Justified) { dwAligment |= FX_TXTLINEALIGNMENT_Justified; } else if (m_Param.dwAlignment & FDE_TEXTEDITALIGN_Distributed) { @@ -1515,7 +1515,7 @@ FX_BOOL CFDE_TxtEdtEngine::IsFitArea(CFX_WideString& wsText) { pTextOut->SetFontSize(m_Param.fFontSize); CFX_RectF rcText; FXSYS_memset(&rcText, 0, sizeof(rcText)); - FX_DWORD dwStyle = 0; + uint32_t dwStyle = 0; if (!(m_Param.dwMode & FDE_TEXTEDITMODE_MultiLines)) { dwStyle |= FDE_TTOSTYLE_SingleLine; } diff --git a/xfa/fee/fde_txtedtpage.cpp b/xfa/fee/fde_txtedtpage.cpp index 5ecbceaf40..f75fcd1426 100644 --- a/xfa/fee/fde_txtedtpage.cpp +++ b/xfa/fee/fde_txtedtpage.cpp @@ -77,7 +77,7 @@ int32_t CFDE_TxtEdtTextSet::GetDisplayPos(FDE_HVISUALOBJ hText, CFDE_TxtEdtEngine* pEngine = (CFDE_TxtEdtEngine*)(m_pPage->GetEngine()); const FDE_TXTEDTPARAMS* pTextParams = pEngine->GetEditParams(); IFX_TxtBreak* pBreak = pEngine->GetTextBreak(); - FX_DWORD dwLayoutStyle = pBreak->GetLayoutStyles(); + uint32_t dwLayoutStyle = pBreak->GetLayoutStyles(); FX_TXTRUN tr; tr.pAccess = m_pPage; tr.pIdentity = (void*)hText; @@ -110,7 +110,7 @@ int32_t CFDE_TxtEdtTextSet::GetCharRects_Impl(FDE_HVISUALOBJ hText, return 0; } const FDE_TXTEDTPARAMS* pTextParams = pEngine->GetEditParams(); - FX_DWORD dwLayoutStyle = pEngine->GetTextBreak()->GetLayoutStyles(); + uint32_t dwLayoutStyle = pEngine->GetTextBreak()->GetLayoutStyles(); FX_TXTRUN tr; tr.pAccess = m_pPage; tr.pIdentity = (void*)hText; @@ -428,7 +428,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox, m_pTextSet = new CFDE_TxtEdtTextSet(this); } m_PieceMassArr.RemoveAll(TRUE); - FX_DWORD dwBreakStatus = FX_TXTBREAK_None; + uint32_t dwBreakStatus = FX_TXTBREAK_None; int32_t nPieceStart = 0; if (m_pCharWidth != NULL) { delete[] m_pCharWidth; diff --git a/xfa/fee/fde_txtedtparag.cpp b/xfa/fee/fde_txtedtparag.cpp index 427bbbc2ce..cac8c3c455 100644 --- a/xfa/fee/fde_txtedtparag.cpp +++ b/xfa/fee/fde_txtedtparag.cpp @@ -44,7 +44,7 @@ void CFDE_TxtEdtParag::LoadParag() { int32_t nEndIndex = m_nCharStart + m_nCharCount; CFX_ArrayTemplate<int32_t> LineBaseArr; FX_BOOL bReload = FALSE; - FX_DWORD dwBreakStatus = FX_TXTBREAK_None; + uint32_t dwBreakStatus = FX_TXTBREAK_None; do { if (bReload) { dwBreakStatus = pTxtBreak->EndBreak(FX_TXTBREAK_ParagraphBreak); @@ -105,7 +105,7 @@ void CFDE_TxtEdtParag::CalcLines() { IFDE_TxtEdtBuf* pTxtBuf = m_pEngine->GetTextBuf(); IFX_CharIter* pIter = new CFDE_TxtEdtBufIter((CFDE_TxtEdtBuf*)pTxtBuf); int32_t nCount = 0; - FX_DWORD dwBreakStatus = FX_TXTBREAK_None; + uint32_t dwBreakStatus = FX_TXTBREAK_None; int32_t nEndIndex = m_nCharStart + m_nCharCount; pIter->SetAt(m_nCharStart); FX_BOOL bReload = FALSE; diff --git a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp index 6b8ae806d6..3f6e240430 100644 --- a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp +++ b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp @@ -7,8 +7,8 @@ #include "xfa/fee/fx_wordbreak/fx_wordbreak_impl.h" FX_WordBreakProp FX_GetWordBreakProperty(FX_WCHAR wcCodePoint) { - FX_DWORD dwProperty = - (FX_DWORD)gs_FX_WordBreak_CodePointProperties[wcCodePoint >> 1]; + uint32_t dwProperty = + (uint32_t)gs_FX_WordBreak_CodePointProperties[wcCodePoint >> 1]; return (FX_WordBreakProp)(((wcCodePoint)&1) ? (dwProperty & 0x0F) : (dwProperty >> 4)); } diff --git a/xfa/fgas/crt/fgas_algorithm.cpp b/xfa/fgas/crt/fgas_algorithm.cpp index 8f13cb3045..ce8dda646a 100644 --- a/xfa/fgas/crt/fgas_algorithm.cpp +++ b/xfa/fgas/crt/fgas_algorithm.cpp @@ -21,20 +21,20 @@ static const FX_CHAR g_FXBase64EncoderMap[64] = { }; struct FX_BASE64DATA { - FX_DWORD data1 : 2; - FX_DWORD data2 : 6; - FX_DWORD data3 : 4; - FX_DWORD data4 : 4; - FX_DWORD data5 : 6; - FX_DWORD data6 : 2; - FX_DWORD data7 : 8; + uint32_t data1 : 2; + uint32_t data2 : 6; + uint32_t data3 : 4; + uint32_t data4 : 4; + uint32_t data5 : 6; + uint32_t data6 : 2; + uint32_t data7 : 8; }; static void FX_Base64EncodePiece(const FX_BASE64DATA& src, int32_t iBytes, FX_CHAR dst[4]) { dst[0] = g_FXBase64EncoderMap[src.data2]; - FX_DWORD b = src.data1 << 4; + uint32_t b = src.data1 << 4; if (iBytes > 1) { b |= src.data4; } @@ -76,7 +76,7 @@ int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst) { ((uint8_t*)&srcData)[2] = *pSrc++; iSrcLen -= 3; } else { - *((FX_DWORD*)&srcData) = 0; + *((uint32_t*)&srcData) = 0; ((uint8_t*)&srcData)[0] = *pSrc++; if (iSrcLen > 1) { ((uint8_t*)&srcData)[1] = *pSrc++; @@ -172,12 +172,12 @@ int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) { uint8_t* pDstEnd = pDst; while (iSrcLen > 0) { if (iSrcLen > 3) { - *((FX_DWORD*)srcData) = *((FX_DWORD*)pSrc); + *((uint32_t*)srcData) = *((uint32_t*)pSrc); pSrc += 4; iSrcLen -= 4; } else { - *((FX_DWORD*)&dstData) = 0; - *((FX_DWORD*)srcData) = 0; + *((uint32_t*)&dstData) = 0; + *((uint32_t*)srcData) = 0; srcData[0] = *pSrc++; if (iSrcLen > 1) { srcData[1] = *pSrc++; @@ -234,8 +234,8 @@ int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) { srcData[3] = (FX_CHAR)*pSrc++; iSrcLen -= 4; } else { - *((FX_DWORD*)&dstData) = 0; - *((FX_DWORD*)srcData) = 0; + *((uint32_t*)&dstData) = 0; + *((uint32_t*)srcData) = 0; srcData[0] = (FX_CHAR)*pSrc++; if (iSrcLen > 1) { srcData[1] = (FX_CHAR)*pSrc++; diff --git a/xfa/fgas/crt/fgas_encode.cpp b/xfa/fgas/crt/fgas_encode.cpp index 7d04e58131..84a1ef40ed 100644 --- a/xfa/fgas/crt/fgas_encode.cpp +++ b/xfa/fgas/crt/fgas_encode.cpp @@ -96,7 +96,7 @@ void FX_WCharToUTF16Copy(const FX_WCHAR* pWChar, } } } -inline FX_DWORD FX_DWordFromBytes(const uint8_t* pStr) { +inline uint32_t FX_DWordFromBytes(const uint8_t* pStr) { return FXBSTR_ID(pStr[3], pStr[2], pStr[1], pStr[0]); } inline uint16_t FX_WordFromBytes(const uint8_t* pStr) { @@ -127,7 +127,7 @@ int32_t FX_UTF8Decode(const FX_CHAR* pSrc, } int32_t iDstLen = *pDstLen; FX_BOOL bValidDst = (pDst != NULL && iDstLen > 0); - FX_DWORD dwCode = 0; + uint32_t dwCode = 0; int32_t iPending = 0; int32_t iSrcNum = 0, iDstNum = 0; int32_t k = 0; diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp index 4dc3737d75..8ab2f9fd37 100644 --- a/xfa/fgas/crt/fgas_stream.cpp +++ b/xfa/fgas/crt/fgas_stream.cpp @@ -16,7 +16,7 @@ namespace { class CFX_StreamImp { public: virtual void Release() { delete this; } - virtual FX_DWORD GetAccessModes() const { return m_dwAccess; } + virtual uint32_t GetAccessModes() const { return m_dwAccess; } virtual int32_t GetLength() const = 0; virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) = 0; virtual int32_t GetPosition() = 0; @@ -33,14 +33,14 @@ class CFX_StreamImp { protected: CFX_StreamImp(); virtual ~CFX_StreamImp() {} - FX_DWORD m_dwAccess; + uint32_t m_dwAccess; }; class CFX_FileStreamImp : public CFX_StreamImp { public: CFX_FileStreamImp(); virtual ~CFX_FileStreamImp(); - FX_BOOL LoadFile(const FX_WCHAR* pszSrcFileName, FX_DWORD dwAccess); + FX_BOOL LoadFile(const FX_WCHAR* pszSrcFileName, uint32_t dwAccess); virtual int32_t GetLength() const; virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset); virtual int32_t GetPosition(); @@ -61,7 +61,7 @@ class CFX_BufferStreamImp : public CFX_StreamImp { public: CFX_BufferStreamImp(); virtual ~CFX_BufferStreamImp() {} - FX_BOOL LoadBuffer(uint8_t* pData, int32_t iTotalSize, FX_DWORD dwAccess); + FX_BOOL LoadBuffer(uint8_t* pData, int32_t iTotalSize, uint32_t dwAccess); virtual int32_t GetLength() const; virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset); virtual int32_t GetPosition(); @@ -84,7 +84,7 @@ class CFX_FileReadStreamImp : public CFX_StreamImp { public: CFX_FileReadStreamImp(); virtual ~CFX_FileReadStreamImp() {} - FX_BOOL LoadFileRead(IFX_FileRead* pFileRead, FX_DWORD dwAccess); + FX_BOOL LoadFileRead(IFX_FileRead* pFileRead, uint32_t dwAccess); virtual int32_t GetLength() const; virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset); virtual int32_t GetPosition() { return m_iPosition; } @@ -113,7 +113,7 @@ class CFX_BufferReadStreamImp : public CFX_StreamImp { ~CFX_BufferReadStreamImp(); FX_BOOL LoadBufferRead(IFX_BufferRead* pBufferRead, int32_t iFileSize, - FX_DWORD dwAccess, + uint32_t dwAccess, FX_BOOL bReleaseBufferRead); virtual int32_t GetLength() const; @@ -143,7 +143,7 @@ class CFX_FileWriteStreamImp : public CFX_StreamImp { public: CFX_FileWriteStreamImp(); virtual ~CFX_FileWriteStreamImp() {} - FX_BOOL LoadFileWrite(IFX_FileWrite* pFileWrite, FX_DWORD dwAccess); + FX_BOOL LoadFileWrite(IFX_FileWrite* pFileWrite, uint32_t dwAccess); virtual int32_t GetLength() const; virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset); virtual int32_t GetPosition() { return m_iPosition; } @@ -176,17 +176,17 @@ class CFX_Stream : public IFX_Stream { public: CFX_Stream(); ~CFX_Stream(); - FX_BOOL LoadFile(const FX_WCHAR* pszSrcFileName, FX_DWORD dwAccess); - FX_BOOL LoadBuffer(uint8_t* pData, int32_t iTotalSize, FX_DWORD dwAccess); - FX_BOOL LoadFileRead(IFX_FileRead* pFileRead, FX_DWORD dwAccess); - FX_BOOL LoadFileWrite(IFX_FileWrite* pFileWrite, FX_DWORD dwAccess); + FX_BOOL LoadFile(const FX_WCHAR* pszSrcFileName, uint32_t dwAccess); + FX_BOOL LoadBuffer(uint8_t* pData, int32_t iTotalSize, uint32_t dwAccess); + FX_BOOL LoadFileRead(IFX_FileRead* pFileRead, uint32_t dwAccess); + FX_BOOL LoadFileWrite(IFX_FileWrite* pFileWrite, uint32_t dwAccess); FX_BOOL LoadBufferRead(IFX_BufferRead* pBufferRead, int32_t iFileSize, - FX_DWORD dwAccess, + uint32_t dwAccess, FX_BOOL bReleaseBufferRead); virtual void Release(); virtual IFX_Stream* Retain(); - virtual FX_DWORD GetAccessModes() const { return m_dwAccess; } + virtual uint32_t GetAccessModes() const { return m_dwAccess; } virtual int32_t GetLength() const; virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset); virtual int32_t GetPosition(); @@ -203,14 +203,14 @@ class CFX_Stream : public IFX_Stream { virtual int32_t GetBOM(uint8_t bom[4]) const; virtual uint16_t GetCodePage() const; virtual uint16_t SetCodePage(uint16_t wCodePage); - virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess, + virtual IFX_Stream* CreateSharedStream(uint32_t dwAccess, int32_t iOffset, int32_t iLength); protected: FX_STREAMTYPE m_eStreamType; CFX_StreamImp* m_pStreamImp; - FX_DWORD m_dwAccess; + uint32_t m_dwAccess; int32_t m_iTotalSize; int32_t m_iPosition; int32_t m_iStart; @@ -225,7 +225,7 @@ class CFX_TextStream : public IFX_Stream { virtual void Release(); virtual IFX_Stream* Retain(); - virtual FX_DWORD GetAccessModes() const; + virtual uint32_t GetAccessModes() const; virtual int32_t GetLength() const; virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset); virtual int32_t GetPosition(); @@ -245,14 +245,14 @@ class CFX_TextStream : public IFX_Stream { virtual uint16_t GetCodePage() const; virtual uint16_t SetCodePage(uint16_t wCodePage); - virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess, + virtual IFX_Stream* CreateSharedStream(uint32_t dwAccess, int32_t iOffset, int32_t iLength); protected: uint16_t m_wCodePage; int32_t m_wBOMLength; - FX_DWORD m_dwBOM; + uint32_t m_dwBOM; uint8_t* m_pBuf; int32_t m_iBufSize; FX_BOOL m_bDelStream; @@ -310,7 +310,7 @@ class CFGAS_FileWrite : public IFX_FileWrite { } // namespace IFX_Stream* IFX_Stream::CreateStream(IFX_BufferRead* pBufferRead, - FX_DWORD dwAccess, + uint32_t dwAccess, int32_t iFileSize, FX_BOOL bReleaseBufferRead) { CFX_Stream* pSR = new CFX_Stream; @@ -325,7 +325,7 @@ IFX_Stream* IFX_Stream::CreateStream(IFX_BufferRead* pBufferRead, return pSR; } IFX_Stream* IFX_Stream::CreateStream(IFX_FileRead* pFileRead, - FX_DWORD dwAccess) { + uint32_t dwAccess) { CFX_Stream* pSR = new CFX_Stream; if (!pSR->LoadFileRead(pFileRead, dwAccess)) { pSR->Release(); @@ -337,7 +337,7 @@ IFX_Stream* IFX_Stream::CreateStream(IFX_FileRead* pFileRead, return pSR; } IFX_Stream* IFX_Stream::CreateStream(IFX_FileWrite* pFileWrite, - FX_DWORD dwAccess) { + uint32_t dwAccess) { CFX_Stream* pSR = new CFX_Stream; if (!pSR->LoadFileWrite(pFileWrite, dwAccess)) { pSR->Release(); @@ -349,7 +349,7 @@ IFX_Stream* IFX_Stream::CreateStream(IFX_FileWrite* pFileWrite, return pSR; } IFX_Stream* IFX_Stream::CreateStream(const FX_WCHAR* pszFileName, - FX_DWORD dwAccess) { + uint32_t dwAccess) { CFX_Stream* pSR = new CFX_Stream; if (!pSR->LoadFile(pszFileName, dwAccess)) { pSR->Release(); @@ -362,7 +362,7 @@ IFX_Stream* IFX_Stream::CreateStream(const FX_WCHAR* pszFileName, } IFX_Stream* IFX_Stream::CreateStream(uint8_t* pData, int32_t length, - FX_DWORD dwAccess) { + uint32_t dwAccess) { CFX_Stream* pSR = new CFX_Stream; if (!pSR->LoadBuffer(pData, length, dwAccess)) { pSR->Release(); @@ -383,7 +383,7 @@ CFX_FileStreamImp::~CFX_FileStreamImp() { } } FX_BOOL CFX_FileStreamImp::LoadFile(const FX_WCHAR* pszSrcFileName, - FX_DWORD dwAccess) { + uint32_t dwAccess) { FXSYS_assert(m_hFile == NULL); FXSYS_assert(pszSrcFileName != NULL && FXSYS_wcslen(pszSrcFileName) > 0); #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || \ @@ -547,7 +547,7 @@ FX_BOOL CFX_FileStreamImp::SetLength(int32_t iLength) { CFX_FileReadStreamImp::CFX_FileReadStreamImp() : m_pFileRead(NULL), m_iPosition(0), m_iLength(0) {} FX_BOOL CFX_FileReadStreamImp::LoadFileRead(IFX_FileRead* pFileRead, - FX_DWORD dwAccess) { + uint32_t dwAccess) { FXSYS_assert(m_pFileRead == NULL && pFileRead != NULL); if (dwAccess & FX_STREAMACCESS_Write) { return FALSE; @@ -621,7 +621,7 @@ CFX_BufferReadStreamImp::~CFX_BufferReadStreamImp() { } FX_BOOL CFX_BufferReadStreamImp::LoadBufferRead(IFX_BufferRead* pBufferRead, int32_t iFileSize, - FX_DWORD dwAccess, + uint32_t dwAccess, FX_BOOL bReleaseBufferRead) { FXSYS_assert(m_pBufferRead == NULL && pBufferRead != NULL); if (dwAccess & FX_STREAMACCESS_Write) { @@ -680,8 +680,8 @@ int32_t CFX_BufferReadStreamImp::ReadData(uint8_t* pBuffer, if (iBufferSize > iLength - m_iPosition) { iBufferSize = iLength - m_iPosition; } - FX_DWORD dwBlockOffset = m_pBufferRead->GetBlockOffset(); - FX_DWORD dwBlockSize = m_pBufferRead->GetBlockSize(); + uint32_t dwBlockOffset = m_pBufferRead->GetBlockOffset(); + uint32_t dwBlockSize = m_pBufferRead->GetBlockSize(); if (m_iPosition < (int32_t)dwBlockOffset) { if (!m_pBufferRead->ReadNextBlock(TRUE)) { return 0; @@ -702,8 +702,8 @@ int32_t CFX_BufferReadStreamImp::ReadData(uint8_t* pBuffer, return 0; } const uint8_t* pBufferTmp = m_pBufferRead->GetBlockBuffer(); - FX_DWORD dwOffsetTmp = m_iPosition - dwBlockOffset; - FX_DWORD dwCopySize = + uint32_t dwOffsetTmp = m_iPosition - dwBlockOffset; + uint32_t dwCopySize = std::min(iBufferSize, (int32_t)(dwBlockSize - dwOffsetTmp)); FXSYS_memcpy(pBuffer, pBufferTmp + dwOffsetTmp, dwCopySize); dwOffsetTmp = dwCopySize; @@ -715,7 +715,7 @@ int32_t CFX_BufferReadStreamImp::ReadData(uint8_t* pBuffer, dwBlockOffset = m_pBufferRead->GetBlockOffset(); dwBlockSize = m_pBufferRead->GetBlockSize(); pBufferTmp = m_pBufferRead->GetBlockBuffer(); - dwCopySize = std::min((FX_DWORD)iBufferSize, dwBlockSize); + dwCopySize = std::min((uint32_t)iBufferSize, dwBlockSize); FXSYS_memcpy(pBuffer + dwOffsetTmp, pBufferTmp, dwCopySize); dwOffsetTmp += dwCopySize; iBufferSize -= dwCopySize; @@ -742,7 +742,7 @@ int32_t CFX_BufferReadStreamImp::ReadString(FX_WCHAR* pStr, CFX_FileWriteStreamImp::CFX_FileWriteStreamImp() : m_pFileWrite(NULL), m_iPosition(0) {} FX_BOOL CFX_FileWriteStreamImp::LoadFileWrite(IFX_FileWrite* pFileWrite, - FX_DWORD dwAccess) { + uint32_t dwAccess) { FXSYS_assert(m_pFileWrite == NULL && pFileWrite != NULL); if (dwAccess & FX_STREAMACCESS_Read) { return FALSE; @@ -809,7 +809,7 @@ CFX_BufferStreamImp::CFX_BufferStreamImp() m_iLength(0) {} FX_BOOL CFX_BufferStreamImp::LoadBuffer(uint8_t* pData, int32_t iTotalSize, - FX_DWORD dwAccess) { + uint32_t dwAccess) { FXSYS_assert(m_pData == NULL); FXSYS_assert(pData != NULL && iTotalSize > 0); m_dwAccess = dwAccess; @@ -988,7 +988,7 @@ IFX_Stream* CFX_TextStream::Retain() { m_iRefCount++; return this; } -FX_DWORD CFX_TextStream::GetAccessModes() const { +uint32_t CFX_TextStream::GetAccessModes() const { return m_pStreamImp->GetAccessModes() | FX_STREAMACCESS_Text; } int32_t CFX_TextStream::GetLength() const { @@ -1018,7 +1018,7 @@ FX_BOOL CFX_TextStream::SetLength(int32_t iLength) { uint16_t CFX_TextStream::GetCodePage() const { return m_wCodePage; } -IFX_Stream* CFX_TextStream::CreateSharedStream(FX_DWORD dwAccess, +IFX_Stream* CFX_TextStream::CreateSharedStream(uint32_t dwAccess, int32_t iOffset, int32_t iLength) { IFX_Stream* pSR = @@ -1035,7 +1035,7 @@ int32_t CFX_TextStream::GetBOM(uint8_t bom[4]) const { if (m_wBOMLength < 1) { return 0; } - *(FX_DWORD*)bom = m_dwBOM; + *(uint32_t*)bom = m_dwBOM; return m_wBOMLength; } uint16_t CFX_TextStream::SetCodePage(uint16_t wCodePage) { @@ -1131,7 +1131,7 @@ CFX_Stream::~CFX_Stream() { } } FX_BOOL CFX_Stream::LoadFile(const FX_WCHAR* pszSrcFileName, - FX_DWORD dwAccess) { + uint32_t dwAccess) { if (m_eStreamType != FX_SREAMTYPE_Unknown || m_pStreamImp != NULL) { return FALSE; } @@ -1151,7 +1151,7 @@ FX_BOOL CFX_Stream::LoadFile(const FX_WCHAR* pszSrcFileName, } return bRet; } -FX_BOOL CFX_Stream::LoadFileRead(IFX_FileRead* pFileRead, FX_DWORD dwAccess) { +FX_BOOL CFX_Stream::LoadFileRead(IFX_FileRead* pFileRead, uint32_t dwAccess) { if (m_eStreamType != FX_SREAMTYPE_Unknown || m_pStreamImp != NULL) { return FALSE; } @@ -1172,7 +1172,7 @@ FX_BOOL CFX_Stream::LoadFileRead(IFX_FileRead* pFileRead, FX_DWORD dwAccess) { return bRet; } FX_BOOL CFX_Stream::LoadFileWrite(IFX_FileWrite* pFileWrite, - FX_DWORD dwAccess) { + uint32_t dwAccess) { if (m_eStreamType != FX_SREAMTYPE_Unknown || m_pStreamImp != NULL) { return FALSE; } @@ -1194,7 +1194,7 @@ FX_BOOL CFX_Stream::LoadFileWrite(IFX_FileWrite* pFileWrite, } FX_BOOL CFX_Stream::LoadBuffer(uint8_t* pData, int32_t iTotalSize, - FX_DWORD dwAccess) { + uint32_t dwAccess) { if (m_eStreamType != FX_SREAMTYPE_Unknown || m_pStreamImp != NULL) { return FALSE; } @@ -1216,7 +1216,7 @@ FX_BOOL CFX_Stream::LoadBuffer(uint8_t* pData, } FX_BOOL CFX_Stream::LoadBufferRead(IFX_BufferRead* pBufferRead, int32_t iFileSize, - FX_DWORD dwAccess, + uint32_t dwAccess, FX_BOOL bReleaseBufferRead) { if (m_eStreamType != FX_SREAMTYPE_Unknown || m_pStreamImp != NULL) { return FALSE; @@ -1435,7 +1435,7 @@ uint16_t CFX_Stream::SetCodePage(uint16_t wCodePage) { return FX_CODEPAGE_UTF16BE; #endif } -IFX_Stream* CFX_Stream::CreateSharedStream(FX_DWORD dwAccess, +IFX_Stream* CFX_Stream::CreateSharedStream(uint32_t dwAccess, int32_t iOffset, int32_t iLength) { FXSYS_assert(iLength > 0); diff --git a/xfa/fgas/crt/fgas_system.cpp b/xfa/fgas/crt/fgas_system.cpp index e6d89a50af..df1a9d044a 100644 --- a/xfa/fgas/crt/fgas_system.cpp +++ b/xfa/fgas/crt/fgas_system.cpp @@ -61,7 +61,7 @@ FX_BOOL FX_fsetsize(FXSYS_FILE* file, int32_t size) { return _chsize(_fileno(file), size) == 0; #elif _FX_OS_ == _FX_WIN32_MOBILE_ HANDLE hFile = _fileno(file); - FX_DWORD dwPos = ::SetFilePointer(hFile, 0, 0, FILE_CURRENT); + uint32_t dwPos = ::SetFilePointer(hFile, 0, 0, FILE_CURRENT); ::SetFilePointer(hFile, size, 0, FILE_BEGIN); FX_BOOL bRet = ::SetEndOfFile(hFile); ::SetFilePointer(hFile, (int32_t)dwPos, 0, FILE_BEGIN); diff --git a/xfa/fgas/font/fgas_fontutils.cpp b/xfa/fgas/font/fgas_fontutils.cpp index a0767d74f5..2e550f7c08 100644 --- a/xfa/fgas/font/fgas_fontutils.cpp +++ b/xfa/fgas/font/fgas_fontutils.cpp @@ -9,8 +9,8 @@ #include "core/fxcrt/include/fx_ext.h" #include "xfa/fgas/font/fgas_font.h" -FX_DWORD FGAS_GetFontHashCode(uint16_t wCodePage, FX_DWORD dwFontStyles) { - FX_DWORD dwHash = wCodePage; +uint32_t FGAS_GetFontHashCode(uint16_t wCodePage, uint32_t dwFontStyles) { + uint32_t dwHash = wCodePage; if (dwFontStyles & FX_FONTSTYLE_FixedPitch) { dwHash |= 0x00010000; } @@ -31,8 +31,8 @@ FX_DWORD FGAS_GetFontHashCode(uint16_t wCodePage, FX_DWORD dwFontStyles) { } return dwHash; } -FX_DWORD FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily, - FX_DWORD dwFontStyles, +uint32_t FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily, + uint32_t dwFontStyles, uint16_t wCodePage) { CFX_WideString wsFont(pszFontFamily); if (dwFontStyles & FX_FONTSTYLE_Bold) { diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp index 75ed0b2a1f..3d740ba43a 100644 --- a/xfa/fgas/font/fgas_gefont.cpp +++ b/xfa/fgas/font/fgas_gefont.cpp @@ -10,7 +10,7 @@ #include "xfa/fgas/font/fgas_fontutils.h" IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage, IFX_FontMgr* pFontMgr) { #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ @@ -109,7 +109,7 @@ CFX_GEFont::CFX_GEFont(IFX_FontMgr* pFontMgr) m_FontMapper(16) { } -CFX_GEFont::CFX_GEFont(const CFX_GEFont& src, FX_DWORD dwFontStyles) +CFX_GEFont::CFX_GEFont(const CFX_GEFont& src, uint32_t dwFontStyles) : #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ m_bUseLogFontStyle(FALSE), @@ -188,7 +188,7 @@ IFX_Font* CFX_GEFont::Retain() { return this; } FX_BOOL CFX_GEFont::LoadFont(const FX_WCHAR* pszFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage) { if (m_pFont) { return FALSE; @@ -197,7 +197,7 @@ FX_BOOL CFX_GEFont::LoadFont(const FX_WCHAR* pszFontFamily, if (pszFontFamily != NULL) { csFontFamily = CFX_ByteString::FromUnicode(pszFontFamily); } - FX_DWORD dwFlags = 0; + uint32_t dwFlags = 0; if (dwFontStyles & FX_FONTSTYLE_FixedPitch) { dwFlags |= FXFONT_FIXED_PITCH; } @@ -329,7 +329,7 @@ FX_BOOL CFX_GEFont::InitFont() { } return TRUE; } -IFX_Font* CFX_GEFont::Derive(FX_DWORD dwFontStyles, uint16_t wCodePage) { +IFX_Font* CFX_GEFont::Derive(uint32_t dwFontStyles, uint16_t wCodePage) { if (GetFontStyles() == dwFontStyles) { return Retain(); } @@ -355,14 +355,14 @@ void CFX_GEFont::GetFamilyName(CFX_WideString& wsFamily) const { void CFX_GEFont::GetPsName(CFX_WideString& wsName) const { wsName = m_pFont->GetPsName(); } -FX_DWORD CFX_GEFont::GetFontStyles() const { +uint32_t CFX_GEFont::GetFontStyles() const { FXSYS_assert(m_pFont != NULL); #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ if (m_bUseLogFontStyle) { return m_dwLogFontStyle; } #endif - FX_DWORD dwStyles = 0; + uint32_t dwStyles = 0; if (!m_pFont->GetSubstFont()) { if (m_pFont->IsBold()) { dwStyles |= FX_FONTSTYLE_Bold; @@ -566,7 +566,7 @@ void CFX_GEFont::Reset() { } } IFX_Font* CFX_GEFont::GetSubstFont(int32_t iGlyphIndex) const { - iGlyphIndex = ((FX_DWORD)iGlyphIndex) >> 24; + iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24; return iGlyphIndex == 0 ? (IFX_Font*)this : (IFX_Font*)m_SubstFonts[iGlyphIndex - 1]; } diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp index a2eae837da..3733852388 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.cpp +++ b/xfa/fgas/font/fgas_stdfontmgr.cpp @@ -58,9 +58,9 @@ CFX_StdFontMgrImp::~CFX_StdFontMgrImp() { } IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage( uint16_t wCodePage, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { - FX_DWORD dwHash = FGAS_GetFontHashCode(wCodePage, dwFontStyles); + uint32_t dwHash = FGAS_GetFontHashCode(wCodePage, dwFontStyles); IFX_Font* pFont = NULL; if (m_CPFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) { return pFont ? LoadFont(pFont, dwFontStyles, wCodePage) : NULL; @@ -85,7 +85,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage( } IFX_Font* CFX_StdFontMgrImp::GetDefFontByCharset( uint8_t nCharset, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { return GetDefFontByCodePage(FX_GetCodePageFromCharset(nCharset), dwFontStyles, pszFontFamily); @@ -93,13 +93,13 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByCharset( IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode( FX_WCHAR wUnicode, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { const FGAS_FONTUSB* pRet = FGAS_GetUnicodeBitField(wUnicode); if (pRet->wBitField == 999) return nullptr; - FX_DWORD dwHash = + uint32_t dwHash = FGAS_GetFontFamilyHash(pszFontFamily, dwFontStyles, pRet->wBitField); IFX_Font* pFont = nullptr; if (m_UnicodeFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) @@ -132,15 +132,15 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode( IFX_Font* CFX_StdFontMgrImp::GetDefFontByLanguage( uint16_t wLanguage, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { return GetDefFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage), dwFontStyles, pszFontFamily); } IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage) { - FX_DWORD dwHash = + uint32_t dwHash = FGAS_GetFontFamilyHash(pszFontFamily, dwFontStyles, wCodePage); IFX_Font* pFont = NULL; if (m_FamilyFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) { @@ -185,7 +185,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer, int32_t iLength) { } IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) { FXSYS_assert(pszFileName != NULL); - FX_DWORD dwHash = FX_HashCode_String_GetW(pszFileName, -1); + uint32_t dwHash = FX_HashCode_String_GetW(pszFileName, -1); IFX_Font* pFont = NULL; if (m_FileFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) { if (pFont != NULL) { @@ -202,7 +202,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) { } IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream, const FX_WCHAR* pszFontAlias, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage, FX_BOOL bSaveStream) { FXSYS_assert(pFontStream != NULL && pFontStream->GetLength() > 0); @@ -210,7 +210,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream, if (m_StreamFonts.Lookup((void*)pFontStream, (void*&)pFont)) { if (pFont != NULL) { if (pszFontAlias != NULL) { - FX_DWORD dwHash = + uint32_t dwHash = FGAS_GetFontFamilyHash(pszFontAlias, dwFontStyles, wCodePage); m_FamilyFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont); } @@ -222,7 +222,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream, m_Fonts.Add(pFont); m_StreamFonts.SetAt((void*)pFontStream, (void*)pFont); if (pszFontAlias != NULL) { - FX_DWORD dwHash = + uint32_t dwHash = FGAS_GetFontFamilyHash(pszFontAlias, dwFontStyles, wCodePage); m_FamilyFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont); } @@ -231,7 +231,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream, return NULL; } IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Font* pSrcFont, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage) { FXSYS_assert(pSrcFont != NULL); if (pSrcFont->GetFontStyles() == dwFontStyles) { @@ -239,7 +239,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Font* pSrcFont, } void* buffer[3] = {pSrcFont, (void*)(uintptr_t)dwFontStyles, (void*)(uintptr_t)wCodePage}; - FX_DWORD dwHash = + uint32_t dwHash = FX_HashCode_String_GetA((const FX_CHAR*)buffer, 3 * sizeof(void*)); IFX_Font* pFont = NULL; if (m_DeriveFonts.GetCount() > 0) { @@ -297,10 +297,10 @@ void CFX_StdFontMgrImp::RemoveFont(IFX_Font* pFont) { } } FX_LPCFONTDESCRIPTOR CFX_StdFontMgrImp::FindFont(const FX_WCHAR* pszFontFamily, - FX_DWORD dwFontStyles, - FX_DWORD dwMatchFlags, + uint32_t dwFontStyles, + uint32_t dwMatchFlags, uint16_t wCodePage, - FX_DWORD dwUSB, + uint32_t dwUSB, FX_WCHAR wUnicode) { if (m_pMatcher == NULL) { return NULL; @@ -367,8 +367,8 @@ FX_LPCFONTDESCRIPTOR FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams, } } else { if (pParams->dwUSB < 128) { - FX_DWORD dwByte = pParams->dwUSB / 32; - FX_DWORD dwUSB = 1 << (pParams->dwUSB % 32); + uint32_t dwByte = pParams->dwUSB / 32; + uint32_t dwUSB = 1 << (pParams->dwUSB % 32); if ((pFont->FontSignature.fsUsb[dwByte] & dwUSB) == 0) { continue; } @@ -394,7 +394,7 @@ FX_LPCFONTDESCRIPTOR FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams, } return iBestSimilar < 1 ? NULL : pBestFont; } -int32_t FX_GetSimilarValue(FX_LPCFONTDESCRIPTOR pFont, FX_DWORD dwFontStyles) { +int32_t FX_GetSimilarValue(FX_LPCFONTDESCRIPTOR pFont, uint32_t dwFontStyles) { int32_t iValue = 0; if ((dwFontStyles & FX_FONTSTYLE_Symbolic) == (pFont->dwFontStyles & FX_FONTSTYLE_Symbolic)) { @@ -417,8 +417,8 @@ int32_t FX_GetSimilarValue(FX_LPCFONTDESCRIPTOR pFont, FX_DWORD dwFontStyles) { FX_LPMatchFont FX_GetDefFontMatchor() { return FX_DefFontMatcher; } -FX_DWORD FX_GetGdiFontStyles(const LOGFONTW& lf) { - FX_DWORD dwStyles = 0; +uint32_t FX_GetGdiFontStyles(const LOGFONTW& lf) { + uint32_t dwStyles = 0; if ((lf.lfPitchAndFamily & 0x03) == FIXED_PITCH) { dwStyles |= FX_FONTSTYLE_FixedPitch; } @@ -644,7 +644,7 @@ void CFX_FontMgrImp::Release() { } FX_POSITION pos = m_Hash2CandidateList.GetStartPosition(); while (pos) { - FX_DWORD dwHash; + uint32_t dwHash; CFX_FontDescriptorInfos* pDescs; m_Hash2CandidateList.GetNextAssoc(pos, dwHash, pDescs); if (NULL != pDescs) { @@ -653,7 +653,7 @@ void CFX_FontMgrImp::Release() { } pos = m_Hash2Fonts.GetStartPosition(); while (pos) { - FX_DWORD dwHash; + uint32_t dwHash; CFX_ArrayTemplate<IFX_Font*>* pFonts; m_Hash2Fonts.GetNextAssoc(pos, dwHash, pFonts); if (NULL != pFonts) { @@ -663,7 +663,7 @@ void CFX_FontMgrImp::Release() { m_Hash2Fonts.RemoveAll(); pos = m_Hash2FileAccess.GetStartPosition(); while (pos) { - FX_DWORD dwHash; + uint32_t dwHash; IFX_FileAccess* pFileAccess; m_Hash2FileAccess.GetNextAssoc(pos, dwHash, pFileAccess); if (NULL != pFileAccess) { @@ -672,7 +672,7 @@ void CFX_FontMgrImp::Release() { } pos = m_FileAccess2IFXFont.GetStartPosition(); while (pos) { - FX_DWORD dwHash; + uint32_t dwHash; IFX_Font* pFont; m_FileAccess2IFXFont.GetNextAssoc(pos, dwHash, pFont); if (NULL != pFont) { @@ -689,40 +689,40 @@ void CFX_FontMgrImp::Release() { delete this; } IFX_Font* CFX_FontMgrImp::GetDefFontByCodePage(uint16_t wCodePage, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByCodePage( this, wCodePage, dwFontStyles, pszFontFamily); } IFX_Font* CFX_FontMgrImp::GetDefFontByCharset(uint8_t nCharset, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByCharset( this, nCharset, dwFontStyles, pszFontFamily); } IFX_Font* CFX_FontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByUnicode( this, wUnicode, dwFontStyles, pszFontFamily); } IFX_Font* CFX_FontMgrImp::GetDefFontByLanguage(uint16_t wLanguage, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByLanguage( this, wLanguage, dwFontStyles, pszFontFamily); } IFX_Font* CFX_FontMgrImp::GetFontByCodePage(uint16_t wCodePage, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { CFX_ByteString bsHash; bsHash.Format("%d, %d", wCodePage, dwFontStyles); bsHash += CFX_WideString(pszFontFamily).UTF8Encode(); - FX_DWORD dwHash = FX_HashCode_String_GetA(bsHash, bsHash.GetLength()); + uint32_t dwHash = FX_HashCode_String_GetA(bsHash, bsHash.GetLength()); CFX_ArrayTemplate<IFX_Font*>* pFonts = NULL; IFX_Font* pFont = NULL; if (m_Hash2Fonts.Lookup(dwHash, pFonts)) { @@ -758,13 +758,13 @@ IFX_Font* CFX_FontMgrImp::GetFontByCodePage(uint16_t wCodePage, return pFont; } IFX_Font* CFX_FontMgrImp::GetFontByCharset(uint8_t nCharset, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { return GetFontByCodePage(FX_GetCodePageFromCharset(nCharset), dwFontStyles, pszFontFamily); } IFX_Font* CFX_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { IFX_Font* pFont = nullptr; if (m_FailedUnicodes2NULL.Lookup(wUnicode, pFont)) @@ -778,7 +778,7 @@ IFX_Font* CFX_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode, else bsHash.Format("%d, %d", wCodePage, dwFontStyles); bsHash += CFX_WideString(pszFontFamily).UTF8Encode(); - FX_DWORD dwHash = FX_HashCode_String_GetA(bsHash, bsHash.GetLength()); + uint32_t dwHash = FX_HashCode_String_GetA(bsHash, bsHash.GetLength()); CFX_ArrayTemplate<IFX_Font*>* pFonts = nullptr; if (m_Hash2Fonts.Lookup(dwHash, pFonts)) { if (!pFonts) @@ -852,7 +852,7 @@ FX_BOOL CFX_FontMgrImp::VerifyUnicode(IFX_Font* pFont, FX_WCHAR wcUnicode) { return TRUE; } IFX_Font* CFX_FontMgrImp::GetFontByLanguage(uint16_t wLanguage, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const FX_WCHAR* pszFontFamily) { return GetFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage), dwFontStyles, pszFontFamily); @@ -862,7 +862,7 @@ IFX_Font* CFX_FontMgrImp::LoadFont(const uint8_t* pBuffer, int32_t iFaceIndex, int32_t* pFaceCount) { void* Hash[2] = {(void*)(uintptr_t)pBuffer, (void*)(uintptr_t)iLength}; - FX_DWORD dwHash = + uint32_t dwHash = FX_HashCode_String_GetA((const FX_CHAR*)Hash, 2 * sizeof(void*)); IFX_FileAccess* pFontAccess = NULL; if (!m_Hash2FileAccess.Lookup(dwHash, pFontAccess)) { @@ -878,7 +878,7 @@ IFX_Font* CFX_FontMgrImp::LoadFont(const FX_WCHAR* pszFileName, int32_t* pFaceCount) { CFX_ByteString bsHash; bsHash += CFX_WideString(pszFileName).UTF8Encode(); - FX_DWORD dwHash = + uint32_t dwHash = FX_HashCode_String_GetA((const FX_CHAR*)bsHash, bsHash.GetLength()); IFX_FileAccess* pFontAccess = NULL; if (!m_Hash2FileAccess.Lookup(dwHash, pFontAccess)) { @@ -896,7 +896,7 @@ IFX_Font* CFX_FontMgrImp::LoadFont(IFX_Stream* pFontStream, int32_t* pFaceCount, FX_BOOL bSaveStream) { void* Hash[1] = {(void*)(uintptr_t)pFontStream}; - FX_DWORD dwHash = + uint32_t dwHash = FX_HashCode_String_GetA((const FX_CHAR*)Hash, 1 * sizeof(void*)); IFX_FileAccess* pFontAccess = NULL; if (!m_Hash2FileAccess.Lookup(dwHash, pFontAccess)) { @@ -911,7 +911,7 @@ IFX_Font* CFX_FontMgrImp::LoadFont(IFX_FileAccess* pFontAccess, int32_t iFaceIndex, int32_t* pFaceCount, FX_BOOL bWantCache) { - FX_DWORD dwHash = 0; + uint32_t dwHash = 0; IFX_Font* pFont = NULL; if (bWantCache) { CFX_ByteString bsHash; @@ -1041,13 +1041,13 @@ FXFT_Face CFX_FontMgrImp::LoadFace(IFX_FileRead* pFontStream, IFX_FileRead* CFX_FontMgrImp::CreateFontStream( CFX_FontMapper* pFontMapper, IFX_SystemFontInfo* pSystemFontInfo, - FX_DWORD index) { + uint32_t index) { int iExact = 0; void* hFont = pSystemFontInfo->MapFont( 0, 0, FXFONT_DEFAULT_CHARSET, 0, pFontMapper->GetFaceName(index), iExact); if (!hFont) return nullptr; - FX_DWORD dwFileSize = pSystemFontInfo->GetFontData(hFont, 0, nullptr, 0); + uint32_t dwFileSize = pSystemFontInfo->GetFontData(hFont, 0, nullptr, 0); if (dwFileSize == 0) return nullptr; uint8_t* pBuffer = FX_Alloc(uint8_t, dwFileSize + 1); @@ -1073,7 +1073,7 @@ IFX_FileRead* CFX_FontMgrImp::CreateFontStream( } int32_t CFX_FontMgrImp::MatchFonts(CFX_FontDescriptorInfos& MatchedFonts, uint16_t wCodePage, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const CFX_WideString& FontName, FX_WCHAR wcUnicode) { MatchedFonts.RemoveAll(); @@ -1136,7 +1136,7 @@ uint16_t FX_GetUnicodeBit(FX_WCHAR wcUnicode) { int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled, uint16_t wCodePage, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, const CFX_WideString& FontName, FX_WCHAR wcUnicode) { int32_t nPenalty = 30000; @@ -1173,7 +1173,7 @@ int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled, nPenalty -= 27000; } } - FX_DWORD dwStyleMask = pInstalled->m_dwFontStyles ^ dwFontStyles; + uint32_t dwStyleMask = pInstalled->m_dwFontStyles ^ dwFontStyles; if (dwStyleMask & FX_FONTSTYLE_Bold) { nPenalty += 4500; } @@ -1219,7 +1219,7 @@ int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled, void CFX_FontMgrImp::ClearFontCache() { FX_POSITION pos = m_Hash2CandidateList.GetStartPosition(); while (pos) { - FX_DWORD dwHash; + uint32_t dwHash; CFX_FontDescriptorInfos* pDescs; m_Hash2CandidateList.GetNextAssoc(pos, dwHash, pDescs); if (NULL != pDescs) { @@ -1228,7 +1228,7 @@ void CFX_FontMgrImp::ClearFontCache() { } pos = m_FileAccess2IFXFont.GetStartPosition(); while (pos) { - FX_DWORD dwHash; + uint32_t dwHash; IFX_Font* pFont; m_FileAccess2IFXFont.GetNextAssoc(pos, dwHash, pFont); if (NULL != pFont) { @@ -1255,7 +1255,7 @@ void CFX_FontMgrImp::RemoveFont(IFX_Font* pEFont) { FX_POSITION pos; pos = m_FileAccess2IFXFont.GetStartPosition(); while (pos) { - FX_DWORD dwHash; + uint32_t dwHash; IFX_Font* pCFont; m_FileAccess2IFXFont.GetNextAssoc(pos, dwHash, pCFont); if (pCFont == pEFont) { @@ -1265,7 +1265,7 @@ void CFX_FontMgrImp::RemoveFont(IFX_Font* pEFont) { } pos = m_Hash2Fonts.GetStartPosition(); while (pos) { - FX_DWORD dwHash; + uint32_t dwHash; CFX_ArrayTemplate<IFX_Font*>* pFonts; m_Hash2Fonts.GetNextAssoc(pos, dwHash, pFonts); if (NULL != pFonts) { @@ -1341,8 +1341,8 @@ void CFX_FontMgrImp::RegisterFaces(IFX_FileRead* pFontStream, FXFT_Done_Face(pFace); } while (index < num_faces); } -FX_DWORD CFX_FontMgrImp::GetFlags(FXFT_Face pFace) { - FX_DWORD flag = 0; +uint32_t CFX_FontMgrImp::GetFlags(FXFT_Face pFace) { + uint32_t flag = 0; if (FT_IS_FIXED_WIDTH(pFace)) { flag |= FX_FONTSTYLE_FixedPitch; } @@ -1488,7 +1488,7 @@ void CFX_FontMgrImp::GetCharsets(FXFT_Face pFace, } } #undef CODEPAGERANGE_IMPLEMENT -void CFX_FontMgrImp::GetUSBCSB(FXFT_Face pFace, FX_DWORD* USB, FX_DWORD* CSB) { +void CFX_FontMgrImp::GetUSBCSB(FXFT_Face pFace, uint32_t* USB, uint32_t* CSB) { TT_OS2* pOS2 = (TT_OS2*)FT_Get_Sfnt_Table(pFace, ft_sfnt_os2); if (NULL != pOS2) { USB[0] = pOS2->ulUnicodeRange1; diff --git a/xfa/fgas/layout/fgas_linebreak.cpp b/xfa/fgas/layout/fgas_linebreak.cpp index 295b5b6b86..72f5d70323 100644 --- a/xfa/fgas/layout/fgas_linebreak.cpp +++ b/xfa/fgas/layout/fgas_linebreak.cpp @@ -273,7 +273,7 @@ void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, if (iLength < 2) { return; } - FX_DWORD dwCur, dwNext; + uint32_t dwCur, dwNext; FX_WCHAR wch; wch = *pwsText++; dwCur = kTextLayoutCodeProperties[(uint16_t)wch] & 0x003F; @@ -298,7 +298,7 @@ void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, return; } FX_LINEBREAKTYPE eType; - FX_DWORD dwCur, dwNext; + uint32_t dwCur, dwNext; FX_WCHAR wch; wch = *pwsText++; dwCur = kTextLayoutCodeProperties[(uint16_t)wch] & 0x003F; diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp index c856b27b70..38a2d212af 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.cpp +++ b/xfa/fgas/layout/fgas_rtfbreak.cpp @@ -68,13 +68,13 @@ class CFX_RTFLine { class CFX_RTFBreak : public IFX_RTFBreak { public: - CFX_RTFBreak(FX_DWORD dwPolicies); + CFX_RTFBreak(uint32_t dwPolicies); ~CFX_RTFBreak(); void Release() override { delete this; } void SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd) override; void SetLineStartPos(FX_FLOAT fLinePos) override; - FX_DWORD GetLayoutStyles() const override { return m_dwLayoutStyles; } - void SetLayoutStyles(FX_DWORD dwLayoutStyles) override; + uint32_t GetLayoutStyles() const override { return m_dwLayoutStyles; } + void SetLayoutStyles(uint32_t dwLayoutStyles) override; void SetFont(IFX_Font* pFont) override; void SetFontSize(FX_FLOAT fFontSize) override; void SetTabWidth(FX_FLOAT fTabWidth) override; @@ -92,8 +92,8 @@ class CFX_RTFBreak : public IFX_RTFBreak { void SetReadingOrder(FX_BOOL bRTL = FALSE) override; void SetAlignment(int32_t iAlignment = FX_RTFLINEALIGNMENT_Left) override; void SetUserData(IFX_Unknown* pUserData) override; - FX_DWORD AppendChar(FX_WCHAR wch) override; - FX_DWORD EndBreak(FX_DWORD dwStatus = FX_RTFBREAK_PieceBreak) override; + uint32_t AppendChar(FX_WCHAR wch) override; + uint32_t EndBreak(uint32_t dwStatus = FX_RTFBREAK_PieceBreak) override; int32_t CountBreakPieces() const override; const CFX_RTFPiece* GetBreakPiece(int32_t index) const override; void GetLineRect(CFX_RectF& rect) const override; @@ -108,19 +108,19 @@ class CFX_RTFBreak : public IFX_RTFBreak { int32_t GetCharRects(const FX_RTFTEXTOBJ* pText, CFX_RectFArray& rtArray, FX_BOOL bCharBBox = FALSE) const override; - FX_DWORD AppendChar_CharCode(FX_WCHAR wch); - FX_DWORD AppendChar_Combination(CFX_RTFChar* pCurChar, int32_t iRotation); - FX_DWORD AppendChar_Tab(CFX_RTFChar* pCurChar, int32_t iRotation); - FX_DWORD AppendChar_Control(CFX_RTFChar* pCurChar, int32_t iRotation); - FX_DWORD AppendChar_Arabic(CFX_RTFChar* pCurChar, int32_t iRotation); - FX_DWORD AppendChar_Others(CFX_RTFChar* pCurChar, int32_t iRotation); + uint32_t AppendChar_CharCode(FX_WCHAR wch); + uint32_t AppendChar_Combination(CFX_RTFChar* pCurChar, int32_t iRotation); + uint32_t AppendChar_Tab(CFX_RTFChar* pCurChar, int32_t iRotation); + uint32_t AppendChar_Control(CFX_RTFChar* pCurChar, int32_t iRotation); + uint32_t AppendChar_Arabic(CFX_RTFChar* pCurChar, int32_t iRotation); + uint32_t AppendChar_Others(CFX_RTFChar* pCurChar, int32_t iRotation); protected: - FX_DWORD m_dwPolicies; + uint32_t m_dwPolicies; IFX_ArabicChar* m_pArabicChar; int32_t m_iBoundaryStart; int32_t m_iBoundaryEnd; - FX_DWORD m_dwLayoutStyles; + uint32_t m_dwLayoutStyles; FX_BOOL m_bPagination; FX_BOOL m_bVertical; FX_BOOL m_bSingleLine; @@ -145,19 +145,19 @@ class CFX_RTFBreak : public IFX_RTFBreak { FX_BOOL m_bRTL; int32_t m_iAlignment; IFX_Unknown* m_pUserData; - FX_DWORD m_dwCharType; - FX_DWORD m_dwIdentity; + uint32_t m_dwCharType; + uint32_t m_dwIdentity; CFX_RTFLine m_RTFLine1; CFX_RTFLine m_RTFLine2; CFX_RTFLine* m_pCurLine; int32_t m_iReady; int32_t m_iTolerance; - int32_t GetLineRotation(FX_DWORD dwStyles) const; + int32_t GetLineRotation(uint32_t dwStyles) const; void SetBreakStatus(); CFX_RTFChar* GetLastChar(int32_t index) const; CFX_RTFLine* GetRTFLine(FX_BOOL bReady) const; CFX_RTFPieceArray* GetRTFPieces(FX_BOOL bReady) const; - FX_DWORD GetUnifiedCharType(FX_DWORD dwType) const; + uint32_t GetUnifiedCharType(uint32_t dwType) const; int32_t GetLastPositionedTab() const; FX_BOOL GetPositionedTab(int32_t& iTabPos) const; int32_t GetBreakPos(CFX_RTFCharArray& tca, @@ -169,19 +169,19 @@ class CFX_RTFBreak : public IFX_RTFBreak { FX_BOOL bAllChars = FALSE); FX_BOOL EndBreak_SplitLine(CFX_RTFLine* pNextLine, FX_BOOL bAllChars, - FX_DWORD dwStatus); - void EndBreak_BidiLine(CFX_TPOArray& tpos, FX_DWORD dwStatus); + uint32_t dwStatus); + void EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus); void EndBreak_Alignment(CFX_TPOArray& tpos, FX_BOOL bAllChars, - FX_DWORD dwStatus); + uint32_t dwStatus); }; } // namespace -IFX_RTFBreak* IFX_RTFBreak::Create(FX_DWORD dwPolicies) { +IFX_RTFBreak* IFX_RTFBreak::Create(uint32_t dwPolicies) { return new CFX_RTFBreak(dwPolicies); } -CFX_RTFBreak::CFX_RTFBreak(FX_DWORD dwPolicies) +CFX_RTFBreak::CFX_RTFBreak(uint32_t dwPolicies) : m_dwPolicies(dwPolicies), m_pArabicChar(NULL), m_iBoundaryStart(0), @@ -243,7 +243,7 @@ void CFX_RTFBreak::SetLineStartPos(FX_FLOAT fLinePos) { iLinePos = std::max(iLinePos, m_iBoundaryStart); m_pCurLine->m_iStart = iLinePos; } -void CFX_RTFBreak::SetLayoutStyles(FX_DWORD dwLayoutStyles) { +void CFX_RTFBreak::SetLayoutStyles(uint32_t dwLayoutStyles) { if (m_dwLayoutStyles == dwLayoutStyles) { return; } @@ -424,7 +424,7 @@ void CFX_RTFBreak::SetUserData(IFX_Unknown* pUserData) { } } static const int32_t gs_FX_RTFLineRotations[8] = {0, 3, 1, 0, 2, 1, 3, 2}; -int32_t CFX_RTFBreak::GetLineRotation(FX_DWORD dwStyles) const { +int32_t CFX_RTFBreak::GetLineRotation(uint32_t dwStyles) const { return gs_FX_RTFLineRotations[(dwStyles & 0x0E) >> 1]; } void CFX_RTFBreak::SetBreakStatus() { @@ -477,7 +477,7 @@ CFX_RTFPieceArray* CFX_RTFBreak::GetRTFPieces(FX_BOOL bReady) const { } return &pRTFLine->m_LinePieces; } -inline FX_DWORD CFX_RTFBreak::GetUnifiedCharType(FX_DWORD dwType) const { +inline uint32_t CFX_RTFBreak::GetUnifiedCharType(uint32_t dwType) const { return dwType >= FX_CHARTYPE_ArabicAlef ? FX_CHARTYPE_Arabic : dwType; } int32_t CFX_RTFBreak::GetLastPositionedTab() const { @@ -497,7 +497,7 @@ FX_BOOL CFX_RTFBreak::GetPositionedTab(int32_t& iTabPos) const { } return FALSE; } -typedef FX_DWORD (CFX_RTFBreak::*FX_RTFBreak_LPFAppendChar)( +typedef uint32_t (CFX_RTFBreak::*FX_RTFBreak_LPFAppendChar)( CFX_RTFChar* pCurChar, int32_t iRotation); static const FX_RTFBreak_LPFAppendChar g_FX_RTFBreak_lpfAppendChar[16] = { @@ -510,13 +510,13 @@ static const FX_RTFBreak_LPFAppendChar g_FX_RTFBreak_lpfAppendChar[16] = { &CFX_RTFBreak::AppendChar_Arabic, &CFX_RTFBreak::AppendChar_Others, &CFX_RTFBreak::AppendChar_Others, &CFX_RTFBreak::AppendChar_Others, }; -FX_DWORD CFX_RTFBreak::AppendChar(FX_WCHAR wch) { +uint32_t CFX_RTFBreak::AppendChar(FX_WCHAR wch) { FXSYS_assert(m_pFont != NULL && m_pCurLine != NULL && m_pArabicChar != NULL); if (m_bCharCode) { return AppendChar_CharCode(wch); } - FX_DWORD dwProps = kTextLayoutCodeProperties[(uint16_t)wch]; - FX_DWORD dwType = (dwProps & FX_CHARTYPEBITSMASK); + uint32_t dwProps = kTextLayoutCodeProperties[(uint16_t)wch]; + uint32_t dwType = (dwProps & FX_CHARTYPEBITSMASK); CFX_RTFCharArray& tca = m_pCurLine->m_LineChars; CFX_RTFChar* pCurChar = tca.AddSpace(); pCurChar->m_dwStatus = 0; @@ -535,7 +535,7 @@ FX_DWORD CFX_RTFBreak::AppendChar(FX_WCHAR wch) { m_pUserData->AddRef(); } pCurChar->m_pUserData = m_pUserData; - FX_DWORD dwRet1 = FX_RTFBREAK_None; + uint32_t dwRet1 = FX_RTFBREAK_None; if (dwType != FX_CHARTYPE_Combination && GetUnifiedCharType(m_dwCharType) != GetUnifiedCharType(dwType)) { if (!m_bSingleLine && !m_bOrphanLine && m_dwCharType > 0 && @@ -553,13 +553,13 @@ FX_DWORD CFX_RTFBreak::AppendChar(FX_WCHAR wch) { if (m_bVertical && (dwProps & 0x8000) != 0) { iRotation = (iRotation + 1) % 4; } - FX_DWORD dwRet2 = + uint32_t dwRet2 = (this->*g_FX_RTFBreak_lpfAppendChar[dwType >> FX_CHARTYPEBITS])( pCurChar, iRotation); m_dwCharType = dwType; return std::max(dwRet1, dwRet2); } -FX_DWORD CFX_RTFBreak::AppendChar_CharCode(FX_WCHAR wch) { +uint32_t CFX_RTFBreak::AppendChar_CharCode(FX_WCHAR wch) { FXSYS_assert(m_pFont != NULL && m_pCurLine != NULL); FXSYS_assert(m_bCharCode); m_pCurLine->m_iMBCSChars++; @@ -601,7 +601,7 @@ FX_DWORD CFX_RTFBreak::AppendChar_CharCode(FX_WCHAR wch) { } return FX_RTFBREAK_None; } -FX_DWORD CFX_RTFBreak::AppendChar_Combination(CFX_RTFChar* pCurChar, +uint32_t CFX_RTFBreak::AppendChar_Combination(CFX_RTFChar* pCurChar, int32_t iRotation) { int32_t iCharWidth = 0; if (m_bVertical != FX_IsOdd(iRotation)) { @@ -626,7 +626,7 @@ FX_DWORD CFX_RTFBreak::AppendChar_Combination(CFX_RTFChar* pCurChar, } return FX_RTFBREAK_None; } -FX_DWORD CFX_RTFBreak::AppendChar_Tab(CFX_RTFChar* pCurChar, +uint32_t CFX_RTFBreak::AppendChar_Tab(CFX_RTFChar* pCurChar, int32_t iRotation) { if (m_dwLayoutStyles & FX_RTFLAYOUTSTYLE_ExpandTab) { FX_BOOL bBreak = FALSE; @@ -648,9 +648,9 @@ FX_DWORD CFX_RTFBreak::AppendChar_Tab(CFX_RTFChar* pCurChar, } return FX_RTFBREAK_None; } -FX_DWORD CFX_RTFBreak::AppendChar_Control(CFX_RTFChar* pCurChar, +uint32_t CFX_RTFBreak::AppendChar_Control(CFX_RTFChar* pCurChar, int32_t iRotation) { - FX_DWORD dwRet2 = FX_RTFBREAK_None; + uint32_t dwRet2 = FX_RTFBREAK_None; if (!m_bSingleLine) { switch (pCurChar->m_wCharCode) { case L'\v': @@ -675,7 +675,7 @@ FX_DWORD CFX_RTFBreak::AppendChar_Control(CFX_RTFChar* pCurChar, } return dwRet2; } -FX_DWORD CFX_RTFBreak::AppendChar_Arabic(CFX_RTFChar* pCurChar, +uint32_t CFX_RTFBreak::AppendChar_Arabic(CFX_RTFChar* pCurChar, int32_t iRotation) { CFX_RTFChar* pLastChar = NULL; int32_t& iLineWidth = m_pCurLine->m_iWidth; @@ -733,9 +733,9 @@ FX_DWORD CFX_RTFBreak::AppendChar_Arabic(CFX_RTFChar* pCurChar, } return FX_RTFBREAK_None; } -FX_DWORD CFX_RTFBreak::AppendChar_Others(CFX_RTFChar* pCurChar, +uint32_t CFX_RTFBreak::AppendChar_Others(CFX_RTFChar* pCurChar, int32_t iRotation) { - FX_DWORD dwType = (pCurChar->m_dwCharProps & FX_CHARTYPEBITSMASK); + uint32_t dwType = (pCurChar->m_dwCharProps & FX_CHARTYPEBITSMASK); FX_WCHAR wForm; if (dwType == FX_CHARTYPE_Numeric) { if (m_dwLayoutStyles & FX_RTFLAYOUTSTYLE_ArabicNumber) { @@ -773,7 +773,7 @@ FX_DWORD CFX_RTFBreak::AppendChar_Others(CFX_RTFChar* pCurChar, } return FX_RTFBREAK_None; } -FX_DWORD CFX_RTFBreak::EndBreak(FX_DWORD dwStatus) { +uint32_t CFX_RTFBreak::EndBreak(uint32_t dwStatus) { FXSYS_assert(dwStatus >= FX_RTFBREAK_PieceBreak && dwStatus <= FX_RTFBREAK_PageBreak); m_dwIdentity++; @@ -836,7 +836,7 @@ EndBreak_Ret: } FX_BOOL CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine, FX_BOOL bAllChars, - FX_DWORD dwStatus) { + uint32_t dwStatus) { FX_BOOL bDone = FALSE; if (!m_bSingleLine && !m_bOrphanLine && m_pCurLine->GetLineEnd() > m_iBoundaryEnd + m_iTolerance) { @@ -869,7 +869,7 @@ FX_BOOL CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine, CFX_RTFPiece tp; tp.m_pChars = &m_pCurLine->m_LineChars; FX_BOOL bNew = TRUE; - FX_DWORD dwIdentity = (FX_DWORD)-1; + uint32_t dwIdentity = (uint32_t)-1; int32_t iLast = m_pCurLine->CountChars() - 1, j = 0; for (int32_t i = 0; i <= iLast;) { pTC = pCurChars + i; @@ -913,7 +913,7 @@ FX_BOOL CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine, } return FALSE; } -void CFX_RTFBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, FX_DWORD dwStatus) { +void CFX_RTFBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) { FX_TPO tpo; CFX_RTFPiece tp; CFX_RTFChar* pTC; @@ -948,7 +948,7 @@ void CFX_RTFBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, FX_DWORD dwStatus) { tp.m_pChars = &chars; CFX_RTFPieceArray* pCurPieces = &m_pCurLine->m_LinePieces; int32_t iBidiLevel = -1, iCharWidth; - FX_DWORD dwIdentity = (FX_DWORD)-1; + uint32_t dwIdentity = (uint32_t)-1; i = j = 0; while (i < iCount) { pTC = chars.GetDataPtr(i); @@ -1011,12 +1011,12 @@ void CFX_RTFBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, FX_DWORD dwStatus) { } void CFX_RTFBreak::EndBreak_Alignment(CFX_TPOArray& tpos, FX_BOOL bAllChars, - FX_DWORD dwStatus) { + uint32_t dwStatus) { CFX_RTFPieceArray* pCurPieces = &m_pCurLine->m_LinePieces; int32_t iNetWidth = m_pCurLine->m_iWidth, iGapChars = 0, iCharWidth; int32_t iCount = pCurPieces->GetSize(); FX_BOOL bFind = FALSE; - FX_DWORD dwCharType; + uint32_t dwCharType; int32_t i, j; FX_TPO tpo; for (i = iCount - 1; i > -1; i--) { @@ -1137,7 +1137,7 @@ int32_t CFX_RTFBreak::GetBreakPos(CFX_RTFCharArray& tca, FX_BOOL bNumberBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_NumberBreak) != 0; FX_BOOL bInfixBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_InfixBreak) != 0; FX_LINEBREAKTYPE eType; - FX_DWORD nCodeProp, nCur, nNext; + uint32_t nCodeProp, nCur, nNext; CFX_RTFChar* pCur = pCharArray + iLength--; if (bAllChars) { pCur->m_nBreakType = FX_LBT_UNKNOWN; @@ -1355,7 +1355,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText, int32_t* pWidths = pText->pWidths; int32_t iLength = pText->iLength - 1; IFX_Font* pFont = pText->pFont; - FX_DWORD dwStyles = pText->dwLayoutStyles; + uint32_t dwStyles = pText->dwLayoutStyles; CFX_RectF rtText(*pText->pRect); FX_BOOL bRTLPiece = FX_IsOdd(pText->iBidiLevel); FX_FLOAT fFontSize = pText->fFontSize; @@ -1378,7 +1378,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText, int32_t iHorScale = pText->iHorizontalScale; int32_t iVerScale = pText->iVerticalScale; FX_BOOL bEmptyChar; - FX_DWORD dwProps, dwCharType; + uint32_t dwProps, dwCharType; fX = rtText.left; fY = rtText.top; if (bVerticalDoc) { @@ -1613,7 +1613,7 @@ int32_t CFX_RTFBreak::GetCharRects(const FX_RTFTEXTOBJ* pText, FX_FLOAT fHeight = FXSYS_fabs(bbox.height * fScale); rtArray.RemoveAll(); rtArray.SetSize(iLength); - FX_DWORD dwStyles = pText->dwLayoutStyles; + uint32_t dwStyles = pText->dwLayoutStyles; FX_BOOL bVertical = (dwStyles & FX_RTFLAYOUTSTYLE_VerticalLayout) != 0; FX_BOOL bSingleLine = (dwStyles & FX_RTFLAYOUTSTYLE_SingleLine) != 0; FX_BOOL bCombText = (dwStyles & FX_TXTLAYOUTSTYLE_CombText) != 0; diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp index 990656b1d1..d33d02c6f2 100644 --- a/xfa/fgas/layout/fgas_textbreak.cpp +++ b/xfa/fgas/layout/fgas_textbreak.cpp @@ -62,13 +62,13 @@ class CFX_TxtLine { class CFX_TxtBreak : public IFX_TxtBreak { public: - CFX_TxtBreak(FX_DWORD dwPolicies); + CFX_TxtBreak(uint32_t dwPolicies); ~CFX_TxtBreak(); virtual void Release() { delete this; } virtual void SetLineWidth(FX_FLOAT fLineWidth); virtual void SetLinePos(FX_FLOAT fLinePos); - virtual FX_DWORD GetLayoutStyles() const { return m_dwLayoutStyles; } - virtual void SetLayoutStyles(FX_DWORD dwLayoutStyles); + virtual uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; } + virtual void SetLayoutStyles(uint32_t dwLayoutStyles); virtual void SetFont(IFX_Font* pFont); virtual void SetFontSize(FX_FLOAT fFontSize); virtual void SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); @@ -80,12 +80,12 @@ class CFX_TxtBreak : public IFX_TxtBreak { virtual void SetCharRotation(int32_t iCharRotation); virtual void SetCharSpace(FX_FLOAT fCharSpace); virtual void SetAlignment(int32_t iAlignment); - virtual FX_DWORD GetContextCharStyles() const; - virtual void SetContextCharStyles(FX_DWORD dwCharStyles); + virtual uint32_t GetContextCharStyles() const; + virtual void SetContextCharStyles(uint32_t dwCharStyles); virtual void SetCombWidth(FX_FLOAT fCombWidth); virtual void SetUserData(void* pUserData); - virtual FX_DWORD AppendChar(FX_WCHAR wch); - virtual FX_DWORD EndBreak(FX_DWORD dwStatus = FX_TXTBREAK_PieceBreak); + virtual uint32_t AppendChar(FX_WCHAR wch); + virtual uint32_t EndBreak(uint32_t dwStatus = FX_TXTBREAK_PieceBreak); virtual int32_t CountBreakChars() const; virtual int32_t CountBreakPieces() const; virtual const CFX_TxtPiece* GetBreakPiece(int32_t index) const; @@ -100,19 +100,19 @@ class CFX_TxtBreak : public IFX_TxtBreak { virtual int32_t GetCharRects(const FX_TXTRUN* pTxtRun, CFX_RectFArray& rtArray, FX_BOOL bCharBBox = FALSE) const; - void AppendChar_PageLoad(CFX_Char* pCurChar, FX_DWORD dwProps); - FX_DWORD AppendChar_Combination(CFX_Char* pCurChar, int32_t iRotation); - FX_DWORD AppendChar_Tab(CFX_Char* pCurChar, int32_t iRotation); - FX_DWORD AppendChar_Control(CFX_Char* pCurChar, int32_t iRotation); - FX_DWORD AppendChar_Arabic(CFX_Char* pCurChar, int32_t iRotation); - FX_DWORD AppendChar_Others(CFX_Char* pCurChar, int32_t iRotation); + void AppendChar_PageLoad(CFX_Char* pCurChar, uint32_t dwProps); + uint32_t AppendChar_Combination(CFX_Char* pCurChar, int32_t iRotation); + uint32_t AppendChar_Tab(CFX_Char* pCurChar, int32_t iRotation); + uint32_t AppendChar_Control(CFX_Char* pCurChar, int32_t iRotation); + uint32_t AppendChar_Arabic(CFX_Char* pCurChar, int32_t iRotation); + uint32_t AppendChar_Others(CFX_Char* pCurChar, int32_t iRotation); protected: - FX_DWORD m_dwPolicies; + uint32_t m_dwPolicies; FX_BOOL m_bPagination; IFX_ArabicChar* m_pArabicChar; int32_t m_iLineWidth; - FX_DWORD m_dwLayoutStyles; + uint32_t m_dwLayoutStyles; FX_BOOL m_bVertical; FX_BOOL m_bArabicContext; FX_BOOL m_bArabicShapes; @@ -132,10 +132,10 @@ class CFX_TxtBreak : public IFX_TxtBreak { int32_t m_iCharRotation; int32_t m_iRotation; int32_t m_iAlignment; - FX_DWORD m_dwContextCharStyles; + uint32_t m_dwContextCharStyles; int32_t m_iCombWidth; void* m_pUserData; - FX_DWORD m_dwCharType; + uint32_t m_dwCharType; FX_BOOL m_bCurRTL; int32_t m_iCurAlignment; FX_BOOL m_bArabicNumber; @@ -149,21 +149,21 @@ class CFX_TxtBreak : public IFX_TxtBreak { int32_t m_iVerScale; int32_t m_iCharSpace; void SetBreakStatus(); - int32_t GetLineRotation(FX_DWORD dwStyles) const; + int32_t GetLineRotation(uint32_t dwStyles) const; CFX_TxtChar* GetLastChar(int32_t index, FX_BOOL bOmitChar = TRUE) const; CFX_TxtLine* GetTxtLine(FX_BOOL bReady) const; CFX_TxtPieceArray* GetTxtPieces(FX_BOOL bReady) const; - FX_DWORD GetUnifiedCharType(FX_DWORD dwType) const; + uint32_t GetUnifiedCharType(uint32_t dwType) const; void ResetArabicContext(); void ResetContextCharStyles(); void EndBreak_UpdateArabicShapes(); FX_BOOL EndBreak_SplitLine(CFX_TxtLine* pNextLine, FX_BOOL bAllChars, - FX_DWORD dwStatus); - void EndBreak_BidiLine(CFX_TPOArray& tpos, FX_DWORD dwStatus); + uint32_t dwStatus); + void EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus); void EndBreak_Alignment(CFX_TPOArray& tpos, FX_BOOL bAllChars, - FX_DWORD dwStatus); + uint32_t dwStatus); int32_t GetBreakPos(CFX_TxtCharArray& ca, int32_t& iEndPos, FX_BOOL bAllChars = FALSE, @@ -176,10 +176,10 @@ class CFX_TxtBreak : public IFX_TxtBreak { } // namespace extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32]; -IFX_TxtBreak* IFX_TxtBreak::Create(FX_DWORD dwPolicies) { +IFX_TxtBreak* IFX_TxtBreak::Create(uint32_t dwPolicies) { return new CFX_TxtBreak(dwPolicies); } -CFX_TxtBreak::CFX_TxtBreak(FX_DWORD dwPolicies) +CFX_TxtBreak::CFX_TxtBreak(uint32_t dwPolicies) : m_dwPolicies(dwPolicies), m_pArabicChar(NULL), m_iLineWidth(2000000), @@ -248,7 +248,7 @@ void CFX_TxtBreak::SetLinePos(FX_FLOAT fLinePos) { m_pCurLine->m_iStart = iLinePos; m_pCurLine->m_iWidth += iLinePos; } -void CFX_TxtBreak::SetLayoutStyles(FX_DWORD dwLayoutStyles) { +void CFX_TxtBreak::SetLayoutStyles(uint32_t dwLayoutStyles) { m_dwLayoutStyles = dwLayoutStyles; m_bVertical = (m_dwLayoutStyles & FX_TXTLAYOUTSTYLE_VerticalChars) != 0; m_bArabicContext = (m_dwLayoutStyles & FX_TXTLAYOUTSTYLE_ArabicContext) != 0; @@ -350,10 +350,10 @@ void CFX_TxtBreak::ResetContextCharStyles() { } m_dwContextCharStyles |= (m_iArabicContext << 8); } -FX_DWORD CFX_TxtBreak::GetContextCharStyles() const { +uint32_t CFX_TxtBreak::GetContextCharStyles() const { return m_dwContextCharStyles; } -void CFX_TxtBreak::SetContextCharStyles(FX_DWORD dwCharStyles) { +void CFX_TxtBreak::SetContextCharStyles(uint32_t dwCharStyles) { m_iCurAlignment = dwCharStyles & 0x0F; m_bArabicNumber = (dwCharStyles & FX_TXTCHARSTYLE_ArabicNumber) != 0; m_bArabicComma = (dwCharStyles & FX_TXTCHARSTYLE_ArabicComma) != 0; @@ -408,7 +408,7 @@ void CFX_TxtBreak::SetCharSpace(FX_FLOAT fCharSpace) { m_iCharSpace = FXSYS_round(fCharSpace * 20000.0f); } static const int32_t gs_FX_TxtLineRotations[8] = {0, 3, 1, 0, 2, 1, 3, 2}; -int32_t CFX_TxtBreak::GetLineRotation(FX_DWORD dwStyles) const { +int32_t CFX_TxtBreak::GetLineRotation(uint32_t dwStyles) const { return gs_FX_TxtLineRotations[(dwStyles & 0x0E) >> 1]; } CFX_TxtChar* CFX_TxtBreak::GetLastChar(int32_t index, FX_BOOL bOmitChar) const { @@ -449,7 +449,7 @@ CFX_TxtPieceArray* CFX_TxtBreak::GetTxtPieces(FX_BOOL bReady) const { } return pTxtLine->m_pLinePieces; } -inline FX_DWORD CFX_TxtBreak::GetUnifiedCharType(FX_DWORD dwType) const { +inline uint32_t CFX_TxtBreak::GetUnifiedCharType(uint32_t dwType) const { return dwType >= FX_CHARTYPE_ArabicAlef ? FX_CHARTYPE_Arabic : dwType; } void CFX_TxtBreak::ResetArabicContext() { @@ -477,7 +477,7 @@ void CFX_TxtBreak::ResetArabicContext() { m_bArabicComma = m_bArabicNumber; ResetContextCharStyles(); } -void CFX_TxtBreak::AppendChar_PageLoad(CFX_Char* pCurChar, FX_DWORD dwProps) { +void CFX_TxtBreak::AppendChar_PageLoad(CFX_Char* pCurChar, uint32_t dwProps) { if (!m_bPagination) { ((CFX_TxtChar*)pCurChar)->m_dwStatus = 0; ((CFX_TxtChar*)pCurChar)->m_pUserData = m_pUserData; @@ -505,7 +505,7 @@ void CFX_TxtBreak::AppendChar_PageLoad(CFX_Char* pCurChar, FX_DWORD dwProps) { } pCurChar->m_dwCharStyles = m_dwContextCharStyles; } -FX_DWORD CFX_TxtBreak::AppendChar_Combination(CFX_Char* pCurChar, +uint32_t CFX_TxtBreak::AppendChar_Combination(CFX_Char* pCurChar, int32_t iRotation) { FXSYS_assert(pCurChar != NULL); FX_WCHAR wch = pCurChar->m_wCharCode; @@ -557,7 +557,7 @@ FX_DWORD CFX_TxtBreak::AppendChar_Combination(CFX_Char* pCurChar, pCurChar->m_iCharWidth = -iCharWidth; return FX_TXTBREAK_None; } -FX_DWORD CFX_TxtBreak::AppendChar_Tab(CFX_Char* pCurChar, int32_t iRotation) { +uint32_t CFX_TxtBreak::AppendChar_Tab(CFX_Char* pCurChar, int32_t iRotation) { m_dwCharType = FX_CHARTYPE_Tab; if ((m_dwLayoutStyles & FX_TXTLAYOUTSTYLE_ExpandTab) == 0) { return FX_TXTBREAK_None; @@ -584,10 +584,10 @@ FX_DWORD CFX_TxtBreak::AppendChar_Tab(CFX_Char* pCurChar, int32_t iRotation) { } return FX_TXTBREAK_None; } -FX_DWORD CFX_TxtBreak::AppendChar_Control(CFX_Char* pCurChar, +uint32_t CFX_TxtBreak::AppendChar_Control(CFX_Char* pCurChar, int32_t iRotation) { m_dwCharType = FX_CHARTYPE_Control; - FX_DWORD dwRet = FX_TXTBREAK_None; + uint32_t dwRet = FX_TXTBREAK_None; if (!m_bSingleLine) { FX_WCHAR wch = pCurChar->m_wCharCode; switch (wch) { @@ -613,9 +613,9 @@ FX_DWORD CFX_TxtBreak::AppendChar_Control(CFX_Char* pCurChar, } return dwRet; } -FX_DWORD CFX_TxtBreak::AppendChar_Arabic(CFX_Char* pCurChar, +uint32_t CFX_TxtBreak::AppendChar_Arabic(CFX_Char* pCurChar, int32_t iRotation) { - FX_DWORD dwType = (pCurChar->m_dwCharProps & FX_CHARTYPEBITSMASK); + uint32_t dwType = (pCurChar->m_dwCharProps & FX_CHARTYPEBITSMASK); int32_t& iLineWidth = m_pCurLine->m_iWidth; FX_WCHAR wForm; int32_t iCharWidth = 0; @@ -676,10 +676,10 @@ FX_DWORD CFX_TxtBreak::AppendChar_Arabic(CFX_Char* pCurChar, } return FX_TXTBREAK_None; } -FX_DWORD CFX_TxtBreak::AppendChar_Others(CFX_Char* pCurChar, +uint32_t CFX_TxtBreak::AppendChar_Others(CFX_Char* pCurChar, int32_t iRotation) { - FX_DWORD dwProps = pCurChar->m_dwCharProps; - FX_DWORD dwType = (dwProps & FX_CHARTYPEBITSMASK); + uint32_t dwProps = pCurChar->m_dwCharProps; + uint32_t dwType = (dwProps & FX_CHARTYPEBITSMASK); int32_t& iLineWidth = m_pCurLine->m_iWidth; int32_t iCharWidth = 0; m_dwCharType = dwType; @@ -719,7 +719,7 @@ FX_DWORD CFX_TxtBreak::AppendChar_Others(CFX_Char* pCurChar, } return FX_TXTBREAK_None; } -typedef FX_DWORD (CFX_TxtBreak::*FX_TxtBreak_LPFAppendChar)(CFX_Char* pCurChar, +typedef uint32_t (CFX_TxtBreak::*FX_TxtBreak_LPFAppendChar)(CFX_Char* pCurChar, int32_t iRotation); static const FX_TxtBreak_LPFAppendChar g_FX_TxtBreak_lpfAppendChar[16] = { &CFX_TxtBreak::AppendChar_Others, &CFX_TxtBreak::AppendChar_Tab, @@ -731,9 +731,9 @@ static const FX_TxtBreak_LPFAppendChar g_FX_TxtBreak_lpfAppendChar[16] = { &CFX_TxtBreak::AppendChar_Arabic, &CFX_TxtBreak::AppendChar_Others, &CFX_TxtBreak::AppendChar_Others, &CFX_TxtBreak::AppendChar_Others, }; -FX_DWORD CFX_TxtBreak::AppendChar(FX_WCHAR wch) { - FX_DWORD dwProps = kTextLayoutCodeProperties[(uint16_t)wch]; - FX_DWORD dwType = (dwProps & FX_CHARTYPEBITSMASK); +uint32_t CFX_TxtBreak::AppendChar(FX_WCHAR wch) { + uint32_t dwProps = kTextLayoutCodeProperties[(uint16_t)wch]; + uint32_t dwType = (dwProps & FX_CHARTYPEBITSMASK); CFX_TxtChar* pCurChar = m_pCurLine->m_pLineChars->AddSpace(); pCurChar->m_wCharCode = (uint16_t)wch; pCurChar->m_nRotation = m_iCharRotation; @@ -749,7 +749,7 @@ FX_DWORD CFX_TxtBreak::AppendChar(FX_WCHAR wch) { pCurChar->m_iBidiOrder = 0; pCurChar->m_pUserData = NULL; AppendChar_PageLoad(pCurChar, dwProps); - FX_DWORD dwRet1 = FX_TXTBREAK_None; + uint32_t dwRet1 = FX_TXTBREAK_None; if (dwType != FX_CHARTYPE_Combination && GetUnifiedCharType(m_dwCharType) != GetUnifiedCharType(dwType)) { if (m_dwCharType > 0 && @@ -767,7 +767,7 @@ FX_DWORD CFX_TxtBreak::AppendChar(FX_WCHAR wch) { if (m_bVertical && (dwProps & 0x8000) != 0) { iRotation = (iRotation + 1) % 4; } - FX_DWORD dwRet2 = + uint32_t dwRet2 = (this->*g_FX_TxtBreak_lpfAppendChar[dwType >> FX_CHARTYPEBITS])( pCurChar, iRotation); return std::max(dwRet1, dwRet2); @@ -825,7 +825,7 @@ void CFX_TxtBreak::EndBreak_UpdateArabicShapes() { } FX_BOOL CFX_TxtBreak::EndBreak_SplitLine(CFX_TxtLine* pNextLine, FX_BOOL bAllChars, - FX_DWORD dwStatus) { + uint32_t dwStatus) { int32_t iCount = m_pCurLine->CountChars(); FX_BOOL bDone = FALSE; CFX_Char* pTC; @@ -873,7 +873,7 @@ FX_BOOL CFX_TxtBreak::EndBreak_SplitLine(CFX_TxtLine* pNextLine, } return FALSE; } -void CFX_TxtBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, FX_DWORD dwStatus) { +void CFX_TxtBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) { CFX_TxtPiece tp; FX_TPO tpo; CFX_TxtChar* pTC; @@ -983,14 +983,14 @@ void CFX_TxtBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, FX_DWORD dwStatus) { } void CFX_TxtBreak::EndBreak_Alignment(CFX_TPOArray& tpos, FX_BOOL bAllChars, - FX_DWORD dwStatus) { + uint32_t dwStatus) { int32_t iNetWidth = m_pCurLine->m_iWidth, iGapChars = 0, iCharWidth; CFX_TxtPieceArray* pCurPieces = m_pCurLine->m_pLinePieces; int32_t i, j, iCount = pCurPieces->GetSize(); FX_BOOL bFind = FALSE; FX_TPO tpo; CFX_TxtChar* pTC; - FX_DWORD dwCharType; + uint32_t dwCharType; for (i = iCount - 1; i > -1; i--) { tpo = tpos.GetAt(i); CFX_TxtPiece& ttp = pCurPieces->GetAt(tpo.index); @@ -1071,7 +1071,7 @@ void CFX_TxtBreak::EndBreak_Alignment(CFX_TPOArray& tpos, } } } -FX_DWORD CFX_TxtBreak::EndBreak(FX_DWORD dwStatus) { +uint32_t CFX_TxtBreak::EndBreak(uint32_t dwStatus) { FXSYS_assert(dwStatus >= FX_TXTBREAK_PieceBreak && dwStatus <= FX_TXTBREAK_PageBreak); CFX_TxtPieceArray* pCurPieces = m_pCurLine->m_pLinePieces; @@ -1158,7 +1158,7 @@ int32_t CFX_TxtBreak::GetBreakPos(CFX_TxtCharArray& ca, FX_BOOL bSpaceBreak = (m_dwPolicies & FX_TXTBREAKPOLICY_SpaceBreak) != 0; FX_BOOL bNumberBreak = (m_dwPolicies & FX_TXTBREAKPOLICY_NumberBreak) != 0; FX_LINEBREAKTYPE eType; - FX_DWORD nCodeProp, nCur, nNext; + uint32_t nCodeProp, nCur, nNext; CFX_Char* pCur = ca.GetDataPtr(iLength--); if (bAllChars) { pCur->m_nBreakType = FX_LBT_UNKNOWN; @@ -1343,7 +1343,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun, int32_t* pWidths = pTxtRun->pWidths; int32_t iLength = pTxtRun->iLength - 1; IFX_Font* pFont = pTxtRun->pFont; - FX_DWORD dwStyles = pTxtRun->dwStyles; + uint32_t dwStyles = pTxtRun->dwStyles; CFX_RectF rtText(*pTxtRun->pRect); FX_BOOL bRTLPiece = (pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_OddBidiLevel) != 0; @@ -1370,7 +1370,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun, int32_t iVerScale = pTxtRun->iVerticalScale; FX_BOOL bSkipSpace = pTxtRun->bSkipSpace; FX_BOOL bEmptyChar, bShadda = FALSE, bLam = FALSE; - FX_DWORD dwProps, dwCharType; + uint32_t dwProps, dwCharType; FX_FORMCHAR formChars[3]; FX_FLOAT fYBase; fX = rtText.left; @@ -1599,7 +1599,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun, fFontSize * (FX_FLOAT)rtBBox.height / (FX_FLOAT)iMaxHeight; } if (wForm == wch && wLast != 0xFEFF) { - FX_DWORD dwLastProps = FX_GetUnicodeProperties(wLast); + uint32_t dwLastProps = FX_GetUnicodeProperties(wLast); if ((dwLastProps & FX_CHARTYPEBITSMASK) == FX_CHARTYPE_Combination) { CFX_Rect rtBBox; diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp index a0dcf8e3f4..a6443f4de7 100644 --- a/xfa/fgas/localization/fgas_locale.cpp +++ b/xfa/fgas/localization/fgas_locale.cpp @@ -44,7 +44,7 @@ static const int32_t g_iFXLocaleNumSubCatCount = sizeof(g_FXLocaleNumSubCatData) / sizeof(FX_LOCALESUBCATEGORYINFO); struct FX_LOCALETIMEZONEINFO { - FX_DWORD uHash; + uint32_t uHash; int16_t iHour; int16_t iMinute; }; @@ -367,7 +367,7 @@ static FX_BOOL FX_WStringToNumeric(const CFX_WideString& wsValue, scale++; cc++; } - lcnum.m_Fractional = (FX_DWORD)(fraction * 4294967296.0); + lcnum.m_Fractional = (uint32_t)(fraction * 4294967296.0); } if (cc < len && (str[cc] == 'E' || str[cc] == 'e')) { cc++; @@ -396,7 +396,7 @@ CFX_LCNumeric::CFX_LCNumeric() { m_Exponent = 0; } CFX_LCNumeric::CFX_LCNumeric(int64_t integral, - FX_DWORD fractional, + uint32_t fractional, int32_t exponent) { m_Integral = integral; m_Fractional = fractional; @@ -404,14 +404,14 @@ CFX_LCNumeric::CFX_LCNumeric(int64_t integral, } CFX_LCNumeric::CFX_LCNumeric(FX_FLOAT dbRetValue) { m_Integral = (int64_t)dbRetValue; - m_Fractional = (FX_DWORD)(((dbRetValue > 0) ? (dbRetValue - m_Integral) + m_Fractional = (uint32_t)(((dbRetValue > 0) ? (dbRetValue - m_Integral) : (m_Integral - dbRetValue)) * 4294967296); m_Exponent = 0; } CFX_LCNumeric::CFX_LCNumeric(double dbvalue) { m_Integral = (int64_t)dbvalue; - m_Fractional = (FX_DWORD)( + m_Fractional = (uint32_t)( ((dbvalue > 0) ? (dbvalue - m_Integral) : (m_Integral - dbvalue)) * 4294967296); m_Exponent = 0; @@ -599,7 +599,7 @@ FX_LOCALECATEGORY CFX_FormatString::GetCategory( wsCategory += pStr[ccf]; ccf++; } - FX_DWORD dwHash = + uint32_t dwHash = FX_HashCode_String_GetW(wsCategory, wsCategory.GetLength()); if (dwHash == FX_LOCALECATEGORY_DateHash) { if (eCategory == FX_LOCALECATEGORY_Time) { @@ -715,7 +715,7 @@ IFX_Locale* CFX_FormatString::GetTextFormat(const CFX_WideString& wsPattern, #define FX_NUMSTYLE_DotVorv 0x04 IFX_Locale* CFX_FormatString::GetNumericFormat(const CFX_WideString& wsPattern, int32_t& iDotIndex, - FX_DWORD& dwStyle, + uint32_t& dwStyle, CFX_WideString& wsPurgePattern) { dwStyle = 0; IFX_Locale* pLocale = NULL; @@ -759,7 +759,7 @@ IFX_Locale* CFX_FormatString::GetNumericFormat(const CFX_WideString& wsPattern, while (ccf < iLenf && pStr[ccf] != '(' && pStr[ccf] != '{') { wsSubCategory += pStr[ccf++]; } - FX_DWORD dwSubHash = + uint32_t dwSubHash = FX_HashCode_String_GetW(wsSubCategory, wsSubCategory.GetLength()); FX_LOCALENUMSUBCATEGORY eSubCategory = FX_LOCALENUMPATTERN_Decimal; for (int32_t i = 0; i < g_iFXLocaleNumSubCatCount; i++) { @@ -920,7 +920,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, return FALSE; } int32_t dot_index_f = -1; - FX_DWORD dwFormatStyle = 0; + uint32_t dwFormatStyle = 0; CFX_WideString wsNumFormat; IFX_Locale* pLocale = GetNumericFormat(wsPattern, dot_index_f, dwFormatStyle, wsNumFormat); @@ -1686,7 +1686,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, return FALSE; } int32_t dot_index_f = -1; - FX_DWORD dwFormatStyle = 0; + uint32_t dwFormatStyle = 0; CFX_WideString wsNumFormat; IFX_Locale* pLocale = GetNumericFormat(wsPattern, dot_index_f, dwFormatStyle, wsNumFormat); @@ -2236,7 +2236,7 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat( while (ccf < iLenf && pStr[ccf] != '(' && pStr[ccf] != '{') { wsSubCategory += pStr[ccf++]; } - FX_DWORD dwSubHash = + uint32_t dwSubHash = FX_HashCode_String_GetW(wsSubCategory, wsSubCategory.GetLength()); FX_LOCALEDATETIMESUBCATEGORY eSubCategory = FX_LOCALEDATETIMESUBCATEGORY_Medium; @@ -2337,8 +2337,8 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate, ccf++; continue; } - FX_DWORD dwSymbolNum = 1; - FX_DWORD dwSymbol = strf[ccf++]; + uint32_t dwSymbolNum = 1; + uint32_t dwSymbol = strf[ccf++]; while (ccf < lenf && strf[ccf] == dwSymbol) { ccf++; dwSymbolNum++; @@ -2556,8 +2556,8 @@ static FX_BOOL FX_ParseLocaleTime(const CFX_WideString& wsTime, ccf++; continue; } - FX_DWORD dwSymbolNum = 1; - FX_DWORD dwSymbol = strf[ccf++]; + uint32_t dwSymbolNum = 1; + uint32_t dwSymbol = strf[ccf++]; while (ccf < lenf && strf[ccf] == dwSymbol) { ccf++; dwSymbolNum++; @@ -2666,7 +2666,7 @@ static FX_BOOL FX_ParseLocaleTime(const CFX_WideString& wsTime, if (cc + 3 > len) { continue; } - FX_DWORD dwHash = str[cc++]; + uint32_t dwHash = str[cc++]; dwHash = (dwHash << 8) | str[cc++]; dwHash = (dwHash << 8) | str[cc++]; if (dwHash == FXBSTR_ID(0, 'G', 'M', 'T')) { @@ -2683,7 +2683,7 @@ static FX_BOOL FX_ParseLocaleTime(const CFX_WideString& wsTime, const FX_LOCALETIMEZONEINFO* pTimeZoneInfo = std::lower_bound(g_FXLocaleTimeZoneData, pEnd, dwHash, [](const FX_LOCALETIMEZONEINFO& info, - FX_DWORD hash) { return info.uHash < hash; }); + uint32_t hash) { return info.uHash < hash; }); if (pTimeZoneInfo < pEnd && dwHash == pTimeZoneInfo->uHash) { hour += pTimeZoneInfo->iHour; minute += pTimeZoneInfo->iHour > 0 ? pTimeZoneInfo->iMinute @@ -2909,7 +2909,7 @@ FX_BOOL CFX_FormatString::FormatStrNum(const CFX_WideStringC& wsInputNum, return FALSE; } int32_t dot_index_f = -1; - FX_DWORD dwNumStyle = 0; + uint32_t dwNumStyle = 0; CFX_WideString wsNumFormat; IFX_Locale* pLocale = GetNumericFormat(wsPattern, dot_index_f, dwNumStyle, wsNumFormat); @@ -3342,7 +3342,7 @@ FX_BOOL CFX_FormatString::FormatLCNumeric(CFX_LCNumeric& lcNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput) { int32_t dot_index_f = -1; - FX_DWORD dwNumStyle = 0; + uint32_t dwNumStyle = 0; CFX_WideString wsNumFormat; IFX_Locale* pLocale = GetNumericFormat(wsPattern, dot_index_f, dwNumStyle, wsNumFormat); @@ -3986,8 +3986,8 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern, wsResult += strf[ccf++]; continue; } - FX_DWORD dwSymbolNum = 1; - FX_DWORD dwSymbol = strf[ccf++]; + uint32_t dwSymbolNum = 1; + uint32_t dwSymbol = strf[ccf++]; while (ccf < lenf && strf[ccf] == dwSymbol) { ccf++; dwSymbolNum++; @@ -4112,8 +4112,8 @@ static FX_BOOL FX_TimeFormat(const CFX_WideString& wsTimePattern, wsResult += strf[ccf++]; continue; } - FX_DWORD dwSymbolNum = 1; - FX_DWORD dwSymbol = strf[ccf++]; + uint32_t dwSymbolNum = 1; + uint32_t dwSymbol = strf[ccf++]; while (ccf < lenf && strf[ccf] == dwSymbol) { ccf++; dwSymbolNum++; diff --git a/xfa/fgas/localization/fgas_localemgr.cpp b/xfa/fgas/localization/fgas_localemgr.cpp index ba617a0f3f..69b8638903 100644 --- a/xfa/fgas/localization/fgas_localemgr.cpp +++ b/xfa/fgas/localization/fgas_localemgr.cpp @@ -39,7 +39,7 @@ IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, if (bssp == "http://www.foxitsoftware.com/localization") { CFX_WideString wsLCID = pXmlLocale->GetAttrValue("", "lcid"); wchar_t* pEnd = NULL; - FX_DWORD dwLCID = wcstol(wsLCID, &pEnd, 16); + uint32_t dwLCID = wcstol(wsLCID, &pEnd, 16); if (pLocaleMgr->m_lcid2xml.GetValueAt((void*)(uintptr_t)dwLCID)) { delete pXmlLocale; } else { diff --git a/xfa/fgas/xml/fgas_sax_imp.cpp b/xfa/fgas/xml/fgas_sax_imp.cpp index f45d7645ac..ea3dafff59 100644 --- a/xfa/fgas/xml/fgas_sax_imp.cpp +++ b/xfa/fgas/xml/fgas_sax_imp.cpp @@ -10,7 +10,7 @@ namespace { -const FX_DWORD kSaxFileBufSize = 32768; +const uint32_t kSaxFileBufSize = 32768; } // namespace @@ -26,10 +26,10 @@ CFX_SAXFile::CFX_SAXFile() m_dwBufSize(0), m_dwBufIndex(0) {} FX_BOOL CFX_SAXFile::StartFile(IFX_FileRead* pFile, - FX_DWORD dwStart, - FX_DWORD dwLen) { + uint32_t dwStart, + uint32_t dwLen) { FXSYS_assert(m_pFile == NULL && pFile != NULL); - FX_DWORD dwSize = pFile->GetSize(); + uint32_t dwSize = pFile->GetSize(); if (dwStart >= dwSize) { return FALSE; } @@ -53,7 +53,7 @@ FX_BOOL CFX_SAXFile::StartFile(IFX_FileRead* pFile, } FX_BOOL CFX_SAXFile::ReadNextBlock() { FXSYS_assert(m_pFile != NULL); - FX_DWORD dwSize = m_dwEnd - m_dwCur; + uint32_t dwSize = m_dwEnd - m_dwCur; if (dwSize == 0) { return FALSE; } @@ -169,9 +169,9 @@ inline FX_BOOL CFX_SAXReader::SkipSpace(uint8_t ch) { return (m_dwParseMode & FX_SAXPARSEMODE_NotSkipSpace) == 0 && ch < 0x21; } int32_t CFX_SAXReader::StartParse(IFX_FileRead* pFile, - FX_DWORD dwStart, - FX_DWORD dwLen, - FX_DWORD dwParseMode) { + uint32_t dwStart, + uint32_t dwLen, + uint32_t dwParseMode) { m_iState = -1; Reset(); if (!m_File.StartFile(pFile, dwStart, dwLen)) { @@ -209,8 +209,8 @@ int32_t CFX_SAXReader::ContinueParse(IFX_Pause* pPause) { return m_iState; } while (m_File.m_dwCur < m_File.m_dwEnd) { - FX_DWORD& index = m_File.m_dwBufIndex; - FX_DWORD size = m_File.m_dwBufSize; + uint32_t& index = m_File.m_dwBufIndex; + uint32_t size = m_File.m_dwBufSize; const uint8_t* pBuf = m_File.m_pBuf; while (index < size) { m_CurByte = pBuf[index]; diff --git a/xfa/fwl/basewidget/fwl_barcodeimp.cpp b/xfa/fwl/basewidget/fwl_barcodeimp.cpp index 1ee731399f..9b6761bf8d 100644 --- a/xfa/fwl/basewidget/fwl_barcodeimp.cpp +++ b/xfa/fwl/basewidget/fwl_barcodeimp.cpp @@ -42,7 +42,7 @@ FWL_ERR CFWL_BarcodeImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_Barcode; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_BarcodeImp::GetClassID() const { +uint32_t CFWL_BarcodeImp::GetClassID() const { return FWL_CLASSHASH_Barcode; } FWL_ERR CFWL_BarcodeImp::Initialize() { @@ -129,7 +129,7 @@ void CFWL_BarcodeImp::GenerateBarcodeImageCache() { } m_pBarcodeEngine->SetHeight(int32_t(m_rtClient.height)); m_pBarcodeEngine->SetWidth(int32_t(m_rtClient.width)); - FX_DWORD dwAttributeMask = pData->GetBarcodeAttributeMask(); + uint32_t dwAttributeMask = pData->GetBarcodeAttributeMask(); if (dwAttributeMask & FWL_BCDATTRIBUTE_CHARENCODING) { m_pBarcodeEngine->SetCharEncoding(pData->GetCharEncoding()); } @@ -212,7 +212,7 @@ FX_BOOL CFWL_BarcodeImp::IsProtectedType() { CFWL_BarcodeImpDelegate::CFWL_BarcodeImpDelegate(CFWL_BarcodeImp* pOwner) : CFWL_EditImpDelegate(pOwner) {} FWL_ERR CFWL_BarcodeImpDelegate::OnProcessEvent(CFWL_Event* pEvent) { - FX_DWORD dwFlag = pEvent->GetClassID(); + uint32_t dwFlag = pEvent->GetClassID(); if (dwFlag == FWL_EVTHASH_EDT_TextChanged) { CFWL_BarcodeImp* pOwner = static_cast<CFWL_BarcodeImp*>(m_pOwner); pOwner->ReleaseBarcodeEngine(); diff --git a/xfa/fwl/basewidget/fwl_caretimp.cpp b/xfa/fwl/basewidget/fwl_caretimp.cpp index cc0f548392..e7ce56777e 100644 --- a/xfa/fwl/basewidget/fwl_caretimp.cpp +++ b/xfa/fwl/basewidget/fwl_caretimp.cpp @@ -26,10 +26,10 @@ IFWL_Caret::IFWL_Caret() {} FWL_ERR IFWL_Caret::ShowCaret(FX_BOOL bFlag) { return static_cast<CFWL_CaretImp*>(GetImpl())->ShowCaret(bFlag); } -FWL_ERR IFWL_Caret::GetFrequency(FX_DWORD& elapse) { +FWL_ERR IFWL_Caret::GetFrequency(uint32_t& elapse) { return static_cast<CFWL_CaretImp*>(GetImpl())->GetFrequency(elapse); } -FWL_ERR IFWL_Caret::SetFrequency(FX_DWORD elapse) { +FWL_ERR IFWL_Caret::SetFrequency(uint32_t elapse) { return static_cast<CFWL_CaretImp*>(GetImpl())->SetFrequency(elapse); } FWL_ERR IFWL_Caret::SetColor(CFX_Color crFill) { @@ -55,7 +55,7 @@ FWL_ERR CFWL_CaretImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_Caret; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_CaretImp::GetClassID() const { +uint32_t CFWL_CaretImp::GetClassID() const { return FWL_CLASSHASH_Caret; } FWL_ERR CFWL_CaretImp::Initialize() { @@ -94,11 +94,11 @@ FWL_ERR CFWL_CaretImp::ShowCaret(FX_BOOL bFlag) { } return SetStates(FWL_WGTSTATE_Invisible, !bFlag); } -FWL_ERR CFWL_CaretImp::GetFrequency(FX_DWORD& elapse) { +FWL_ERR CFWL_CaretImp::GetFrequency(uint32_t& elapse) { elapse = m_dwElapse; return FWL_ERR_Succeeded; } -FWL_ERR CFWL_CaretImp::SetFrequency(FX_DWORD elapse) { +FWL_ERR CFWL_CaretImp::SetFrequency(uint32_t elapse) { m_dwElapse = elapse; return FWL_ERR_Succeeded; } diff --git a/xfa/fwl/basewidget/fwl_checkboximp.cpp b/xfa/fwl/basewidget/fwl_checkboximp.cpp index 8ab75562b9..d2d149ffd4 100644 --- a/xfa/fwl/basewidget/fwl_checkboximp.cpp +++ b/xfa/fwl/basewidget/fwl_checkboximp.cpp @@ -54,7 +54,7 @@ FWL_ERR CFWL_CheckBoxImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_CheckBox; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_CheckBoxImp::GetClassID() const { +uint32_t CFWL_CheckBoxImp::GetClassID() const { return FWL_CLASSHASH_CheckBox; } FWL_ERR CFWL_CheckBoxImp::Initialize() { @@ -279,7 +279,7 @@ void CFWL_CheckBoxImp::Layout() { m_rtFocus.Inflate(1, 1); } } -FX_DWORD CFWL_CheckBoxImp::GetPartStates() { +uint32_t CFWL_CheckBoxImp::GetPartStates() { int32_t dwStates = FWL_PARTSTATE_CKB_UnChecked; if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) == FWL_STATE_CKB_Neutral) { @@ -355,7 +355,7 @@ void CFWL_CheckBoxImp::UpdateTextOutStyles() { } } void CFWL_CheckBoxImp::NextStates() { - FX_DWORD dwFirststate = m_pProperties->m_dwStates; + uint32_t dwFirststate = m_pProperties->m_dwStates; if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_RadioButton) { if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) == FWL_STATE_CKB_Unchecked) { @@ -400,7 +400,7 @@ void CFWL_CheckBoxImp::NextStates() { } } Repaint(&m_rtClient); - FX_DWORD dwLaststate = m_pProperties->m_dwStates; + uint32_t dwLaststate = m_pProperties->m_dwStates; if (dwFirststate != dwLaststate) { CFWL_EvtCkbCheckStateChanged wmCheckBoxState; wmCheckBoxState.m_pSrcTarget = m_pInterface; @@ -412,7 +412,7 @@ CFWL_CheckBoxImpDelegate::CFWL_CheckBoxImpDelegate(CFWL_CheckBoxImp* pOwner) int32_t CFWL_CheckBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); int32_t iRet = 1; switch (dwMsgCode) { case FWL_MSGHASH_Activate: { @@ -426,7 +426,7 @@ int32_t CFWL_CheckBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMsg); diff --git a/xfa/fwl/basewidget/fwl_comboboximp.cpp b/xfa/fwl/basewidget/fwl_comboboximp.cpp index 5404777e73..9d3a5db4c2 100644 --- a/xfa/fwl/basewidget/fwl_comboboximp.cpp +++ b/xfa/fwl/basewidget/fwl_comboboximp.cpp @@ -128,8 +128,8 @@ FX_BOOL IFWL_ComboBox::EditDeSelect() { FWL_ERR IFWL_ComboBox::GetBBox(CFX_RectF& rect) { return static_cast<CFWL_ComboBoxImp*>(GetImpl())->GetBBox(rect); } -FWL_ERR IFWL_ComboBox::EditModifyStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR IFWL_ComboBox::EditModifyStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { return static_cast<CFWL_ComboBoxImp*>(GetImpl()) ->EditModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); } @@ -145,7 +145,7 @@ CFWL_ComboEditImpDelegate::CFWL_ComboEditImpDelegate(CFWL_ComboEditImp* pOwner) int32_t CFWL_ComboEditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); FX_BOOL backDefault = TRUE; switch (dwMsgCode) { case FWL_MSGHASH_SetFocus: @@ -287,7 +287,7 @@ CFWL_ComboListImpDelegate::CFWL_ComboListImpDelegate(CFWL_ComboListImp* pOwner) int32_t CFWL_ComboListImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; - FX_DWORD dwHashCode = pMessage->GetClassID(); + uint32_t dwHashCode = pMessage->GetClassID(); FX_BOOL backDefault = TRUE; if (dwHashCode == FWL_MSGHASH_SetFocus || dwHashCode == FWL_MSGHASH_KillFocus) { @@ -305,7 +305,7 @@ int32_t CFWL_ComboListImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { return pDelegate->OnProcessMessage(pMsg); } } - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_MouseMove: { backDefault = FALSE; @@ -413,7 +413,7 @@ int32_t CFWL_ComboListImpDelegate::OnDropListKey(CFWL_MsgKey* pKey) { static_cast<CFWL_ComboBoxImp*>(m_pOwner->m_pOuter->GetImpl()); FX_BOOL bPropagate = FALSE; if (pKey->m_dwCmd == FWL_MSGKEYCMD_KeyDown) { - FX_DWORD dwKeyCode = pKey->m_dwKeyCode; + uint32_t dwKeyCode = pKey->m_dwKeyCode; switch (dwKeyCode) { case FWL_VKEY_Return: case FWL_VKEY_Escape: { @@ -440,7 +440,7 @@ int32_t CFWL_ComboListImpDelegate::OnDropListKey(CFWL_MsgKey* pKey) { return 0; } void CFWL_ComboListImpDelegate::OnDropListKeyDown(CFWL_MsgKey* pKey) { - FX_DWORD dwKeyCode = pKey->m_dwKeyCode; + uint32_t dwKeyCode = pKey->m_dwKeyCode; switch (dwKeyCode) { case FWL_VKEY_Up: case FWL_VKEY_Down: @@ -485,7 +485,7 @@ FWL_ERR CFWL_ComboBoxImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_ComboBox; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_ComboBoxImp::GetClassID() const { +uint32_t CFWL_ComboBoxImp::GetClassID() const { return FWL_CLASSHASH_ComboBox; } FWL_ERR CFWL_ComboBoxImp::Initialize() { @@ -549,8 +549,8 @@ FWL_ERR CFWL_ComboBoxImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { } return FWL_ERR_Succeeded; } -FWL_ERR CFWL_ComboBoxImp::ModifyStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR CFWL_ComboBoxImp::ModifyStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { if (m_pWidgetMgr->IsFormDisabled()) { return DisForm_ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); } @@ -590,7 +590,7 @@ FWL_ERR CFWL_ComboBoxImp::Update() { &part, FWL_WGTCAPACITY_CMB_ComboFormHandler)); return FWL_ERR_Succeeded; } -FX_DWORD CFWL_ComboBoxImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_ComboBoxImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { if (m_pWidgetMgr->IsFormDisabled()) { return DisForm_HitTest(fx, fy); } @@ -719,7 +719,7 @@ FWL_ERR CFWL_ComboBoxImp::SetCurSel(int32_t iSel) { m_iCurSel = bClearSel ? -1 : iSel; return FWL_ERR_Succeeded; } -FWL_ERR CFWL_ComboBoxImp::SetStates(FX_DWORD dwStates, FX_BOOL bSet) { +FWL_ERR CFWL_ComboBoxImp::SetStates(uint32_t dwStates, FX_BOOL bSet) { FX_BOOL bIsDropDown = IsDropDownStyle(); if (bIsDropDown && m_pEdit) { m_pEdit->SetStates(dwStates, bSet); @@ -863,8 +863,8 @@ FWL_ERR CFWL_ComboBoxImp::GetBBox(CFX_RectF& rect) { } return FWL_ERR_Succeeded; } -FWL_ERR CFWL_ComboBoxImp::EditModifyStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR CFWL_ComboBoxImp::EditModifyStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { if (m_pEdit != NULL) { return m_pEdit->ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); } else { @@ -904,7 +904,7 @@ void CFWL_ComboBoxImp::ShowDropList(FX_BOOL bActivate) { static_cast<CFWL_ComboListImp*>(m_pListBox->GetImpl()) ->ChangeSelected(m_iCurSel); ReSetListItemAlignment(); - FX_DWORD dwStyleAdd = m_pProperties->m_dwStyleExes & + uint32_t dwStyleAdd = m_pProperties->m_dwStyleExes & (FWL_STYLEEXT_CMB_Sort | FWL_STYLEEXT_CMB_OwnerDraw); m_pListBox->ModifyStylesEx(dwStyleAdd, 0); m_pListBox->GetWidgetRect(m_rtList, TRUE); @@ -1049,8 +1049,8 @@ void CFWL_ComboBoxImp::ReSetTheme() { void CFWL_ComboBoxImp::ReSetEditAlignment() { if (!m_pEdit) return; - FX_DWORD dwStylExes = m_pProperties->m_dwStyleExes; - FX_DWORD dwAdd = 0; + uint32_t dwStylExes = m_pProperties->m_dwStyleExes; + uint32_t dwAdd = 0; switch (dwStylExes & FWL_STYLEEXT_CMB_EditHAlignMask) { case FWL_STYLEEXT_CMB_EditHCenter: { dwAdd |= FWL_STYLEEXT_EDT_HCenter; @@ -1086,8 +1086,8 @@ void CFWL_ComboBoxImp::ReSetEditAlignment() { void CFWL_ComboBoxImp::ReSetListItemAlignment() { if (!m_pListBox) return; - FX_DWORD dwStylExes = m_pProperties->m_dwStyleExes; - FX_DWORD dwAdd = 0; + uint32_t dwStylExes = m_pProperties->m_dwStyleExes; + uint32_t dwAdd = 0; switch (dwStylExes & FWL_STYLEEXT_CMB_ListItemAlignMask) { case FWL_STYLEEXT_CMB_ListItemCenterAlign: { dwAdd |= FWL_STYLEEXT_LTB_CenterAlign; @@ -1224,8 +1224,8 @@ void CFWL_ComboBoxImp::DisForm_ShowDropList(FX_BOOL bActivate) { FX_BOOL CFWL_ComboBoxImp::DisForm_IsDropListShowed() { return !(m_pListBox->GetStates() & FWL_WGTSTATE_Invisible); } -FWL_ERR CFWL_ComboBoxImp::DisForm_ModifyStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR CFWL_ComboBoxImp::DisForm_ModifyStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { if (!m_pEdit) { DisForm_InitComboEdit(); } @@ -1251,7 +1251,7 @@ FWL_ERR CFWL_ComboBoxImp::DisForm_Update() { Layout(); return FWL_ERR_Succeeded; } -FX_DWORD CFWL_ComboBoxImp::DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_ComboBoxImp::DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) { CFX_RectF rect; rect.Set(0, 0, m_pProperties->m_rtWidget.width - m_rtBtn.width, m_pProperties->m_rtWidget.height); @@ -1366,7 +1366,7 @@ int32_t CFWL_ComboBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); FX_BOOL iRet = 1; switch (dwMsgCode) { case FWL_MSGHASH_SetFocus: @@ -1376,7 +1376,7 @@ int32_t CFWL_ComboBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMsg); @@ -1408,7 +1408,7 @@ int32_t CFWL_ComboBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { return iRet; } FWL_ERR CFWL_ComboBoxImpDelegate::OnProcessEvent(CFWL_Event* pEvent) { - FX_DWORD dwFlag = pEvent->GetClassID(); + uint32_t dwFlag = pEvent->GetClassID(); if (dwFlag == FWL_EVTHASH_LTB_DrawItem) { CFWL_EvtLtbDrawItem* pDrawItemEvent = static_cast<CFWL_EvtLtbDrawItem*>(pEvent); @@ -1522,7 +1522,7 @@ void CFWL_ComboBoxImpDelegate::OnMouseLeave(CFWL_MsgMouse* pMsg) { } } void CFWL_ComboBoxImpDelegate::OnKey(CFWL_MsgKey* pMsg) { - FX_DWORD dwKeyCode = pMsg->m_dwKeyCode; + uint32_t dwKeyCode = pMsg->m_dwKeyCode; if (dwKeyCode == FWL_VKEY_Tab) { m_pOwner->DispatchKeyEvent(pMsg); return; @@ -1531,7 +1531,7 @@ void CFWL_ComboBoxImpDelegate::OnKey(CFWL_MsgKey* pMsg) { DoSubCtrlKey(pMsg); } void CFWL_ComboBoxImpDelegate::DoSubCtrlKey(CFWL_MsgKey* pMsg) { - FX_DWORD dwKeyCode = pMsg->m_dwKeyCode; + uint32_t dwKeyCode = pMsg->m_dwKeyCode; const bool bUp = dwKeyCode == FWL_VKEY_Up; const bool bDown = dwKeyCode == FWL_VKEY_Down; if (bUp || bDown) { @@ -1589,7 +1589,7 @@ int32_t CFWL_ComboBoxImpDelegate::DisForm_OnProcessMessage( CFWL_Message* pMessage) { if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); FX_BOOL backDefault = TRUE; switch (dwMsgCode) { case FWL_MSGHASH_SetFocus: @@ -1601,7 +1601,7 @@ int32_t CFWL_ComboBoxImpDelegate::DisForm_OnProcessMessage( case FWL_MSGHASH_Mouse: { backDefault = FALSE; CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { DisForm_OnLButtonDown(pMsg); @@ -1623,7 +1623,7 @@ int32_t CFWL_ComboBoxImpDelegate::DisForm_OnProcessMessage( } if (m_pOwner->DisForm_IsDropListShowed() && pKey->m_dwCmd == FWL_MSGKEYCMD_KeyDown) { - FX_DWORD dwKeyCode = pKey->m_dwKeyCode; + uint32_t dwKeyCode = pKey->m_dwKeyCode; FX_BOOL bListKey = dwKeyCode == FWL_VKEY_Up || dwKeyCode == FWL_VKEY_Down || dwKeyCode == FWL_VKEY_Return || dwKeyCode == FWL_VKEY_Escape; @@ -1683,7 +1683,7 @@ void CFWL_ComboBoxImpDelegate::DisForm_OnFocusChanged(CFWL_Message* pMsg, } } void CFWL_ComboBoxImpDelegate::DisForm_OnKey(CFWL_MsgKey* pMsg) { - FX_DWORD dwKeyCode = pMsg->m_dwKeyCode; + uint32_t dwKeyCode = pMsg->m_dwKeyCode; const bool bUp = dwKeyCode == FWL_VKEY_Up; const bool bDown = dwKeyCode == FWL_VKEY_Down; if (bUp || bDown) { @@ -1738,10 +1738,10 @@ CFWL_ComboProxyImpDelegate::CFWL_ComboProxyImpDelegate( int32_t CFWL_ComboProxyImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); if (dwMsgCode == FWL_MSGHASH_Mouse) { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMsg); diff --git a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp index 70f76c607b..978fb619e2 100644 --- a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp +++ b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp @@ -147,8 +147,8 @@ FWL_ERR IFWL_DateTimePicker::GetBBox(CFX_RectF& rect) { FWL_ERR IFWL_DateTimePicker::SetEditLimit(int32_t nLimit) { return static_cast<CFWL_DateTimePickerImp*>(GetImpl())->SetEditLimit(nLimit); } -FWL_ERR IFWL_DateTimePicker::ModifyEditStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR IFWL_DateTimePicker::ModifyEditStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { return static_cast<CFWL_DateTimePickerImp*>(GetImpl()) ->ModifyEditStylesEx(dwStylesExAdded, dwStylesExRemoved); } @@ -173,7 +173,7 @@ int32_t CFWL_DateTimeEditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (m_pOwner->m_pWidgetMgr->IsFormDisabled()) { return DisForm_OnProcessMessage(pMessage); } - FX_DWORD dwHashCode = pMessage->GetClassID(); + uint32_t dwHashCode = pMessage->GetClassID(); if (dwHashCode == FWL_MSGHASH_SetFocus || dwHashCode == FWL_MSGHASH_KillFocus) { IFWL_Widget* pOuter = m_pOwner->GetOuter(); @@ -184,7 +184,7 @@ int32_t CFWL_DateTimeEditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } int32_t CFWL_DateTimeEditImpDelegate::DisForm_OnProcessMessage( CFWL_Message* pMessage) { - FX_DWORD dwHashCode = pMessage->GetClassID(); + uint32_t dwHashCode = pMessage->GetClassID(); if (m_pOwner->m_pWidgetMgr->IsFormDisabled()) { if (dwHashCode == FWL_MSGHASH_Mouse) { CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); @@ -232,7 +232,7 @@ CFWL_DateTimeCalendarImpDelegate::CFWL_DateTimeCalendarImpDelegate( } int32_t CFWL_DateTimeCalendarImpDelegate::OnProcessMessage( CFWL_Message* pMessage) { - FX_DWORD dwCode = pMessage->GetClassID(); + uint32_t dwCode = pMessage->GetClassID(); if (dwCode == FWL_MSGHASH_SetFocus || dwCode == FWL_MSGHASH_KillFocus) { IFWL_Widget* pOuter = m_pOwner->GetOuter(); IFWL_WidgetDelegate* pDelegate = pOuter->SetDelegate(NULL); @@ -431,7 +431,7 @@ FWL_ERR CFWL_DateTimePickerImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_DateTimePicker; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_DateTimePickerImp::GetClassID() const { +uint32_t CFWL_DateTimePickerImp::GetClassID() const { return FWL_CLASSHASH_DateTimePicker; } FWL_ERR CFWL_DateTimePickerImp::Initialize() { @@ -531,7 +531,7 @@ FWL_ERR CFWL_DateTimePickerImp::Update() { m_pMonthCal->Update(); return FWL_ERR_Succeeded; } -FX_DWORD CFWL_DateTimePickerImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_DateTimePickerImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { if (m_pWidgetMgr->IsFormDisabled()) { return DisForm_HitTest(fx, fy); } @@ -675,8 +675,8 @@ FWL_ERR CFWL_DateTimePickerImp::GetBBox(CFX_RectF& rect) { FWL_ERR CFWL_DateTimePickerImp::SetEditLimit(int32_t nLimit) { return m_pEdit->SetLimit(nLimit); } -FWL_ERR CFWL_DateTimePickerImp::ModifyEditStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR CFWL_DateTimePickerImp::ModifyEditStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { return m_pEdit->ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); } void CFWL_DateTimePickerImp::DrawDropDownButton(CFX_Graphics* pGraphics, @@ -755,8 +755,8 @@ FX_BOOL CFWL_DateTimePickerImp::IsMonthCalendarShowed() { void CFWL_DateTimePickerImp::ReSetEditAlignment() { if (!m_pEdit) return; - FX_DWORD dwStylExes = m_pProperties->m_dwStyleExes; - FX_DWORD dwAdd = 0; + uint32_t dwStylExes = m_pProperties->m_dwStyleExes; + uint32_t dwAdd = 0; switch (dwStylExes & FWL_STYLEEXT_DTP_EditHAlignMask) { case FWL_STYLEEXT_DTP_EditHCenter: { dwAdd |= FWL_STYLEEXT_EDT_HCenter; @@ -901,7 +901,7 @@ void CFWL_DateTimePickerImp::DisForm_ShowMonthCalendar(FX_BOOL bActivate) { rtInvalidate.Inflate(2, 2); Repaint(&rtInvalidate); } -FX_DWORD CFWL_DateTimePickerImp::DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_DateTimePickerImp::DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) { CFX_RectF rect; rect.Set(0, 0, m_pProperties->m_rtWidget.width, m_pProperties->m_rtWidget.height); @@ -1018,7 +1018,7 @@ int32_t CFWL_DateTimePickerImpDelegate::OnProcessMessage( CFWL_Message* pMessage) { if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); switch (dwMsgCode) { case FWL_MSGHASH_SetFocus: case FWL_MSGHASH_KillFocus: { @@ -1027,7 +1027,7 @@ int32_t CFWL_DateTimePickerImpDelegate::OnProcessMessage( } case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMouse->m_dwCmd; + uint32_t dwCmd = pMouse->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMouse); diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp index 237e461917..e60650f450 100644 --- a/xfa/fwl/basewidget/fwl_editimp.cpp +++ b/xfa/fwl/basewidget/fwl_editimp.cpp @@ -155,7 +155,7 @@ FWL_ERR IFWL_Edit::SetOuter(IFWL_Widget* pOuter) { FWL_ERR IFWL_Edit::SetNumberRange(int32_t iMin, int32_t iMax) { return static_cast<CFWL_EditImp*>(GetImpl())->SetNumberRange(iMin, iMax); } -FWL_ERR IFWL_Edit::SetBackColor(FX_DWORD dwColor) { +FWL_ERR IFWL_Edit::SetBackColor(uint32_t dwColor) { return static_cast<CFWL_EditImp*>(GetImpl())->SetBackgroundColor(dwColor); } FWL_ERR IFWL_Edit::SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize) { @@ -210,7 +210,7 @@ FWL_ERR CFWL_EditImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_Edit; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_EditImp::GetClassID() const { +uint32_t CFWL_EditImp::GetClassID() const { return FWL_CLASSHASH_Edit; } FWL_ERR CFWL_EditImp::Initialize() { @@ -273,7 +273,7 @@ FWL_ERR CFWL_EditImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { } return FWL_ERR_Succeeded; } -FWL_ERR CFWL_EditImp::SetStates(FX_DWORD dwStates, FX_BOOL bSet) { +FWL_ERR CFWL_EditImp::SetStates(uint32_t dwStates, FX_BOOL bSet) { if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Invisible) || (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)) { ShowCaret(FALSE); @@ -300,7 +300,7 @@ FWL_ERR CFWL_EditImp::Update() { InitCaret(); return FWL_ERR_Succeeded; } -FX_DWORD CFWL_EditImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_EditImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_OuterScrollbar) { if (IsShowScrollBar(TRUE)) { CFX_RectF rect; @@ -798,7 +798,7 @@ void CFWL_EditImp::On_CaretChanged(IFDE_TxtEdtEngine* pEdit, } void CFWL_EditImp::On_TextChanged(IFDE_TxtEdtEngine* pEdit, FDE_TXTEDT_TEXTCHANGE_INFO& ChangeInfo) { - FX_DWORD dwStyleEx = m_pProperties->m_dwStyleExes; + uint32_t dwStyleEx = m_pProperties->m_dwStyleExes; if (dwStyleEx & FWL_STYLEEXT_EDT_VAlignMask) { UpdateVAlignment(); } @@ -922,7 +922,7 @@ FX_BOOL CFWL_EditImp::On_Validate(IFDE_TxtEdtEngine* pEdit, DispatchEvent(&event); return event.bValidate; } -FWL_ERR CFWL_EditImp::SetBackgroundColor(FX_DWORD color) { +FWL_ERR CFWL_EditImp::SetBackgroundColor(uint32_t color) { m_backColor = color; m_updateBackColor = TRUE; return FWL_ERR_Succeeded; @@ -945,7 +945,7 @@ void CFWL_EditImp::DrawTextBk(CFX_Graphics* pGraphics, param.m_dwStates = m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly ? FWL_PARTSTATE_EDT_ReadOnly : FWL_PARTSTATE_EDT_Normal; - FX_DWORD dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled); + uint32_t dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled); if (dwStates) { param.m_dwStates = FWL_PARTSTATE_EDT_Disable; } @@ -1166,8 +1166,8 @@ void CFWL_EditImp::UpdateEditParams() { if (!pFontSize) return; m_fFontSize = *pFontSize; - FX_DWORD* pFontColor = - static_cast<FX_DWORD*>(GetThemeCapacity(FWL_WGTCAPACITY_TextColor)); + uint32_t* pFontColor = + static_cast<uint32_t*>(GetThemeCapacity(FWL_WGTCAPACITY_TextColor)); if (!pFontColor) return; params.dwFontColor = *pFontColor; @@ -1738,7 +1738,7 @@ CFWL_EditImpDelegate::CFWL_EditImpDelegate(CFWL_EditImp* pOwner) int32_t CFWL_EditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); int32_t iRet = 1; switch (dwMsgCode) { case FWL_MSGHASH_Activate: { @@ -1756,7 +1756,7 @@ int32_t CFWL_EditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMsg); @@ -1784,7 +1784,7 @@ int32_t CFWL_EditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } case FWL_MSGHASH_Key: { CFWL_MsgKey* pKey = static_cast<CFWL_MsgKey*>(pMessage); - FX_DWORD dwCmd = pKey->m_dwCmd; + uint32_t dwCmd = pKey->m_dwCmd; if (dwCmd == FWL_MSGKEYCMD_KeyDown) { OnKeyDown(pKey); } else if (dwCmd == FWL_MSGKEYCMD_Char) { @@ -1800,7 +1800,7 @@ int32_t CFWL_EditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { FWL_ERR CFWL_EditImpDelegate::OnProcessEvent(CFWL_Event* pEvent) { if (!pEvent) return FWL_ERR_Indefinite; - FX_DWORD dwHashCode = pEvent->GetClassID(); + uint32_t dwHashCode = pEvent->GetClassID(); if (dwHashCode != FWL_EVTHASH_Scroll) { return FWL_ERR_Succeeded; } @@ -1847,7 +1847,7 @@ void CFWL_EditImpDelegate::DoButtonDown(CFWL_MsgMouse* pMsg) { m_pOwner->m_pEdtEngine->SetCaretPos(nIndex, bBefore); } void CFWL_EditImpDelegate::OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet) { - FX_DWORD dwStyleEx = m_pOwner->GetStylesEx(); + uint32_t dwStyleEx = m_pOwner->GetStylesEx(); FX_BOOL bRepaint = dwStyleEx & FWL_STYLEEXT_EDT_InnerCaret; if (bSet) { m_pOwner->m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused; @@ -1964,7 +1964,7 @@ void CFWL_EditImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { FDE_TXTEDTMOVECARET MoveCaret = MC_MoveNone; FX_BOOL bShift = pMsg->m_dwFlags & FWL_KEYFLAG_Shift; FX_BOOL bCtrl = pMsg->m_dwFlags & FWL_KEYFLAG_Ctrl; - FX_DWORD dwKeyCode = pMsg->m_dwKeyCode; + uint32_t dwKeyCode = pMsg->m_dwKeyCode; switch (dwKeyCode) { case FWL_VKEY_Left: { MoveCaret = MC_Left; @@ -2109,7 +2109,7 @@ void CFWL_EditImpDelegate::OnChar(CFWL_MsgKey* pMsg) { } } FX_BOOL CFWL_EditImpDelegate::OnScroll(IFWL_ScrollBar* pScrollBar, - FX_DWORD dwCode, + uint32_t dwCode, FX_FLOAT fPos) { CFX_SizeF fs; pScrollBar->GetRange(fs.x, fs.y); diff --git a/xfa/fwl/basewidget/fwl_formproxyimp.cpp b/xfa/fwl/basewidget/fwl_formproxyimp.cpp index 51f3507707..27a608795b 100644 --- a/xfa/fwl/basewidget/fwl_formproxyimp.cpp +++ b/xfa/fwl/basewidget/fwl_formproxyimp.cpp @@ -20,7 +20,7 @@ FWL_ERR CFWL_FormProxyImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_FormProxy; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_FormProxyImp::GetClassID() const { +uint32_t CFWL_FormProxyImp::GetClassID() const { return FWL_CLASSHASH_FormProxy; } FX_BOOL CFWL_FormProxyImp::IsInstance(const CFX_WideStringC& wsClass) const { diff --git a/xfa/fwl/basewidget/fwl_listboximp.cpp b/xfa/fwl/basewidget/fwl_listboximp.cpp index ad5800142c..24b29d6ac0 100644 --- a/xfa/fwl/basewidget/fwl_listboximp.cpp +++ b/xfa/fwl/basewidget/fwl_listboximp.cpp @@ -80,7 +80,7 @@ FWL_ERR CFWL_ListBoxImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_ListBox; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_ListBoxImp::GetClassID() const { +uint32_t CFWL_ListBoxImp::GetClassID() const { return FWL_CLASSHASH_ListBox; } FWL_ERR CFWL_ListBoxImp::Initialize() { @@ -143,7 +143,7 @@ FWL_ERR CFWL_ListBoxImp::Update() { CalcSize(); return FWL_ERR_Succeeded; } -FX_DWORD CFWL_ListBoxImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_ListBoxImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { if (IsShowScrollBar(FALSE)) { CFX_RectF rect; m_pHorzScrollBar->GetWidgetRect(rect); @@ -217,7 +217,7 @@ int32_t CFWL_ListBoxImp::CountSelItems() { if (!hItem) { continue; } - FX_DWORD dwStyle = pData->GetItemStyles(m_pInterface, hItem); + uint32_t dwStyle = pData->GetItemStyles(m_pInterface, hItem); if (dwStyle & FWL_ITEMSTATE_LTB_Selected) { iRet++; } @@ -236,7 +236,7 @@ FWL_HLISTITEM CFWL_ListBoxImp::GetSelItem(int32_t nIndexSel) { if (!hItem) { return NULL; } - FX_DWORD dwStyle = pData->GetItemStyles(m_pInterface, hItem); + uint32_t dwStyle = pData->GetItemStyles(m_pInterface, hItem); if (dwStyle & FWL_ITEMSTATE_LTB_Selected) { if (index == nIndexSel) { return hItem; @@ -259,7 +259,7 @@ int32_t CFWL_ListBoxImp::GetSelIndex(int32_t nIndex) { if (!hItem) { return -1; } - FX_DWORD dwStyle = pData->GetItemStyles(m_pInterface, hItem); + uint32_t dwStyle = pData->GetItemStyles(m_pInterface, hItem); if (dwStyle & FWL_ITEMSTATE_LTB_Selected) { if (index == nIndex) { return i; @@ -327,7 +327,7 @@ FWL_ERR* CFWL_ListBoxImp::Sort(IFWL_ListBoxCompare* pCom) { return FWL_ERR_Succeeded; } FWL_HLISTITEM CFWL_ListBoxImp::GetItem(FWL_HLISTITEM hItem, - FX_DWORD dwKeyCode) { + uint32_t dwKeyCode) { FWL_HLISTITEM hRet = NULL; switch (dwKeyCode) { case FWL_VKEY_Up: @@ -383,7 +383,7 @@ void CFWL_ListBoxImp::SetSelection(FWL_HLISTITEM hStart, void CFWL_ListBoxImp::SetSelectionDirect(FWL_HLISTITEM hItem, FX_BOOL bSelect) { IFWL_ListBoxDP* pData = static_cast<IFWL_ListBoxDP*>(m_pProperties->m_pDataProvider); - FX_DWORD dwOldStyle = pData->GetItemStyles(m_pInterface, hItem); + uint32_t dwOldStyle = pData->GetItemStyles(m_pInterface, hItem); bSelect ? dwOldStyle |= FWL_ITEMSTATE_LTB_Selected : dwOldStyle &= ~FWL_ITEMSTATE_LTB_Selected; pData->SetItemStyles(m_pInterface, hItem, dwOldStyle); @@ -391,7 +391,7 @@ void CFWL_ListBoxImp::SetSelectionDirect(FWL_HLISTITEM hItem, FX_BOOL bSelect) { FX_BOOL CFWL_ListBoxImp::IsItemSelected(FWL_HLISTITEM hItem) { IFWL_ListBoxDP* pData = static_cast<IFWL_ListBoxDP*>(m_pProperties->m_pDataProvider); - FX_DWORD dwState = pData->GetItemStyles(m_pInterface, hItem); + uint32_t dwState = pData->GetItemStyles(m_pInterface, hItem); return (dwState & FWL_ITEMSTATE_LTB_Selected) != 0; } void CFWL_ListBoxImp::ClearSelection() { @@ -402,7 +402,7 @@ void CFWL_ListBoxImp::ClearSelection() { int32_t iCount = pData->CountItems(m_pInterface); for (int32_t i = 0; i < iCount; i++) { FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, i); - FX_DWORD dwState = pData->GetItemStyles(m_pInterface, hItem); + uint32_t dwState = pData->GetItemStyles(m_pInterface, hItem); FX_BOOL bFindSel = dwState & FWL_ITEMSTATE_LTB_Selected; if (!bFindSel) { continue; @@ -448,12 +448,12 @@ void CFWL_ListBoxImp::SetFocusItem(FWL_HLISTITEM hItem) { FWL_HLISTITEM hFocus = GetFocusedItem(); if (hItem != hFocus) { if (hFocus) { - FX_DWORD dwStyle = pData->GetItemStyles(m_pInterface, hFocus); + uint32_t dwStyle = pData->GetItemStyles(m_pInterface, hFocus); dwStyle &= ~FWL_ITEMSTATE_LTB_Focused; pData->SetItemStyles(m_pInterface, hFocus, dwStyle); } if (hItem) { - FX_DWORD dwStyle = pData->GetItemStyles(m_pInterface, hItem); + uint32_t dwStyle = pData->GetItemStyles(m_pInterface, hItem); dwStyle |= FWL_ITEMSTATE_LTB_Focused; pData->SetItemStyles(m_pInterface, hItem, dwStyle); } @@ -629,8 +629,8 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) { IFWL_ListBoxDP* pData = static_cast<IFWL_ListBoxDP*>(m_pProperties->m_pDataProvider); - FX_DWORD dwItemStyles = pData->GetItemStyles(m_pInterface, hItem); - FX_DWORD dwPartStates = FWL_PARTSTATE_LTB_Normal; + uint32_t dwItemStyles = pData->GetItemStyles(m_pInterface, hItem); + uint32_t dwPartStates = FWL_PARTSTATE_LTB_Normal; if (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) { dwPartStates = FWL_PARTSTATE_LTB_Disabled; } else if (dwItemStyles & FWL_ITEMSTATE_LTB_Selected) { @@ -651,7 +651,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics, param.m_pGraphics = pGraphics; param.m_matrix.Concat(*pMatrix); param.m_rtPart = rtItem; - param.m_dwData = (FX_DWORD)(uintptr_t)(&itemData); + param.m_dwData = (uint32_t)(uintptr_t)(&itemData); CFX_RectF rtFocus(rtItem); param.m_pData = &rtFocus; if (m_pVertScrollBar && !m_pHorzScrollBar && @@ -675,7 +675,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics, param.m_pGraphics = pGraphics; param.m_matrix.Concat(*pMatrix); param.m_rtPart = rtDIB; - param.m_dwData = (FX_DWORD)(uintptr_t)(&itemData); + param.m_dwData = (uint32_t)(uintptr_t)(&itemData); param.m_pImage = pDib; pTheme->DrawBackground(¶m); } @@ -697,7 +697,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics, } param.m_matrix.Concat(*pMatrix); param.m_rtPart = rtCheck; - param.m_dwData = (FX_DWORD)(uintptr_t)(&itemData); + param.m_dwData = (uint32_t)(uintptr_t)(&itemData); pTheme->DrawBackground(¶m); } CFX_WideString wsText; @@ -720,7 +720,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics, textParam.m_wsText = wsText; textParam.m_dwTTOStyles = m_dwTTOStyles; textParam.m_iTTOAlign = m_iTTOAligns; - textParam.m_dwData = (FX_DWORD)(uintptr_t)(&itemData); + textParam.m_dwData = (uint32_t)(uintptr_t)(&itemData); pTheme->DrawText(&textParam); } } @@ -990,7 +990,7 @@ int32_t CFWL_ListBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!m_pOwner->IsEnabled()) { return 1; } - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); int32_t iRet = 1; switch (dwMsgCode) { case FWL_MSGHASH_SetFocus: @@ -1000,7 +1000,7 @@ int32_t CFWL_ListBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMsg); @@ -1131,7 +1131,7 @@ void CFWL_ListBoxImpDelegate::OnMouseWheel(CFWL_MsgMouseWheel* pMsg) { pDelegate->OnProcessMessage(pMsg); } void CFWL_ListBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { - FX_DWORD dwKeyCode = pMsg->m_dwKeyCode; + uint32_t dwKeyCode = pMsg->m_dwKeyCode; switch (dwKeyCode) { case FWL_VKEY_Tab: case FWL_VKEY_Up: @@ -1182,7 +1182,7 @@ void CFWL_ListBoxImpDelegate::OnVK(FWL_HLISTITEM hItem, } } FX_BOOL CFWL_ListBoxImpDelegate::OnScroll(IFWL_ScrollBar* pScrollBar, - FX_DWORD dwCode, + uint32_t dwCode, FX_FLOAT fPos) { CFX_SizeF fs; pScrollBar->GetRange(fs.x, fs.y); diff --git a/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp b/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp index 7106601b68..d55144a805 100644 --- a/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp +++ b/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp @@ -93,7 +93,7 @@ FWL_ERR CFWL_MonthCalendarImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_MonthCalendar; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_MonthCalendarImp::GetClassID() const { +uint32_t CFWL_MonthCalendarImp::GetClassID() const { return FWL_CLASSHASH_MonthCalendar; } FWL_ERR CFWL_MonthCalendarImp::Initialize() { @@ -513,7 +513,7 @@ CFX_SizeF CFWL_MonthCalendarImp::CalcSize(FX_BOOL bAutoSize) { CFX_WideString* wsText = NULL; FX_FLOAT fMaxWeekW = 0.0f; FX_FLOAT fMaxWeekH = 0.0f; - for (FX_DWORD week = FWL_MCCAPACITY_Sun; week <= FWL_MCCAPACITY_Sat; week++) { + for (uint32_t week = FWL_MCCAPACITY_Sun; week <= FWL_MCCAPACITY_Sat; week++) { wsText = static_cast<CFX_WideString*>(pTheme->GetCapacity(¶ms, week)); CFX_SizeF sz = CalcTextSize(*wsText, m_pProperties->m_pThemeProvider); fMaxWeekW = (fMaxWeekW >= sz.x) ? fMaxWeekW : sz.x; @@ -536,7 +536,7 @@ CFX_SizeF CFWL_MonthCalendarImp::CalcSize(FX_BOOL bAutoSize) { MONTHCAL_HEADER_BTN_HMARGIN * 2; FX_FLOAT fMonthMaxW = 0.0f; FX_FLOAT fMonthMaxH = 0.0f; - for (FX_DWORD month = FWL_MCCAPACITY_January; + for (uint32_t month = FWL_MCCAPACITY_January; month <= FWL_MCCAPACITY_December; month++) { wsText = static_cast<CFX_WideString*>(pTheme->GetCapacity(¶ms, month)); CFX_SizeF sz = CalcTextSize(*wsText, m_pProperties->m_pThemeProvider); @@ -773,7 +773,7 @@ void CFWL_MonthCalendarImp::ReSetDateItem() { } CFX_WideString wsDay; wsDay.Format(L"%d", i + 1); - FX_DWORD dwStates = 0; + uint32_t dwStates = 0; if (m_iYear == m_iCurYear && m_iMonth == m_iCurMonth && m_iDay == (i + 1)) { dwStates |= FWL_ITEMSTATE_MCD_Flag; } @@ -929,7 +929,7 @@ int32_t CFWL_MonthCalendarImpDelegate::OnProcessMessage( CFWL_Message* pMessage) { if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); int32_t iRet = 1; switch (dwMsgCode) { case FWL_MSGHASH_SetFocus: @@ -942,7 +942,7 @@ int32_t CFWL_MonthCalendarImpDelegate::OnProcessMessage( } case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMouse->m_dwCmd; + uint32_t dwCmd = pMouse->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMouse); diff --git a/xfa/fwl/basewidget/fwl_pictureboximp.cpp b/xfa/fwl/basewidget/fwl_pictureboximp.cpp index a9dd440ccd..f1b72b8ee4 100644 --- a/xfa/fwl/basewidget/fwl_pictureboximp.cpp +++ b/xfa/fwl/basewidget/fwl_pictureboximp.cpp @@ -40,7 +40,7 @@ FWL_ERR CFWL_PictureBoxImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_PictureBox; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_PictureBoxImp::GetClassID() const { +uint32_t CFWL_PictureBoxImp::GetClassID() const { return FWL_CLASSHASH_PictureBox; } FWL_ERR CFWL_PictureBoxImp::Initialize() { diff --git a/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp b/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp index cb6f99de7c..89654d0271 100644 --- a/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp +++ b/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp @@ -44,7 +44,7 @@ FWL_ERR CFWL_PushButtonImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_PushButton; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_PushButtonImp::GetClassID() const { +uint32_t CFWL_PushButtonImp::GetClassID() const { return FWL_CLASSHASH_PushButton; } FWL_ERR CFWL_PushButtonImp::Initialize() { @@ -84,7 +84,7 @@ FWL_ERR CFWL_PushButtonImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { } return FWL_ERR_Succeeded; } -FWL_ERR CFWL_PushButtonImp::SetStates(FX_DWORD dwStates, FX_BOOL bSet) { +FWL_ERR CFWL_PushButtonImp::SetStates(uint32_t dwStates, FX_BOOL bSet) { if ((dwStates & FWL_WGTSTATE_Disabled) && bSet) { m_pProperties->m_dwStates = FWL_WGTSTATE_Disabled; return FWL_ERR_Succeeded; @@ -335,8 +335,8 @@ void CFWL_PushButtonImp::DrawText(CFX_Graphics* pGraphics, param.m_iTTOAlign = m_iTTOAlign; pTheme->DrawText(¶m); } -FX_DWORD CFWL_PushButtonImp::GetPartStates() { - FX_DWORD dwStates = FWL_PARTSTATE_PSB_Normal; +uint32_t CFWL_PushButtonImp::GetPartStates() { + uint32_t dwStates = FWL_PARTSTATE_PSB_Normal; if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) { dwStates |= FWL_PARTSTATE_PSB_Focused; } @@ -408,7 +408,7 @@ int32_t CFWL_PushButtonImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { return 1; } int32_t iRet = 1; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); switch (dwMsgCode) { case FWL_MSGHASH_SetFocus: case FWL_MSGHASH_KillFocus: { @@ -417,7 +417,7 @@ int32_t CFWL_PushButtonImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMsg); diff --git a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp index ad41d82be2..23bda25d58 100644 --- a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp +++ b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp @@ -62,7 +62,7 @@ FX_FLOAT IFWL_ScrollBar::GetTrackPos() { FWL_ERR IFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) { return static_cast<CFWL_ScrollBarImp*>(GetImpl())->SetTrackPos(fTrackPos); } -FX_BOOL IFWL_ScrollBar::DoScroll(FX_DWORD dwCode, FX_FLOAT fPos) { +FX_BOOL IFWL_ScrollBar::DoScroll(uint32_t dwCode, FX_FLOAT fPos) { return static_cast<CFWL_ScrollBarImp*>(GetImpl())->DoScroll(dwCode, fPos); } CFWL_ScrollBarImp::CFWL_ScrollBarImp(const CFWL_WidgetImpProperties& properties, @@ -104,7 +104,7 @@ FWL_ERR CFWL_ScrollBarImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_ScrollBar; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_ScrollBarImp::GetClassID() const { +uint32_t CFWL_ScrollBarImp::GetClassID() const { return FWL_CLASSHASH_ScrollBar; } FWL_ERR CFWL_ScrollBarImp::Initialize() { @@ -210,7 +210,7 @@ FWL_ERR CFWL_ScrollBarImp::SetTrackPos(FX_FLOAT fTrackPos) { CalcMaxTrackRect(m_rtMaxTrack); return FWL_ERR_Succeeded; } -FX_BOOL CFWL_ScrollBarImp::DoScroll(FX_DWORD dwCode, FX_FLOAT fPos) { +FX_BOOL CFWL_ScrollBarImp::DoScroll(uint32_t dwCode, FX_FLOAT fPos) { switch (dwCode) { case FWL_SCBCODE_Min: case FWL_SCBCODE_Max: @@ -615,7 +615,7 @@ FX_BOOL CFWL_ScrollBarImp::SendEvent() { } return TRUE; } -FX_BOOL CFWL_ScrollBarImp::OnScroll(FX_DWORD dwCode, FX_FLOAT fPos) { +FX_BOOL CFWL_ScrollBarImp::OnScroll(uint32_t dwCode, FX_FLOAT fPos) { FX_BOOL bRet = TRUE; CFWL_EvtScroll ev; ev.m_iScrollCode = dwCode; @@ -631,10 +631,10 @@ int32_t CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; int32_t iRet = 1; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); if (dwMsgCode == FWL_MSGHASH_Mouse) { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMsg->m_dwFlags, pMsg->m_fx, pMsg->m_fy); @@ -667,7 +667,7 @@ FWL_ERR CFWL_ScrollBarImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) { return m_pOwner->DrawWidget(pGraphics, pMatrix); } -void CFWL_ScrollBarImpDelegate::OnLButtonDown(FX_DWORD dwFlags, +void CFWL_ScrollBarImpDelegate::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!m_pOwner->IsEnabled()) { @@ -703,7 +703,7 @@ void CFWL_ScrollBarImpDelegate::OnLButtonDown(FX_DWORD dwFlags, m_pOwner->m_hTimer = FWL_StartTimer(m_pOwner, FWL_SCROLLBAR_Elapse); } } -void CFWL_ScrollBarImpDelegate::OnLButtonUp(FX_DWORD dwFlags, +void CFWL_ScrollBarImpDelegate::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { FWL_StopTimer(m_pOwner->m_hTimer); @@ -715,7 +715,7 @@ void CFWL_ScrollBarImpDelegate::OnLButtonUp(FX_DWORD dwFlags, DoMouseUp(4, m_pOwner->m_rtMaxTrack, m_pOwner->m_iMaxTrackState, fx, fy); m_pOwner->SetGrab(FALSE); } -void CFWL_ScrollBarImpDelegate::OnMouseMove(FX_DWORD dwFlags, +void CFWL_ScrollBarImpDelegate::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { DoMouseMove(0, m_pOwner->m_rtMinBtn, m_pOwner->m_iMinButtonState, fx, fy); @@ -733,7 +733,7 @@ void CFWL_ScrollBarImpDelegate::OnMouseLeave() { } void CFWL_ScrollBarImpDelegate::OnMouseWheel(FX_FLOAT fx, FX_FLOAT fy, - FX_DWORD dwFlags, + uint32_t dwFlags, FX_FLOAT fDeltaX, FX_FLOAT fDeltaY) { m_pOwner->m_iMouseWheel = (int32_t)fDeltaX; diff --git a/xfa/fwl/basewidget/fwl_spinbuttonimp.cpp b/xfa/fwl/basewidget/fwl_spinbuttonimp.cpp index bc11d8fdf1..9f276b7281 100644 --- a/xfa/fwl/basewidget/fwl_spinbuttonimp.cpp +++ b/xfa/fwl/basewidget/fwl_spinbuttonimp.cpp @@ -60,7 +60,7 @@ FWL_ERR CFWL_SpinButtonImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_SpinButton; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_SpinButtonImp::GetClassID() const { +uint32_t CFWL_SpinButtonImp::GetClassID() const { return FWL_CLASSHASH_SpinButton; } FWL_ERR CFWL_SpinButtonImp::Initialize() { @@ -101,7 +101,7 @@ FWL_ERR CFWL_SpinButtonImp::Update() { } return FWL_ERR_Succeeded; } -FX_DWORD CFWL_SpinButtonImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_SpinButtonImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { if (m_rtClient.Contains(fx, fy)) { return FWL_WGTHITTEST_Client; } @@ -208,7 +208,7 @@ int32_t CFWL_SpinButtonImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; int32_t iRet = 1; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); switch (dwMsgCode) { case FWL_MSGHASH_SetFocus: case FWL_MSGHASH_KillFocus: { @@ -217,7 +217,7 @@ int32_t CFWL_SpinButtonImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); - FX_DWORD dwCmd = pMsg->m_dwCmd; + uint32_t dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMsg); diff --git a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp index 584e6c3ae8..97ead0e44c 100644 --- a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp +++ b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp @@ -63,7 +63,7 @@ FWL_ERR CFWL_ToolTipImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_ToolTip; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_ToolTipImp::GetClassID() const { +uint32_t CFWL_ToolTipImp::GetClassID() const { return FWL_CLASSHASH_ToolTip; } FWL_ERR CFWL_ToolTipImp::Initialize() { @@ -226,7 +226,7 @@ FWL_ERR CFWL_ToolTipImp::Hide() { } return TRUE; } -FWL_ERR CFWL_ToolTipImp::SetStates(FX_DWORD dwStates, FX_BOOL bSet) { +FWL_ERR CFWL_ToolTipImp::SetStates(uint32_t dwStates, FX_BOOL bSet) { if ((dwStates & FWL_WGTSTATE_Invisible) && !bSet) { IFWL_ToolTipDP* pData = static_cast<IFWL_ToolTipDP*>(m_pProperties->m_pDataProvider); diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp index 83176550eb..f7fc301d97 100644 --- a/xfa/fwl/core/fwl_formimp.cpp +++ b/xfa/fwl/core/fwl_formimp.cpp @@ -49,7 +49,7 @@ FWL_ERR IFWL_Form::SetFormSize(FWL_FORMSIZE eFormSize) { IFWL_Widget* IFWL_Form::DoModal() { return static_cast<CFWL_FormImp*>(GetImpl())->DoModal(); } -IFWL_Widget* IFWL_Form::DoModal(FX_DWORD& dwCommandID) { +IFWL_Widget* IFWL_Form::DoModal(uint32_t& dwCommandID) { return static_cast<CFWL_FormImp*>(GetImpl())->DoModal(dwCommandID); } FWL_ERR IFWL_Form::EndDoModal() { @@ -96,7 +96,7 @@ FWL_ERR CFWL_FormImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_Form; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_FormImp::GetClassID() const { +uint32_t CFWL_FormImp::GetClassID() const { return FWL_CLASSHASH_Form; } FX_BOOL CFWL_FormImp::IsInstance(const CFX_WideStringC& wsClass) const { @@ -194,7 +194,7 @@ FWL_ERR CFWL_FormImp::Update() { Layout(); return FWL_ERR_Succeeded; } -FX_DWORD CFWL_FormImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_FormImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { (void)GetAvailableTheme(); if (m_pCloseBox && m_pCloseBox->m_rtBtn.Contains(fx, fy)) { return FWL_WGTHITTEST_CloseBox; @@ -407,7 +407,7 @@ IFWL_Widget* CFWL_FormImp::DoModal() { m_pNoteLoop = NULL; return NULL; } -IFWL_Widget* CFWL_FormImp::DoModal(FX_DWORD& dwCommandID) { +IFWL_Widget* CFWL_FormImp::DoModal(uint32_t& dwCommandID) { return DoModal(); } FWL_ERR CFWL_FormImp::EndDoModal() { @@ -458,7 +458,7 @@ void CFWL_FormImp::SetAccelerator(CFX_MapAccelerators* pAccelerators) { if (!pAccelerators) return; m_mapAccelerators.RemoveAll(); - FX_DWORD vrKey, rValue; + uint32_t vrKey, rValue; FX_POSITION pos = pAccelerators->GetStartPosition(); while (pos) { pAccelerators->GetNextAssoc(pos, vrKey, rValue); @@ -526,7 +526,7 @@ CFWL_SysBtn* CFWL_FormImp::GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy) { } return NULL; } -CFWL_SysBtn* CFWL_FormImp::GetSysBtnByState(FX_DWORD dwState) { +CFWL_SysBtn* CFWL_FormImp::GetSysBtnByState(uint32_t dwState) { if (m_pCloseBox && (m_pCloseBox->m_dwState & dwState)) { return m_pCloseBox; } @@ -571,7 +571,7 @@ int32_t CFWL_FormImp::GetSysBtnIndex(CFWL_SysBtn* pBtn) { return arrBtn.Find(pBtn); } FX_FLOAT CFWL_FormImp::GetCaptionHeight() { - FX_DWORD dwCapacity = 0; + uint32_t dwCapacity = 0; if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Caption) { dwCapacity = FWL_WGTCAPACITY_FRM_CYCaption; } else if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_NarrowCaption) { @@ -879,7 +879,7 @@ int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { #ifdef FWL_UseMacSystemBorder if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); switch (dwMsgCode) { case FWL_MSGHASH_Activate: { m_pOwner->m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated; @@ -896,7 +896,7 @@ int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { #else if (!pMessage) return 0; - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); int32_t iRet = 1; switch (dwMsgCode) { case FWL_MSGHASH_Activate: { diff --git a/xfa/fwl/core/fwl_gridimp.cpp b/xfa/fwl/core/fwl_gridimp.cpp index 9ff1949b38..77e4c245cd 100644 --- a/xfa/fwl/core/fwl_gridimp.cpp +++ b/xfa/fwl/core/fwl_gridimp.cpp @@ -168,7 +168,7 @@ FWL_ERR CFWL_GridImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_Grid; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_GridImp::GetClassID() const { +uint32_t CFWL_GridImp::GetClassID() const { return FWL_CLASSHASH_Grid; } FWL_ERR CFWL_GridImp::Initialize() { diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp index 72dd9ecff2..dbb9a95286 100644 --- a/xfa/fwl/core/fwl_noteimp.cpp +++ b/xfa/fwl/core/fwl_noteimp.cpp @@ -76,11 +76,11 @@ FX_BOOL CFWL_NoteLoop::TranslateAccelerator(CFWL_Message* pMessage) { if (!pos) { return FALSE; } - FX_DWORD vrKey, rValue; + uint32_t vrKey, rValue; while (pos) { accel.GetNextAssoc(pos, vrKey, rValue); - FX_DWORD dwFlags = (vrKey & 0xFF00) >> 8; - FX_DWORD m_dwKeyCode = vrKey & 0x00FF; + uint32_t dwFlags = (vrKey & 0xFF00) >> 8; + uint32_t m_dwKeyCode = vrKey & 0x00FF; if (pMsgKey->m_dwFlags == dwFlags && pMsgKey->m_dwKeyCode == m_dwKeyCode) { GenerateCommondEvent(rValue); return TRUE; @@ -92,7 +92,7 @@ FWL_ERR CFWL_NoteLoop::SetMainForm(CFWL_WidgetImp* pForm) { m_pForm = pForm; return FWL_ERR_Succeeded; } -void CFWL_NoteLoop::GenerateCommondEvent(FX_DWORD dwCommand) { +void CFWL_NoteLoop::GenerateCommondEvent(uint32_t dwCommand) { CFWL_EvtMenuCommand ev; ev.m_iCommand = dwCommand; IFWL_NoteThread* pThread = m_pForm->GetOwnerThread(); @@ -165,8 +165,8 @@ FX_BOOL CFWL_NoteDriver::SendNote(CFWL_Note* pNote) { #define FWL_NoteDriver_EventKey 1100 FWL_ERR CFWL_NoteDriver::RegisterEventTarget(IFWL_Widget* pListener, IFWL_Widget* pEventSource, - FX_DWORD dwFilter) { - FX_DWORD dwkey = (FX_DWORD)(uintptr_t)pListener->GetPrivateData( + uint32_t dwFilter) { + uint32_t dwkey = (uint32_t)(uintptr_t)pListener->GetPrivateData( (void*)(uintptr_t)FWL_NoteDriver_EventKey); if (dwkey == 0) { void* random = FX_Random_MT_Start(0); @@ -184,7 +184,7 @@ FWL_ERR CFWL_NoteDriver::RegisterEventTarget(IFWL_Widget* pListener, return FWL_ERR_Succeeded; } FWL_ERR CFWL_NoteDriver::UnregisterEventTarget(IFWL_Widget* pListener) { - FX_DWORD dwkey = (FX_DWORD)(uintptr_t)pListener->GetPrivateData( + uint32_t dwkey = (uint32_t)(uintptr_t)pListener->GetPrivateData( (void*)(uintptr_t)FWL_NoteDriver_EventKey); if (dwkey == 0) { return FWL_ERR_Indefinite; @@ -847,7 +847,7 @@ CFWL_EventTarget::~CFWL_EventTarget() { m_eventSources.RemoveAll(); } int32_t CFWL_EventTarget::SetEventSource(IFWL_Widget* pSource, - FX_DWORD dwFilter) { + uint32_t dwFilter) { if (pSource) { m_eventSources.SetAt(pSource, dwFilter); return m_eventSources.GetCount(); @@ -865,7 +865,7 @@ FX_BOOL CFWL_EventTarget::ProcessEvent(CFWL_Event* pEvent) { FX_POSITION pos = m_eventSources.GetStartPosition(); while (pos) { IFWL_Widget* pSource = NULL; - FX_DWORD dwFilter = 0; + uint32_t dwFilter = 0; m_eventSources.GetNextAssoc(pos, (void*&)pSource, dwFilter); if (pSource == pEvent->m_pSrcTarget || pEvent->GetClassID() == FWL_EVTHASH_Idle) { @@ -877,7 +877,7 @@ FX_BOOL CFWL_EventTarget::ProcessEvent(CFWL_Event* pEvent) { } return FALSE; } -FX_BOOL CFWL_EventTarget::IsFilterEvent(CFWL_Event* pEvent, FX_DWORD dwFilter) { +FX_BOOL CFWL_EventTarget::IsFilterEvent(CFWL_Event* pEvent, uint32_t dwFilter) { if (dwFilter == FWL_EVENT_ALL_MASK) { return TRUE; } diff --git a/xfa/fwl/core/fwl_panelimp.cpp b/xfa/fwl/core/fwl_panelimp.cpp index 3d1bf9a84d..fce89fb465 100644 --- a/xfa/fwl/core/fwl_panelimp.cpp +++ b/xfa/fwl/core/fwl_panelimp.cpp @@ -42,7 +42,7 @@ FWL_ERR CFWL_PanelImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_Panel; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_PanelImp::GetClassID() const { +uint32_t CFWL_PanelImp::GetClassID() const { return FWL_CLASSHASH_Panel; } FWL_ERR CFWL_PanelImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { diff --git a/xfa/fwl/core/fwl_sdadapterimp.cpp b/xfa/fwl/core/fwl_sdadapterimp.cpp index 1d69defcac..2e9d740e40 100644 --- a/xfa/fwl/core/fwl_sdadapterimp.cpp +++ b/xfa/fwl/core/fwl_sdadapterimp.cpp @@ -86,7 +86,7 @@ FWL_ERR CFWL_SDAdapterWidgetMgr::SetBorderRegion(IFWL_Widget* pWidget, return FWL_ERR_Succeeded; } FWL_ERR CFWL_SDAdapterWidgetMgr::SetTransparent(IFWL_Widget* pWidget, - FX_DWORD dwAlpha) { + uint32_t dwAlpha) { return FWL_ERR_Succeeded; } FWL_ERR CFWL_SDAdapterWidgetMgr::SetFullScreen(IFWL_Widget* pWidget, @@ -113,7 +113,7 @@ FWL_ERR CFWL_SDAdapterWidgetMgr::ReleaseWidgetDC(IFWL_Widget* pWidget, void* CFWL_SDAdapterWidgetMgr::GetWindow(IFWL_Widget* pWidget) { return NULL; } -FX_DWORD CFWL_SDAdapterWidgetMgr::GetKeyState(FX_DWORD dwVirtKey) { +uint32_t CFWL_SDAdapterWidgetMgr::GetKeyState(uint32_t dwVirtKey) { return 0; } FWL_ERR CFWL_SDAdapterWidgetMgr::RunLoop(IFWL_Widget* widget) { diff --git a/xfa/fwl/core/fwl_targetimp.cpp b/xfa/fwl/core/fwl_targetimp.cpp index d1f92d0307..e3e768085a 100644 --- a/xfa/fwl/core/fwl_targetimp.cpp +++ b/xfa/fwl/core/fwl_targetimp.cpp @@ -9,7 +9,7 @@ FWL_ERR IFWL_Target::GetClassName(CFX_WideString& wsClass) const { return m_pImpl->GetClassName(wsClass); } -FX_DWORD IFWL_Target::GetClassID() const { +uint32_t IFWL_Target::GetClassID() const { return m_pImpl->GetClassID(); } FX_BOOL IFWL_Target::IsInstance(const CFX_WideStringC& wsClass) const { @@ -30,7 +30,7 @@ FWL_ERR CFWL_TargetImp::GetClassName(CFX_WideString& wsClass) const { wsClass.Empty(); return FWL_ERR_Succeeded; } -FX_DWORD CFWL_TargetImp::GetClassID() const { +uint32_t CFWL_TargetImp::GetClassID() const { return 0; } FX_BOOL CFWL_TargetImp::IsInstance(const CFX_WideStringC& wsClass) const { diff --git a/xfa/fwl/core/fwl_timerimp.cpp b/xfa/fwl/core/fwl_timerimp.cpp index b9cb478a18..1dfed0c584 100644 --- a/xfa/fwl/core/fwl_timerimp.cpp +++ b/xfa/fwl/core/fwl_timerimp.cpp @@ -13,7 +13,7 @@ #include "xfa/fwl/core/include/ifwl_adaptertimermgr.h" FWL_HTIMER FWL_StartTimer(IFWL_Timer* pTimer, - FX_DWORD dwElapse, + uint32_t dwElapse, FX_BOOL bImmediately) { IFWL_AdapterNative* pAdapterNative = FWL_GetAdapterNative(); if (!pAdapterNative) diff --git a/xfa/fwl/core/fwl_widgetimp.cpp b/xfa/fwl/core/fwl_widgetimp.cpp index fdc192756d..961b60e172 100644 --- a/xfa/fwl/core/fwl_widgetimp.cpp +++ b/xfa/fwl/core/fwl_widgetimp.cpp @@ -61,26 +61,26 @@ FWL_ERR IFWL_Widget::SetOwner(IFWL_Widget* pOwner) { IFWL_Widget* IFWL_Widget::GetOuter() { return static_cast<CFWL_WidgetImp*>(GetImpl())->GetOuter(); } -FX_DWORD IFWL_Widget::GetStyles() { +uint32_t IFWL_Widget::GetStyles() { return static_cast<CFWL_WidgetImp*>(GetImpl())->GetStyles(); } -FWL_ERR IFWL_Widget::ModifyStyles(FX_DWORD dwStylesAdded, - FX_DWORD dwStylesRemoved) { +FWL_ERR IFWL_Widget::ModifyStyles(uint32_t dwStylesAdded, + uint32_t dwStylesRemoved) { return static_cast<CFWL_WidgetImp*>(GetImpl()) ->ModifyStyles(dwStylesAdded, dwStylesRemoved); } -FX_DWORD IFWL_Widget::GetStylesEx() { +uint32_t IFWL_Widget::GetStylesEx() { return static_cast<CFWL_WidgetImp*>(GetImpl())->GetStylesEx(); } -FWL_ERR IFWL_Widget::ModifyStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR IFWL_Widget::ModifyStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { return static_cast<CFWL_WidgetImp*>(GetImpl()) ->ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); } -FX_DWORD IFWL_Widget::GetStates() { +uint32_t IFWL_Widget::GetStates() { return static_cast<CFWL_WidgetImp*>(GetImpl())->GetStates(); } -FWL_ERR IFWL_Widget::SetStates(FX_DWORD dwStates, FX_BOOL bSet) { +FWL_ERR IFWL_Widget::SetStates(uint32_t dwStates, FX_BOOL bSet) { return static_cast<CFWL_WidgetImp*>(GetImpl())->SetStates(dwStates, bSet); } FWL_ERR IFWL_Widget::SetPrivateData(void* module_id, @@ -101,7 +101,7 @@ FWL_ERR IFWL_Widget::LockUpdate() { FWL_ERR IFWL_Widget::UnlockUpdate() { return static_cast<CFWL_WidgetImp*>(GetImpl())->UnlockUpdate(); } -FX_DWORD IFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t IFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) { return static_cast<CFWL_WidgetImp*>(GetImpl())->HitTest(fx, fy); } FWL_ERR IFWL_Widget::TransformTo(IFWL_Widget* pWidget, @@ -258,25 +258,25 @@ FWL_ERR CFWL_WidgetImp::SetOwner(IFWL_Widget* pOwner) { IFWL_Widget* CFWL_WidgetImp::GetOuter() { return m_pOuter; } -FX_DWORD CFWL_WidgetImp::GetStyles() { +uint32_t CFWL_WidgetImp::GetStyles() { return m_pProperties->m_dwStyles; } -FWL_ERR CFWL_WidgetImp::ModifyStyles(FX_DWORD dwStylesAdded, - FX_DWORD dwStylesRemoved) { +FWL_ERR CFWL_WidgetImp::ModifyStyles(uint32_t dwStylesAdded, + uint32_t dwStylesRemoved) { m_pProperties->m_dwStyles = (m_pProperties->m_dwStyles & ~dwStylesRemoved) | dwStylesAdded; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_WidgetImp::GetStylesEx() { +uint32_t CFWL_WidgetImp::GetStylesEx() { return m_pProperties->m_dwStyleExes; } -FWL_ERR CFWL_WidgetImp::ModifyStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR CFWL_WidgetImp::ModifyStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { m_pProperties->m_dwStyleExes = (m_pProperties->m_dwStyleExes & ~dwStylesExRemoved) | dwStylesExAdded; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_WidgetImp::GetStates() { +uint32_t CFWL_WidgetImp::GetStates() { return m_pProperties->m_dwStates; } static void NotifyHideChildWidget(IFWL_WidgetMgr* widgetMgr, @@ -289,7 +289,7 @@ static void NotifyHideChildWidget(IFWL_WidgetMgr* widgetMgr, child = widgetMgr->GetWidget(child, FWL_WGTRELATION_NextSibling); } } -FWL_ERR CFWL_WidgetImp::SetStates(FX_DWORD dwStates, FX_BOOL bSet) { +FWL_ERR CFWL_WidgetImp::SetStates(uint32_t dwStates, FX_BOOL bSet) { bSet ? (m_pProperties->m_dwStates |= dwStates) : (m_pProperties->m_dwStates &= ~dwStates); FWL_ERR ret = FWL_ERR_Succeeded; @@ -340,7 +340,7 @@ FWL_ERR CFWL_WidgetImp::UnlockUpdate() { } return FWL_ERR_Succeeded; } -FX_DWORD CFWL_WidgetImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_WidgetImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) { CFX_RectF rtClient; GetClientRect(rtClient); if (rtClient.Contains(fx, fy)) { @@ -592,7 +592,7 @@ FX_FLOAT CFWL_WidgetImp::GetBorderSize(FX_BOOL bCX) { return *pfBorder; } FX_FLOAT CFWL_WidgetImp::GetEdgeWidth() { - FX_DWORD dwCapacity = 0; + uint32_t dwCapacity = 0; switch (m_pProperties->m_dwStyles & FWL_WGTSTYLE_EdgeMask) { case FWL_WGTSTYLE_EdgeFlat: { dwCapacity = FWL_WGTCAPACITY_EdgeFlat; @@ -617,7 +617,7 @@ void CFWL_WidgetImp::GetRelativeRect(CFX_RectF& rect) { rect = m_pProperties->m_rtWidget; rect.left = rect.top = 0; } -void* CFWL_WidgetImp::GetThemeCapacity(FX_DWORD dwCapacity) { +void* CFWL_WidgetImp::GetThemeCapacity(uint32_t dwCapacity) { IFWL_ThemeProvider* pTheme = GetAvailableTheme(); if (!pTheme) return NULL; @@ -680,7 +680,7 @@ CFX_SizeF CFWL_WidgetImp::CalcTextSize(const CFX_WideString& wsText, } void CFWL_WidgetImp::CalcTextRect(const CFX_WideString& wsText, IFWL_ThemeProvider* pTheme, - FX_DWORD dwTTOStyles, + uint32_t dwTTOStyles, int32_t iTTOAlign, CFX_RectF& rect) { CFWL_ThemeText calPart; @@ -823,7 +823,7 @@ FX_BOOL CFWL_WidgetImp::GetScreenSize(FX_FLOAT& fx, FX_FLOAT& fy) { return FALSE; } void CFWL_WidgetImp::RegisterEventTarget(IFWL_Widget* pEventSource, - FX_DWORD dwFilter) { + uint32_t dwFilter) { IFWL_NoteThread* pThread = GetOwnerThread(); if (!pThread) return; @@ -969,7 +969,7 @@ int32_t CFWL_WidgetImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { return 0; CFWL_WidgetImp* pWidget = static_cast<CFWL_WidgetImp*>(pMessage->m_pDstTarget->GetImpl()); - FX_DWORD dwMsgCode = pMessage->GetClassID(); + uint32_t dwMsgCode = pMessage->GetClassID(); switch (dwMsgCode) { case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMsgMouse = static_cast<CFWL_MsgMouse*>(pMessage); @@ -1089,11 +1089,11 @@ void FWL_SetWidgetRect(IFWL_Widget* widget, const CFX_RectF& rect) { static_cast<CFWL_WidgetImp*>(widget->GetImpl())->m_pProperties->m_rtWidget = rect; } -void FWL_SetWidgetStates(IFWL_Widget* widget, FX_DWORD dwStates) { +void FWL_SetWidgetStates(IFWL_Widget* widget, uint32_t dwStates) { static_cast<CFWL_WidgetImp*>(widget->GetImpl())->m_pProperties->m_dwStates = dwStates; } -void FWL_SetWidgetStyles(IFWL_Widget* widget, FX_DWORD dwStyles) { +void FWL_SetWidgetStyles(IFWL_Widget* widget, uint32_t dwStyles) { static_cast<CFWL_WidgetImp*>(widget->GetImpl())->m_pProperties->m_dwStyles = dwStyles; } diff --git a/xfa/fwl/core/fwl_widgetmgrimp.cpp b/xfa/fwl/core/fwl_widgetmgrimp.cpp index 9a9b2d6f24..97a3cbc1f1 100644 --- a/xfa/fwl/core/fwl_widgetmgrimp.cpp +++ b/xfa/fwl/core/fwl_widgetmgrimp.cpp @@ -664,7 +664,7 @@ FX_BOOL CFWL_WidgetMgr::IsAbleNative(IFWL_Widget* pWidget) { if (!pWidget->IsInstance(FX_WSTRC(FWL_CLASS_Form))) { return FALSE; } - FX_DWORD dwStyles = pWidget->GetStyles(); + uint32_t dwStyles = pWidget->GetStyles(); return ((dwStyles & FWL_WGTSTYLE_WindowTypeMask) == FWL_WGTSTYLE_OverLapper) || (dwStyles & FWL_WGTSTYLE_Popup); @@ -686,7 +686,7 @@ FX_BOOL CFWL_WidgetMgr::GetAdapterPopupPos(IFWL_Widget* pWidget, } CFWL_WidgetMgrDelegate::CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr) : m_pWidgetMgr(pWidgetMgr) {} -FWL_ERR CFWL_WidgetMgrDelegate::OnSetCapability(FX_DWORD dwCapability) { +FWL_ERR CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) { m_pWidgetMgr->m_dwCapability = dwCapability; return FWL_ERR_Succeeded; } diff --git a/xfa/fwl/lightwidget/caret.cpp b/xfa/fwl/lightwidget/caret.cpp index 5415aa5560..9c2b90b22a 100644 --- a/xfa/fwl/lightwidget/caret.cpp +++ b/xfa/fwl/lightwidget/caret.cpp @@ -35,10 +35,10 @@ FWL_ERR CFWL_Caret::Initialize(const CFWL_WidgetProperties* pProperties) { FWL_ERR CFWL_Caret::ShowCaret(FX_BOOL bFlag) { return static_cast<IFWL_Caret*>(m_pIface)->ShowCaret(bFlag); } -FWL_ERR CFWL_Caret::GetFrequency(FX_DWORD& elapse) { +FWL_ERR CFWL_Caret::GetFrequency(uint32_t& elapse) { return static_cast<IFWL_Caret*>(m_pIface)->GetFrequency(elapse); } -FWL_ERR CFWL_Caret::SetFrequency(FX_DWORD elapse) { +FWL_ERR CFWL_Caret::SetFrequency(uint32_t elapse) { return static_cast<IFWL_Caret*>(m_pIface)->SetFrequency(elapse); } FWL_ERR CFWL_Caret::SetColor(CFX_Color crFill) { diff --git a/xfa/fwl/lightwidget/combobox.cpp b/xfa/fwl/lightwidget/combobox.cpp index 7ea1370341..65b1081832 100644 --- a/xfa/fwl/lightwidget/combobox.cpp +++ b/xfa/fwl/lightwidget/combobox.cpp @@ -230,8 +230,8 @@ FWL_ERR CFWL_ComboBox::GetBBox(CFX_RectF& rect) { return FALSE; return static_cast<IFWL_ComboBox*>(m_pIface)->GetBBox(rect); } -FWL_ERR CFWL_ComboBox::EditModifyStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR CFWL_ComboBox::EditModifyStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { if (!m_pIface) return FALSE; return static_cast<IFWL_ComboBox*>(m_pIface) @@ -272,7 +272,7 @@ FX_BOOL CFWL_ComboBox::CFWL_ComboBoxDP::SetItemIndex(IFWL_Widget* pWidget, m_ItemArray[nIndex].reset(reinterpret_cast<CFWL_ComboBoxItem*>(hItem)); return TRUE; } -FX_DWORD CFWL_ComboBox::CFWL_ComboBoxDP::GetItemStyles(IFWL_Widget* pWidget, +uint32_t CFWL_ComboBox::CFWL_ComboBoxDP::GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) { if (!hItem) return 0; @@ -305,7 +305,7 @@ void* CFWL_ComboBox::CFWL_ComboBoxDP::GetItemData(IFWL_Widget* pWidget, } FWL_ERR CFWL_ComboBox::CFWL_ComboBoxDP::SetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem, - FX_DWORD dwStyle) { + uint32_t dwStyle) { if (!hItem) return FWL_ERR_Indefinite; reinterpret_cast<CFWL_ComboBoxItem*>(hItem)->m_dwStyles = dwStyle; @@ -351,7 +351,7 @@ FWL_ERR CFWL_ComboBox::CFWL_ComboBoxDP::SetItemCheckRect( pItem->m_rtCheckBox = rtCheck; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_ComboBox::CFWL_ComboBoxDP::GetItemCheckState( +uint32_t CFWL_ComboBox::CFWL_ComboBoxDP::GetItemCheckState( IFWL_Widget* pWidget, FWL_HLISTITEM hItem) { CFWL_ComboBoxItem* pItem = reinterpret_cast<CFWL_ComboBoxItem*>(hItem); @@ -360,7 +360,7 @@ FX_DWORD CFWL_ComboBox::CFWL_ComboBoxDP::GetItemCheckState( FWL_ERR CFWL_ComboBox::CFWL_ComboBoxDP::SetItemCheckState( IFWL_Widget* pWidget, FWL_HLISTITEM hItem, - FX_DWORD dwCheckState) { + uint32_t dwCheckState) { CFWL_ComboBoxItem* pItem = reinterpret_cast<CFWL_ComboBoxItem*>(hItem); pItem->m_dwCheckState = dwCheckState; return FWL_ERR_Succeeded; diff --git a/xfa/fwl/lightwidget/datetimepicker.cpp b/xfa/fwl/lightwidget/datetimepicker.cpp index 3372c53829..a3ace90c2d 100644 --- a/xfa/fwl/lightwidget/datetimepicker.cpp +++ b/xfa/fwl/lightwidget/datetimepicker.cpp @@ -136,8 +136,8 @@ FWL_ERR CFWL_DateTimePicker::GetBBox(CFX_RectF& rect) { FWL_ERR CFWL_DateTimePicker::SetEditLimit(int32_t nLimit) { return static_cast<IFWL_DateTimePicker*>(m_pIface)->SetEditLimit(nLimit); } -FWL_ERR CFWL_DateTimePicker::ModifyEditStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR CFWL_DateTimePicker::ModifyEditStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { return static_cast<IFWL_DateTimePicker*>(m_pIface) ->ModifyEditStylesEx(dwStylesExAdded, dwStylesExRemoved); } diff --git a/xfa/fwl/lightwidget/edit.cpp b/xfa/fwl/lightwidget/edit.cpp index 612d5a4ac2..efceb4e39f 100644 --- a/xfa/fwl/lightwidget/edit.cpp +++ b/xfa/fwl/lightwidget/edit.cpp @@ -161,7 +161,7 @@ FWL_ERR CFWL_Edit::SetNumberRange(int32_t iMin, int32_t iMax) { } return static_cast<IFWL_Edit*>(m_pIface)->SetNumberRange(iMin, iMax); } -FWL_ERR CFWL_Edit::SetBackColor(FX_DWORD dwColor) { +FWL_ERR CFWL_Edit::SetBackColor(uint32_t dwColor) { if (!m_pIface) return FWL_ERR_Indefinite; return static_cast<IFWL_Edit*>(m_pIface)->SetBackColor(dwColor); diff --git a/xfa/fwl/lightwidget/listbox.cpp b/xfa/fwl/lightwidget/listbox.cpp index 6a7a26cd1b..7913727775 100644 --- a/xfa/fwl/lightwidget/listbox.cpp +++ b/xfa/fwl/lightwidget/listbox.cpp @@ -174,7 +174,7 @@ FWL_HLISTITEM CFWL_ListBox::GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy) { } return NULL; } -FX_DWORD CFWL_ListBox::GetItemStates(FWL_HLISTITEM hItem) { +uint32_t CFWL_ListBox::GetItemStates(FWL_HLISTITEM hItem) { if (!hItem) return 0; CFWL_ListItem* pItem = reinterpret_cast<CFWL_ListItem*>(hItem); @@ -216,7 +216,7 @@ FX_BOOL CFWL_ListBox::CFWL_ListBoxDP::SetItemIndex(IFWL_Widget* pWidget, m_ItemArray[nIndex].reset(reinterpret_cast<CFWL_ListItem*>(hItem)); return TRUE; } -FX_DWORD CFWL_ListBox::CFWL_ListBoxDP::GetItemStyles(IFWL_Widget* pWidget, +uint32_t CFWL_ListBox::CFWL_ListBoxDP::GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) { if (!hItem) return -1; @@ -248,7 +248,7 @@ void* CFWL_ListBox::CFWL_ListBoxDP::GetItemData(IFWL_Widget* pWidget, } FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem, - FX_DWORD dwStyle) { + uint32_t dwStyle) { if (!hItem) return FWL_ERR_Indefinite; reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwStates = dwStyle; @@ -290,13 +290,13 @@ FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemCheckRect( reinterpret_cast<CFWL_ListItem*>(hItem)->m_rtCheckBox = rtCheck; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_ListBox::CFWL_ListBoxDP::GetItemCheckState(IFWL_Widget* pWidget, +uint32_t CFWL_ListBox::CFWL_ListBoxDP::GetItemCheckState(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) { return reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwCheckState; } FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemCheckState(IFWL_Widget* pWidget, FWL_HLISTITEM hItem, - FX_DWORD dwCheckState) { + uint32_t dwCheckState) { reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwCheckState = dwCheckState; return FWL_ERR_Succeeded; } diff --git a/xfa/fwl/lightwidget/scrollbar.cpp b/xfa/fwl/lightwidget/scrollbar.cpp index a070483183..62f2ffd1e5 100644 --- a/xfa/fwl/lightwidget/scrollbar.cpp +++ b/xfa/fwl/lightwidget/scrollbar.cpp @@ -84,7 +84,7 @@ FWL_ERR CFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) { return FWL_ERR_Indefinite; return static_cast<IFWL_ScrollBar*>(m_pIface)->SetTrackPos(fTrackPos); } -FX_BOOL CFWL_ScrollBar::DoScroll(FX_DWORD dwCode, FX_FLOAT fPos) { +FX_BOOL CFWL_ScrollBar::DoScroll(uint32_t dwCode, FX_FLOAT fPos) { if (!m_pIface) return FALSE; return static_cast<IFWL_ScrollBar*>(m_pIface)->DoScroll(dwCode, fPos); diff --git a/xfa/fwl/lightwidget/theme.cpp b/xfa/fwl/lightwidget/theme.cpp index 950d70e944..59729c1b2d 100644 --- a/xfa/fwl/lightwidget/theme.cpp +++ b/xfa/fwl/lightwidget/theme.cpp @@ -49,14 +49,14 @@ FX_BOOL CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) { return !!GetTheme(pWidget); } -FX_DWORD CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) { +uint32_t CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) { return GetTheme(pWidget)->GetThemeID(pWidget); } -FX_DWORD CFWL_Theme::SetThemeID(IFWL_Widget* pWidget, - FX_DWORD dwThemeID, +uint32_t CFWL_Theme::SetThemeID(IFWL_Widget* pWidget, + uint32_t dwThemeID, FX_BOOL bChildren) { - FX_DWORD dwID; + uint32_t dwID; for (const auto& pTheme : m_ThemesArray) { dwID = pTheme->GetThemeID(pWidget); pTheme->SetThemeID(pWidget, dwThemeID, FALSE); @@ -81,7 +81,7 @@ FX_BOOL CFWL_Theme::DrawText(CFWL_ThemeText* pParams) { return GetTheme(pParams->m_pWidget)->DrawText(pParams); } -void* CFWL_Theme::GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity) { +void* CFWL_Theme::GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity) { return GetTheme(pThemePart->m_pWidget)->GetCapacity(pThemePart, dwCapacity); } diff --git a/xfa/fwl/lightwidget/widget.cpp b/xfa/fwl/lightwidget/widget.cpp index ae1f147502..294604a01b 100644 --- a/xfa/fwl/lightwidget/widget.cpp +++ b/xfa/fwl/lightwidget/widget.cpp @@ -39,7 +39,7 @@ FWL_ERR CFWL_Widget::GetClassName(CFX_WideString& wsClass) const { return FWL_ERR_Indefinite; return m_pIface->GetClassName(wsClass); } -FX_DWORD CFWL_Widget::GetClassID() const { +uint32_t CFWL_Widget::GetClassID() const { if (!m_pIface) return 0; return m_pIface->GetClassID(); @@ -99,32 +99,32 @@ FWL_ERR CFWL_Widget::SetOwner(CFWL_Widget* pOwner) { return FWL_ERR_Indefinite; return FWL_ERR_Succeeded; } -FX_DWORD CFWL_Widget::GetStyles() { +uint32_t CFWL_Widget::GetStyles() { if (!m_pIface) return 0; return m_pIface->GetStyles(); } -FWL_ERR CFWL_Widget::ModifyStyles(FX_DWORD dwStylesAdded, - FX_DWORD dwStylesRemoved) { +FWL_ERR CFWL_Widget::ModifyStyles(uint32_t dwStylesAdded, + uint32_t dwStylesRemoved) { if (!m_pIface) return FWL_ERR_Indefinite; return m_pIface->ModifyStyles(dwStylesAdded, dwStylesRemoved); } -FX_DWORD CFWL_Widget::GetStylesEx() { +uint32_t CFWL_Widget::GetStylesEx() { if (!m_pIface) return 0; return m_pIface->GetStylesEx(); } -FWL_ERR CFWL_Widget::ModifyStylesEx(FX_DWORD dwStylesExAdded, - FX_DWORD dwStylesExRemoved) { +FWL_ERR CFWL_Widget::ModifyStylesEx(uint32_t dwStylesExAdded, + uint32_t dwStylesExRemoved) { return m_pIface->ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); } -FX_DWORD CFWL_Widget::GetStates() { +uint32_t CFWL_Widget::GetStates() { if (!m_pIface) return FWL_ERR_Indefinite; return m_pIface->GetStates(); } -FWL_ERR CFWL_Widget::SetStates(FX_DWORD dwStates, FX_BOOL bSet) { +FWL_ERR CFWL_Widget::SetStates(uint32_t dwStates, FX_BOOL bSet) { if (!m_pIface) return FWL_ERR_Indefinite; return m_pIface->SetStates(dwStates, bSet); @@ -156,7 +156,7 @@ FWL_ERR CFWL_Widget::UnlockUpdate() { return FWL_ERR_Indefinite; return m_pIface->UnlockUpdate(); } -FX_DWORD CFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) { if (!m_pIface) return 0; return m_pIface->HitTest(fx, fy); @@ -251,7 +251,7 @@ FWL_ERR CFWL_Widget::SetGrab(FX_BOOL bSet) { return FWL_ERR_Succeeded; } void CFWL_Widget::RegisterEventTarget(CFWL_Widget* pEventSource, - FX_DWORD dwFilter) { + uint32_t dwFilter) { if (!m_pIface) return; IFWL_NoteThread* pThread = m_pIface->GetOwnerThread(); diff --git a/xfa/fwl/theme/carettp.cpp b/xfa/fwl/theme/carettp.cpp index b1cf5ef65a..a5782f30b6 100644 --- a/xfa/fwl/theme/carettp.cpp +++ b/xfa/fwl/theme/carettp.cpp @@ -37,7 +37,7 @@ FX_BOOL CFWL_CaretTP::DrawBackground(CFWL_ThemeBackground* pParams) { return TRUE; } void CFWL_CaretTP::DrawCaretBK(CFX_Graphics* pGraphics, - FX_DWORD dwStates, + uint32_t dwStates, const CFX_RectF* pRect, CFX_Color* crFill, CFX_Matrix* pMatrix) { diff --git a/xfa/fwl/theme/checkboxtp.cpp b/xfa/fwl/theme/checkboxtp.cpp index e7d206a1a0..ee485fb7ac 100644 --- a/xfa/fwl/theme/checkboxtp.cpp +++ b/xfa/fwl/theme/checkboxtp.cpp @@ -41,8 +41,8 @@ CFWL_CheckBoxTP::~CFWL_CheckBoxTP() { FX_BOOL CFWL_CheckBoxTP::IsValidWidget(IFWL_Widget* pWidget) { return pWidget && pWidget->GetClassID() == FWL_CLASSHASH_CheckBox; } -FX_DWORD CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget, - FX_DWORD dwThemeID, +uint32_t CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget, + uint32_t dwThemeID, FX_BOOL bChildren) { if (m_pThemeData) { SetThemeData(FWL_GetThemeColor(dwThemeID)); @@ -111,11 +111,11 @@ FWL_ERR CFWL_CheckBoxTP::Finalize() { void CFWL_CheckBoxTP::DrawBoxBk(IFWL_Widget* pWidget, CFX_Graphics* pGraphics, const CFX_RectF* pRect, - FX_DWORD dwStates, + uint32_t dwStates, CFX_Matrix* pMatrix) { dwStates &= 0x03; int32_t fillMode = FXFILL_WINDING; - FX_DWORD dwStyleEx = pWidget->GetStylesEx(); + uint32_t dwStyleEx = pWidget->GetStylesEx(); dwStyleEx &= FWL_STYLEEXT_CKB_ShapeMask; CFX_Path path; path.Create(); @@ -176,11 +176,11 @@ void CFWL_CheckBoxTP::DrawBoxBk(IFWL_Widget* pWidget, void CFWL_CheckBoxTP::DrawSign(IFWL_Widget* pWidget, CFX_Graphics* pGraphics, const CFX_RectF* pRtBox, - FX_DWORD dwStates, + uint32_t dwStates, CFX_Matrix* pMatrix) { CFX_RectF rtSign(*pRtBox); rtSign.Deflate(CHECKBOX_SIZE_SIGNMARGIN, CHECKBOX_SIZE_SIGNMARGIN); - FX_DWORD dwColor = m_pThemeData->clrSignCheck; + uint32_t dwColor = m_pThemeData->clrSignCheck; FX_BOOL bCheck = TRUE; if (((dwStates & FWL_PARTSTATE_CKB_Mask1) == FWL_PARTSTATE_CKB_Disabled) && ((dwStates & FWL_PARTSTATE_CKB_Mask2) == FWL_PARTSTATE_CKB_Checked)) { @@ -209,7 +209,7 @@ void CFWL_CheckBoxTP::DrawSign(IFWL_Widget* pWidget, } } if (bCheck) { - FX_DWORD dwStyle = pWidget->GetStylesEx(); + uint32_t dwStyle = pWidget->GetStylesEx(); switch (dwStyle & FWL_STYLEEXT_CKB_SignShapeMask) { case FWL_STYLEEXT_CKB_SignShapeCheck: { DrawSignCheck(pGraphics, &rtSign, dwColor, pMatrix); @@ -393,8 +393,8 @@ void CFWL_CheckBoxTP::DrawSignBorder(IFWL_Widget* pWidget, } } } -void CFWL_CheckBoxTP::SetThemeData(FX_DWORD dwID) { - FX_DWORD* pData = (FX_DWORD*)&m_pThemeData->clrBoxBk; +void CFWL_CheckBoxTP::SetThemeData(uint32_t dwID) { + uint32_t* pData = (uint32_t*)&m_pThemeData->clrBoxBk; if (dwID) { *pData++ = 0, *pData++ = 0, *pData++ = ArgbEncode(255, 220, 220, 215), *pData++ = ArgbEncode(255, 255, 255, 255), diff --git a/xfa/fwl/theme/comboboxtp.cpp b/xfa/fwl/theme/comboboxtp.cpp index 23b1320fe3..578793b002 100644 --- a/xfa/fwl/theme/comboboxtp.cpp +++ b/xfa/fwl/theme/comboboxtp.cpp @@ -72,7 +72,7 @@ FX_BOOL CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { return TRUE; } void CFWL_ComboBoxTP::DrawStrethHandler(CFWL_ThemeBackground* pParams, - FX_DWORD dwStates, + uint32_t dwStates, CFX_Matrix* pMatrix) { CFX_Path path; path.Create(); @@ -83,7 +83,7 @@ void CFWL_ComboBoxTP::DrawStrethHandler(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix); } void* CFWL_ComboBoxTP::GetCapacity(CFWL_ThemePart* pThemePart, - FX_DWORD dwCapacity) { + uint32_t dwCapacity) { if (dwCapacity == FWL_WGTCAPACITY_CMB_ComboFormHandler) { m_fValue = FWLTHEME_CAPACITY_ComboFormHandler; return &m_fValue; @@ -92,7 +92,7 @@ void* CFWL_ComboBoxTP::GetCapacity(CFWL_ThemePart* pThemePart, } #ifdef THEME_XPSimilar void CFWL_ComboBoxTP::DrawDropDownButton(CFWL_ThemeBackground* pParams, - FX_DWORD dwStates, + uint32_t dwStates, CFX_Matrix* pMatrix) { FWLTHEME_STATE eState = FWLTHEME_STATE_Normal; switch (dwStates) { @@ -119,7 +119,7 @@ void CFWL_ComboBoxTP::DrawDropDownButton(CFWL_ThemeBackground* pParams, } #else void CFWL_ComboBoxTP::DrawDropDownButton(CFWL_ThemeBackground* pParams, - FX_DWORD dwStates, + uint32_t dwStates, CFX_Matrix* pMatrix) { FX_BOOL bPressed = ((pParams->m_dwStates & FWL_CMBPARTSTATE_Pressed) == FWL_CMBPARTSTATE_Pressed); diff --git a/xfa/fwl/theme/datetimepickertp.cpp b/xfa/fwl/theme/datetimepickertp.cpp index 99c5ccb448..63fbc13110 100644 --- a/xfa/fwl/theme/datetimepickertp.cpp +++ b/xfa/fwl/theme/datetimepickertp.cpp @@ -45,7 +45,7 @@ FX_BOOL CFWL_DateTimePickerTP::DrawBackground(CFWL_ThemeBackground* pParams) { #ifdef THEME_XPSimilar void CFWL_DateTimePickerTP::DrawDropDownButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix) { - FX_DWORD dwStates = pParams->m_dwStates; + uint32_t dwStates = pParams->m_dwStates; dwStates &= 0x03; FWLTHEME_STATE eState = FWLTHEME_STATE_Normal; switch (eState & dwStates) { @@ -111,7 +111,7 @@ void CFWL_DateTimePickerTP::DrawDropDownButton(CFWL_ThemeBackground* pParams, } #endif void CFWL_DateTimePickerTP::initThemeData() { - FX_DWORD* pData = (FX_DWORD*)&m_pThemeData->BoxBkColor; + uint32_t* pData = (uint32_t*)&m_pThemeData->BoxBkColor; *pData++ = 0, *pData++ = 0, *pData++ = ArgbEncode(255, 220, 220, 215), *pData++ = ArgbEncode(255, 255, 255, 255), *pData++ = ArgbEncode(255, 255, 240, 207), diff --git a/xfa/fwl/theme/formtp.cpp b/xfa/fwl/theme/formtp.cpp index 67ef025f7e..28a8805dee 100644 --- a/xfa/fwl/theme/formtp.cpp +++ b/xfa/fwl/theme/formtp.cpp @@ -62,11 +62,11 @@ FWL_ERR CFWL_FormTP::Finalize() { FX_BOOL CFWL_FormTP::IsValidWidget(IFWL_Widget* pWidget) { if (!pWidget) return FALSE; - FX_DWORD dwHash = pWidget->GetClassID(); + uint32_t dwHash = pWidget->GetClassID(); return dwHash == FWL_CLASSHASH_Form; } -FX_DWORD CFWL_FormTP::SetThemeID(IFWL_Widget* pWidget, - FX_DWORD dwThemeID, +uint32_t CFWL_FormTP::SetThemeID(IFWL_Widget* pWidget, + uint32_t dwThemeID, FX_BOOL bChildren) { if (m_pThemeData) { SetThemeData(FWL_GetThemeColor(dwThemeID)); @@ -159,7 +159,7 @@ FX_BOOL CFWL_FormTP::DrawText(CFWL_ThemeText* pParams) { return CFWL_WidgetTP::DrawText(pParams); } void* CFWL_FormTP::GetCapacity(CFWL_ThemePart* pThemePart, - FX_DWORD dwCapacity) { + uint32_t dwCapacity) { FX_BOOL bDefPro = FALSE; FX_BOOL bDwordVal = FALSE; switch (dwCapacity) { @@ -230,7 +230,7 @@ FWL_ERR CFWL_FormTP::GetPartRect(CFWL_ThemePart* pThemePart, return FWL_ERR_Succeeded; } void CFWL_FormTP::CalCloseBox(IFWL_Widget* pWidget, CFX_RectF& rect) { - FX_DWORD dwStyles = pWidget->GetStyles(); + uint32_t dwStyles = pWidget->GetStyles(); CFX_RectF rtWidget; pWidget->GetWidgetRect(rtWidget); rtWidget.Offset(-rtWidget.left, -rtWidget.top); @@ -244,7 +244,7 @@ void CFWL_FormTP::CalCloseBox(IFWL_Widget* pWidget, CFX_RectF& rect) { } } void CFWL_FormTP::CalMaxBox(IFWL_Widget* pWidget, CFX_RectF& rect) { - FX_DWORD dwStyles = pWidget->GetStyles(); + uint32_t dwStyles = pWidget->GetStyles(); CFX_RectF rtWidget; pWidget->GetWidgetRect(rtWidget); rtWidget.Offset(-rtWidget.left, -rtWidget.top); @@ -260,7 +260,7 @@ void CFWL_FormTP::CalMaxBox(IFWL_Widget* pWidget, CFX_RectF& rect) { } } void CFWL_FormTP::CalMinBox(IFWL_Widget* pWidget, CFX_RectF& rect) { - FX_DWORD dwStyles = pWidget->GetStyles(); + uint32_t dwStyles = pWidget->GetStyles(); CFX_RectF rtWidget; pWidget->GetWidgetRect(rtWidget); rtWidget.Offset(-rtWidget.left, -rtWidget.top); @@ -578,7 +578,7 @@ void CFWL_FormTP::DrawIconImage(CFX_Graphics* pGraphics, int32_t iActive) { pGraphics->StretchImage(pDIBitmap, *pRect, pMatrix); } -void CFWL_FormTP::SetThemeData(FX_DWORD dwID) { +void CFWL_FormTP::SetThemeData(uint32_t dwID) { m_pThemeData->clrTransWhite = ArgbEncode(0x65, 255, 255, 255); m_pThemeData->clrCloseBtBKStart[0][0] = ArgbEncode(0xff, 240, 166, 148); m_pThemeData->clrCloseBtBKEnd[0][0] = ArgbEncode(0xff, 228, 61, 5); diff --git a/xfa/fwl/theme/listboxtp.cpp b/xfa/fwl/theme/listboxtp.cpp index 0022e06f50..5c38166afa 100644 --- a/xfa/fwl/theme/listboxtp.cpp +++ b/xfa/fwl/theme/listboxtp.cpp @@ -53,7 +53,7 @@ FX_BOOL CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { break; } case FWL_PART_LTB_Check: { - FX_DWORD color = 0xFF000000; + uint32_t color = 0xFF000000; if (pParams->m_dwStates == FWL_PARTSTATE_LTB_Checked) { color = 0xFFFF0000; } else if (pParams->m_dwStates == FWL_PARTSTATE_LTB_UnChecked) { @@ -75,7 +75,7 @@ FWL_ERR CFWL_ListBoxTP::Finalize() { return CFWL_WidgetTP::Finalize(); } void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics* pGraphics, - FX_DWORD dwStates, + uint32_t dwStates, const CFX_RectF* prtItem, void* pData, CFX_Matrix* pMatrix) { diff --git a/xfa/fwl/theme/monthcalendartp.cpp b/xfa/fwl/theme/monthcalendartp.cpp index 832adde73a..2ae154860a 100644 --- a/xfa/fwl/theme/monthcalendartp.cpp +++ b/xfa/fwl/theme/monthcalendartp.cpp @@ -71,8 +71,8 @@ FX_BOOL CFWL_MonthCalendarTP::IsValidWidget(IFWL_Widget* pWidget) { return FALSE; return pWidget->GetClassID() == FWL_CLASSHASH_MonthCalendar; } -FX_DWORD CFWL_MonthCalendarTP::SetThemeID(IFWL_Widget* pWidget, - FX_DWORD dwThemeID, +uint32_t CFWL_MonthCalendarTP::SetThemeID(IFWL_Widget* pWidget, + uint32_t dwThemeID, FX_BOOL bChildren) { if (m_pThemeData) { SetThemeData(FWL_GetThemeColor(dwThemeID)); @@ -160,7 +160,7 @@ FX_BOOL CFWL_MonthCalendarTP::DrawText(CFWL_ThemeText* pParams) { return CFWL_WidgetTP::DrawText(pParams); } void* CFWL_MonthCalendarTP::GetCapacity(CFWL_ThemePart* pThemePart, - FX_DWORD dwCapacity) { + uint32_t dwCapacity) { FX_BOOL bDefPro = FALSE; FX_BOOL bDwordVal = FALSE; switch (dwCapacity) { @@ -558,7 +558,7 @@ FX_BOOL CFWL_MonthCalendarTP::DrawTodayCircle(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->RestoreGraphState(); return TRUE; } -FWLTHEME_STATE CFWL_MonthCalendarTP::GetState(FX_DWORD dwFWLStates) { +FWLTHEME_STATE CFWL_MonthCalendarTP::GetState(uint32_t dwFWLStates) { if (dwFWLStates & FWL_PARTSTATE_MCD_Hovered) { return FWLTHEME_STATE_Hover; } else if (dwFWLStates & FWL_PARTSTATE_MCD_Pressed) { @@ -566,7 +566,7 @@ FWLTHEME_STATE CFWL_MonthCalendarTP::GetState(FX_DWORD dwFWLStates) { } return FWLTHEME_STATE_Normal; } -void CFWL_MonthCalendarTP::SetThemeData(FX_DWORD dwThemeID) { +void CFWL_MonthCalendarTP::SetThemeData(uint32_t dwThemeID) { if (dwThemeID == 0) { m_pThemeData->clrCaption = ArgbEncode(0xff, 0, 153, 255); m_pThemeData->clrSeperator = ArgbEncode(0xff, 141, 161, 239); diff --git a/xfa/fwl/theme/pushbuttontp.cpp b/xfa/fwl/theme/pushbuttontp.cpp index 091375094e..00ff3e9737 100644 --- a/xfa/fwl/theme/pushbuttontp.cpp +++ b/xfa/fwl/theme/pushbuttontp.cpp @@ -27,8 +27,8 @@ CFWL_PushButtonTP::~CFWL_PushButtonTP() { FX_BOOL CFWL_PushButtonTP::IsValidWidget(IFWL_Widget* pWidget) { return pWidget->GetClassID() == FWL_CLASSHASH_PushButton; } -FX_DWORD CFWL_PushButtonTP::SetThemeID(IFWL_Widget* pWidget, - FX_DWORD dwThemeID, +uint32_t CFWL_PushButtonTP::SetThemeID(IFWL_Widget* pWidget, + uint32_t dwThemeID, FX_BOOL bChildren) { SetThemeData(FWL_GetThemeColor(dwThemeID)); return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); @@ -96,7 +96,7 @@ FX_BOOL CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) { return TRUE; } void* CFWL_PushButtonTP::GetCapacity(CFWL_ThemePart* pThemePart, - FX_DWORD dwCapacity) { + uint32_t dwCapacity) { if (dwCapacity == FWL_WGTCAPACITY_PSB_Margin) { m_fValue = 0; return &m_fValue; @@ -111,7 +111,7 @@ FWL_ERR CFWL_PushButtonTP::Finalize() { FinalizeTTO(); return CFWL_WidgetTP::Finalize(); } -void CFWL_PushButtonTP::SetThemeData(FX_DWORD dwID) { +void CFWL_PushButtonTP::SetThemeData(uint32_t dwID) { if (dwID) { m_pThemeData->clrBorder[0] = ArgbEncode(255, 55, 98, 6); m_pThemeData->clrBorder[1] = ArgbEncode(255, 55, 98, 6); @@ -156,6 +156,6 @@ void CFWL_PushButtonTP::SetThemeData(FX_DWORD dwID) { m_pThemeData->clrFill[4] = ArgbEncode(255, 245, 244, 234); } } -int32_t CFWL_PushButtonTP::GetColorID(FX_DWORD dwStates) { +int32_t CFWL_PushButtonTP::GetColorID(uint32_t dwStates) { return dwStates &= FWL_PARTSTATE_PSB_Mask; } diff --git a/xfa/fwl/theme/scrollbartp.cpp b/xfa/fwl/theme/scrollbartp.cpp index 2c7bed02da..2df08d68be 100644 --- a/xfa/fwl/theme/scrollbartp.cpp +++ b/xfa/fwl/theme/scrollbartp.cpp @@ -31,15 +31,15 @@ FX_BOOL CFWL_ScrollBarTP::IsValidWidget(IFWL_Widget* pWidget) { return pWidget->GetClassID() == FWL_CLASSHASH_ScrollBar; } void* CFWL_ScrollBarTP::GetCapacity(CFWL_ThemePart* pThemePart, - FX_DWORD dwCapacity) { + uint32_t dwCapacity) { if (dwCapacity == FWL_CAPACITY_SCB_Size) { m_fValue = 5; return &m_fValue; } return CFWL_WidgetTP::GetCapacity(pThemePart, dwCapacity); } -FX_DWORD CFWL_ScrollBarTP::SetThemeID(IFWL_Widget* pWidget, - FX_DWORD dwThemeID, +uint32_t CFWL_ScrollBarTP::SetThemeID(IFWL_Widget* pWidget, + uint32_t dwThemeID, FX_BOOL bChildren) { if (m_pThemeData) { SetThemeData(FWL_GetThemeColor(dwThemeID)); @@ -335,7 +335,7 @@ void CFWL_ScrollBarTP::DrawMaxMinBtn(CFX_Graphics* pGraphics, eState == FWLTHEME_STATE_Pressed, pMatrix); } #endif -void CFWL_ScrollBarTP::SetThemeData(FX_DWORD dwID) { +void CFWL_ScrollBarTP::SetThemeData(uint32_t dwID) { m_pThemeData->clrPawColorLight[3] = ArgbEncode(0xff, 208, 223, 172); m_pThemeData->clrPawColorDark[3] = ArgbEncode(0xff, 140, 157, 115); m_pThemeData->clrBtnBK[3][0] = ArgbEncode(0xff, 164, 180, 139); diff --git a/xfa/fwl/theme/widgettp.cpp b/xfa/fwl/theme/widgettp.cpp index 2eda644838..c87c70c1c2 100644 --- a/xfa/fwl/theme/widgettp.cpp +++ b/xfa/fwl/theme/widgettp.cpp @@ -18,7 +18,7 @@ #include "xfa/fxgraphics/cfx_path.h" #include "xfa/fxgraphics/cfx_shading.h" -static void FWL_SetChildThemeID(IFWL_Widget* pParent, FX_DWORD dwThemeID) { +static void FWL_SetChildThemeID(IFWL_Widget* pParent, uint32_t dwThemeID) { IFWL_WidgetMgr* pWidgetMgr = FWL_GetWidgetMgr(); IFWL_Widget* pChild = pWidgetMgr->GetWidget(pParent, FWL_WGTRELATION_FirstChild); @@ -34,13 +34,13 @@ static void FWL_SetChildThemeID(IFWL_Widget* pParent, FX_DWORD dwThemeID) { FX_BOOL CFWL_WidgetTP::IsValidWidget(IFWL_Widget* pWidget) { return FALSE; } -FX_DWORD CFWL_WidgetTP::GetThemeID(IFWL_Widget* pWidget) { +uint32_t CFWL_WidgetTP::GetThemeID(IFWL_Widget* pWidget) { return m_dwThemeID; } -FX_DWORD CFWL_WidgetTP::SetThemeID(IFWL_Widget* pWidget, - FX_DWORD dwThemeID, +uint32_t CFWL_WidgetTP::SetThemeID(IFWL_Widget* pWidget, + uint32_t dwThemeID, FX_BOOL bChildren) { - FX_DWORD dwOld = m_dwThemeID; + uint32_t dwOld = m_dwThemeID; m_dwThemeID = dwThemeID; if (CFWL_ArrowData::IsInstance()) { CFWL_ArrowData::GetInstance()->SetColorData(FWL_GetThemeColor(dwThemeID)); @@ -81,7 +81,7 @@ FX_BOOL CFWL_WidgetTP::DrawText(CFWL_ThemeText* pParams) { return TRUE; } void* CFWL_WidgetTP::GetCapacity(CFWL_ThemePart* pThemePart, - FX_DWORD dwCapacity) { + uint32_t dwCapacity) { switch (dwCapacity) { case FWL_WGTCAPACITY_CXBorder: { m_fValue = FWLTHEME_CAPACITY_CXBorder; @@ -222,7 +222,7 @@ FX_ERR CFWL_WidgetTP::FinalizeTTO() { } #ifdef THEME_XPSimilar void CFWL_WidgetTP::DrawEdge(CFX_Graphics* pGraphics, - FX_DWORD dwStyles, + uint32_t dwStyles, const CFX_RectF* pRect, CFX_Matrix* pMatrix) { if (!pGraphics) @@ -249,7 +249,7 @@ void CFWL_WidgetTP::DrawEdge(CFX_Graphics* pGraphics, } #else void CFWL_WidgetTP::DrawEdge(CFX_Graphics* pGraphics, - FX_DWORD dwStyles, + uint32_t dwStyles, const CFX_RectF* pRect, CFX_Matrix* pMatrix) { if (!pGraphics) @@ -717,13 +717,13 @@ CFWL_FontData::~CFWL_FontData() { #endif } FX_BOOL CFWL_FontData::Equal(const CFX_WideStringC& wsFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage) { return m_wsFamily == wsFontFamily && m_dwStyles == dwFontStyles && m_dwCodePage == wCodePage; } FX_BOOL CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t dwCodePage) { m_wsFamily = wsFontFamily; m_dwStyles = dwFontStyles; @@ -754,7 +754,7 @@ void CFWL_FontManager::DestroyInstance() { CFWL_FontManager::CFWL_FontManager() {} CFWL_FontManager::~CFWL_FontManager() {} IFX_Font* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage) { for (const auto& pData : m_FontsArray) { if (pData->Equal(wsFontFamily, dwFontStyles, wCodePage)) @@ -773,13 +773,13 @@ void FWLTHEME_Release() { CFWL_ArrowData::DestroyInstance(); CFWL_FontManager::DestroyInstance(); } -FX_DWORD FWL_GetThemeLayout(FX_DWORD dwThemeID) { +uint32_t FWL_GetThemeLayout(uint32_t dwThemeID) { return 0xffff0000 & dwThemeID; } -FX_DWORD FWL_GetThemeColor(FX_DWORD dwThemeID) { +uint32_t FWL_GetThemeColor(uint32_t dwThemeID) { return 0x0000ffff & dwThemeID; } -FX_DWORD FWL_MakeThemeID(FX_DWORD dwLayout, FX_DWORD dwColor) { +uint32_t FWL_MakeThemeID(uint32_t dwLayout, uint32_t dwColor) { return (dwLayout << 16) | (0x0000FFFF & dwColor); } CFWL_ArrowData* CFWL_ArrowData::m_pInstance = NULL; @@ -804,7 +804,7 @@ CFWL_ArrowData::~CFWL_ArrowData() { m_pColorData = NULL; } } -void CFWL_ArrowData::SetColorData(FX_DWORD dwID) { +void CFWL_ArrowData::SetColorData(uint32_t dwID) { if (!m_pColorData) { m_pColorData = new CColorData; } diff --git a/xfa/fxbarcode/BC_Utils.cpp b/xfa/fxbarcode/BC_Utils.cpp index b69b4d251d..2225f7ce50 100644 --- a/xfa/fxbarcode/BC_Utils.cpp +++ b/xfa/fxbarcode/BC_Utils.cpp @@ -8,8 +8,8 @@ #include "xfa/fxbarcode/utils.h" FX_BOOL BC_FX_ByteString_Replace(CFX_ByteString& dst, - FX_DWORD first, - FX_DWORD last, + uint32_t first, + uint32_t last, int32_t count, FX_CHAR c) { if (first > last || count <= 0) { diff --git a/xfa/fxbarcode/common/BC_CommonBitMatrix.cpp b/xfa/fxbarcode/common/BC_CommonBitMatrix.cpp index a8f87e7ec4..4fff7b1a84 100644 --- a/xfa/fxbarcode/common/BC_CommonBitMatrix.cpp +++ b/xfa/fxbarcode/common/BC_CommonBitMatrix.cpp @@ -54,7 +54,7 @@ FX_BOOL CBC_CommonBitMatrix::Get(int32_t x, int32_t y) { if (offset >= m_rowSize * m_height || offset < 0) { return false; } - return ((((FX_DWORD)m_bits[offset]) >> (x & 0x1f)) & 1) != 0; + return ((((uint32_t)m_bits[offset]) >> (x & 0x1f)) & 1) != 0; } int32_t* CBC_CommonBitMatrix::GetBits() { return m_bits; diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp index d8e7bb1dc5..1f7c4c3453 100644 --- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp +++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp @@ -166,7 +166,7 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg, int32_t charsProcessed = 0; while (TRUE) { if ((startpos + charsProcessed) == msg.GetLength()) { - FX_DWORD min = std::numeric_limits<int32_t>::max(); + uint32_t min = std::numeric_limits<int32_t>::max(); CFX_ByteArray mins; mins.SetSize(6); CFX_Int32Array intCharCounts; diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp index 62ca97f488..b95c2be283 100644 --- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp +++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp @@ -133,7 +133,7 @@ void CBC_OneDimWriter::CalcTextInfo(const CFX_ByteString& text, FX_CreateFontEncodingEx(cFont)); int32_t length = text.GetLength(); - FX_DWORD* pCharCode = FX_Alloc(FX_DWORD, text.GetLength()); + uint32_t* pCharCode = FX_Alloc(uint32_t, text.GetLength()); FX_FLOAT charWidth = 0; for (int32_t j = 0; j < text.GetLength(); j++) { pCharCode[j] = encoding->CharCodeFromUnicode(text[j]); diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Common.cpp b/xfa/fxbarcode/pdf417/BC_PDF417Common.cpp index 92c641d1bd..b9cac0c678 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417Common.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417Common.cpp @@ -620,22 +620,22 @@ int32_t CBC_PDF417Common::getBitCountSum(CFX_Int32Array& moduleBitCount) { } return bitCountSum; } -int32_t CBC_PDF417Common::getCodeword(FX_DWORD symbol) { - FX_DWORD sym = symbol & 0x3FFFF; +int32_t CBC_PDF417Common::getCodeword(uint32_t symbol) { + uint32_t sym = symbol & 0x3FFFF; int32_t i = findCodewordIndex(sym); if (i == -1) { return -1; } return (CODEWORD_TABLE[i] - 1) % NUMBER_OF_CODEWORDS; } -int32_t CBC_PDF417Common::findCodewordIndex(FX_DWORD symbol) { +int32_t CBC_PDF417Common::findCodewordIndex(uint32_t symbol) { int32_t first = 0; int32_t upto = sizeof(SYMBOL_TABLE) / sizeof(SYMBOL_TABLE[0]); while (first < upto) { - int32_t mid = ((FX_DWORD)(first + upto)) >> 1; - if (symbol < (FX_DWORD)SYMBOL_TABLE[mid]) { + int32_t mid = ((uint32_t)(first + upto)) >> 1; + if (symbol < (uint32_t)SYMBOL_TABLE[mid]) { upto = mid; - } else if (symbol > (FX_DWORD)SYMBOL_TABLE[mid]) { + } else if (symbol > (uint32_t)SYMBOL_TABLE[mid]) { first = mid + 1; } else { return mid; diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp index 0360ef0b13..ded0df694b 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp +++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp @@ -740,9 +740,9 @@ void CBC_QRCoderEncoder::AppendGBKBytes(const CFX_ByteString& content, CBC_QRCoderBitVector* bits, int32_t& e) { int32_t length = content.GetLength(); - FX_DWORD value = 0; + uint32_t value = 0; for (int32_t i = 0; i < length; i += 2) { - value = (FX_DWORD)((uint8_t)content[i] << 8 | (uint8_t)content[i + 1]); + value = (uint32_t)((uint8_t)content[i] << 8 | (uint8_t)content[i + 1]); if (value <= 0xAAFE && value >= 0xA1A1) { value -= 0xA1A1; } else if (value <= 0xFAFE && value >= 0xB0A1) { @@ -751,7 +751,7 @@ void CBC_QRCoderEncoder::AppendGBKBytes(const CFX_ByteString& content, e = BCExceptionInvalidateCharacter; BC_EXCEPTION_CHECK_ReturnVoid(e); } - value = (FX_DWORD)((value >> 8) * 0x60) + (FX_DWORD)(value & 0xff); + value = (uint32_t)((value >> 8) * 0x60) + (uint32_t)(value & 0xff); bits->AppendBits(value, 13, e); BC_EXCEPTION_CHECK_ReturnVoid(e); } @@ -777,9 +777,9 @@ void CBC_QRCoderEncoder::AppendKanjiBytes(const CFX_ByteString& content, CBC_QRCoderBitVector* bits, int32_t& e) { CFX_ByteArray bytes; - FX_DWORD value = 0; + uint32_t value = 0; for (int32_t i = 0; i < bytes.GetSize(); i += 2) { - value = (FX_DWORD)((uint8_t)(content[i] << 8) | (uint8_t)content[i + 1]); + value = (uint32_t)((uint8_t)(content[i] << 8) | (uint8_t)content[i + 1]); if (value <= 0x9ffc && value >= 0x8140) { value -= 0x8140; } else if (value <= 0xebbf && value >= 0xe040) { @@ -788,7 +788,7 @@ void CBC_QRCoderEncoder::AppendKanjiBytes(const CFX_ByteString& content, e = BCExceptionInvalidateCharacter; BC_EXCEPTION_CHECK_ReturnVoid(e); } - value = (FX_DWORD)((value >> 8) * 0xc0) + (FX_DWORD)(value & 0xff); + value = (uint32_t)((value >> 8) * 0xc0) + (uint32_t)(value & 0xff); bits->AppendBits(value, 13, e); BC_EXCEPTION_CHECK_ReturnVoid(e); } diff --git a/xfa/fxfa/app/xfa_checksum.cpp b/xfa/fxfa/app/xfa_checksum.cpp index b9a7b50be7..4d2bdfc401 100644 --- a/xfa/fxfa/app/xfa_checksum.cpp +++ b/xfa/fxfa/app/xfa_checksum.cpp @@ -16,7 +16,7 @@ CXFA_SAXReaderHandler::CXFA_SAXReaderHandler(CXFA_ChecksumContext* pContext) CXFA_SAXReaderHandler::~CXFA_SAXReaderHandler() {} void* CXFA_SAXReaderHandler::OnTagEnter(const CFX_ByteStringC& bsTagName, FX_SAXNODE eType, - FX_DWORD dwStartPos) { + uint32_t dwStartPos) { UpdateChecksum(TRUE); if (eType != FX_SAXNODE_Tag && eType != FX_SAXNODE_Instruction) { return NULL; @@ -51,7 +51,7 @@ void CXFA_SAXReaderHandler::OnTagBreak(void* pTag) { void CXFA_SAXReaderHandler::OnTagData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& bsData, - FX_DWORD dwStartPos) { + uint32_t dwStartPos) { if (pTag == NULL) { return; } @@ -64,7 +64,7 @@ void CXFA_SAXReaderHandler::OnTagData(void* pTag, textBuf << "]]>"; } } -void CXFA_SAXReaderHandler::OnTagClose(void* pTag, FX_DWORD dwEndPos) { +void CXFA_SAXReaderHandler::OnTagClose(void* pTag, uint32_t dwEndPos) { if (pTag == NULL) { return; } @@ -79,7 +79,7 @@ void CXFA_SAXReaderHandler::OnTagClose(void* pTag, FX_DWORD dwEndPos) { } void CXFA_SAXReaderHandler::OnTagEnd(void* pTag, const CFX_ByteStringC& bsTagName, - FX_DWORD dwEndPos) { + uint32_t dwEndPos) { if (pTag == NULL) { return; } @@ -90,7 +90,7 @@ void CXFA_SAXReaderHandler::OnTagEnd(void* pTag, void CXFA_SAXReaderHandler::OnTargetData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& bsData, - FX_DWORD dwStartPos) { + uint32_t dwStartPos) { if (pTag == NULL && eType != FX_SAXNODE_Comment) { return; } @@ -155,7 +155,7 @@ FX_BOOL CXFA_ChecksumContext::UpdateChecksum(IFX_FileRead* pSrcFile, CXFA_SAXReaderHandler handler(this); m_pSAXReader->SetHandler(&handler); if (m_pSAXReader->StartParse( - pSrcFile, (FX_DWORD)offset, (FX_DWORD)size, + pSrcFile, (uint32_t)offset, (uint32_t)size, FX_SAXPARSEMODE_NotSkipSpace | FX_SAXPARSEMODE_NotConvert_amp | FX_SAXPARSEMODE_NotConvert_lt | FX_SAXPARSEMODE_NotConvert_gt | FX_SAXPARSEMODE_NotConvert_sharp) < 0) { diff --git a/xfa/fxfa/app/xfa_ffapp.cpp b/xfa/fxfa/app/xfa_ffapp.cpp index c31538659e..1fdcc25563 100644 --- a/xfa/fxfa/app/xfa_ffapp.cpp +++ b/xfa/fxfa/app/xfa_ffapp.cpp @@ -24,7 +24,7 @@ CXFA_FileRead::CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams) { } } FX_FILESIZE CXFA_FileRead::GetSize() { - FX_DWORD dwSize = 0; + uint32_t dwSize = 0; int32_t iCount = m_Data.GetSize(); for (int32_t i = 0; i < iCount; i++) { CPDF_StreamAcc& acc = m_Data[i]; @@ -48,7 +48,7 @@ FX_BOOL CXFA_FileRead::ReadBlock(void* buffer, } while (index < iCount) { CPDF_StreamAcc& acc = m_Data[index]; - FX_DWORD dwSize = acc.GetSize(); + uint32_t dwSize = acc.GetSize(); size_t dwRead = std::min(size, static_cast<size_t>(dwSize - offset)); FXSYS_memcpy(buffer, acc.GetData() + offset, dwRead); size -= dwRead; diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index 8bc4a26931..22ab7f7cd3 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.cpp +++ b/xfa/fxfa/app/xfa_ffbarcode.cpp @@ -141,7 +141,7 @@ FX_BOOL CXFA_FFBarcode::LoadWidget() { } void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -217,7 +217,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty() { pBarCodeWidget->SetPrintChecksum(TRUE); } } -FX_BOOL CXFA_FFBarcode::OnLButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFBarcode::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; @@ -229,7 +229,7 @@ FX_BOOL CXFA_FFBarcode::OnLButtonDown(FX_DWORD dwFlags, } return CXFA_FFTextEdit::OnLButtonDown(dwFlags, fx, fy); } -FX_BOOL CXFA_FFBarcode::OnRButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp index 1e7c71aa3d..c1b3099ff4 100644 --- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp +++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp @@ -52,7 +52,7 @@ void CXFA_FFCheckButton::UpdateWidgetProperty() { } FX_FLOAT fSize = m_pDataAcc->GetCheckButtonSize(); pCheckBox->SetBoxSize(fSize); - FX_DWORD dwStyleEx = FWL_STYLEEXT_CKB_SignShapeCross; + uint32_t dwStyleEx = FWL_STYLEEXT_CKB_SignShapeCross; int32_t iCheckMark = m_pDataAcc->GetCheckButtonMark(); switch (iCheckMark) { case XFA_ATTRIBUTEENUM_Check: @@ -214,7 +214,7 @@ void CXFA_FFCheckButton::AddUIMargin(int32_t iCapPlacement) { } void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -239,7 +239,7 @@ void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS, GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(), pGS, &mt); } -FX_BOOL CXFA_FFCheckButton::OnLButtonUp(FX_DWORD dwFlags, +FX_BOOL CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!m_pNormalWidget) { @@ -261,7 +261,7 @@ FX_BOOL CXFA_FFCheckButton::OnLButtonUp(FX_DWORD dwFlags, } XFA_CHECKSTATE CXFA_FFCheckButton::FWLState2XFAState() { XFA_CHECKSTATE eCheckState = XFA_CHECKSTATE_Off; - FX_DWORD dwState = m_pNormalWidget->GetStates(); + uint32_t dwState = m_pNormalWidget->GetStates(); if (dwState & FWL_STATE_CKB_Checked) { eCheckState = XFA_CHECKSTATE_On; } else if (dwState & FWL_STATE_CKB_Neutral) { @@ -300,7 +300,7 @@ int32_t CXFA_FFCheckButton::OnProcessMessage(CFWL_Message* pMessage) { } FWL_ERR CXFA_FFCheckButton::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); - FX_DWORD dwEventID = pEvent->GetClassID(); + uint32_t dwEventID = pEvent->GetClassID(); switch (dwEventID) { case FWL_EVTHASH_CKB_CheckStateChanged: { CXFA_EventParam eParam; diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index f94ed1ef43..1410ad4fa5 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -46,7 +46,7 @@ FX_BOOL CXFA_FFListBox::LoadWidget() { for (int32_t i = 0; i < iItems; i++) { pListBox->AddString(wsLabelArray[i]); } - FX_DWORD dwExtendedStyle = FWL_STYLEEXT_LTB_ShowScrollBarFocus; + uint32_t dwExtendedStyle = FWL_STYLEEXT_LTB_ShowScrollBarFocus; if (m_pDataAcc->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) { dwExtendedStyle |= FWL_STYLEEXT_LTB_MultiSelection; } @@ -100,8 +100,8 @@ FX_BOOL CXFA_FFListBox::IsDataChanged() { } return TRUE; } -FX_DWORD CXFA_FFListBox::GetAlignment() { - FX_DWORD dwExtendedStyle = 0; +uint32_t CXFA_FFListBox::GetAlignment() { + uint32_t dwExtendedStyle = 0; if (CXFA_Para para = m_pDataAcc->GetPara()) { int32_t iHorz = para.GetHorizontalAlign(); switch (iHorz) { @@ -185,7 +185,7 @@ int32_t CXFA_FFListBox::OnProcessMessage(CFWL_Message* pMessage) { } FWL_ERR CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); - FX_DWORD dwEventID = pEvent->GetClassID(); + uint32_t dwEventID = pEvent->GetClassID(); switch (dwEventID) { case FWL_EVTHASH_LTB_SelChanged: { CFX_Int32Array arrSels; @@ -208,7 +208,7 @@ CXFA_FFComboBox::CXFA_FFComboBox(CXFA_FFPageView* pPageView, CXFA_FFComboBox::~CXFA_FFComboBox() {} FX_BOOL CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox, - FX_DWORD dwStatus, + uint32_t dwStatus, FX_BOOL bDrawFocus) { if (bDrawFocus) return FALSE; @@ -261,8 +261,8 @@ void CXFA_FFComboBox::UpdateWidgetProperty() { if (!pComboBox) { return; } - FX_DWORD dwExtendedStyle = 0; - FX_DWORD dwEditStyles = + uint32_t dwExtendedStyle = 0; + uint32_t dwEditStyles = FWL_STYLEEXT_EDT_ReadOnly | FWL_STYLEEXT_EDT_LastLineHeight; dwExtendedStyle |= UpdateUIProperty(); if (m_pDataAcc->IsChoiceListAllowTextEntry()) { @@ -281,7 +281,7 @@ void CXFA_FFComboBox::UpdateWidgetProperty() { } pComboBox->EditModifyStylesEx(dwEditStyles, 0xFFFFFFFF); } -FX_BOOL CXFA_FFComboBox::OnRButtonUp(FX_DWORD dwFlags, +FX_BOOL CXFA_FFComboBox::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!CXFA_FFField::OnRButtonUp(dwFlags, fx, fy)) @@ -331,8 +331,8 @@ void CXFA_FFComboBox::FWLEventSelChange(CXFA_EventParam* pParam) { pFWLcombobox->GetEditText(pParam->m_wsNewText); m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, pParam); } -FX_DWORD CXFA_FFComboBox::GetAlignment() { - FX_DWORD dwExtendedStyle = 0; +uint32_t CXFA_FFComboBox::GetAlignment() { + uint32_t dwExtendedStyle = 0; if (CXFA_Para para = m_pDataAcc->GetPara()) { int32_t iHorz = para.GetHorizontalAlign(); switch (iHorz) { @@ -500,7 +500,7 @@ int32_t CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) { } FWL_ERR CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); - FX_DWORD dwEventID = pEvent->GetClassID(); + uint32_t dwEventID = pEvent->GetClassID(); switch (dwEventID) { case FWL_EVTHASH_CMB_SelChanged: { CFWL_EvtCmbSelChanged* postEvent = (CFWL_EvtCmbSelChanged*)pEvent; diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp index ec2a1a215e..c130a036b5 100644 --- a/xfa/fxfa/app/xfa_ffdoc.cpp +++ b/xfa/fxfa/app/xfa_ffdoc.cpp @@ -32,7 +32,7 @@ CXFA_FFDoc::CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocProvider* pDocProvider) CXFA_FFDoc::~CXFA_FFDoc() { CloseDoc(); } -FX_DWORD CXFA_FFDoc::GetDocType() { +uint32_t CXFA_FFDoc::GetDocType() { return m_dwDocType; } int32_t CXFA_FFDoc::StartLoad() { @@ -181,7 +181,7 @@ void CXFA_FFDoc::StopLoad() { m_dwDocType = XFA_DOCTYPE_Dynamic; } } -IXFA_DocView* CXFA_FFDoc::CreateDocView(FX_DWORD dwView) { +IXFA_DocView* CXFA_FFDoc::CreateDocView(uint32_t dwView) { CXFA_FFDocView* pDocView = (CXFA_FFDocView*)m_mapTypeToDocView.GetValueAt((void*)(uintptr_t)dwView); if (!pDocView) { @@ -236,8 +236,8 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) { CFX_ArrayTemplate<CPDF_Stream*> xfaStreams; if (pElementXFA->IsArray()) { CPDF_Array* pXFAArray = (CPDF_Array*)pElementXFA; - FX_DWORD count = pXFAArray->GetCount() / 2; - for (FX_DWORD i = 0; i < count; i++) { + uint32_t count = pXFAArray->GetCount() / 2; + for (uint32_t i = 0; i < count; i++) { if (CPDF_Stream* pStream = pXFAArray->GetStreamAt(i * 2 + 1)) xfaStreams.Add(pStream); } @@ -307,7 +307,7 @@ FX_BOOL CXFA_FFDoc::CloseDoc() { pNoteDriver->ClearEventTargets(FALSE); return TRUE; } -void CXFA_FFDoc::SetDocType(FX_DWORD dwType) { +void CXFA_FFDoc::SetDocType(uint32_t dwType) { m_dwDocType = dwType; } CPDF_Document* CXFA_FFDoc::GetPDFDoc() { @@ -320,7 +320,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName, if (!m_pPDFDoc) return nullptr; - FX_DWORD dwHash = + uint32_t dwHash = FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength(), FALSE); FX_IMAGEDIB_AND_DPI* imageDIBDpi = nullptr; if (m_mapNamedImages.Lookup((void*)(uintptr_t)dwHash, (void*&)imageDIBDpi)) { @@ -379,7 +379,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName, } IFDE_XMLElement* CXFA_FFDoc::GetPackageData(const CFX_WideStringC& wsPackage) { - FX_DWORD packetHash = + uint32_t packetHash = FX_HashCode_String_GetW(wsPackage.GetPtr(), wsPackage.GetLength()); CXFA_Node* pNode = ToNode(m_pDocument->GetXFAObject(packetHash)); if (!pNode) { @@ -397,7 +397,7 @@ FX_BOOL CXFA_FFDoc::SavePackage(const CFX_WideStringC& wsPackage, if (!pExport) { return FALSE; } - FX_DWORD packetHash = + uint32_t packetHash = FX_HashCode_String_GetW(wsPackage.GetPtr(), wsPackage.GetLength()); CXFA_Node* pNode = NULL; if (packetHash == XFA_HASHCODE_Xfa) { diff --git a/xfa/fxfa/app/xfa_ffdochandler.cpp b/xfa/fxfa/app/xfa_ffdochandler.cpp index 5ea7884134..2019bb24df 100644 --- a/xfa/fxfa/app/xfa_ffdochandler.cpp +++ b/xfa/fxfa/app/xfa_ffdochandler.cpp @@ -17,7 +17,7 @@ void CXFA_FFDocHandler::ReleaseDoc(IXFA_Doc* hDoc) { IXFA_DocProvider* CXFA_FFDocHandler::GetDocProvider(IXFA_Doc* hDoc) { return static_cast<CXFA_FFDoc*>(hDoc)->GetDocProvider(); } -FX_DWORD CXFA_FFDocHandler::GetDocType(IXFA_Doc* hDoc) { +uint32_t CXFA_FFDocHandler::GetDocType(IXFA_Doc* hDoc) { return static_cast<CXFA_FFDoc*>(hDoc)->GetDocType(); } int32_t CXFA_FFDocHandler::StartLoad(IXFA_Doc* hDoc) { @@ -31,7 +31,7 @@ void CXFA_FFDocHandler::StopLoad(IXFA_Doc* hDoc) { } IXFA_DocView* CXFA_FFDocHandler::CreateDocView(IXFA_Doc* hDoc, - FX_DWORD dwView) { + uint32_t dwView) { return static_cast<CXFA_FFDoc*>(hDoc)->CreateDocView(dwView); } int32_t CXFA_FFDocHandler::CountPackages(IXFA_Doc* hDoc) { diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp index ab1cafe5f4..5e814475db 100644 --- a/xfa/fxfa/app/xfa_ffdocview.cpp +++ b/xfa/fxfa/app/xfa_ffdocview.cpp @@ -505,7 +505,7 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName( const CFX_WideStringC& wsName, CXFA_WidgetAcc* pRefWidgetAcc) { CFX_WideString wsExpression; - FX_DWORD dwStyle = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | + uint32_t dwStyle = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent; IXFA_ScriptContext* pScriptContext = m_pDoc->GetXFADoc()->GetScriptContext(); if (!pScriptContext) { @@ -774,7 +774,7 @@ void CXFA_FFDocView::RunBindItems() { pWidgetNode->GetDocument()->GetScriptContext(); CFX_WideStringC wsRef; binditems.GetRef(wsRef); - FX_DWORD dwStyle = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | + uint32_t dwStyle = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_ALL; XFA_RESOLVENODE_RS rs; @@ -793,7 +793,7 @@ void CXFA_FFDocView::RunBindItems() { const bool bValueUseContent = wsValueRef.IsEmpty() || wsValueRef == FX_WSTRC(L"$"); CFX_WideString wsValue, wsLabel; - FX_DWORD uValueHash = FX_HashCode_String_GetW(CFX_WideString(wsValueRef), + uint32_t uValueHash = FX_HashCode_String_GetW(CFX_WideString(wsValueRef), wsValueRef.GetLength()); for (int32_t i = 0; i < iCount; i++) { CXFA_Object* refObj = rs.nodes[i]; diff --git a/xfa/fxfa/app/xfa_ffexclgroup.cpp b/xfa/fxfa/app/xfa_ffexclgroup.cpp index 4e24218470..6705ea6c0e 100644 --- a/xfa/fxfa/app/xfa_ffexclgroup.cpp +++ b/xfa/fxfa/app/xfa_ffexclgroup.cpp @@ -17,7 +17,7 @@ CXFA_FFExclGroup::CXFA_FFExclGroup(CXFA_FFPageView* pPageView, CXFA_FFExclGroup::~CXFA_FFExclGroup() {} void CXFA_FFExclGroup::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index 0f5874f9aa..ed81953897 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -31,7 +31,7 @@ CXFA_FFField::~CXFA_FFField() { } FX_BOOL CXFA_FFField::GetBBox(CFX_RectF& rtBox, - FX_DWORD dwStatus, + uint32_t dwStatus, FX_BOOL bDrawFocus) { if (!bDrawFocus) return CXFA_FFWidget::GetBBox(rtBox, dwStatus); @@ -51,7 +51,7 @@ FX_BOOL CXFA_FFField::GetBBox(CFX_RectF& rtBox, void CXFA_FFField::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -76,7 +76,7 @@ void CXFA_FFField::RenderWidget(CFX_Graphics* pGS, } void CXFA_FFField::DrawHighlight(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, FX_BOOL bEllipse) { if (m_rtUI.IsEmpty() || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { return; @@ -321,9 +321,9 @@ void CXFA_FFField::UpdateFWL() { m_pNormalWidget->Update(); } } -FX_DWORD CXFA_FFField::UpdateUIProperty() { +uint32_t CXFA_FFField::UpdateUIProperty() { CXFA_Node* pUiNode = m_pDataAcc->GetUIChild(); - FX_DWORD dwStyle = 0; + uint32_t dwStyle = 0; if (pUiNode && pUiNode->GetClassID() == XFA_ELEMENT_DefaultUi) { dwStyle = FWL_STYLEEXT_EDT_ReadOnly; } @@ -376,7 +376,7 @@ void CXFA_FFField::FWLToClient(FX_FLOAT& fx, FX_FLOAT& fy) { fx -= rtWidget.left; fy -= rtWidget.top; } -FX_BOOL CXFA_FFField::OnLButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFField::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!m_pNormalWidget) { @@ -400,7 +400,7 @@ FX_BOOL CXFA_FFField::OnLButtonDown(FX_DWORD dwFlags, TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFField::OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { +FX_BOOL CXFA_FFField::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!m_pNormalWidget) { return FALSE; } @@ -418,7 +418,7 @@ FX_BOOL CXFA_FFField::OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFField::OnLButtonDblClk(FX_DWORD dwFlags, +FX_BOOL CXFA_FFField::OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!m_pNormalWidget) { @@ -434,7 +434,7 @@ FX_BOOL CXFA_FFField::OnLButtonDblClk(FX_DWORD dwFlags, TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFField::OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { +FX_BOOL CXFA_FFField::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!m_pNormalWidget) { return FALSE; } @@ -448,7 +448,7 @@ FX_BOOL CXFA_FFField::OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFField::OnMouseWheel(FX_DWORD dwFlags, +FX_BOOL CXFA_FFField::OnMouseWheel(uint32_t dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy) { @@ -467,7 +467,7 @@ FX_BOOL CXFA_FFField::OnMouseWheel(FX_DWORD dwFlags, TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFField::OnRButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFField::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!m_pNormalWidget) { @@ -491,7 +491,7 @@ FX_BOOL CXFA_FFField::OnRButtonDown(FX_DWORD dwFlags, TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFField::OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { +FX_BOOL CXFA_FFField::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!m_pNormalWidget) { return FALSE; } @@ -509,7 +509,7 @@ FX_BOOL CXFA_FFField::OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFField::OnRButtonDblClk(FX_DWORD dwFlags, +FX_BOOL CXFA_FFField::OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!m_pNormalWidget) { @@ -552,7 +552,7 @@ FX_BOOL CXFA_FFField::OnKillFocus(CXFA_FFWidget* pNewWidget) { CXFA_FFWidget::OnKillFocus(pNewWidget); return TRUE; } -FX_BOOL CXFA_FFField::OnKeyDown(FX_DWORD dwKeyCode, FX_DWORD dwFlags) { +FX_BOOL CXFA_FFField::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) { if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { return FALSE; } @@ -565,7 +565,7 @@ FX_BOOL CXFA_FFField::OnKeyDown(FX_DWORD dwKeyCode, FX_DWORD dwFlags) { TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFField::OnKeyUp(FX_DWORD dwKeyCode, FX_DWORD dwFlags) { +FX_BOOL CXFA_FFField::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { return FALSE; } @@ -578,7 +578,7 @@ FX_BOOL CXFA_FFField::OnKeyUp(FX_DWORD dwKeyCode, FX_DWORD dwFlags) { TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFField::OnChar(FX_DWORD dwChar, FX_DWORD dwFlags) { +FX_BOOL CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) { if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { return FALSE; } @@ -600,11 +600,11 @@ FX_BOOL CXFA_FFField::OnChar(FX_DWORD dwChar, FX_DWORD dwFlags) { TranslateFWLMessage(&ms); return TRUE; } -FX_DWORD CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { if (m_pNormalWidget) { FX_FLOAT ffx = fx, ffy = fy; FWLToClient(ffx, ffy); - FX_DWORD dwWidgetHit = m_pNormalWidget->HitTest(ffx, ffy); + uint32_t dwWidgetHit = m_pNormalWidget->HitTest(ffx, ffy); if (dwWidgetHit != FWL_WGTHITTEST_Unknown) { return FWL_WGTHITTEST_Client; } @@ -794,7 +794,7 @@ int32_t CXFA_FFField::OnProcessMessage(CFWL_Message* pMessage) { return FWL_ERR_Succeeded; } FWL_ERR CXFA_FFField::OnProcessEvent(CFWL_Event* pEvent) { - FX_DWORD dwEventID = pEvent->GetClassID(); + uint32_t dwEventID = pEvent->GetClassID(); switch (dwEventID) { case FWL_EVTHASH_Mouse: { CFWL_EvtMouse* event = (CFWL_EvtMouse*)pEvent; diff --git a/xfa/fxfa/app/xfa_ffimage.cpp b/xfa/fxfa/app/xfa_ffimage.cpp index c17273d5cf..306c4677d2 100644 --- a/xfa/fxfa/app/xfa_ffimage.cpp +++ b/xfa/fxfa/app/xfa_ffimage.cpp @@ -32,7 +32,7 @@ void CXFA_FFImage::UnloadWidget() { } void CXFA_FFImage::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp index c2d75522c7..a90e25c919 100644 --- a/xfa/fxfa/app/xfa_ffimageedit.cpp +++ b/xfa/fxfa/app/xfa_ffimageedit.cpp @@ -46,7 +46,7 @@ void CXFA_FFImageEdit::UnloadWidget() { } void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -82,7 +82,7 @@ void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS, iImageYDpi, iHorzAlign, iVertAlign); } } -FX_BOOL CXFA_FFImageEdit::OnLButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) { diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp index 60fc1603aa..25e0d7d7a9 100644 --- a/xfa/fxfa/app/xfa_ffnotify.cpp +++ b/xfa/fxfa/app/xfa_ffnotify.cpp @@ -71,7 +71,7 @@ void CXFA_FFNotify::OnNodeEvent(CXFA_Node* pSender, } } void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, - FX_DWORD dwEvent, + uint32_t dwEvent, void* pParam, void* pAdditional, void* pAdditional2) { @@ -432,7 +432,7 @@ void CXFA_FFNotify::OnValueChanging(CXFA_Node* pSender, if (pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End) { return; } - FX_DWORD dwPacket = pSender->GetPacketID(); + uint32_t dwPacket = pSender->GetPacketID(); if (dwPacket & XFA_XDPPACKET_Datasets) { } else if (pSender->IsFormContainer()) { XFA_ATTRIBUTE eAttr = (XFA_ATTRIBUTE)(uintptr_t)pParam; @@ -460,7 +460,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender, if (!pDocView) { return; } - FX_DWORD dwPacket = pSender->GetPacketID(); + uint32_t dwPacket = pSender->GetPacketID(); XFA_ATTRIBUTE eAttr = (XFA_ATTRIBUTE)(uintptr_t)pParam; if (dwPacket & XFA_XDPPACKET_Form) { CXFA_Node* pParentNode = static_cast<CXFA_Node*>(pParam3); @@ -575,8 +575,8 @@ void CXFA_FFNotify::OnLayoutItemAdd(CXFA_FFDocView* pDocView, CXFA_FFWidget* pWidget = static_cast<CXFA_FFWidget*>(pSender); int32_t iPageIdx = (int32_t)(uintptr_t)pParam; IXFA_PageView* pNewPageView = pDocView->GetPageView(iPageIdx); - FX_DWORD dwStatus = (FX_DWORD)(uintptr_t)pParam2; - FX_DWORD dwFilter = XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable | + uint32_t dwStatus = (uint32_t)(uintptr_t)pParam2; + uint32_t dwFilter = XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable | XFA_WIDGETSTATUS_Printable; pWidget->ModifyStatus(dwStatus, dwFilter); IXFA_PageView* pPrePageView = pWidget->GetPageView(); @@ -628,7 +628,7 @@ void CXFA_FFNotify::OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, if (!pWidget) { return; } - FX_DWORD dwStatus = (FX_DWORD)(uintptr_t)pParam; + uint32_t dwStatus = (uint32_t)(uintptr_t)pParam; if (dwStatus == 0) { CXFA_LayoutItem* pPreItem = pSender->GetPrev(); if (pPreItem) { @@ -638,8 +638,8 @@ void CXFA_FFNotify::OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, } } } - FX_DWORD dwOldStatus = pWidget->GetStatus(); - FX_DWORD dwFilter = XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable | + uint32_t dwOldStatus = pWidget->GetStatus(); + uint32_t dwFilter = XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable | XFA_WIDGETSTATUS_Printable; if ((dwOldStatus & dwFilter) == dwStatus) { return; diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp index 1bc168187c..e4841f17b2 100644 --- a/xfa/fxfa/app/xfa_ffpageview.cpp +++ b/xfa/fxfa/app/xfa_ffpageview.cpp @@ -76,7 +76,7 @@ IXFA_Widget* CXFA_FFPageView::GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy) { FX_FLOAT fWidgetx = fx; FX_FLOAT fWidgety = fy; pWidget->Rotate2Normal(fWidgetx, fWidgety); - FX_DWORD dwFlag = pWidget->OnHitTest(fWidgetx, fWidgety); + uint32_t dwFlag = pWidget->OnHitTest(fWidgetx, fWidgety); if ((FWL_WGTHITTEST_Client == dwFlag || FWL_WGTHITTEST_HyperLink == dwFlag)) { break; @@ -86,8 +86,8 @@ IXFA_Widget* CXFA_FFPageView::GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy) { return pWidget; } IXFA_WidgetIterator* CXFA_FFPageView::CreateWidgetIterator( - FX_DWORD dwTraverseWay, - FX_DWORD dwWidgetFilter) { + uint32_t dwTraverseWay, + uint32_t dwWidgetFilter) { switch (dwTraverseWay) { case XFA_TRAVERSEWAY_Tranvalse: return new CXFA_FFTabOrderPageWidgetIterator(this, dwWidgetFilter); @@ -97,16 +97,16 @@ IXFA_WidgetIterator* CXFA_FFPageView::CreateWidgetIterator( return NULL; } static FX_BOOL XFA_PageWidgetFilter(CXFA_FFWidget* pWidget, - FX_DWORD dwFilter, + uint32_t dwFilter, FX_BOOL bTraversal, FX_BOOL bIgnorerelevant) { CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc(); - FX_DWORD dwType = dwFilter & XFA_WIDGETFILTER_AllType; + uint32_t dwType = dwFilter & XFA_WIDGETFILTER_AllType; if ((dwType == XFA_WIDGETFILTER_Field) && (pWidgetAcc->GetClassID() != XFA_ELEMENT_Field)) { return FALSE; } - FX_DWORD dwStatus = pWidget->GetStatus(); + uint32_t dwStatus = pWidget->GetStatus(); if (bTraversal && (dwStatus & XFA_WIDGETSTATUS_Disabled)) { return FALSE; } @@ -118,7 +118,7 @@ static FX_BOOL XFA_PageWidgetFilter(CXFA_FFWidget* pWidget, return (dwFilter & dwStatus) == dwFilter; } CXFA_FFPageWidgetIterator::CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView, - FX_DWORD dwFilter) { + uint32_t dwFilter) { m_pPageView = pPageView; m_dwFilter = dwFilter; m_sIterator.Init(pPageView); @@ -186,7 +186,7 @@ IXFA_Widget* CXFA_FFPageWidgetIterator::GetWidget( } CXFA_FFTabOrderPageWidgetIterator::CXFA_FFTabOrderPageWidgetIterator( CXFA_FFPageView* pPageView, - FX_DWORD dwFilter) + uint32_t dwFilter) : m_pPageView(pPageView), m_dwFilter(dwFilter), m_iCurWidget(-1) { m_bIgnorerelevant = ((CXFA_FFDoc*)m_pPageView->GetDocView()->GetDoc()) ->GetXFADoc() diff --git a/xfa/fxfa/app/xfa_ffpath.cpp b/xfa/fxfa/app/xfa_ffpath.cpp index e0f6825a03..d8ece72bb0 100644 --- a/xfa/fxfa/app/xfa_ffpath.cpp +++ b/xfa/fxfa/app/xfa_ffpath.cpp @@ -51,7 +51,7 @@ void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect, } void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -108,7 +108,7 @@ CXFA_FFArc::CXFA_FFArc(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc) CXFA_FFArc::~CXFA_FFArc() {} void CXFA_FFArc::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -136,7 +136,7 @@ CXFA_FFRectangle::CXFA_FFRectangle(CXFA_FFPageView* pPageView, CXFA_FFRectangle::~CXFA_FFRectangle() {} void CXFA_FFRectangle::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp index 37472a840f..0d70143ac3 100644 --- a/xfa/fxfa/app/xfa_ffpushbutton.cpp +++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp @@ -31,7 +31,7 @@ CXFA_FFPushButton::~CXFA_FFPushButton() { } void CXFA_FFPushButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -70,7 +70,7 @@ FX_BOOL CXFA_FFPushButton::LoadWidget() { return CXFA_FFField::LoadWidget(); } void CXFA_FFPushButton::UpdateWidgetProperty() { - FX_DWORD dwStyleEx = 0; + uint32_t dwStyleEx = 0; switch (m_pDataAcc->GetButtonHighlight()) { case XFA_ATTRIBUTEENUM_Inverted: dwStyleEx = XFA_FWL_PSBSTYLEEXT_HiliteInverted; @@ -190,7 +190,7 @@ void CXFA_FFPushButton::RenderHighlightCaption(CFX_Graphics* pGS, mt.Concat(*pMatrix); } { - FX_DWORD dwState = m_pNormalWidget->GetStates(); + uint32_t dwState = m_pNormalWidget->GetStates(); if (m_pDownTextLayout && (dwState & FWL_STATE_PSB_Pressed) && (dwState & FWL_STATE_PSB_Hovered)) { if (m_pDownTextLayout->DrawString(pRenderDevice, mt, rtClip)) { diff --git a/xfa/fxfa/app/xfa_ffsignature.cpp b/xfa/fxfa/app/xfa_ffsignature.cpp index 96907c50a0..ca933f8cdc 100644 --- a/xfa/fxfa/app/xfa_ffsignature.cpp +++ b/xfa/fxfa/app/xfa_ffsignature.cpp @@ -20,7 +20,7 @@ FX_BOOL CXFA_FFSignature::LoadWidget() { } void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -46,61 +46,61 @@ FX_BOOL CXFA_FFSignature::OnMouseEnter() { FX_BOOL CXFA_FFSignature::OnMouseExit() { return FALSE; } -FX_BOOL CXFA_FFSignature::OnLButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFSignature::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnLButtonUp(FX_DWORD dwFlags, +FX_BOOL CXFA_FFSignature::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnLButtonDblClk(FX_DWORD dwFlags, +FX_BOOL CXFA_FFSignature::OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnMouseMove(FX_DWORD dwFlags, +FX_BOOL CXFA_FFSignature::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnMouseWheel(FX_DWORD dwFlags, +FX_BOOL CXFA_FFSignature::OnMouseWheel(uint32_t dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnRButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFSignature::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnRButtonUp(FX_DWORD dwFlags, +FX_BOOL CXFA_FFSignature::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnRButtonDblClk(FX_DWORD dwFlags, +FX_BOOL CXFA_FFSignature::OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnKeyDown(FX_DWORD dwKeyCode, FX_DWORD dwFlags) { +FX_BOOL CXFA_FFSignature::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnKeyUp(FX_DWORD dwKeyCode, FX_DWORD dwFlags) { +FX_BOOL CXFA_FFSignature::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { return FALSE; } -FX_BOOL CXFA_FFSignature::OnChar(FX_DWORD dwChar, FX_DWORD dwFlags) { +FX_BOOL CXFA_FFSignature::OnChar(uint32_t dwChar, uint32_t dwFlags) { return FALSE; } -FX_DWORD CXFA_FFSignature::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CXFA_FFSignature::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { if (m_pNormalWidget) { FX_FLOAT ffx = fx, ffy = fy; FWLToClient(ffx, ffy); - FX_DWORD dwWidgetHit = m_pNormalWidget->HitTest(ffx, ffy); + uint32_t dwWidgetHit = m_pNormalWidget->HitTest(ffx, ffy); if (dwWidgetHit != FWL_WGTHITTEST_Unknown) { return FWL_WGTHITTEST_Client; } diff --git a/xfa/fxfa/app/xfa_fftext.cpp b/xfa/fxfa/app/xfa_fftext.cpp index b35f7b4296..333f9f7f14 100644 --- a/xfa/fxfa/app/xfa_fftext.cpp +++ b/xfa/fxfa/app/xfa_fftext.cpp @@ -20,7 +20,7 @@ CXFA_FFText::CXFA_FFText(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc) CXFA_FFText::~CXFA_FFText() {} void CXFA_FFText::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -101,7 +101,7 @@ FX_BOOL CXFA_FFText::PerformLayout() { pTextLayout->m_bHasBlock = FALSE; return TRUE; } -FX_BOOL CXFA_FFText::OnLButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { +FX_BOOL CXFA_FFText::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { CFX_RectF rtBox; GetRectWithoutRotate(rtBox); if (!rtBox.Contains(fx, fy)) { @@ -114,7 +114,7 @@ FX_BOOL CXFA_FFText::OnLButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { SetButtonDown(TRUE); return TRUE; } -FX_BOOL CXFA_FFText::OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { +FX_BOOL CXFA_FFText::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { CFX_RectF rtBox; GetRectWithoutRotate(rtBox); if (!rtBox.Contains(fx, fy)) { @@ -126,7 +126,7 @@ FX_BOOL CXFA_FFText::OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { } return TRUE; } -FX_BOOL CXFA_FFText::OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { +FX_BOOL CXFA_FFText::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!IsButtonDown()) { return FALSE; } @@ -139,7 +139,7 @@ FX_BOOL CXFA_FFText::OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { pDoc->GetDocProvider()->GotoURL(pDoc, CFX_WideStringC(wsURLContent), FALSE); return TRUE; } -FX_DWORD CXFA_FFText::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CXFA_FFText::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { CFX_RectF rtBox; GetRectWithoutRotate(rtBox); if (!rtBox.Contains(fx, fy)) { diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp index 837054aec8..01f23ab61f 100644 --- a/xfa/fxfa/app/xfa_fftextedit.cpp +++ b/xfa/fxfa/app/xfa_fftextedit.cpp @@ -56,8 +56,8 @@ void CXFA_FFTextEdit::UpdateWidgetProperty() { if (!pWidget) { return; } - FX_DWORD dwStyle = 0; - FX_DWORD dwExtendedStyle = FWL_STYLEEXT_EDT_ShowScrollbarFocus | + uint32_t dwStyle = 0; + uint32_t dwExtendedStyle = FWL_STYLEEXT_EDT_ShowScrollbarFocus | FWL_STYLEEXT_EDT_OuterScrollbar | FWL_STYLEEXT_EDT_LastLineHeight; dwExtendedStyle |= UpdateUIProperty(); @@ -94,7 +94,7 @@ void CXFA_FFTextEdit::UpdateWidgetProperty() { m_pNormalWidget->ModifyStyles(dwStyle, 0xFFFFFFFF); m_pNormalWidget->ModifyStylesEx(dwExtendedStyle, 0xFFFFFFFF); } -FX_BOOL CXFA_FFTextEdit::OnLButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFTextEdit::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!PtInActiveRect(fx, fy)) { @@ -116,7 +116,7 @@ FX_BOOL CXFA_FFTextEdit::OnLButtonDown(FX_DWORD dwFlags, TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFTextEdit::OnRButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFTextEdit::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) { @@ -140,7 +140,7 @@ FX_BOOL CXFA_FFTextEdit::OnRButtonDown(FX_DWORD dwFlags, TranslateFWLMessage(&ms); return TRUE; } -FX_BOOL CXFA_FFTextEdit::OnRButtonUp(FX_DWORD dwFlags, +FX_BOOL CXFA_FFTextEdit::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { if (!CXFA_FFField::OnRButtonUp(dwFlags, fx, fy)) @@ -208,8 +208,8 @@ void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText) { FX_BOOL CXFA_FFTextEdit::IsDataChanged() { return (m_dwStatus & XFA_WIDGETSTATUS_TextEditValueChanged) != 0; } -FX_DWORD CXFA_FFTextEdit::GetAlignment() { - FX_DWORD dwExtendedStyle = 0; +uint32_t CXFA_FFTextEdit::GetAlignment() { + uint32_t dwExtendedStyle = 0; if (CXFA_Para para = m_pDataAcc->GetPara()) { int32_t iHorz = para.GetHorizontalAlign(); switch (iHorz) { @@ -405,7 +405,7 @@ int32_t CXFA_FFTextEdit::OnProcessMessage(CFWL_Message* pMessage) { } FWL_ERR CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); - FX_DWORD dwEventID = pEvent->GetClassID(); + uint32_t dwEventID = pEvent->GetClassID(); switch (dwEventID) { case FWL_EVTHASH_EDT_TextChanged: { CFWL_EvtEdtTextChanged* event = (CFWL_EvtEdtTextChanged*)pEvent; @@ -463,7 +463,7 @@ void CXFA_FFNumericEdit::UpdateWidgetProperty() { if (!pWidget) { return; } - FX_DWORD dwExtendedStyle = + uint32_t dwExtendedStyle = FWL_STYLEEXT_EDT_ShowScrollbarFocus | FWL_STYLEEXT_EDT_OuterScrollbar | FWL_STYLEEXT_EDT_Validate | FWL_STYLEEXT_EDT_Number | FWL_STYLEEXT_EDT_LastLineHeight; @@ -484,7 +484,7 @@ void CXFA_FFNumericEdit::UpdateWidgetProperty() { m_pNormalWidget->ModifyStylesEx(dwExtendedStyle, 0xFFFFFFFF); } FWL_ERR CXFA_FFNumericEdit::OnProcessEvent(CFWL_Event* pEvent) { - FX_DWORD dwEventID = pEvent->GetClassID(); + uint32_t dwEventID = pEvent->GetClassID(); if (dwEventID == FWL_EVTHASH_EDT_Validate) { CFWL_EvtEdtValidate* event = (CFWL_EvtEdtValidate*)pEvent; CFX_WideString wsChange = event->wsInsert; @@ -537,7 +537,7 @@ void CXFA_FFPasswordEdit::UpdateWidgetProperty() { if (!pWidget) { return; } - FX_DWORD dwExtendedStyle = + uint32_t dwExtendedStyle = FWL_STYLEEXT_EDT_ShowScrollbarFocus | FWL_STYLEEXT_EDT_OuterScrollbar | FWL_STYLEEXT_EDT_Password | FWL_STYLEEXT_EDT_LastLineHeight; dwExtendedStyle |= UpdateUIProperty(); @@ -563,7 +563,7 @@ CXFA_FFDateTimeEdit::CXFA_FFDateTimeEdit(CXFA_FFPageView* pPageView, CXFA_FFDateTimeEdit::~CXFA_FFDateTimeEdit() {} FX_BOOL CXFA_FFDateTimeEdit::GetBBox(CFX_RectF& rtBox, - FX_DWORD dwStatus, + uint32_t dwStatus, FX_BOOL bDrawFocus) { if (bDrawFocus) return FALSE; @@ -618,11 +618,11 @@ void CXFA_FFDateTimeEdit::UpdateWidgetProperty() { if (!pWidget) { return; } - FX_DWORD dwExtendedStyle = FWL_STYLEEXT_DTP_ShortDateFormat; + uint32_t dwExtendedStyle = FWL_STYLEEXT_DTP_ShortDateFormat; dwExtendedStyle |= UpdateUIProperty(); dwExtendedStyle |= GetAlignment(); m_pNormalWidget->ModifyStylesEx(dwExtendedStyle, 0xFFFFFFFF); - FX_DWORD dwEditStyles = FWL_STYLEEXT_EDT_LastLineHeight; + uint32_t dwEditStyles = FWL_STYLEEXT_EDT_LastLineHeight; int32_t iNumCells = m_pDataAcc->GetNumberOfCells(); if (iNumCells > 0) { dwEditStyles |= FWL_STYLEEXT_EDT_CombText; @@ -637,8 +637,8 @@ void CXFA_FFDateTimeEdit::UpdateWidgetProperty() { } pWidget->ModifyEditStylesEx(dwEditStyles, 0xFFFFFFFF); } -FX_DWORD CXFA_FFDateTimeEdit::GetAlignment() { - FX_DWORD dwExtendedStyle = 0; +uint32_t CXFA_FFDateTimeEdit::GetAlignment() { + uint32_t dwExtendedStyle = 0; if (CXFA_Para para = m_pDataAcc->GetPara()) { int32_t iHorz = para.GetHorizontalAlign(); switch (iHorz) { @@ -786,7 +786,7 @@ void CXFA_FFDateTimeEdit::OnSelectChanged(IFWL_Widget* pWidget, m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); } FWL_ERR CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { - FX_DWORD dwEventID = pEvent->GetClassID(); + uint32_t dwEventID = pEvent->GetClassID(); if (dwEventID == FWL_EVTHASH_DTP_SelectChanged) { CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 37d363f443..027d07a9f5 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -69,16 +69,16 @@ void CXFA_FFWidget::GetRectWithoutRotate(CFX_RectF& rtWidget) { break; } } -FX_DWORD CXFA_FFWidget::GetStatus() { +uint32_t CXFA_FFWidget::GetStatus() { return m_dwStatus; } -void CXFA_FFWidget::ModifyStatus(FX_DWORD dwAdded, FX_DWORD dwRemoved) { +void CXFA_FFWidget::ModifyStatus(uint32_t dwAdded, uint32_t dwRemoved) { m_dwStatus = (m_dwStatus & ~dwRemoved) | dwAdded; } FX_BOOL CXFA_FFWidget::GetBBox(CFX_RectF& rtBox, - FX_DWORD dwStatus, + uint32_t dwStatus, FX_BOOL bDrawFocus) { if (bDrawFocus) return FALSE; @@ -100,7 +100,7 @@ FX_BOOL CXFA_FFWidget::GetToolTip(CFX_WideString& wsToolTip) { } void CXFA_FFWidget::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - FX_DWORD dwStatus, + uint32_t dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; @@ -137,7 +137,7 @@ void CXFA_FFWidget::DrawBorder(CFX_Graphics* pGS, CXFA_Box box, const CFX_RectF& rtBorder, CFX_Matrix* pMatrix, - FX_DWORD dwFlags) { + uint32_t dwFlags) { XFA_DrawBox(box, pGS, rtBorder, pMatrix, dwFlags); } void CXFA_FFWidget::InvalidateWidget(const CFX_RectF* pRect) { @@ -179,37 +179,37 @@ FX_BOOL CXFA_FFWidget::OnMouseEnter() { FX_BOOL CXFA_FFWidget::OnMouseExit() { return FALSE; } -FX_BOOL CXFA_FFWidget::OnLButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFWidget::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFWidget::OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { +FX_BOOL CXFA_FFWidget::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFWidget::OnLButtonDblClk(FX_DWORD dwFlags, +FX_BOOL CXFA_FFWidget::OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFWidget::OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { +FX_BOOL CXFA_FFWidget::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFWidget::OnMouseWheel(FX_DWORD dwFlags, +FX_BOOL CXFA_FFWidget::OnMouseWheel(uint32_t dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFWidget::OnRButtonDown(FX_DWORD dwFlags, +FX_BOOL CXFA_FFWidget::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFWidget::OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) { +FX_BOOL CXFA_FFWidget::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } -FX_BOOL CXFA_FFWidget::OnRButtonDblClk(FX_DWORD dwFlags, +FX_BOOL CXFA_FFWidget::OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { return FALSE; @@ -238,16 +238,16 @@ FX_BOOL CXFA_FFWidget::OnKillFocus(CXFA_FFWidget* pNewWidget) { } return TRUE; } -FX_BOOL CXFA_FFWidget::OnKeyDown(FX_DWORD dwKeyCode, FX_DWORD dwFlags) { +FX_BOOL CXFA_FFWidget::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) { return FALSE; } -FX_BOOL CXFA_FFWidget::OnKeyUp(FX_DWORD dwKeyCode, FX_DWORD dwFlags) { +FX_BOOL CXFA_FFWidget::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { return FALSE; } -FX_BOOL CXFA_FFWidget::OnChar(FX_DWORD dwChar, FX_DWORD dwFlags) { +FX_BOOL CXFA_FFWidget::OnChar(uint32_t dwChar, uint32_t dwFlags) { return FALSE; } -FX_DWORD CXFA_FFWidget::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { +uint32_t CXFA_FFWidget::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { return FALSE; } FX_BOOL CXFA_FFWidget::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) { @@ -398,7 +398,7 @@ void CXFA_FFWidget::GetMinMaxHeight(FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight) { m_pDataAcc->GetMaxHeight(fMaxHeight); } } -FX_BOOL CXFA_FFWidget::IsMatchVisibleStatus(FX_DWORD dwStatus) { +FX_BOOL CXFA_FFWidget::IsMatchVisibleStatus(uint32_t dwStatus) { return m_dwStatus & XFA_WIDGETSTATUS_Visible; } void CXFA_FFWidget::EventKillFocus() { @@ -483,7 +483,7 @@ class CXFA_ImageRenderer { FX_ARGB bitmap_argb, int bitmap_alpha, const CFX_Matrix* pImage2Device, - FX_DWORD flags, + uint32_t flags, int blendType = FXDIB_BLEND_NORMAL); FX_BOOL Continue(IFX_Pause* pPause); @@ -495,7 +495,7 @@ class CXFA_ImageRenderer { CFX_DIBitmap* m_pCloneConvert; int m_BitmapAlpha; FX_ARGB m_FillArgb; - FX_DWORD m_Flags; + uint32_t m_Flags; CFX_ImageTransformer* m_pTransformer; void* m_DeviceHandle; int32_t m_BlendType; @@ -540,7 +540,7 @@ FX_BOOL CXFA_ImageRenderer::Start(CFX_RenderDevice* pDevice, FX_ARGB bitmap_argb, int bitmap_alpha, const CFX_Matrix* pImage2Device, - FX_DWORD flags, + uint32_t flags, int blendType) { m_pDevice = pDevice; m_pDIBSource = pDIBSource; @@ -683,7 +683,7 @@ void CXFA_ImageRenderer::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, return; } } else { - FX_DWORD fill_argb = (mask_argb); + uint32_t fill_argb = (mask_argb); if (bitmap_alpha < 255) { ((uint8_t*)&fill_argb)[3] = ((uint8_t*)&fill_argb)[3] * bitmap_alpha / 255; @@ -870,7 +870,7 @@ static int32_t XFA_Base64Decode(const FX_CHAR* pStr, uint8_t* pOutBuffer) { } int32_t iLen = FXSYS_strlen((FX_CHAR*)pBuffer); int32_t i = 0, j = 0; - FX_DWORD dwLimb = 0; + uint32_t dwLimb = 0; for (; i + 3 < iLen; i += 4) { if (pBuffer[i] == '=' || pBuffer[i + 1] == '=' || pBuffer[i + 2] == '=' || pBuffer[i + 3] == '=') { @@ -878,23 +878,23 @@ static int32_t XFA_Base64Decode(const FX_CHAR* pStr, uint8_t* pOutBuffer) { break; } if (pBuffer[i + 2] == '=') { - dwLimb = ((FX_DWORD)g_inv_base64[pBuffer[i]] << 6) | - ((FX_DWORD)g_inv_base64[pBuffer[i + 1]]); + dwLimb = ((uint32_t)g_inv_base64[pBuffer[i]] << 6) | + ((uint32_t)g_inv_base64[pBuffer[i + 1]]); pOutBuffer[j] = (uint8_t)(dwLimb >> 4) & 0xFF; j++; } else { - dwLimb = ((FX_DWORD)g_inv_base64[pBuffer[i]] << 12) | - ((FX_DWORD)g_inv_base64[pBuffer[i + 1]] << 6) | - ((FX_DWORD)g_inv_base64[pBuffer[i + 2]]); + dwLimb = ((uint32_t)g_inv_base64[pBuffer[i]] << 12) | + ((uint32_t)g_inv_base64[pBuffer[i + 1]] << 6) | + ((uint32_t)g_inv_base64[pBuffer[i + 2]]); pOutBuffer[j] = (uint8_t)(dwLimb >> 10) & 0xFF; pOutBuffer[j + 1] = (uint8_t)(dwLimb >> 2) & 0xFF; j += 2; } } else { - dwLimb = ((FX_DWORD)g_inv_base64[pBuffer[i]] << 18) | - ((FX_DWORD)g_inv_base64[pBuffer[i + 1]] << 12) | - ((FX_DWORD)g_inv_base64[pBuffer[i + 2]] << 6) | - ((FX_DWORD)g_inv_base64[pBuffer[i + 3]]); + dwLimb = ((uint32_t)g_inv_base64[pBuffer[i]] << 18) | + ((uint32_t)g_inv_base64[pBuffer[i + 1]] << 12) | + ((uint32_t)g_inv_base64[pBuffer[i + 2]] << 6) | + ((uint32_t)g_inv_base64[pBuffer[i + 3]]); pOutBuffer[j] = (uint8_t)(dwLimb >> 16) & 0xff; pOutBuffer[j + 1] = (uint8_t)(dwLimb >> 8) & 0xff; pOutBuffer[j + 2] = (uint8_t)(dwLimb)&0xff; @@ -911,11 +911,11 @@ static const FX_CHAR g_base64_chars[] = FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len) { FX_CHAR* out = NULL; int i, j; - FX_DWORD limb; + uint32_t limb; out = FX_Alloc(FX_CHAR, ((buf_len * 8 + 5) / 6) + 5); for (i = 0, j = 0, limb = 0; i + 2 < buf_len; i += 3, j += 4) { - limb = ((FX_DWORD)buf[i] << 16) | ((FX_DWORD)buf[i + 1] << 8) | - ((FX_DWORD)buf[i + 2]); + limb = ((uint32_t)buf[i] << 16) | ((uint32_t)buf[i + 1] << 8) | + ((uint32_t)buf[i + 2]); out[j] = g_base64_chars[(limb >> 18) & 63]; out[j + 1] = g_base64_chars[(limb >> 12) & 63]; out[j + 2] = g_base64_chars[(limb >> 6) & 63]; @@ -925,14 +925,14 @@ FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len) { case 0: break; case 1: - limb = ((FX_DWORD)buf[i]); + limb = ((uint32_t)buf[i]); out[j++] = g_base64_chars[(limb >> 2) & 63]; out[j++] = g_base64_chars[(limb << 4) & 63]; out[j++] = '='; out[j++] = '='; break; case 2: - limb = ((FX_DWORD)buf[i] << 8) | ((FX_DWORD)buf[i + 1]); + limb = ((uint32_t)buf[i] << 8) | ((uint32_t)buf[i + 1]); out[j++] = g_base64_chars[(limb >> 10) & 63]; out[j++] = g_base64_chars[(limb >> 4) & 63]; out[j++] = g_base64_chars[(limb << 2) & 63]; @@ -1120,7 +1120,7 @@ FX_BOOL XFA_IsCreateWidget(XFA_ELEMENT iType) { static void XFA_BOX_GetPath_Arc(CXFA_Box box, CFX_RectF rtDraw, CFX_Path& fillPath, - FX_DWORD dwFlags) { + uint32_t dwFlags) { FX_FLOAT a, b; a = rtDraw.width / 2.0f; b = rtDraw.height / 2.0f; @@ -1552,7 +1552,7 @@ static void XFA_BOX_Fill(CXFA_Box box, CFX_Graphics* pGS, const CFX_RectF& rtWidget, CFX_Matrix* pMatrix, - FX_DWORD dwFlags) { + uint32_t dwFlags) { CXFA_Fill fill = box.GetFill(); if (!fill || fill.GetPresence() != XFA_ATTRIBUTEENUM_Visible) { return; @@ -1623,7 +1623,7 @@ static void XFA_BOX_StrokeArc(CXFA_Box box, CFX_Graphics* pGS, CFX_RectF rtWidget, CFX_Matrix* pMatrix, - FX_DWORD dwFlags) { + uint32_t dwFlags) { CXFA_Edge edge = box.GetEdge(0); if (!edge || !edge.IsVisible()) { return; @@ -1883,7 +1883,7 @@ static void XFA_BOX_Stroke(CXFA_Box box, CFX_Graphics* pGS, CFX_RectF rtWidget, CFX_Matrix* pMatrix, - FX_DWORD dwFlags) { + uint32_t dwFlags) { if (box.IsArc() || (dwFlags & XFA_DRAWBOX_ForceRound) != 0) { XFA_BOX_StrokeArc(box, pGS, rtWidget, pMatrix, dwFlags); return; @@ -1947,7 +1947,7 @@ void XFA_DrawBox(CXFA_Box box, CFX_Graphics* pGS, const CFX_RectF& rtWidget, CFX_Matrix* pMatrix, - FX_DWORD dwFlags) { + uint32_t dwFlags) { if (!box || box.GetPresence() != XFA_ATTRIBUTEENUM_Visible) { return; } diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp index c62256262a..e4e574b969 100644 --- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp +++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp @@ -741,7 +741,7 @@ void CXFA_WidgetAcc::UpdateUIDisplay(CXFA_FFWidget* pExcept) { pWidget->AddInvalidateRect(); } } -void CXFA_WidgetAcc::NotifyEvent(FX_DWORD dwEvent, +void CXFA_WidgetAcc::NotifyEvent(uint32_t dwEvent, CXFA_FFWidget* pWidget, void* pParam, void* pAdditional) { @@ -899,7 +899,7 @@ void CXFA_WidgetAcc::CalculateTextContentSize(CFX_SizeF& size) { pTextOut->SetFontSize(fFontSize); pTextOut->SetLineBreakTolerance(fFontSize * 0.2f); pTextOut->SetLineSpace(GetLineHeight()); - FX_DWORD dwStyles = FDE_TTOSTYLE_LastLineHeight; + uint32_t dwStyles = FDE_TTOSTYLE_LastLineHeight; if (GetUIType() == XFA_ELEMENT_TextEdit && IsMultiLine()) { dwStyles |= FDE_TTOSTYLE_LineWrap; } @@ -1535,7 +1535,7 @@ CXFA_WidgetLayoutData* CXFA_WidgetAcc::GetWidgetLayoutData() { } IFX_Font* CXFA_WidgetAcc::GetFDEFont() { CFX_WideStringC wsFontName = FX_WSTRC(L"Courier"); - FX_DWORD dwFontStyle = 0; + uint32_t dwFontStyle = 0; if (CXFA_Font font = GetFont()) { if (font.IsBold()) { dwFontStyle |= FX_FONTSTYLE_Bold; diff --git a/xfa/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/fxfa/app/xfa_ffwidgethandler.cpp index b775643189..80d2e5acc5 100644 --- a/xfa/fxfa/app/xfa_ffwidgethandler.cpp +++ b/xfa/fxfa/app/xfa_ffwidgethandler.cpp @@ -25,12 +25,12 @@ IXFA_PageView* CXFA_FFWidgetHandler::GetPageView(IXFA_Widget* hWidget) { void CXFA_FFWidgetHandler::GetRect(IXFA_Widget* hWidget, CFX_RectF& rt) { static_cast<CXFA_FFWidget*>(hWidget)->GetWidgetRect(rt); } -FX_DWORD CXFA_FFWidgetHandler::GetStatus(IXFA_Widget* hWidget) { +uint32_t CXFA_FFWidgetHandler::GetStatus(IXFA_Widget* hWidget) { return static_cast<CXFA_FFWidget*>(hWidget)->GetStatus(); } FX_BOOL CXFA_FFWidgetHandler::GetBBox(IXFA_Widget* hWidget, CFX_RectF& rtBox, - FX_DWORD dwStatus, + uint32_t dwStatus, FX_BOOL bDrawFocus) { return static_cast<CXFA_FFWidget*>(hWidget) ->GetBBox(rtBox, dwStatus, bDrawFocus); @@ -74,7 +74,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnMouseExit(IXFA_Widget* hWidget) { return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnLButtonDown(IXFA_Widget* hWidget, - FX_DWORD dwFlags, + uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { m_pDocView->LockUpdate(); @@ -91,7 +91,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnLButtonDown(IXFA_Widget* hWidget, return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnLButtonUp(IXFA_Widget* hWidget, - FX_DWORD dwFlags, + uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { m_pDocView->LockUpdate(); @@ -104,7 +104,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnLButtonUp(IXFA_Widget* hWidget, return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnLButtonDblClk(IXFA_Widget* hWidget, - FX_DWORD dwFlags, + uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy); @@ -114,7 +114,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnLButtonDblClk(IXFA_Widget* hWidget, return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnMouseMove(IXFA_Widget* hWidget, - FX_DWORD dwFlags, + uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy); @@ -124,7 +124,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnMouseMove(IXFA_Widget* hWidget, return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnMouseWheel(IXFA_Widget* hWidget, - FX_DWORD dwFlags, + uint32_t dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy) { @@ -135,7 +135,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnMouseWheel(IXFA_Widget* hWidget, return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnRButtonDown(IXFA_Widget* hWidget, - FX_DWORD dwFlags, + uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy); @@ -150,7 +150,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnRButtonDown(IXFA_Widget* hWidget, return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnRButtonUp(IXFA_Widget* hWidget, - FX_DWORD dwFlags, + uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy); @@ -160,7 +160,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnRButtonUp(IXFA_Widget* hWidget, return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnRButtonDblClk(IXFA_Widget* hWidget, - FX_DWORD dwFlags, + uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy); @@ -170,8 +170,8 @@ FX_BOOL CXFA_FFWidgetHandler::OnRButtonDblClk(IXFA_Widget* hWidget, return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnKeyDown(IXFA_Widget* hWidget, - FX_DWORD dwKeyCode, - FX_DWORD dwFlags) { + uint32_t dwKeyCode, + uint32_t dwFlags) { FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnKeyDown(dwKeyCode, dwFlags); m_pDocView->RunInvalidate(); @@ -179,21 +179,21 @@ FX_BOOL CXFA_FFWidgetHandler::OnKeyDown(IXFA_Widget* hWidget, return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnKeyUp(IXFA_Widget* hWidget, - FX_DWORD dwKeyCode, - FX_DWORD dwFlags) { + uint32_t dwKeyCode, + uint32_t dwFlags) { FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnKeyUp(dwKeyCode, dwFlags); m_pDocView->RunInvalidate(); return bRet; } FX_BOOL CXFA_FFWidgetHandler::OnChar(IXFA_Widget* hWidget, - FX_DWORD dwChar, - FX_DWORD dwFlags) { + uint32_t dwChar, + uint32_t dwFlags) { FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnChar(dwChar, dwFlags); m_pDocView->RunInvalidate(); return bRet; } -FX_DWORD CXFA_FFWidgetHandler::OnHitTest(IXFA_Widget* hWidget, +uint32_t CXFA_FFWidgetHandler::OnHitTest(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy) { if (!(static_cast<CXFA_FFWidget*>(hWidget)->GetStatus() & @@ -534,7 +534,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const { return pFont; } CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent, - FX_DWORD dwFlags, + uint32_t dwFlags, FX_FLOAT fInsets[4]) const { CXFA_Node* pMargin = CreateCopyNode(XFA_ELEMENT_Margin, pParent); if (dwFlags & 0x01) { diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp index 6ac5f0c984..256af6cf21 100644 --- a/xfa/fxfa/app/xfa_fontmgr.cpp +++ b/xfa/fxfa/app/xfa_fontmgr.cpp @@ -1698,14 +1698,14 @@ void XFA_LocalFontNameToEnglishName(const CFX_WideStringC& wsLocalName, _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || \ _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \ _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_ - FX_DWORD dwLocalNameHash = FX_HashCode_String_GetW( + uint32_t dwLocalNameHash = FX_HashCode_String_GetW( wsLocalName.GetPtr(), wsLocalName.GetLength(), TRUE); int32_t iStart = 0; int32_t iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1; int32_t iMid = 0; do { iMid = (iStart + iEnd) / 2; - FX_DWORD dwFontNameHash = g_XFAFontsMap[iMid].dwFontNameHash; + uint32_t dwFontNameHash = g_XFAFontsMap[iMid].dwFontNameHash; if (dwFontNameHash == dwLocalNameHash) { wsEnglishName = g_XFAFontsMap[iMid].pPsName; break; @@ -1725,7 +1725,7 @@ const XFA_FONTINFO* XFA_GetFontINFOByFontName( _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_ CFX_WideString wsFontNameTemp = wsFontName; wsFontNameTemp.Remove(L' '); - FX_DWORD dwCurFontNameHash = + uint32_t dwCurFontNameHash = FX_HashCode_String_GetW(wsFontNameTemp, wsFontNameTemp.GetLength(), TRUE); int32_t iStart = 0; int32_t iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1; @@ -1733,7 +1733,7 @@ const XFA_FONTINFO* XFA_GetFontINFOByFontName( const XFA_FONTINFO* pFontInfo = NULL; do { iMid = (iStart + iEnd) / 2; - FX_DWORD dwFontNameHash = g_XFAFontsMap[iMid].dwFontNameHash; + uint32_t dwFontNameHash = g_XFAFontsMap[iMid].dwFontNameHash; if (dwFontNameHash == dwCurFontNameHash) { pFontInfo = &g_XFAFontsMap[iMid]; break; @@ -1764,7 +1764,7 @@ CXFA_DefFontMgr::~CXFA_DefFontMgr() { IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage) { CFX_WideString wsFontName = wsFontFamily; IFX_FontMgr* pFDEFontMgr = @@ -1773,7 +1773,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, if (!pFont) { const XFA_FONTINFO* pCurFont = XFA_GetFontINFOByFontName(wsFontName); if (pCurFont && pCurFont->pReplaceFont) { - FX_DWORD dwStyle = 0; + uint32_t dwStyle = 0; if (dwFontStyles & FX_FONTSTYLE_Bold) { dwStyle |= FX_FONTSTYLE_Bold; } @@ -1808,7 +1808,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage) { IFX_FontMgr* pFDEFontMgr = ((CXFA_FFDoc*)hDoc)->GetApp()->GetFDEFontMgr(); IFX_Font* pFont = @@ -1891,10 +1891,10 @@ IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName, return NULL; } IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, CPDF_Font** pPDFFont, FX_BOOL bStrictMatch) { - FX_DWORD dwHashCode = + uint32_t dwHashCode = FX_HashCode_String_GetW(wsFontFamily.GetPtr(), wsFontFamily.GetLength()); CFX_ByteString strKey; strKey.Format("%u%u", dwHashCode, dwFontStyles); @@ -2020,9 +2020,9 @@ CXFA_FontMgr::~CXFA_FontMgr() { } IFX_Font* CXFA_FontMgr::GetFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, - FX_DWORD dwFontStyles, + uint32_t dwFontStyles, uint16_t wCodePage) { - FX_DWORD dwHash = FX_HashCode_String_GetW(wsFontFamily.GetPtr(), + uint32_t dwHash = FX_HashCode_String_GetW(wsFontFamily.GetPtr(), wsFontFamily.GetLength(), FALSE); CFX_ByteString bsKey; bsKey.Format("%u%u%u", dwHash, dwFontStyles, wCodePage); diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp index 3c0d100488..9c55b27652 100644 --- a/xfa/fxfa/app/xfa_fwltheme.cpp +++ b/xfa/fxfa/app/xfa_fwltheme.cpp @@ -112,11 +112,11 @@ FWL_ERR CXFA_FWLTheme::Finalize() { FX_BOOL CXFA_FWLTheme::IsValidWidget(IFWL_Widget* pWidget) { return TRUE; } -FX_DWORD CXFA_FWLTheme::GetThemeID(IFWL_Widget* pWidget) { +uint32_t CXFA_FWLTheme::GetThemeID(IFWL_Widget* pWidget) { return 0; } -FX_DWORD CXFA_FWLTheme::SetThemeID(IFWL_Widget* pWidget, - FX_DWORD dwThemeID, +uint32_t CXFA_FWLTheme::SetThemeID(IFWL_Widget* pWidget, + uint32_t dwThemeID, FX_BOOL bChildren) { return 0; } @@ -191,7 +191,7 @@ FX_BOOL CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) { return TRUE; } void* CXFA_FWLTheme::GetCapacity(CFWL_ThemePart* pThemePart, - FX_DWORD dwCapacity) { + uint32_t dwCapacity) { switch (dwCapacity) { case FWL_WGTCAPACITY_Font: { if (CXFA_FFWidget* pWidget = @@ -377,12 +377,12 @@ void CXFA_FWLCheckBoxTP::DrawCheckSign(IFWL_Widget* pWidget, int32_t iState, CFX_Matrix* pMatrix) { CFX_RectF rtSign(*pRtBox); - FX_DWORD dwColor = 0xFF000000; + uint32_t dwColor = 0xFF000000; if ((iState & FWL_PARTSTATE_CKB_Mask2) == FWL_PARTSTATE_CKB_Neutral) { dwColor = 0xFFA9A9A9; } { - FX_DWORD dwStyle = pWidget->GetStylesEx(); + uint32_t dwStyle = pWidget->GetStylesEx(); rtSign.Deflate(rtSign.width / 4, rtSign.height / 4); switch (dwStyle & FWL_STYLEEXT_CKB_SignShapeMask) { case FWL_STYLEEXT_CKB_SignShapeCheck: diff --git a/xfa/fxfa/app/xfa_rendercontext.cpp b/xfa/fxfa/app/xfa_rendercontext.cpp index c9ca92bd6c..ec9a3f88f4 100644 --- a/xfa/fxfa/app/xfa_rendercontext.cpp +++ b/xfa/fxfa/app/xfa_rendercontext.cpp @@ -41,7 +41,7 @@ int32_t CXFA_RenderContext::StartRender(IXFA_PageView* pPageView, m_rtClipRect.Set(rtPage.left, rtPage.top, rtPage.width, rtPage.height); mtRes.TransformRect(m_rtClipRect); m_dwStatus = m_options.m_bHighlight ? XFA_WIDGETSTATUS_Highlight : 0; - FX_DWORD dwFilterType = XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_AllType | + uint32_t dwFilterType = XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_AllType | (m_options.m_bPrint ? XFA_WIDGETSTATUS_Printable : XFA_WIDGETSTATUS_Viewable); m_pWidgetIterator = diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp index 6a17122149..ddd9809f91 100644 --- a/xfa/fxfa/app/xfa_textlayout.cpp +++ b/xfa/fxfa/app/xfa_textlayout.cpp @@ -170,7 +170,7 @@ IFDE_CSSComputedStyle* CXFA_TextParser::CreateRootStyle( FDE_CSSLENGTH letterSpacing; letterSpacing.Set(FDE_CSSLENGTHUNIT_Point, font.GetLetterSpacing()); pParaStyle->SetLetterSpacing(letterSpacing); - FX_DWORD dwDecoration = 0; + uint32_t dwDecoration = 0; if (font.GetLineThrough() > 0) { dwDecoration |= FDE_CSSTEXTDECORATION_LineThrough; } @@ -192,7 +192,7 @@ IFDE_CSSComputedStyle* CXFA_TextParser::CreateStyle( FXSYS_assert(pNewStyle); if (pParentStyle) { IFDE_CSSParagraphStyle* pParaStyle = pParentStyle->GetParagraphStyles(); - FX_DWORD dwDecoration = pParaStyle->GetTextDecoration(); + uint32_t dwDecoration = pParaStyle->GetTextDecoration(); FX_FLOAT fBaseLine = 0; if (pParaStyle->GetVerticalAlign() == FDE_CSSVERTICALALIGN_Number) { fBaseLine = pParaStyle->GetNumberVerticalAlign(); @@ -289,7 +289,7 @@ void CXFA_TextParser::ParseRichText(IFDE_XMLNode* pXMLNode, } void CXFA_TextParser::ParseTagInfo(IFDE_XMLNode* pXMLNode, CXFA_CSSTagProvider& tagProvider) { - static const FX_DWORD s_XFATagName[] = { + static const uint32_t s_XFATagName[] = { 0x61, 0x62, 0x69, 0x70, 0x0001f714, 0x00022a55, 0x000239bb, 0x00025881, 0x0bd37faa, 0x0bd37fb8, 0xa73e3af2, 0xb182eaae, 0xdb8ac455, @@ -299,10 +299,10 @@ void CXFA_TextParser::ParseTagInfo(IFDE_XMLNode* pXMLNode, IFDE_XMLElement* pXMLElement = (IFDE_XMLElement*)pXMLNode; pXMLElement->GetLocalTagName(wsName); tagProvider.SetTagNameObj(wsName); - FX_DWORD dwHashCode = + uint32_t dwHashCode = FX_HashCode_String_GetW(wsName, wsName.GetLength(), TRUE); - static const int32_t s_iCount = sizeof(s_XFATagName) / sizeof(FX_DWORD); - CFX_DSPATemplate<FX_DWORD> lookup; + static const int32_t s_iCount = sizeof(s_XFATagName) / sizeof(uint32_t); + CFX_DSPATemplate<uint32_t> lookup; tagProvider.m_bTagAviliable = lookup.Lookup(dwHashCode, s_XFATagName, s_iCount) > -1; CFX_WideString wsValue; @@ -349,7 +349,7 @@ FX_BOOL CXFA_TextParser::IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const { IFX_Font* CXFA_TextParser::GetFont(IXFA_TextProvider* pTextProvider, IFDE_CSSComputedStyle* pStyle) const { CFX_WideStringC wsFamily = FX_WSTRC(L"Courier"); - FX_DWORD dwStyle = 0; + uint32_t dwStyle = 0; CXFA_Font font = pTextProvider->GetFontNode(); if (font) { font.GetTypeface(wsFamily); @@ -434,7 +434,7 @@ void CXFA_TextParser::GetUnderline(IXFA_TextProvider* pTextProvider, iUnderline = 0; iPeriod = XFA_ATTRIBUTEENUM_All; if (pStyle) { - FX_DWORD dwDecoration = pStyle->GetParagraphStyles()->GetTextDecoration(); + uint32_t dwDecoration = pStyle->GetParagraphStyles()->GetTextDecoration(); if (dwDecoration & FDE_CSSTEXTDECORATION_Double) { iUnderline = 2; } else if (dwDecoration & FDE_CSSTEXTDECORATION_Underline) { @@ -460,7 +460,7 @@ void CXFA_TextParser::GetLinethrough(IXFA_TextProvider* pTextProvider, IFDE_CSSComputedStyle* pStyle, int32_t& iLinethrough) const { if (pStyle) { - FX_DWORD dwDecoration = pStyle->GetParagraphStyles()->GetTextDecoration(); + uint32_t dwDecoration = pStyle->GetParagraphStyles()->GetTextDecoration(); iLinethrough = (dwDecoration & FDE_CSSTEXTDECORATION_LineThrough) ? 1 : 0; } else { CXFA_Font font = pTextProvider->GetFontNode(); @@ -640,7 +640,7 @@ FX_BOOL CXFA_TextParser::GetTabstops( break; case XFA_TABSTOPSSTATUS_Location: if (ch == ' ') { - FX_DWORD dwHashCode = + uint32_t dwHashCode = FX_HashCode_String_GetW(wsAlign, wsAlign.GetLength(), TRUE); CXFA_Measurement ms(CFX_WideStringC(pTabStops + iLast, iCur - iLast)); FX_FLOAT fPos = ms.ToUnit(XFA_UNIT_Pt); @@ -655,7 +655,7 @@ FX_BOOL CXFA_TextParser::GetTabstops( } } if (!wsAlign.IsEmpty()) { - FX_DWORD dwHashCode = + uint32_t dwHashCode = FX_HashCode_String_GetW(wsAlign, wsAlign.GetLength(), TRUE); CXFA_Measurement ms(CFX_WideStringC(pTabStops + iLast, iCur - iLast)); FX_FLOAT fPos = ms.ToUnit(XFA_UNIT_Pt); @@ -737,7 +737,7 @@ IFDE_XMLNode* CXFA_TextLayout::GetXMLContainerNode() { return pXMLContainer; } IFX_RTFBreak* CXFA_TextLayout::CreateBreak(FX_BOOL bDefault) { - FX_DWORD dwStyle = FX_RTFLAYOUTSTYLE_ExpandTab; + uint32_t dwStyle = FX_RTFLAYOUTSTYLE_ExpandTab; if (!bDefault) { dwStyle |= FX_RTFLAYOUTSTYLE_Pagination; } @@ -1535,7 +1535,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode, } if (m_bBlockContinue) { if (pContext && !bContentNode) { - FX_DWORD dwStatus = (eDisplay == FDE_CSSDISPLAY_Block) + uint32_t dwStatus = (eDisplay == FDE_CSSDISPLAY_Block) ? FX_RTFBREAK_ParagraphBreak : FX_RTFBREAK_PieceBreak; EndBreak(dwStatus, fLinePos, bSavePieces); @@ -1572,7 +1572,7 @@ FX_BOOL CXFA_TextLayout::AppendChar(const CFX_WideString& wsText, FX_FLOAT& fLinePos, FX_FLOAT fSpaceAbove, FX_BOOL bSavePieces) { - FX_DWORD dwStatus = 0; + uint32_t dwStatus = 0; int32_t iChar = 0; if (m_pLoader) { iChar = m_pLoader->m_iChar; @@ -1631,7 +1631,7 @@ void CXFA_TextLayout::ProcessText(CFX_WideString& wsText) { wsText.ReleaseBuffer(iLen); wsText = wsText.Left(iTrimLeft); } -void CXFA_TextLayout::EndBreak(FX_DWORD dwStatus, +void CXFA_TextLayout::EndBreak(uint32_t dwStatus, FX_FLOAT& fLinePos, FX_BOOL bSavePieces) { dwStatus = m_pBreak->EndBreak(dwStatus); @@ -1672,7 +1672,7 @@ void CXFA_TextLayout::DoTabstops(IFDE_CSSComputedStyle* pStyle, if (m_pTabstopContext->m_bTabstops) { XFA_TABSTOPS* pTabstops = m_pTabstopContext->m_tabstops.GetDataPtr(iTabstopsIndex); - FX_DWORD dwAlgin = pTabstops->dwAlign; + uint32_t dwAlgin = pTabstops->dwAlign; if (dwAlgin == FX_HashCode_String_GetW(L"center", 6)) { fLeft = pPiece->rtPiece.width / 2.0f; } else if (dwAlgin == FX_HashCode_String_GetW(L"right", 5) || @@ -1695,7 +1695,7 @@ void CXFA_TextLayout::DoTabstops(IFDE_CSSComputedStyle* pStyle, pPiece->rtPiece.left -= m_pTabstopContext->m_fLeft; } } -void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus, +void CXFA_TextLayout::AppendTextLine(uint32_t dwStatus, FX_FLOAT& fLinePos, FX_BOOL bSavePieces, FX_BOOL bEndBreak) { diff --git a/xfa/fxfa/fm2js/xfa_expression.cpp b/xfa/fxfa/fm2js/xfa_expression.cpp index a97e777256..0166fa609f 100644 --- a/xfa/fxfa/fm2js/xfa_expression.cpp +++ b/xfa/fxfa/fm2js/xfa_expression.cpp @@ -18,10 +18,10 @@ const CFX_WideStringC RUNTIMEBLOCKTEMPARRAYINDEX = } // namespace -CXFA_FMExpression::CXFA_FMExpression(FX_DWORD line) +CXFA_FMExpression::CXFA_FMExpression(uint32_t line) : m_type(XFA_FM_EXPTYPE_UNKNOWN), m_line(line) {} -CXFA_FMExpression::CXFA_FMExpression(FX_DWORD line, XFA_FM_EXPTYPE type) +CXFA_FMExpression::CXFA_FMExpression(uint32_t line, XFA_FM_EXPTYPE type) : m_type(type), m_line(line) {} void CXFA_FMExpression::ToJavaScript(CFX_WideTextBuf& javascript) {} @@ -29,7 +29,7 @@ void CXFA_FMExpression::ToJavaScript(CFX_WideTextBuf& javascript) {} void CXFA_FMExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {} CXFA_FMFunctionDefinition::CXFA_FMFunctionDefinition( - FX_DWORD line, + uint32_t line, FX_BOOL isGlobal, const CFX_WideStringC& wsName, CFX_WideStringCArray* pArguments, @@ -118,7 +118,7 @@ void CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& javascript) { void CXFA_FMFunctionDefinition::ToImpliedReturnJS(CFX_WideTextBuf&) {} -CXFA_FMVarExpression::CXFA_FMVarExpression(FX_DWORD line, +CXFA_FMVarExpression::CXFA_FMVarExpression(uint32_t line, const CFX_WideStringC& wsName, CXFA_FMExpression* pInit) : CXFA_FMExpression(line, XFA_FM_EXPTYPE_VAR), @@ -171,7 +171,7 @@ void CXFA_FMVarExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { javascript << FX_WSTRC(L";\n"); } -CXFA_FMExpExpression::CXFA_FMExpExpression(FX_DWORD line, +CXFA_FMExpExpression::CXFA_FMExpExpression(uint32_t line, CXFA_FMSimpleExpression* pExpression) : CXFA_FMExpression(line, XFA_FM_EXPTYPE_EXP), m_pExpression(pExpression) {} @@ -208,7 +208,7 @@ void CXFA_FMExpExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { } } -CXFA_FMBlockExpression::CXFA_FMBlockExpression(FX_DWORD line, +CXFA_FMBlockExpression::CXFA_FMBlockExpression(uint32_t line, CFX_PtrArray* pExpressionList) : CXFA_FMExpression(line, XFA_FM_EXPTYPE_BLOCK), m_pExpressionList(pExpressionList) {} @@ -251,7 +251,7 @@ void CXFA_FMBlockExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { javascript << FX_WSTRC(L"}\n"); } -CXFA_FMDoExpression::CXFA_FMDoExpression(FX_DWORD line, +CXFA_FMDoExpression::CXFA_FMDoExpression(uint32_t line, CXFA_FMExpression* pList) : CXFA_FMExpression(line), m_pList(pList) {} @@ -263,7 +263,7 @@ void CXFA_FMDoExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { m_pList->ToImpliedReturnJS(javascript); } -CXFA_FMIfExpression::CXFA_FMIfExpression(FX_DWORD line, +CXFA_FMIfExpression::CXFA_FMIfExpression(uint32_t line, CXFA_FMSimpleExpression* pExpression, CXFA_FMExpression* pIfExpression, CXFA_FMExpression* pElseExpression) @@ -331,7 +331,7 @@ void CXFA_FMLoopExpression::ToJavaScript(CFX_WideTextBuf& javascript) {} void CXFA_FMLoopExpression::ToImpliedReturnJS(CFX_WideTextBuf&) {} CXFA_FMWhileExpression::CXFA_FMWhileExpression( - FX_DWORD line, + uint32_t line, CXFA_FMSimpleExpression* pCondition, CXFA_FMExpression* pExpression) : CXFA_FMLoopExpression(line), @@ -354,7 +354,7 @@ void CXFA_FMWhileExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { m_pExpression->ToImpliedReturnJS(javascript); } -CXFA_FMBreakExpression::CXFA_FMBreakExpression(FX_DWORD line) +CXFA_FMBreakExpression::CXFA_FMBreakExpression(uint32_t line) : CXFA_FMExpression(line, XFA_FM_EXPTYPE_BREAK) {} CXFA_FMBreakExpression::~CXFA_FMBreakExpression() {} @@ -371,7 +371,7 @@ void CXFA_FMBreakExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { javascript << FX_WSTRC(L"break;\n"); } -CXFA_FMContinueExpression::CXFA_FMContinueExpression(FX_DWORD line) +CXFA_FMContinueExpression::CXFA_FMContinueExpression(uint32_t line) : CXFA_FMExpression(line, XFA_FM_EXPTYPE_CONTINUE) {} CXFA_FMContinueExpression::~CXFA_FMContinueExpression() {} @@ -388,7 +388,7 @@ void CXFA_FMContinueExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { javascript << FX_WSTRC(L"continue;\n"); } -CXFA_FMForExpression::CXFA_FMForExpression(FX_DWORD line, +CXFA_FMForExpression::CXFA_FMForExpression(uint32_t line, const CFX_WideStringC& wsVariant, CXFA_FMSimpleExpression* pAssignment, CXFA_FMSimpleExpression* pAccessor, @@ -504,7 +504,7 @@ void CXFA_FMForExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { } CXFA_FMForeachExpression::CXFA_FMForeachExpression( - FX_DWORD line, + uint32_t line, const CFX_WideStringC& wsIdentifier, CFX_PtrArray* pAccessors, CXFA_FMExpression* pList) diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp index 7b3573f36e..3acae67bc3 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp @@ -4288,7 +4288,7 @@ FX_BOOL CXFA_FM2JSContext::HTMLCode2STR(uint32_t iCode, return FALSE; } static FX_BOOL XFA_PATTERN_STRING_Type(const CFX_ByteStringC& szPattern, - FX_DWORD& patternType) { + uint32_t& patternType) { CFX_WideString wsPattern = CFX_WideString::FromUTF8(szPattern.GetCStr(), szPattern.GetLength()); if (FX_WSTRC(L"datetime") == wsPattern.Left(8)) { @@ -4391,7 +4391,7 @@ void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis, FXSYS_assert(pThisNode); CXFA_WidgetData widgetData(pThisNode); IFX_Locale* pLocale = widgetData.GetLocal(); - FX_DWORD patternType; + uint32_t patternType; FX_BOOL bCompelte = XFA_PATTERN_STRING_Type(szPattern, patternType); CFX_WideString wsPattern = CFX_WideString::FromUTF8(szPattern, szPattern.GetLength()); @@ -4603,7 +4603,7 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis, FXSYS_assert(pThisNode); CXFA_WidgetData widgetData(pThisNode); IFX_Locale* pLocale = widgetData.GetLocal(); - FX_DWORD patternType; + uint32_t patternType; FX_BOOL bCompletePattern = XFA_PATTERN_STRING_Type(szPattern, patternType); CFX_WideString wsPattern = @@ -6837,7 +6837,7 @@ FX_BOOL CXFA_FM2JSContext::GetObjectByName( } IXFA_ScriptContext* pScriptContext = pDoc->GetScriptContext(); XFA_RESOLVENODE_RS resoveNodeRS; - FX_DWORD dwFlags = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | + uint32_t dwFlags = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent; int32_t iRet = pScriptContext->ResolveObjects( pScriptContext->GetThisObject(), @@ -6868,7 +6868,7 @@ int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis, } IXFA_ScriptContext* pScriptContext = pDoc->GetScriptContext(); CXFA_Object* pNode = NULL; - FX_DWORD dFlags = 0UL; + uint32_t dFlags = 0UL; if (bdotAccessor) { if (FXJSE_Value_IsNull(hRefValue)) { pNode = pScriptContext->GetThisObject(); diff --git a/xfa/fxfa/fm2js/xfa_fmparse.cpp b/xfa/fxfa/fm2js/xfa_fmparse.cpp index 6e30d95f1a..e66a42f471 100644 --- a/xfa/fxfa/fm2js/xfa_fmparse.cpp +++ b/xfa/fxfa/fm2js/xfa_fmparse.cpp @@ -36,7 +36,7 @@ void CXFA_FMParse::Check(XFA_FM_TOKEN op) { NextToken(); } -void CXFA_FMParse::Error(FX_DWORD lineNum, XFA_FM_ERRMSG msg, ...) { +void CXFA_FMParse::Error(uint32_t lineNum, XFA_FM_ERRMSG msg, ...) { m_pErrorInfo->linenum = lineNum; const FX_WCHAR* lpMessageInfo = XFA_FM_ErrorMsg(msg); va_list ap; @@ -79,7 +79,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseFunction() { CFX_WideStringC ident; std::unique_ptr<CFX_WideStringCArray> pArguments; std::unique_ptr<CFX_PtrArray> pExpressions; - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; NextToken(); if (m_pToken->m_type != TOKidentifier) { CFX_WideString ws_TempString = m_pToken->m_wstring; @@ -142,7 +142,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseFunction() { CXFA_FMExpression* CXFA_FMParse::ParseExpression() { std::unique_ptr<CXFA_FMExpression> e; - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; switch (m_pToken->m_type) { case TOKvar: e.reset(ParseVarExpression()); @@ -193,7 +193,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseExpression() { CXFA_FMExpression* CXFA_FMParse::ParseVarExpression() { std::unique_ptr<CXFA_FMExpression> e; CFX_WideStringC ident; - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; NextToken(); if (m_pToken->m_type != TOKidentifier) { CFX_WideString ws_TempString = m_pToken->m_wstring; @@ -216,7 +216,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseVarExpression() { } CXFA_FMSimpleExpression* CXFA_FMParse::ParseSimpleExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; std::unique_ptr<CXFA_FMSimpleExpression> pExp1(ParseLogicalOrExpression()); while (m_pToken->m_type == TOKassign) { NextToken(); @@ -232,7 +232,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseSimpleExpression() { } CXFA_FMExpression* CXFA_FMParse::ParseExpExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; std::unique_ptr<CXFA_FMSimpleExpression> pExp1(ParseSimpleExpression()); std::unique_ptr<CXFA_FMExpression> e; if (m_pErrorInfo->message.IsEmpty()) { @@ -244,7 +244,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseExpExpression() { } CXFA_FMSimpleExpression* CXFA_FMParse::ParseLogicalOrExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; std::unique_ptr<CXFA_FMSimpleExpression> e1(ParseLogicalAndExpression()); for (;;) { switch (m_pToken->m_type) { @@ -270,7 +270,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseLogicalOrExpression() { } CXFA_FMSimpleExpression* CXFA_FMParse::ParseLogicalAndExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; std::unique_ptr<CXFA_FMSimpleExpression> e1(ParseEqualityExpression()); for (;;) { switch (m_pToken->m_type) { @@ -295,7 +295,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseLogicalAndExpression() { } CXFA_FMSimpleExpression* CXFA_FMParse::ParseEqualityExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; std::unique_ptr<CXFA_FMSimpleExpression> e1(ParseRelationalExpression()); for (;;) { std::unique_ptr<CXFA_FMSimpleExpression> e2; @@ -331,7 +331,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseEqualityExpression() { } CXFA_FMSimpleExpression* CXFA_FMParse::ParseRelationalExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; std::unique_ptr<CXFA_FMSimpleExpression> e1(ParseAddtiveExpression()); for (;;) { std::unique_ptr<CXFA_FMSimpleExpression> e2; @@ -389,7 +389,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseRelationalExpression() { } CXFA_FMSimpleExpression* CXFA_FMParse::ParseAddtiveExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; std::unique_ptr<CXFA_FMSimpleExpression> e1(ParseMultiplicativeExpression()); for (;;) { std::unique_ptr<CXFA_FMSimpleExpression> e2; @@ -423,7 +423,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseAddtiveExpression() { } CXFA_FMSimpleExpression* CXFA_FMParse::ParseMultiplicativeExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; std::unique_ptr<CXFA_FMSimpleExpression> e1(ParseUnaryExpression()); for (;;) { std::unique_ptr<CXFA_FMSimpleExpression> e2; @@ -458,7 +458,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseMultiplicativeExpression() { CXFA_FMSimpleExpression* CXFA_FMParse::ParseUnaryExpression() { std::unique_ptr<CXFA_FMSimpleExpression> e; - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; switch (m_pToken->m_type) { case TOKplus: NextToken(); @@ -496,7 +496,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseUnaryExpression() { CXFA_FMSimpleExpression* CXFA_FMParse::ParsePrimaryExpression() { std::unique_ptr<CXFA_FMSimpleExpression> e; - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; switch (m_pToken->m_type) { case TOKnumber: e.reset(new CXFA_FMNumberExpression(line, m_pToken->m_wstring)); @@ -546,7 +546,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePrimaryExpression() { CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( CXFA_FMSimpleExpression* e) { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; while (1) { switch (m_pToken->m_type) { case TOKlparen: { @@ -599,7 +599,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( NextToken(); if (m_pToken->m_type == TOKidentifier) { CFX_WideStringC tempStr = m_pToken->m_wstring; - FX_DWORD tempLine = m_pToken->m_uLinenum; + uint32_t tempLine = m_pToken->m_uLinenum; NextToken(); if (m_pToken->m_type == TOKlparen) { CXFA_FMSimpleExpression* pExpAccessor; @@ -678,7 +678,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( NextToken(); if (m_pToken->m_type == TOKidentifier) { CFX_WideStringC tempStr = m_pToken->m_wstring; - FX_DWORD tempLine = m_pToken->m_uLinenum; + uint32_t tempLine = m_pToken->m_uLinenum; NextToken(); if (m_pToken->m_type == TOKlbracket) { std::unique_ptr<CXFA_FMSimpleExpression> s(ParseIndexExpression()); @@ -706,7 +706,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( NextToken(); if (m_pToken->m_type == TOKidentifier) { CFX_WideStringC tempStr = m_pToken->m_wstring; - FX_DWORD tempLine = m_pToken->m_uLinenum; + uint32_t tempLine = m_pToken->m_uLinenum; NextToken(); if (m_pToken->m_type == TOKlbracket) { std::unique_ptr<CXFA_FMSimpleExpression> s(ParseIndexExpression()); @@ -746,7 +746,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( CXFA_FMSimpleExpression* CXFA_FMParse::ParseIndexExpression() { std::unique_ptr<CXFA_FMSimpleExpression> pExp; - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; NextToken(); std::unique_ptr<CXFA_FMSimpleExpression> s; XFA_FM_AccessorIndex accessorIndex = ACCESSOR_NO_RELATIVEINDEX; @@ -790,7 +790,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseParenExpression() { return nullptr; } - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; std::unique_ptr<CXFA_FMSimpleExpression> pExp1(ParseLogicalOrExpression()); while (m_pToken->m_type == TOKassign) { @@ -808,7 +808,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseParenExpression() { } CXFA_FMExpression* CXFA_FMParse::ParseBlockExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; CXFA_FMExpression* e = nullptr; std::unique_ptr<CFX_PtrArray> expression(new CFX_PtrArray()); while (1) { @@ -849,7 +849,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseBlockExpression() { } CXFA_FMExpression* CXFA_FMParse::ParseIfExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; const FX_WCHAR* pStartPos = m_lexer->SavePos(); NextToken(); Check(TOKlparen); @@ -906,7 +906,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseIfExpression() { } CXFA_FMExpression* CXFA_FMParse::ParseWhileExpression() { - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; NextToken(); std::unique_ptr<CXFA_FMSimpleExpression> pCondition(ParseParenExpression()); Check(TOKdo); @@ -938,7 +938,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseSubassignmentInForExpression() { CXFA_FMExpression* CXFA_FMParse::ParseForExpression() { CFX_WideStringC wsVariant; - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; NextToken(); if (m_pToken->m_type != TOKidentifier) { CFX_WideString ws_TempString = m_pToken->m_wstring; @@ -990,7 +990,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseForeachExpression() { CFX_WideStringC wsIdentifier; std::unique_ptr<CFX_PtrArray> pAccessors; std::unique_ptr<CXFA_FMExpression> pList; - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; NextToken(); if (m_pToken->m_type != TOKidentifier) { CFX_WideString ws_TempString = m_pToken->m_wstring; @@ -1038,7 +1038,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseForeachExpression() { CXFA_FMExpression* CXFA_FMParse::ParseDoExpression() { std::unique_ptr<CXFA_FMExpression> e; - FX_DWORD line = m_pToken->m_uLinenum; + uint32_t line = m_pToken->m_uLinenum; NextToken(); e.reset(ParseBlockExpression()); Check(TOKend); diff --git a/xfa/fxfa/fm2js/xfa_lexer.cpp b/xfa/fxfa/fm2js/xfa_lexer.cpp index 7c9682de8b..20b1320f70 100644 --- a/xfa/fxfa/fm2js/xfa_lexer.cpp +++ b/xfa/fxfa/fm2js/xfa_lexer.cpp @@ -160,7 +160,7 @@ const FX_WCHAR* XFA_FM_KeywordToString(XFA_FM_TOKEN op) { CXFA_FMToken::CXFA_FMToken() : m_type(TOKreserver), m_uLinenum(1) {} -CXFA_FMToken::CXFA_FMToken(FX_DWORD uLineNum) +CXFA_FMToken::CXFA_FMToken(uint32_t uLineNum) : m_type(TOKreserver), m_uLinenum(uLineNum) {} CXFA_FMLexer::CXFA_FMLexer(const CFX_WideStringC& wsFormCalc, @@ -404,7 +404,7 @@ CXFA_FMToken* CXFA_FMLexer::Scan() { } } -FX_DWORD CXFA_FMLexer::Number(CXFA_FMToken* t, +uint32_t CXFA_FMLexer::Number(CXFA_FMToken* t, const FX_WCHAR* p, const FX_WCHAR*& pEnd) { FX_DOUBLE number = 0; @@ -418,7 +418,7 @@ FX_DWORD CXFA_FMLexer::Number(CXFA_FMToken* t, return 0; } -FX_DWORD CXFA_FMLexer::String(CXFA_FMToken* t, +uint32_t CXFA_FMLexer::String(CXFA_FMToken* t, const FX_WCHAR* p, const FX_WCHAR*& pEnd) { const FX_WCHAR* pStart = p; @@ -458,7 +458,7 @@ FX_DWORD CXFA_FMLexer::String(CXFA_FMToken* t, return 0; } -FX_DWORD CXFA_FMLexer::Identifiers(CXFA_FMToken* t, +uint32_t CXFA_FMLexer::Identifiers(CXFA_FMToken* t, const FX_WCHAR* p, const FX_WCHAR*& pEnd) { const FX_WCHAR* pStart = p; diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp index ece1cde7ae..113fbfb536 100644 --- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp +++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp @@ -81,7 +81,7 @@ const XFA_FMBuildInFunc g_BuildInFuncs[] = { struct XFA_FMSOMMethod { uint32_t m_uHash; const FX_WCHAR* m_wsSomMethodName; - FX_DWORD m_dParameters; + uint32_t m_dParameters; }; const XFA_FMSOMMethod gs_FMSomMethods[] = { {0x00000068, L"h", 0x01}, @@ -114,7 +114,7 @@ CFX_WideStringC XFA_FM_EXPTypeToString( return gs_lpStrExpFuncName[simpleExpType]; } -CXFA_FMSimpleExpression::CXFA_FMSimpleExpression(FX_DWORD line, XFA_FM_TOKEN op) +CXFA_FMSimpleExpression::CXFA_FMSimpleExpression(uint32_t line, XFA_FM_TOKEN op) : m_line(line), m_op(op) {} void CXFA_FMSimpleExpression::ToJavaScript(CFX_WideTextBuf& javascript) {} @@ -125,14 +125,14 @@ XFA_FM_TOKEN CXFA_FMSimpleExpression::GetOperatorToken() const { return m_op; } -CXFA_FMNullExpression::CXFA_FMNullExpression(FX_DWORD line) +CXFA_FMNullExpression::CXFA_FMNullExpression(uint32_t line) : CXFA_FMSimpleExpression(line, TOKnull) {} void CXFA_FMNullExpression::ToJavaScript(CFX_WideTextBuf& javascript) { javascript << FX_WSTRC(L"null"); } -CXFA_FMNumberExpression::CXFA_FMNumberExpression(FX_DWORD line, +CXFA_FMNumberExpression::CXFA_FMNumberExpression(uint32_t line, CFX_WideStringC wsNumber) : CXFA_FMSimpleExpression(line, TOKnumber), m_wsNumber(wsNumber) {} @@ -140,7 +140,7 @@ void CXFA_FMNumberExpression::ToJavaScript(CFX_WideTextBuf& javascript) { javascript << m_wsNumber; } -CXFA_FMStringExpression::CXFA_FMStringExpression(FX_DWORD line, +CXFA_FMStringExpression::CXFA_FMStringExpression(uint32_t line, CFX_WideStringC wsString) : CXFA_FMSimpleExpression(line, TOKstring), m_wsString(wsString) {} @@ -171,7 +171,7 @@ void CXFA_FMStringExpression::ToJavaScript(CFX_WideTextBuf& javascript) { } CXFA_FMIdentifierExpressionn::CXFA_FMIdentifierExpressionn( - FX_DWORD line, + uint32_t line, CFX_WideStringC wsIdentifier) : CXFA_FMSimpleExpression(line, TOKidentifier), m_wsIdentifier(wsIdentifier) {} @@ -200,14 +200,14 @@ void CXFA_FMIdentifierExpressionn::ToJavaScript(CFX_WideTextBuf& javascript) { javascript << tempStr; } -CXFA_FMUnaryExpression::CXFA_FMUnaryExpression(FX_DWORD line, +CXFA_FMUnaryExpression::CXFA_FMUnaryExpression(uint32_t line, XFA_FM_TOKEN op, CXFA_FMSimpleExpression* pExp) : CXFA_FMSimpleExpression(line, op), m_pExp(pExp) {} void CXFA_FMUnaryExpression::ToJavaScript(CFX_WideTextBuf& javascript) {} -CXFA_FMBinExpression::CXFA_FMBinExpression(FX_DWORD line, +CXFA_FMBinExpression::CXFA_FMBinExpression(uint32_t line, XFA_FM_TOKEN op, CXFA_FMSimpleExpression* pExp1, CXFA_FMSimpleExpression* pExp2) @@ -215,7 +215,7 @@ CXFA_FMBinExpression::CXFA_FMBinExpression(FX_DWORD line, void CXFA_FMBinExpression::ToJavaScript(CFX_WideTextBuf& javascript) {} -CXFA_FMAssignExpression::CXFA_FMAssignExpression(FX_DWORD line, +CXFA_FMAssignExpression::CXFA_FMAssignExpression(uint32_t line, XFA_FM_TOKEN op, CXFA_FMSimpleExpression* pExp1, CXFA_FMSimpleExpression* pExp2) @@ -282,7 +282,7 @@ void CXFA_FMAssignExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { } CXFA_FMLogicalOrExpression::CXFA_FMLogicalOrExpression( - FX_DWORD line, + uint32_t line, XFA_FM_TOKEN op, CXFA_FMSimpleExpression* pExp1, CXFA_FMSimpleExpression* pExp2) @@ -298,7 +298,7 @@ void CXFA_FMLogicalOrExpression::ToJavaScript(CFX_WideTextBuf& javascript) { } CXFA_FMLogicalAndExpression::CXFA_FMLogicalAndExpression( - FX_DWORD line, + uint32_t line, XFA_FM_TOKEN op, CXFA_FMSimpleExpression* pExp1, CXFA_FMSimpleExpression* pExp2) @@ -314,7 +314,7 @@ void CXFA_FMLogicalAndExpression::ToJavaScript(CFX_WideTextBuf& javascript) { } CXFA_FMEqualityExpression::CXFA_FMEqualityExpression( - FX_DWORD line, + uint32_t line, XFA_FM_TOKEN op, CXFA_FMSimpleExpression* pExp1, CXFA_FMSimpleExpression* pExp2) @@ -342,7 +342,7 @@ void CXFA_FMEqualityExpression::ToJavaScript(CFX_WideTextBuf& javascript) { } CXFA_FMRelationalExpression::CXFA_FMRelationalExpression( - FX_DWORD line, + uint32_t line, XFA_FM_TOKEN op, CXFA_FMSimpleExpression* pExp1, CXFA_FMSimpleExpression* pExp2) @@ -378,7 +378,7 @@ void CXFA_FMRelationalExpression::ToJavaScript(CFX_WideTextBuf& javascript) { } CXFA_FMAdditiveExpression::CXFA_FMAdditiveExpression( - FX_DWORD line, + uint32_t line, XFA_FM_TOKEN op, CXFA_FMSimpleExpression* pExp1, CXFA_FMSimpleExpression* pExp2) @@ -404,7 +404,7 @@ void CXFA_FMAdditiveExpression::ToJavaScript(CFX_WideTextBuf& javascript) { } CXFA_FMMultiplicativeExpression::CXFA_FMMultiplicativeExpression( - FX_DWORD line, + uint32_t line, XFA_FM_TOKEN op, CXFA_FMSimpleExpression* pExp1, CXFA_FMSimpleExpression* pExp2) @@ -430,7 +430,7 @@ void CXFA_FMMultiplicativeExpression::ToJavaScript( javascript << FX_WSTRC(L")"); } -CXFA_FMPosExpression::CXFA_FMPosExpression(FX_DWORD line, +CXFA_FMPosExpression::CXFA_FMPosExpression(uint32_t line, CXFA_FMSimpleExpression* pExp) : CXFA_FMUnaryExpression(line, TOKplus, pExp) {} @@ -441,7 +441,7 @@ void CXFA_FMPosExpression::ToJavaScript(CFX_WideTextBuf& javascript) { javascript << FX_WSTRC(L")"); } -CXFA_FMNegExpression::CXFA_FMNegExpression(FX_DWORD line, +CXFA_FMNegExpression::CXFA_FMNegExpression(uint32_t line, CXFA_FMSimpleExpression* pExp) : CXFA_FMUnaryExpression(line, TOKminus, pExp) {} @@ -452,7 +452,7 @@ void CXFA_FMNegExpression::ToJavaScript(CFX_WideTextBuf& javascript) { javascript << FX_WSTRC(L")"); } -CXFA_FMNotExpression::CXFA_FMNotExpression(FX_DWORD line, +CXFA_FMNotExpression::CXFA_FMNotExpression(uint32_t line, CXFA_FMSimpleExpression* pExp) : CXFA_FMUnaryExpression(line, TOKksnot, pExp) {} @@ -463,7 +463,7 @@ void CXFA_FMNotExpression::ToJavaScript(CFX_WideTextBuf& javascript) { javascript << FX_WSTRC(L")"); } -CXFA_FMCallExpression::CXFA_FMCallExpression(FX_DWORD line, +CXFA_FMCallExpression::CXFA_FMCallExpression(uint32_t line, CXFA_FMSimpleExpression* pExp, CFX_PtrArray* pArguments, FX_BOOL bIsSomMethod) @@ -498,12 +498,12 @@ bool CXFA_FMCallExpression::IsBuildInFunc(CFX_WideTextBuf* funcName) { return false; } -FX_DWORD CXFA_FMCallExpression::IsMethodWithObjParam( +uint32_t CXFA_FMCallExpression::IsMethodWithObjParam( const CFX_WideStringC& methodName) { int32_t iLength = methodName.GetLength(); uint32_t uHash = FX_HashCode_String_GetW(methodName.GetPtr(), iLength); XFA_FMSOMMethod somMethodWithObjPara; - FX_DWORD parameters = 0x00; + uint32_t parameters = 0x00; int32_t iStart = 0, iEnd = (sizeof(gs_FMSomMethods) / sizeof(gs_FMSomMethods[0])) - 1; int32_t iMid = (iStart + iEnd) / 2; @@ -529,7 +529,7 @@ void CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) { javascript << funcName; javascript << FX_WSTRC(L"("); if (m_pArguments) { - FX_DWORD methodPara = IsMethodWithObjParam(funcName.GetWideString()); + uint32_t methodPara = IsMethodWithObjParam(funcName.GetWideString()); if (methodPara > 0) { for (int i = 0; i < m_pArguments->GetSize(); ++i) { if ((methodPara & (0x01 << i)) > 0) { @@ -615,7 +615,7 @@ void CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) { } CXFA_FMDotAccessorExpression::CXFA_FMDotAccessorExpression( - FX_DWORD line, + uint32_t line, CXFA_FMSimpleExpression* pAccessor, XFA_FM_TOKEN op, CFX_WideStringC wsIdentifier, @@ -655,7 +655,7 @@ void CXFA_FMDotAccessorExpression::ToJavaScript(CFX_WideTextBuf& javascript) { } CXFA_FMIndexExpression::CXFA_FMIndexExpression( - FX_DWORD line, + uint32_t line, XFA_FM_AccessorIndex accessorIndex, CXFA_FMSimpleExpression* pIndexExp, FX_BOOL bIsStarIndex) @@ -691,7 +691,7 @@ void CXFA_FMIndexExpression::ToJavaScript(CFX_WideTextBuf& javascript) { } CXFA_FMDotDotAccessorExpression::CXFA_FMDotDotAccessorExpression( - FX_DWORD line, + uint32_t line, CXFA_FMSimpleExpression* pAccessor, XFA_FM_TOKEN op, CFX_WideStringC wsIdentifier, @@ -718,7 +718,7 @@ void CXFA_FMDotDotAccessorExpression::ToJavaScript( } CXFA_FMMethodCallExpression::CXFA_FMMethodCallExpression( - FX_DWORD line, + uint32_t line, CXFA_FMSimpleExpression* pAccessorExp1, CXFA_FMSimpleExpression* pCallExp) : CXFA_FMBinExpression(line, TOKdot, pAccessorExp1, pCallExp) {} diff --git a/xfa/fxfa/parser/xfa_basic_imp.cpp b/xfa/fxfa/parser/xfa_basic_imp.cpp index ae5e5e8939..a126cd6d1f 100644 --- a/xfa/fxfa/parser/xfa_basic_imp.cpp +++ b/xfa/fxfa/parser/xfa_basic_imp.cpp @@ -42,11 +42,11 @@ const XFA_PACKETINFO* XFA_GetPacketByName(const CFX_WideStringC& wsName) { return NULL; } -const XFA_PACKETINFO* XFA_GetPacketByID(FX_DWORD dwPacket) { +const XFA_PACKETINFO* XFA_GetPacketByID(uint32_t dwPacket) { int32_t iStart = 0, iEnd = g_iXFAPacketCount - 1; do { int32_t iMid = (iStart + iEnd) / 2; - FX_DWORD dwFind = (g_XFAPacketData + iMid)->eName; + uint32_t dwFind = (g_XFAPacketData + iMid)->eName; if (dwPacket == dwFind) { return g_XFAPacketData + iMid; } else if (dwPacket < dwFind) { @@ -116,7 +116,7 @@ FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue, XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType, - FX_DWORD dwPacket) { + uint32_t dwPacket) { const XFA_ATTRIBUTEINFO* pInfo = XFA_GetAttributeByID(eAttribute); if (pInfo == NULL) { return FALSE; @@ -139,7 +139,7 @@ FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue, } XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, - FX_DWORD dwPacket) { + uint32_t dwPacket) { void* pValue; if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Enum, dwPacket)) { @@ -149,7 +149,7 @@ XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, } CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, - FX_DWORD dwPacket) { + uint32_t dwPacket) { void* pValue; if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Cdata, dwPacket)) { @@ -159,7 +159,7 @@ CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, } FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, - FX_DWORD dwPacket) { + uint32_t dwPacket) { void* pValue; if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Boolean, dwPacket)) { @@ -169,7 +169,7 @@ FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, } int32_t XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, - FX_DWORD dwPacket) { + uint32_t dwPacket) { void* pValue; if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Integer, dwPacket)) { @@ -179,7 +179,7 @@ int32_t XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, } CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, - FX_DWORD dwPacket) { + uint32_t dwPacket) { void* pValue; if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Measure, dwPacket)) { @@ -231,7 +231,7 @@ const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount) { } const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, - FX_DWORD dwPacket) { + uint32_t dwPacket) { int32_t iCount = 0; const uint8_t* pAttr = XFA_GetElementAttributes(eElement, iCount); if (pAttr == NULL || iCount < 1) { @@ -250,7 +250,7 @@ const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement, } const XFA_ELEMENTINFO* XFA_GetChildOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eChild, - FX_DWORD dwPacket) { + uint32_t dwPacket) { int32_t iCount = 0; const uint16_t* pChild = XFA_GetElementChildren(eElement, iCount); if (pChild == NULL || iCount < 1) { @@ -278,7 +278,7 @@ const XFA_PROPERTY* XFA_GetElementProperties(XFA_ELEMENT eElement, } const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eProperty, - FX_DWORD dwPacket) { + uint32_t dwPacket) { int32_t iCount = 0; const XFA_PROPERTY* pProperty = XFA_GetElementProperties(eElement, iCount); if (pProperty == NULL || iCount < 1) { @@ -560,7 +560,7 @@ IFX_Stream* CXFA_WideTextRead::Retain() { m_iRefCount++; return this; } -FX_DWORD CXFA_WideTextRead::GetAccessModes() const { +uint32_t CXFA_WideTextRead::GetAccessModes() const { return FX_STREAMACCESS_Read | FX_STREAMACCESS_Text; } int32_t CXFA_WideTextRead::GetLength() const { diff --git a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp index 8cc8d01644..1a6ca1b5fe 100644 --- a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp @@ -34,7 +34,7 @@ void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode, for (CXFA_Node* pDataChild = pDataNode->GetNodeItem(XFA_NODEITEM_FirstChild); pDataChild; pDataChild = pDataChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { - FX_DWORD dwNameHash = pDataChild->GetNameHash(); + uint32_t dwNameHash = pDataChild->GetNameHash(); XFA_ELEMENT eType = pDataChild->GetClassID(); if (!dwNameHash) { continue; diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp index 317610e8b3..8872400bb5 100644 --- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp @@ -340,13 +340,13 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, } } static CXFA_Node* XFA_DataMerge_GetGlobalBinding(CXFA_Document* pDocument, - FX_DWORD dwNameHash) { + uint32_t dwNameHash) { CXFA_Node* pNode = NULL; pDocument->m_rgGlobalBinding.Lookup(dwNameHash, pNode); return pNode; } static void XFA_DataMerge_RegisterGlobalBinding(CXFA_Document* pDocument, - FX_DWORD dwNameHash, + uint32_t dwNameHash, CXFA_Node* pDataNode) { pDocument->m_rgGlobalBinding.SetAt(dwNameHash, pDataNode); } @@ -355,7 +355,7 @@ static void XFA_DataMerge_ClearGlobalBinding(CXFA_Document* pDocument) { } static CXFA_Node* XFA_DataMerge_ScopeMatchGlobalBinding( CXFA_Node* pDataScope, - FX_DWORD dwNameHash, + uint32_t dwNameHash, XFA_ELEMENT eMatchDataNodeType, FX_BOOL bUpLevel = TRUE) { for (CXFA_Node *pCurDataScope = pDataScope, *pLastDataScope = NULL; @@ -394,7 +394,7 @@ static CXFA_Node* XFA_DataMerge_FindGlobalDataNode(CXFA_Document* pDocument, CFX_WideStringC wsName, CXFA_Node* pDataScope, XFA_ELEMENT eMatchNodeType) { - FX_DWORD dwNameHash = + uint32_t dwNameHash = wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength()); if (dwNameHash != 0) { @@ -414,7 +414,7 @@ static CXFA_Node* XFA_DataMerge_FindOnceDataNode(CXFA_Document* pDocument, CFX_WideStringC wsName, CXFA_Node* pDataScope, XFA_ELEMENT eMatchNodeType) { - FX_DWORD dwNameHash = + uint32_t dwNameHash = wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength()); if (dwNameHash != 0) { @@ -447,7 +447,7 @@ static CXFA_Node* XFA_DataMerge_FindDataRefDataNode(CXFA_Document* pDocument, CXFA_Node* pTemplateNode, FX_BOOL bForceBind, FX_BOOL bUpLevel = TRUE) { - FX_DWORD dFlags = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_BindNew; + uint32_t dFlags = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_BindNew; if (bUpLevel || wsRef != FX_WSTRC(L"name")) { dFlags |= (XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings); } @@ -471,7 +471,7 @@ static CXFA_Node* XFA_DataMerge_FindDataRefDataNode(CXFA_Document* pDocument, } CXFA_Node* XFA_DataMerge_FindFormDOMInstance(CXFA_Document* pDocument, XFA_ELEMENT eClassID, - FX_DWORD dwNameHash, + uint32_t dwNameHash, CXFA_Node* pFormParent) { CXFA_Node* pFormChild = pFormParent->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pFormChild; @@ -558,12 +558,12 @@ static CXFA_Node* XFA_NodeMerge_CloneOrMergeInstanceManager( CXFA_NodeArray& subforms) { CFX_WideStringC wsSubformName = pTemplateNode->GetCData(XFA_ATTRIBUTE_Name); CFX_WideString wsInstMgrNodeName = FX_WSTRC(L"_") + wsSubformName; - FX_DWORD dwInstNameHash = + uint32_t dwInstNameHash = FX_HashCode_String_GetW(wsInstMgrNodeName, wsInstMgrNodeName.GetLength()); CXFA_Node* pExistingNode = XFA_DataMerge_FindFormDOMInstance( pDocument, XFA_ELEMENT_InstanceManager, dwInstNameHash, pFormParent); if (pExistingNode) { - FX_DWORD dwNameHash = pTemplateNode->GetNameHash(); + uint32_t dwNameHash = pTemplateNode->GetNameHash(); for (CXFA_Node* pNode = pExistingNode->GetNodeItem(XFA_NODEITEM_NextSibling); pNode;) { @@ -1152,7 +1152,7 @@ static void XFA_DataMerge_UpdateBindingRelations(CXFA_Document* pDocument, break; case XFA_ATTRIBUTEENUM_Global: if (!bDataRef || bParentDataRef) { - FX_DWORD dwNameHash = pFormNode->GetNameHash(); + uint32_t dwNameHash = pFormNode->GetNameHash(); if (dwNameHash != 0 && !pDataNode) { pDataNode = XFA_DataMerge_GetGlobalBinding(pDocument, dwNameHash); if (!pDataNode) { @@ -1185,7 +1185,7 @@ static void XFA_DataMerge_UpdateBindingRelations(CXFA_Document* pDocument, if (!pDataNode && bDataRef) { CFX_WideStringC wsRef = pTemplateNodeBind->GetCData(XFA_ATTRIBUTE_Ref); - FX_DWORD dFlags = + uint32_t dFlags = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_CreateNode; XFA_RESOLVENODE_RS rs; pDocument->GetScriptContext()->ResolveObjects(pDataScope, wsRef, rs, @@ -1315,7 +1315,7 @@ void CXFA_Document::DoDataMerge() { } CXFA_Node* pDataTopLevel = pDataRoot->GetFirstChildByClass(XFA_ELEMENT_DataGroup); - FX_DWORD dwNameHash = pDataTopLevel ? pDataTopLevel->GetNameHash() : 0; + uint32_t dwNameHash = pDataTopLevel ? pDataTopLevel->GetNameHash() : 0; CXFA_Node* pTemplateRoot = m_pRootNode->GetFirstChildByClass(XFA_ELEMENT_Template); if (!pTemplateRoot) { diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp index 3c07c4822d..6f08489c17 100644 --- a/xfa/fxfa/parser/xfa_document_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_imp.cpp @@ -95,7 +95,7 @@ CXFA_Object* CXFA_Document::GetXFAObject(const CFX_WideStringC& wsNodeName) { return GetXFAObject( FX_HashCode_String_GetW(wsNodeName.GetPtr(), wsNodeName.GetLength())); } -CXFA_Object* CXFA_Document::GetXFAObject(FX_DWORD dwNodeNameHash) { +CXFA_Object* CXFA_Document::GetXFAObject(uint32_t dwNodeNameHash) { switch (dwNodeNameHash) { case XFA_HASHCODE_Data: { CXFA_Node* pDatasetsNode = ToNode(GetXFAObject(XFA_HASHCODE_Datasets)); @@ -168,7 +168,7 @@ CXFA_Object* CXFA_Document::GetXFAObject(FX_DWORD dwNodeNameHash) { return m_pRootNode->GetFirstChildByName(dwNodeNameHash); } } -CXFA_Node* CXFA_Document::CreateNode(FX_DWORD dwPacket, XFA_ELEMENT eElement) { +CXFA_Node* CXFA_Document::CreateNode(uint32_t dwPacket, XFA_ELEMENT eElement) { return CreateNode(XFA_GetPacketByID(dwPacket), eElement); } CXFA_Node* CXFA_Document::CreateNode(const XFA_PACKETINFO* pPacket, @@ -201,7 +201,7 @@ void CXFA_Document::PurgeNodes() { } m_rgPurgeNodes.RemoveAll(); } -void CXFA_Document::SetFlag(FX_DWORD dwFlag, FX_BOOL bOn) { +void CXFA_Document::SetFlag(uint32_t dwFlag, FX_BOOL bOn) { if (bOn) { m_dwDocFlags |= dwFlag; } else { @@ -359,7 +359,7 @@ void CXFA_Document::DoProtoMerge() { if (!pTemplateRoot) { return; } - CFX_MapPtrTemplate<FX_DWORD, CXFA_Node*> mIDMap; + CFX_MapPtrTemplate<uint32_t, CXFA_Node*> mIDMap; CXFA_NodeSet sUseNodes; CXFA_NodeIterator sIterator(pTemplateRoot); for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode; @@ -417,7 +417,7 @@ void CXFA_Document::DoProtoMerge() { } CXFA_Node* pProtoNode = NULL; if (!wsSOM.IsEmpty()) { - FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | + uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp index 858effff60..3df82e38f1 100644 --- a/xfa/fxfa/parser/xfa_document_serialize.cpp +++ b/xfa/fxfa/parser/xfa_document_serialize.cpp @@ -477,7 +477,7 @@ FX_BOOL CXFA_DataExporter::Export(IFX_FileWrite* pWrite) { } FX_BOOL CXFA_DataExporter::Export(IFX_FileWrite* pWrite, CXFA_Node* pNode, - FX_DWORD dwFlag, + uint32_t dwFlag, const FX_CHAR* pChecksum) { if (!pWrite) { ASSERT(false); @@ -496,7 +496,7 @@ FX_BOOL CXFA_DataExporter::Export(IFX_FileWrite* pWrite, } FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream, CXFA_Node* pNode, - FX_DWORD dwFlag, + uint32_t dwFlag, const FX_CHAR* pChecksum) { IFDE_XMLDoc* pXMLDoc = m_pDocument->GetParser()->GetXMLDoc(); if (pNode->GetObjectType() == XFA_OBJECTTYPE_ModelNode) { diff --git a/xfa/fxfa/parser/xfa_layout_appadapter.cpp b/xfa/fxfa/parser/xfa_layout_appadapter.cpp index 3515dee1ee..b175cad9c6 100644 --- a/xfa/fxfa/parser/xfa_layout_appadapter.cpp +++ b/xfa/fxfa/parser/xfa_layout_appadapter.cpp @@ -19,8 +19,8 @@ #include "xfa/fxfa/parser/xfa_script.h" #include "xfa/fxfa/parser/xfa_utils.h" -FX_DWORD XFA_GetRelevant(CXFA_Node* pFormItem, FX_DWORD dwParentRelvant) { - FX_DWORD dwRelevant = XFA_LAYOUTSTATUS_Viewable | XFA_LAYOUTSTATUS_Printable; +uint32_t XFA_GetRelevant(CXFA_Node* pFormItem, uint32_t dwParentRelvant) { + uint32_t dwRelevant = XFA_LAYOUTSTATUS_Viewable | XFA_LAYOUTSTATUS_Printable; CFX_WideStringC wsRelevant; if (pFormItem->TryCData(XFA_ATTRIBUTE_Relevant, wsRelevant)) { if (wsRelevant == FX_WSTRC(L"+print") || wsRelevant == FX_WSTRC(L"print")) { diff --git a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp index b46d882b54..61c0715f1a 100644 --- a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp +++ b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp @@ -1516,7 +1516,7 @@ void CXFA_LayoutPageMgr::SaveLayoutItem(CXFA_LayoutItem* pParentLayoutItem) { while (pCurLayoutItem) { pNextLayoutItem = pCurLayoutItem->m_pNextSibling; if (pCurLayoutItem->IsContentLayoutItem()) { - FX_DWORD dwFlag = pCurLayoutItem->m_pFormNode->GetFlag(); + uint32_t dwFlag = pCurLayoutItem->m_pFormNode->GetFlag(); if (dwFlag & (XFA_NODEFLAG_HasRemoved)) { IXFA_Notify* pNotify = m_pTemplatePageSetRoot->GetDocument()->GetParser()->GetNotify(); @@ -1793,12 +1793,12 @@ void CXFA_LayoutPageMgr::LayoutPageSetContents() { void XFA_SyncContainer(IXFA_Notify* pNotify, IXFA_DocLayout* pDocLayout, CXFA_LayoutItem* pContainerItem, - FX_DWORD dwRelevant, + uint32_t dwRelevant, FX_BOOL bVisible, int32_t nPageIndex) { FX_BOOL bVisibleItem = FALSE; - FX_DWORD dwStatus = 0; - FX_DWORD dwRelevantContainer = 0; + uint32_t dwStatus = 0; + uint32_t dwRelevantContainer = 0; if (bVisible) { XFA_ATTRIBUTEENUM eAttributeValue = pContainerItem->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Presence); @@ -1841,7 +1841,7 @@ void CXFA_LayoutPageMgr::SyncLayoutData() { switch (pContainerItem->m_pFormNode->GetClassID()) { case XFA_ELEMENT_PageArea: { nPageIdx++; - FX_DWORD dwRelevant = + uint32_t dwRelevant = XFA_LAYOUTSTATUS_Viewable | XFA_LAYOUTSTATUS_Printable; CXFA_NodeIteratorTemplate<CXFA_LayoutItem, CXFA_TraverseStrategy_LayoutItem> @@ -1857,7 +1857,7 @@ void CXFA_LayoutPageMgr::SyncLayoutData() { FX_BOOL bVisible = (pContentItem->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Presence) == XFA_ATTRIBUTEENUM_Visible); - FX_DWORD dwRelevantChild = + uint32_t dwRelevantChild = XFA_GetRelevant(pContentItem->m_pFormNode, dwRelevant); XFA_SyncContainer(pNotify, m_pLayoutProcessor, pContentItem, dwRelevantChild, bVisible, nPageIdx); diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp index dc511abf7c..ce638a3b97 100644 --- a/xfa/fxfa/parser/xfa_localemgr.cpp +++ b/xfa/fxfa/parser/xfa_localemgr.cpp @@ -1048,7 +1048,7 @@ static IFX_Locale* XFA_GetLocaleFromBuffer(const uint8_t* pBuf, int nBufLen) { } CXML_Element* pLocale = NULL; uint8_t* pOut = NULL; - FX_DWORD dwSize; + uint32_t dwSize; pCodecMgr->GetFlateModule()->FlateOrLZWDecode(FALSE, pBuf, nBufLen, TRUE, 0, 0, 0, 0, 0, pOut, dwSize); if (pOut) { @@ -1066,8 +1066,8 @@ static uint16_t XFA_GetLanguage(CFX_WideString wsLanguage) { return dwLangueID; } wsLanguage.MakeLower(); - FX_DWORD dwIDFirst = wsLanguage.GetAt(0) << 8 | wsLanguage.GetAt(1); - FX_DWORD dwIDSecond = wsLanguage.GetLength() >= 5 + uint32_t dwIDFirst = wsLanguage.GetAt(0) << 8 | wsLanguage.GetAt(1); + uint32_t dwIDSecond = wsLanguage.GetLength() >= 5 ? wsLanguage.GetAt(3) << 8 | wsLanguage.GetAt(4) : 0; switch (dwIDFirst) { diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp index b7ee9d48ad..3c85622b0d 100644 --- a/xfa/fxfa/parser/xfa_localevalue.cpp +++ b/xfa/fxfa/parser/xfa_localevalue.cpp @@ -43,13 +43,13 @@ CXFA_LocaleValue::CXFA_LocaleValue(const CXFA_LocaleValue& value) { m_pLocaleMgr = NULL; *this = value; } -CXFA_LocaleValue::CXFA_LocaleValue(FX_DWORD dwType, +CXFA_LocaleValue::CXFA_LocaleValue(uint32_t dwType, CXFA_LocaleMgr* pLocaleMgr) { m_dwType = dwType; m_bValid = (m_dwType != XFA_VT_NULL); m_pLocaleMgr = pLocaleMgr; } -CXFA_LocaleValue::CXFA_LocaleValue(FX_DWORD dwType, +CXFA_LocaleValue::CXFA_LocaleValue(uint32_t dwType, const CFX_WideString& wsValue, CXFA_LocaleMgr* pLocaleMgr) { m_wsValue = wsValue; @@ -57,7 +57,7 @@ CXFA_LocaleValue::CXFA_LocaleValue(FX_DWORD dwType, m_pLocaleMgr = pLocaleMgr; m_bValid = ValidateCanonicalValue(wsValue, dwType); } -CXFA_LocaleValue::CXFA_LocaleValue(FX_DWORD dwType, +CXFA_LocaleValue::CXFA_LocaleValue(uint32_t dwType, const CFX_WideString& wsValue, const CFX_WideString& wsFormat, IFX_Locale* pLocale, @@ -76,7 +76,7 @@ CXFA_LocaleValue& CXFA_LocaleValue::operator=(const CXFA_LocaleValue& value) { } CXFA_LocaleValue::~CXFA_LocaleValue() {} static FX_LOCALECATEGORY XFA_ValugeCategory(FX_LOCALECATEGORY eCategory, - FX_DWORD dwValueType) { + uint32_t dwValueType) { if (eCategory == FX_LOCALECATEGORY_Unknown) { switch (dwValueType) { case XFA_VT_BOOLEAN: @@ -193,11 +193,11 @@ FX_BOOL CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue, CFX_WideString CXFA_LocaleValue::GetValue() const { return m_wsValue; } -FX_DWORD CXFA_LocaleValue::GetType() const { +uint32_t CXFA_LocaleValue::GetType() const { return m_dwType; } void CXFA_LocaleValue::SetValue(const CFX_WideString& wsValue, - FX_DWORD dwType) { + uint32_t dwType) { m_wsValue = wsValue; m_dwType = dwType; } @@ -211,7 +211,7 @@ FX_FLOAT CXFA_LocaleValue::GetNum() const { if (m_bValid && (m_dwType == XFA_VT_BOOLEAN || m_dwType == XFA_VT_INTEGER || m_dwType == XFA_VT_DECIMAL || m_dwType == XFA_VT_FLOAT)) { int64_t nIntegral = 0; - FX_DWORD dwFractional = 0; + uint32_t dwFractional = 0; int32_t nExponent = 0; int cc = 0; FX_BOOL bNegative = FALSE, bExpSign = FALSE; @@ -252,7 +252,7 @@ FX_FLOAT CXFA_LocaleValue::GetNum() const { break; } } - dwFractional = (FX_DWORD)(fraction * 4294967296.0); + dwFractional = (uint32_t)(fraction * 4294967296.0); } if (cc < len && (str[cc] == 'E' || str[cc] == 'e')) { cc++; @@ -286,7 +286,7 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const { if (m_bValid && (m_dwType == XFA_VT_BOOLEAN || m_dwType == XFA_VT_INTEGER || m_dwType == XFA_VT_DECIMAL || m_dwType == XFA_VT_FLOAT)) { int64_t nIntegral = 0; - FX_DWORD dwFractional = 0; + uint32_t dwFractional = 0; int32_t nExponent = 0; int32_t cc = 0; FX_BOOL bNegative = FALSE, bExpSign = FALSE; @@ -327,7 +327,7 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const { break; } } - dwFractional = (FX_DWORD)(fraction * 4294967296.0); + dwFractional = (uint32_t)(fraction * 4294967296.0); } if (cc < len && (str[cc] == 'E' || str[cc] == 'e')) { cc++; @@ -551,7 +551,7 @@ static FX_BOOL XFA_ValueSplitDateTime(const CFX_WideString& wsDateTime, return TRUE; } FX_BOOL CXFA_LocaleValue::ValidateCanonicalValue(const CFX_WideString& wsValue, - FX_DWORD dwVType) { + uint32_t dwVType) { if (wsValue.IsEmpty()) { return TRUE; } diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp index 1010a19102..fad2b26d4e 100644 --- a/xfa/fxfa/parser/xfa_object_imp.cpp +++ b/xfa/fxfa/parser/xfa_object_imp.cpp @@ -21,7 +21,7 @@ #include "xfa/fxfa/parser/xfa_utils.h" #include "xfa/fxjse/cfxjse_arguments.h" -CXFA_Object::CXFA_Object(CXFA_Document* pDocument, FX_DWORD uFlags) +CXFA_Object::CXFA_Object(CXFA_Document* pDocument, uint32_t uFlags) : m_pDocument(pDocument), m_uFlags(uFlags) {} void CXFA_Object::GetClassName(CFX_WideStringC& wsName) const { wsName = XFA_GetElementByID(GetClassID())->pName; @@ -222,7 +222,7 @@ CXFA_Node* CXFA_Node::GetNodeItem(XFA_NODEITEM eItem, return pNode; } int32_t CXFA_Node::GetNodeList(CXFA_NodeArray& nodes, - FX_DWORD dwTypeFilter, + uint32_t dwTypeFilter, XFA_ELEMENT eElementFilter, int32_t iLevel) { if (--iLevel < 0) { @@ -303,7 +303,7 @@ int32_t CXFA_Node::GetNodeList(CXFA_NodeArray& nodes, return nodes.GetSize(); } CXFA_Node* CXFA_Node::CreateSamePacketNode(XFA_ELEMENT eElement, - FX_DWORD dwFlags) { + uint32_t dwFlags) { IXFA_ObjFactory* pFactory = m_pDocument->GetParser()->GetFactory(); CXFA_Node* pNode = pFactory->CreateNode(m_ePacket, eElement); pNode->SetFlag(dwFlags); @@ -638,7 +638,7 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) { if (refNode->GetClassID() == XFA_ELEMENT_Xfa) { refNode = ToNode(pScriptContext->GetThisObject()); } - FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | + uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; @@ -681,7 +681,7 @@ void CXFA_Node::Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments) { if (!hValue) { return; } - FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | + uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; CXFA_Node* refNode = this; @@ -692,7 +692,7 @@ void CXFA_Node::Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments) { } void CXFA_Node::Script_Som_ResolveNodeList(FXJSE_HVALUE hValue, CFX_WideString wsExpression, - FX_DWORD dwFlag, + uint32_t dwFlag, CXFA_Node* refNode) { IXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); if (!pScriptContext) { @@ -729,7 +729,7 @@ void CXFA_Node::Script_TreeClass_All(FXJSE_HVALUE hValue, if (bSetting) { ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET); } else { - FX_DWORD dwFlag = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_ALL; + uint32_t dwFlag = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_ALL; CFX_WideString wsName; GetAttribute(XFA_ATTRIBUTE_Name, wsName); CFX_WideString wsExpression = wsName + FX_WSTRC(L"[*]"); @@ -761,7 +761,7 @@ void CXFA_Node::Script_TreeClass_ClassAll(FXJSE_HVALUE hValue, if (bSetting) { ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET); } else { - FX_DWORD dwFlag = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_ALL; + uint32_t dwFlag = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_ALL; CFX_WideStringC wsName; GetClassName(wsName); CFX_WideString wsExpression = FX_WSTRC(L"#") + wsName + FX_WSTRC(L"[*]"); @@ -1311,7 +1311,7 @@ void CXFA_Node::Script_Attribute_SendAttributeChangeMessage( if (!pNotify) { return; } - FX_DWORD dwPacket = GetPacketID(); + uint32_t dwPacket = GetPacketID(); if (dwPacket & XFA_XDPPACKET_Form) { FX_BOOL bNeedFindContainer = FALSE; XFA_ELEMENT eType = GetClassID(); @@ -1492,7 +1492,7 @@ void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue, } CXFA_Node* pProtoNode = NULL; if (!wsSOM.IsEmpty()) { - FX_DWORD dwFlag = XFA_RESOLVENODE_Children | + uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; @@ -2491,7 +2491,7 @@ static CXFA_Node* XFA_ScriptInstanceManager_GetItem(CXFA_Node* pInstMgrNode, int32_t iIndex) { ASSERT(pInstMgrNode); int32_t iCount = 0; - FX_DWORD dwNameHash = 0; + uint32_t dwNameHash = 0; for (CXFA_Node* pNode = pInstMgrNode->GetNodeItem(XFA_NODEITEM_NextSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { XFA_ELEMENT eCurType = pNode->GetClassID(); @@ -2821,7 +2821,7 @@ void CXFA_Node::Script_InstanceManager_Min(FXJSE_HVALUE hValue, static int32_t XFA_ScriptInstanceManager_GetCount(CXFA_Node* pInstMgrNode) { ASSERT(pInstMgrNode); int32_t iCount = 0; - FX_DWORD dwNameHash = 0; + uint32_t dwNameHash = 0; for (CXFA_Node* pNode = pInstMgrNode->GetNodeItem(XFA_NODEITEM_NextSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { XFA_ELEMENT eCurType = pNode->GetClassID(); @@ -2883,7 +2883,7 @@ static void XFA_ScriptInstanceManager_ReorderDataNodes(CXFA_NodeSet& sSet1, CXFA_NodeSet& sSet2, FX_BOOL bInsertBefore) { CFX_MapPtrTemplate<CXFA_Node*, - CFX_MapPtrTemplate<FX_DWORD, CXFA_DualNodeArray*>*> + CFX_MapPtrTemplate<uint32_t, CXFA_DualNodeArray*>*> rgNodeListMap; FX_POSITION pos; pos = sSet1.GetStartPosition(); @@ -2891,15 +2891,15 @@ static void XFA_ScriptInstanceManager_ReorderDataNodes(CXFA_NodeSet& sSet1, CXFA_Node* pNode = NULL; sSet1.GetNextAssoc(pos, pNode); CXFA_Node* pParentNode = pNode->GetNodeItem(XFA_NODEITEM_Parent); - FX_DWORD dwNameHash = pNode->GetNameHash(); + uint32_t dwNameHash = pNode->GetNameHash(); if (!pParentNode || !dwNameHash) { continue; } - CFX_MapPtrTemplate<FX_DWORD, CXFA_DualNodeArray*>* pNodeListChildMap = + CFX_MapPtrTemplate<uint32_t, CXFA_DualNodeArray*>* pNodeListChildMap = rgNodeListMap[pParentNode]; if (!pNodeListChildMap) { rgNodeListMap[pParentNode] = pNodeListChildMap = - new CFX_MapPtrTemplate<FX_DWORD, CXFA_DualNodeArray*>; + new CFX_MapPtrTemplate<uint32_t, CXFA_DualNodeArray*>; } CXFA_DualNodeArray* pDualNodeArray = (*pNodeListChildMap)[dwNameHash]; if (!pDualNodeArray) { @@ -2913,15 +2913,15 @@ static void XFA_ScriptInstanceManager_ReorderDataNodes(CXFA_NodeSet& sSet1, CXFA_Node* pNode = NULL; sSet2.GetNextAssoc(pos, pNode); CXFA_Node* pParentNode = pNode->GetNodeItem(XFA_NODEITEM_Parent); - FX_DWORD dwNameHash = pNode->GetNameHash(); + uint32_t dwNameHash = pNode->GetNameHash(); if (!pParentNode || !dwNameHash) { continue; } - CFX_MapPtrTemplate<FX_DWORD, CXFA_DualNodeArray*>* pNodeListChildMap = + CFX_MapPtrTemplate<uint32_t, CXFA_DualNodeArray*>* pNodeListChildMap = rgNodeListMap[pParentNode]; if (!pNodeListChildMap) { rgNodeListMap[pParentNode] = pNodeListChildMap = - new CFX_MapPtrTemplate<FX_DWORD, CXFA_DualNodeArray*>; + new CFX_MapPtrTemplate<uint32_t, CXFA_DualNodeArray*>; } CXFA_DualNodeArray* pDualNodeArray = (*pNodeListChildMap)[dwNameHash]; if (!pDualNodeArray) { @@ -2937,14 +2937,14 @@ static void XFA_ScriptInstanceManager_ReorderDataNodes(CXFA_NodeSet& sSet1, pos = rgNodeListMap.GetStartPosition(); while (pos) { CXFA_Node* pParentNode = NULL; - CFX_MapPtrTemplate<FX_DWORD, CXFA_DualNodeArray*>* pNodeListChildMap = NULL; + CFX_MapPtrTemplate<uint32_t, CXFA_DualNodeArray*>* pNodeListChildMap = NULL; rgNodeListMap.GetNextAssoc(pos, pParentNode, pNodeListChildMap); if (!pNodeListChildMap) { continue; } FX_POSITION childpos = pNodeListChildMap->GetStartPosition(); while (childpos) { - FX_DWORD dwNameHash = 0; + uint32_t dwNameHash = 0; CXFA_DualNodeArray* pDualNodeArray = NULL; pNodeListChildMap->GetNextAssoc(childpos, dwNameHash, pDualNodeArray); if (!pDualNodeArray) { @@ -3294,7 +3294,7 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) { CFX_WideString wsInstanceName = wsInstManagerName.IsEmpty() ? wsInstManagerName : wsInstManagerName.Mid(1); - FX_DWORD dInstanceNameHash = + uint32_t dInstanceNameHash = wsInstanceName.IsEmpty() ? 0 : FX_HashCode_String_GetW( wsInstanceName, wsInstanceName.GetLength()); @@ -3733,7 +3733,7 @@ enum XFA_KEYTYPE { XFA_KEYTYPE_Element, }; void* XFA_GetMapKey_Custom(const CFX_WideStringC& wsKey) { - FX_DWORD dwKey = FX_HashCode_String_GetW(wsKey.GetPtr(), wsKey.GetLength()); + uint32_t dwKey = FX_HashCode_String_GetW(wsKey.GetPtr(), wsKey.GetLength()); return (void*)(uintptr_t)((dwKey << 1) | XFA_KEYTYPE_Custom); } void* XFA_GetMapKey_Element(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute) { @@ -4495,7 +4495,7 @@ CXFA_Node* CXFA_Node::GetProperty(int32_t index, XFA_ELEMENT eProperty, FX_BOOL bCreateProperty) { XFA_ELEMENT eElement = GetClassID(); - FX_DWORD dwPacket = GetPacketID(); + uint32_t dwPacket = GetPacketID(); const XFA_PROPERTY* pProperty = XFA_GetPropertyOfElement(eElement, eProperty, dwPacket); if (pProperty == NULL || index >= pProperty->uOccur) { @@ -4737,7 +4737,7 @@ CXFA_Node* CXFA_Node::GetFirstChildByName(const CFX_WideStringC& wsName) const { wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength())); } -CXFA_Node* CXFA_Node::GetFirstChildByName(FX_DWORD dwNameHash) const { +CXFA_Node* CXFA_Node::GetFirstChildByName(uint32_t dwNameHash) const { for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_FirstChild); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { if (pNode->GetNameHash() == dwNameHash) { @@ -4755,7 +4755,7 @@ CXFA_Node* CXFA_Node::GetFirstChildByClass(XFA_ELEMENT eElement) const { } return NULL; } -CXFA_Node* CXFA_Node::GetNextSameNameSibling(FX_DWORD dwNameHash) const { +CXFA_Node* CXFA_Node::GetNextSameNameSibling(uint32_t dwNameHash) const { for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_NextSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { if (pNode->GetNameHash() == dwNameHash) { @@ -4831,7 +4831,7 @@ CXFA_Node* CXFA_Node::GetInstanceMgrOfSubform() { CXFA_Node* CXFA_Node::GetOccurNode() { return GetFirstChildByClass(XFA_ELEMENT_Occur); } -FX_BOOL CXFA_Node::HasFlag(FX_DWORD dwFlag) const { +FX_BOOL CXFA_Node::HasFlag(uint32_t dwFlag) const { if (m_uFlags & dwFlag) { return TRUE; } @@ -4843,7 +4843,7 @@ FX_BOOL CXFA_Node::HasFlag(FX_DWORD dwFlag) const { } return FALSE; } -void CXFA_Node::SetFlag(FX_DWORD dwFlag, FX_BOOL bOn, FX_BOOL bNotify) { +void CXFA_Node::SetFlag(uint32_t dwFlag, FX_BOOL bOn, FX_BOOL bNotify) { if (bOn) { switch (dwFlag) { case XFA_NODEFLAG_Initialized: @@ -5241,7 +5241,7 @@ CXFA_NodeList::CXFA_NodeList(CXFA_Document* pDocument) } CXFA_Node* CXFA_NodeList::NamedItem(const CFX_WideStringC& wsName) { int32_t iCount = GetLength(); - FX_DWORD dwHashCode = + uint32_t dwHashCode = FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength()); for (int32_t i = 0; i < iCount; i++) { CXFA_Node* ret = Item(i); diff --git a/xfa/fxfa/parser/xfa_objectacc_imp.cpp b/xfa/fxfa/parser/xfa_objectacc_imp.cpp index d729eef028..72a18bcd3a 100644 --- a/xfa/fxfa/parser/xfa_objectacc_imp.cpp +++ b/xfa/fxfa/parser/xfa_objectacc_imp.cpp @@ -829,7 +829,7 @@ FX_FLOAT CXFA_Stroke::GetRadius() const { return m_pNode ? m_pNode->GetMeasure(XFA_ATTRIBUTE_Radius).ToUnit(XFA_UNIT_Pt) : 0; } -FX_BOOL CXFA_Stroke::SameStyles(CXFA_Stroke stroke, FX_DWORD dwFlags) const { +FX_BOOL CXFA_Stroke::SameStyles(CXFA_Stroke stroke, uint32_t dwFlags) const { if (m_pNode == stroke.GetNode()) { return TRUE; } @@ -1236,7 +1236,7 @@ CXFA_Node* CXFA_WidgetData::GetSelectedMember() { CXFA_Node* CXFA_WidgetData::SetSelectedMember(const CFX_WideStringC& wsName, FX_BOOL bNotify) { CXFA_Node* pSelectedMember = NULL; - FX_DWORD nameHash = + uint32_t nameHash = FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength()); for (CXFA_Node* pNode = ToNode(m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { @@ -2189,7 +2189,7 @@ FX_BOOL CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture, if (!pLocale) { return FALSE; } - FX_DWORD dwType = widgetValue.GetType(); + uint32_t dwType = widgetValue.GetType(); switch (dwType) { case XFA_VT_DATE: pLocale->GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY_Medium, @@ -2229,7 +2229,7 @@ FX_BOOL CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture, if (!pLocale) { return FALSE; } - FX_DWORD dwType = widgetValue.GetType(); + uint32_t dwType = widgetValue.GetType(); switch (dwType) { case XFA_VT_DATE: pLocale->GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY_Short, diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp index 638ce8b248..efddc427a6 100644 --- a/xfa/fxfa/parser/xfa_parser_imp.cpp +++ b/xfa/fxfa/parser/xfa_parser_imp.cpp @@ -245,7 +245,7 @@ static FX_BOOL XFA_FDEExtension_MatchNodeName( IFDE_XMLNode* pNode, const CFX_WideStringC& wsLocalTagName, const CFX_WideStringC& wsNamespaceURIPrefix, - FX_DWORD eMatchFlags = XFA_XDPPACKET_FLAGS_NOMATCH) { + uint32_t eMatchFlags = XFA_XDPPACKET_FLAGS_NOMATCH) { if (!pNode || pNode->GetType() != FDE_XMLNODE_Element) { return FALSE; } diff --git a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp index 5282019f70..3f415e2a75 100644 --- a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp @@ -53,7 +53,7 @@ void Script_EventPseudoModel_BooleanProperty(FXJSE_HVALUE hValue, } void CScript_EventPseudoModel::Script_EventPseudoModel_Property( FXJSE_HVALUE hValue, - FX_DWORD dwFlag, + uint32_t dwFlag, FX_BOOL bSetting) { IXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); if (!pScriptContext) { diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp index 4165790ed7..e2bc9dc857 100644 --- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp @@ -25,7 +25,7 @@ CScript_HostPseudoModel::~CScript_HostPseudoModel() {} void CScript_HostPseudoModel::Script_HostPseudoModel_LoadString( FXJSE_HVALUE hValue, IXFA_Notify* pNotify, - FX_DWORD dwFlag) { + uint32_t dwFlag) { CFX_WideString wsValue; pNotify->GetAppProvider()->LoadString(dwFlag, wsValue); FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue)); @@ -323,7 +323,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList( FXJSE_Value_Release(hValue); return; } - FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | + uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; int32_t iRet = pScriptContext->ResolveObjects(pObject, wsExpression, @@ -457,7 +457,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData( if (!pObject) { return; } - FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | + uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; int32_t iRet = @@ -486,7 +486,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Beep( if (!pNotify) { return; } - FX_DWORD dwType = 4; + uint32_t dwType = 4; if (iLength >= 1) { dwType = pArguments->GetInt32(0); } @@ -526,7 +526,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus( FXJSE_Value_Release(hValue); return; } - FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | + uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; int32_t iRet = pScriptContext->ResolveObjects(pObject, wsExpression, @@ -570,8 +570,8 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_MessageBox( } CFX_WideString wsMessage; CFX_WideString bsTitle; - FX_DWORD dwMessageType = XFA_MBICON_Error; - FX_DWORD dwButtonType = XFA_MB_OK; + uint32_t dwMessageType = XFA_MBICON_Error; + uint32_t dwButtonType = XFA_MB_OK; if (iLength >= 1) { if (!Script_HostPseudoModel_ValidateArgsForMsg(pArguments, 0, wsMessage)) { return; @@ -656,7 +656,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Print( return; } IXFA_Doc* hDoc = pNotify->GetHDOC(); - FX_DWORD dwOptions = 0; + uint32_t dwOptions = 0; FX_BOOL bShowDialog = TRUE; if (iLength >= 1) { bShowDialog = pArguments->GetInt32(0) == 0 ? FALSE : TRUE; diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp index 48ae6b4923..e20a4e0b2a 100644 --- a/xfa/fxfa/parser/xfa_script_imp.cpp +++ b/xfa/fxfa/parser/xfa_script_imp.cpp @@ -116,7 +116,7 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject, CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(lpOrginalNode); CFX_WideString wsPropName = CFX_WideString::FromUTF8( (const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength()); - FX_DWORD dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings | + uint32_t dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Attributes; CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject()); @@ -143,7 +143,7 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject, FX_BOOL CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode, const CFX_WideStringC& propname, FXJSE_HVALUE hValue, - FX_DWORD dwFlag, + uint32_t dwFlag, FX_BOOL bSetting) { if (!refNode) return false; @@ -191,7 +191,7 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject, } } } - FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | + uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Attributes; CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject()); if (pOrginalObject->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) { @@ -240,7 +240,7 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject, FXJSE_Value_Set(hValue, pValue); return; } - FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | + uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Attributes; FX_BOOL bRet = lpScriptContext->QueryNodeByFlag(ToNode(pObject), wsPropName, hValue, dwFlag, FALSE); @@ -563,7 +563,7 @@ FXJSE_HCLASS CXFA_ScriptContext::GetJseNormalClass() { int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode, const CFX_WideStringC& wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, - FX_DWORD dwStyles, + uint32_t dwStyles, CXFA_Node* bindNode) { if (wsExpression.IsEmpty()) { return 0; diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp index 6d106e9d64..d7a1e29d9d 100644 --- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp +++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp @@ -69,7 +69,7 @@ int32_t CXFA_NodeHelper::XFA_CountSiblings(CXFA_Node* pNode, } int32_t CXFA_NodeHelper::XFA_NodeAcc_TraverseAnySiblings( CXFA_Node* parent, - FX_DWORD dNameHash, + uint32_t dNameHash, CXFA_NodeArray* pSiblings, FX_BOOL bIsClassName) { if (parent == NULL || pSiblings == NULL) { @@ -128,7 +128,7 @@ int32_t CXFA_NodeHelper::XFA_NodeAcc_TraverseAnySiblings( return nCount; } int32_t CXFA_NodeHelper::XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, - FX_DWORD dNameHash, + uint32_t dNameHash, CXFA_NodeArray* pSiblings, XFA_LOGIC_TYPE eLogicType, FX_BOOL bIsClassName, @@ -242,7 +242,7 @@ int32_t CXFA_NodeHelper::XFA_GetIndex(CXFA_Node* pNode, return 0; } } - FX_DWORD dwHashName = pNode->GetNameHash(); + uint32_t dwHashName = pNode->GetNameHash(); if (bIsClassIndex) { dwHashName = pNode->GetClassHashCode(); } diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp index 6573c0676f..3467471c5f 100644 --- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp +++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp @@ -122,7 +122,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Dollar( if (rnd.m_nLevel > 0) { return -1; } - FX_DWORD dwNameHash = + uint32_t dwNameHash = FX_HashCode_String_GetW((const FX_WCHAR*)wsName + 1, iNameLen - 1); if (dwNameHash == XFA_HASHCODE_Xfa) { nodes.Add(rnd.m_pSC->GetDocument()->GetRoot()); @@ -218,7 +218,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( CXFA_Node* curNode = ToNode(rnd.m_CurNode); CXFA_ObjArray& nodes = rnd.m_Nodes; int32_t nNum = nodes.GetSize(); - FX_DWORD dwStyles = rnd.m_dwStyles; + uint32_t dwStyles = rnd.m_dwStyles; CFX_WideString& wsName = rnd.m_wsName; uint32_t uNameHash = rnd.m_uHashName; CFX_WideString& wsCondition = rnd.m_wsCondition; @@ -391,7 +391,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( } if (dwStyles & XFA_RESOLVENODE_Siblings) { CXFA_Node* child = parentNode->GetNodeItem(XFA_NODEITEM_FirstChild); - FX_DWORD dwSubStyles = + uint32_t dwSubStyles = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties; if (dwStyles & XFA_RESOLVENODE_TagName) { dwSubStyles |= XFA_RESOLVENODE_TagName; @@ -443,7 +443,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( rndFind.m_CurNode = child; CFX_WideString wsOriginCondition = rndFind.m_wsCondition; rndFind.m_wsCondition.Empty(); - FX_DWORD dwOriginStyle = rndFind.m_dwStyles; + uint32_t dwOriginStyle = rndFind.m_dwStyles; rndFind.m_dwStyles = dwOriginStyle | XFA_RESOLVENODE_ALL; XFA_ResolveNodes_Normal(rndFind); rndFind.m_dwStyles = dwOriginStyle; @@ -476,7 +476,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( } } if (dwStyles & XFA_RESOLVENODE_Parent) { - FX_DWORD dwSubStyles = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent | + uint32_t dwSubStyles = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Properties; if (dwStyles & XFA_RESOLVENODE_TagName) { dwSubStyles |= XFA_RESOLVENODE_TagName; @@ -782,9 +782,9 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_FilterCondition( } } void CXFA_ResolveProcessor::XFA_ResolveNodes_SetStylesForChild( - FX_DWORD dwParentStyles, + uint32_t dwParentStyles, CXFA_ResolveNodesData& rnd) { - FX_DWORD dwSubStyles = XFA_RESOLVENODE_Children; + uint32_t dwSubStyles = XFA_RESOLVENODE_Children; if (dwParentStyles & XFA_RESOLVENODE_TagName) { dwSubStyles |= XFA_RESOLVENODE_TagName; } diff --git a/xfa/fxfa/parser/xfa_utils_imp.cpp b/xfa/fxfa/parser/xfa_utils_imp.cpp index af0630f6ec..5e8881e192 100644 --- a/xfa/fxfa/parser/xfa_utils_imp.cpp +++ b/xfa/fxfa/parser/xfa_utils_imp.cpp @@ -316,7 +316,7 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString& wsStringVal) { wsValue.TrimLeft(); wsValue.TrimRight(); int64_t nIntegral = 0; - FX_DWORD dwFractional = 0; + uint32_t dwFractional = 0; int32_t nExponent = 0; int32_t cc = 0; FX_BOOL bNegative = FALSE, bExpSign = FALSE; @@ -361,7 +361,7 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString& wsStringVal) { return 0; } } - dwFractional = (FX_DWORD)(fraction * 4294967296.0); + dwFractional = (uint32_t)(fraction * 4294967296.0); } if (cc < len && (str[cc] == 'E' || str[cc] == 'e')) { cc++; diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp index c879e54a6c..82017f49a0 100644 --- a/xfa/fxgraphics/cfx_graphics.cpp +++ b/xfa/fxgraphics/cfx_graphics.cpp @@ -959,7 +959,7 @@ FX_ERR CFX_Graphics::CalcTextRect(CFX_RectF& rect, CFX_Matrix* matrix) { if (m_type == FX_CONTEXT_Device && m_renderDevice) { int32_t length = text.GetLength(); - FX_DWORD* charCodes = FX_Alloc(FX_DWORD, length); + uint32_t* charCodes = FX_Alloc(uint32_t, length); FXTEXT_CHARPOS* charPos = FX_Alloc(FXTEXT_CHARPOS, length); CalcTextInfo(text, charCodes, charPos, rect); FX_Free(charPos); @@ -1282,7 +1282,7 @@ FX_ERR CFX_Graphics::RenderDeviceShowText(const CFX_PointF& point, const CFX_WideString& text, CFX_Matrix* matrix) { int32_t length = text.GetLength(); - FX_DWORD* charCodes = FX_Alloc(FX_DWORD, length); + uint32_t* charCodes = FX_Alloc(uint32_t, length); FXTEXT_CHARPOS* charPos = FX_Alloc(FXTEXT_CHARPOS, length); CFX_RectF rect; rect.Set(point.x, point.y, 0, 0); @@ -1378,7 +1378,7 @@ FX_ERR CFX_Graphics::FillPathWithShading(CFX_Path* path, FX_FLOAT y_span = end_y - start_y; FX_FLOAT axis_len_square = (x_span * x_span) + (y_span * y_span); for (int32_t row = 0; row < height; row++) { - FX_DWORD* dib_buf = (FX_DWORD*)(bmp.GetBuffer() + row * pitch); + uint32_t* dib_buf = (uint32_t*)(bmp.GetBuffer() + row * pitch); for (int32_t column = 0; column < width; column++) { FX_FLOAT x = (FX_FLOAT)(column); FX_FLOAT y = (FX_FLOAT)(row); @@ -1410,7 +1410,7 @@ FX_ERR CFX_Graphics::FillPathWithShading(CFX_Path* path, ((start_y - end_y) * (start_y - end_y)) - ((start_r - end_r) * (start_r - end_r)); for (int32_t row = 0; row < height; row++) { - FX_DWORD* dib_buf = (FX_DWORD*)(bmp.GetBuffer() + row * pitch); + uint32_t* dib_buf = (uint32_t*)(bmp.GetBuffer() + row * pitch); for (int32_t column = 0; column < width; column++) { FX_FLOAT x = (FX_FLOAT)(column); FX_FLOAT y = (FX_FLOAT)(row); @@ -1495,7 +1495,7 @@ FX_ERR CFX_Graphics::SetDIBitsWithMatrix(CFX_DIBSource* source, } FX_ERR CFX_Graphics::CalcTextInfo(const CFX_WideString& text, - FX_DWORD* charCodes, + uint32_t* charCodes, FXTEXT_CHARPOS* charPos, CFX_RectF& rect) { std::unique_ptr<CFX_UnicodeEncoding> encoding( diff --git a/xfa/fxjse/context.cpp b/xfa/fxjse/context.cpp index 1b46a792f2..83af487632 100644 --- a/xfa/fxjse/context.cpp +++ b/xfa/fxjse/context.cpp @@ -70,7 +70,7 @@ static const FX_CHAR* szCompatibleModeScripts[] = { " }\n" "}(this, {String: ['substr', 'toUpperCase']}));"}; void FXJSE_Context_EnableCompatibleMode(FXJSE_HCONTEXT hContext, - FX_DWORD dwCompatibleFlags) { + uint32_t dwCompatibleFlags) { for (uint32_t i = 0; i < (uint32_t)FXJSE_COMPATIBLEMODEFLAGCOUNT; i++) { if (dwCompatibleFlags & (1 << i)) { FXJSE_ExecuteScript(hContext, szCompatibleModeScripts[i], NULL, NULL); |