diff options
author | tsepez <tsepez@chromium.org> | 2016-03-25 14:19:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-25 14:19:51 -0700 |
commit | 736f28ab2434e2da1de66ff91b64741483ff9cba (patch) | |
tree | ce46fdc563828d8ae671f898c551311d85ecea0f /xfa/fde | |
parent | 342f6fa66f6d843fe07d9b6a133656f83c8d62f6 (diff) | |
download | pdfium-736f28ab2434e2da1de66ff91b64741483ff9cba.tar.xz |
Remove FX_DWORD from XFA.
Review URL: https://codereview.chromium.org/1830323006
Diffstat (limited to 'xfa/fde')
-rw-r--r-- | xfa/fde/css/fde_csscache.cpp | 8 | ||||
-rw-r--r-- | xfa/fde/css/fde_cssdatatable.cpp | 16 | ||||
-rw-r--r-- | xfa/fde/css/fde_cssdeclaration.cpp | 10 | ||||
-rw-r--r-- | xfa/fde/css/fde_cssstyleselector.cpp | 26 | ||||
-rw-r--r-- | xfa/fde/css/fde_cssstylesheet.cpp | 14 | ||||
-rw-r--r-- | xfa/fde/css/fde_csssyntax.cpp | 4 | ||||
-rw-r--r-- | xfa/fde/fde_gedevice.cpp | 2 | ||||
-rw-r--r-- | xfa/fde/fde_iterator.cpp | 10 | ||||
-rw-r--r-- | xfa/fde/fde_render.cpp | 2 | ||||
-rw-r--r-- | xfa/fde/tto/fde_textout.cpp | 26 | ||||
-rw-r--r-- | xfa/fde/xml/fde_xml_imp.cpp | 24 |
11 files changed, 71 insertions, 71 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; |