summaryrefslogtreecommitdiff
path: root/xfa/src/fdp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fdp')
-rw-r--r--xfa/src/fdp/include/fde_brs.h18
-rw-r--r--xfa/src/fdp/include/fde_css.h64
-rw-r--r--xfa/src/fdp/include/fde_img.h30
-rw-r--r--xfa/src/fdp/include/fde_mem.h4
-rw-r--r--xfa/src/fdp/include/fde_pen.h20
-rw-r--r--xfa/src/fdp/include/fde_psr.h18
-rw-r--r--xfa/src/fdp/include/fde_rdr.h2
-rw-r--r--xfa/src/fdp/include/fde_rdv.h6
-rw-r--r--xfa/src/fdp/include/fde_tto.h28
-rw-r--r--xfa/src/fdp/include/fde_xml.h52
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.h10
-rw-r--r--xfa/src/fdp/src/css/fde_cssdatatable.cpp64
-rw-r--r--xfa/src/fdp/src/css/fde_cssdatatable.h40
-rw-r--r--xfa/src/fdp/src/css/fde_cssdeclaration.cpp54
-rw-r--r--xfa/src/fdp/src/css/fde_cssdeclaration.h44
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.cpp86
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.h70
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.cpp32
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.h22
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.cpp30
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.h38
-rw-r--r--xfa/src/fdp/src/fde/fde_devbasic.cpp2
-rw-r--r--xfa/src/fdp/src/fde/fde_devbasic.h8
-rw-r--r--xfa/src/fdp/src/fde/fde_gdidevice.cpp6
-rw-r--r--xfa/src/fdp/src/fde/fde_gdidevice.h6
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.cpp48
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.h14
-rw-r--r--xfa/src/fdp/src/fde/fde_geobject.cpp32
-rw-r--r--xfa/src/fdp/src/fde/fde_geobject.h4
-rw-r--r--xfa/src/fdp/src/fde/fde_object.cpp2
-rw-r--r--xfa/src/fdp/src/fde/fde_object.h54
-rw-r--r--xfa/src/fdp/src/fde/fde_render.cpp8
-rw-r--r--xfa/src/fdp/src/fde/fde_render.h2
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.cpp172
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.h80
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.cpp232
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.h108
37 files changed, 755 insertions, 755 deletions
diff --git a/xfa/src/fdp/include/fde_brs.h b/xfa/src/fdp/include/fde_brs.h
index 04a4f48ad5..dacf31fd2a 100644
--- a/xfa/src/fdp/include/fde_brs.h
+++ b/xfa/src/fdp/include/fde_brs.h
@@ -33,9 +33,9 @@ typedef CFX_ArrayTemplate<FDE_GRADIENTCOLOR> CFDE_GradientColors;
class IFDE_Brush
{
public:
- static IFDE_Brush* Create(FX_INT32 iType);
+ static IFDE_Brush* Create(int32_t iType);
virtual void Release() = 0;
- virtual FX_INT32 GetType() const = 0;
+ virtual int32_t GetType() const = 0;
};
class IFDE_SolidBrush : public IFDE_Brush
{
@@ -112,16 +112,16 @@ class IFDE_HatchBrush : public IFDE_Brush
public:
virtual FX_ARGB GetColor(FX_BOOL bForegroundColor) const = 0;
virtual void SetColor(FX_ARGB color, FX_BOOL bForegroundColor) = 0;
- virtual FX_INT32 GetHatchStyle() const = 0;
- virtual FX_BOOL SetHatchStyle(FX_INT32 iHatchStyle) = 0;
+ virtual int32_t GetHatchStyle() const = 0;
+ virtual FX_BOOL SetHatchStyle(int32_t iHatchStyle) = 0;
};
class IFDE_TextureBrush : public IFDE_Brush
{
public:
virtual IFDE_Image* GetImage() const = 0;
virtual void SetImage(IFDE_Image *pImage, FX_BOOL bAutoRelease) = 0;
- virtual FX_INT32 GetWrapMode() const = 0;
- virtual void SetWrapMode(FX_INT32 iWrapMode) = 0;
+ virtual int32_t GetWrapMode() const = 0;
+ virtual void SetWrapMode(int32_t iWrapMode) = 0;
};
#define FDE_LINEARGRADIENTMODE_Horizontal 0
#define FDE_LINEARGRADIENTMODE_Vertical 1
@@ -134,10 +134,10 @@ public:
virtual void SetLinearPoints(const CFX_PointF &startingPoint, const CFX_PointF &endingPoint) = 0;
virtual void GetLinearColors(FX_ARGB &startingColor, FX_ARGB &endingColor) const = 0;
virtual void SetLinearColors(const FX_ARGB &startingColor, const FX_ARGB &endingColor) = 0;
- virtual FX_INT32 CountGradientColors() const = 0;
+ virtual int32_t CountGradientColors() const = 0;
virtual FX_BOOL GetGradientColors(CFDE_GradientColors &colors) const = 0;
virtual FX_BOOL SetGradientColors(const CFDE_GradientColors &colors) = 0;
- virtual FX_INT32 GetWrapMode() const = 0;
- virtual void SetWrapMode(FX_INT32 iWrapMode) = 0;
+ virtual int32_t GetWrapMode() const = 0;
+ virtual void SetWrapMode(int32_t iWrapMode) = 0;
};
#endif
diff --git a/xfa/src/fdp/include/fde_css.h b/xfa/src/fdp/include/fde_css.h
index 2870c8d27a..0c9b323954 100644
--- a/xfa/src/fdp/include/fde_css.h
+++ b/xfa/src/fdp/include/fde_css.h
@@ -242,11 +242,11 @@ public:
virtual FDE_CSSPRIMITIVETYPE GetPrimitiveType() const = 0;
virtual FX_ARGB GetRGBColor() const = 0;
virtual FX_FLOAT GetFloat() const = 0;
- virtual FX_LPCWSTR GetString(FX_INT32 &iLength) const = 0;
+ virtual FX_LPCWSTR GetString(int32_t &iLength) const = 0;
virtual FDE_CSSPROPERTYVALUE GetEnum() const = 0;
virtual FX_LPCWSTR GetFuncName() const = 0;
- virtual FX_INT32 CountArgs() const = 0;
- virtual IFDE_CSSValue* GetArgs(FX_INT32 index) const = 0;
+ virtual int32_t CountArgs() const = 0;
+ virtual IFDE_CSSValue* GetArgs(int32_t index) const = 0;
};
class IFDE_CSSValueList : public IFDE_CSSValue
{
@@ -255,8 +255,8 @@ public:
{
return FDE_CSSVALUETYPE_List;
}
- virtual FX_INT32 CountValues() const = 0;
- virtual IFDE_CSSValue* GetValue(FX_INT32 index) const = 0;
+ virtual int32_t CountValues() const = 0;
+ virtual IFDE_CSSValue* GetValue(int32_t index) const = 0;
};
enum FDE_CSSPROPERTY {
FDE_CSSPROPERTY_WritingMode,
@@ -429,8 +429,8 @@ public:
{
return FDE_CSSRULETYPE_Style;
}
- virtual FX_INT32 CountSelectorLists() const = 0;
- virtual IFDE_CSSSelector* GetSelectorList(FX_INT32 index) const = 0;
+ virtual int32_t CountSelectorLists() const = 0;
+ virtual IFDE_CSSSelector* GetSelectorList(int32_t index) const = 0;
virtual IFDE_CSSDeclaration* GetDeclaration() const = 0;
};
class IFDE_CSSMediaRule : public IFDE_CSSRule
@@ -441,8 +441,8 @@ public:
return FDE_CSSRULETYPE_Media;
}
virtual FX_DWORD GetMediaList() const = 0;
- virtual FX_INT32 CountRules() const = 0;
- virtual IFDE_CSSRule* GetRule(FX_INT32 index) = 0;
+ virtual int32_t CountRules() const = 0;
+ virtual IFDE_CSSRule* GetRule(int32_t index) = 0;
};
class IFDE_CSSFontFaceRule : public IFDE_CSSRule
{
@@ -458,13 +458,13 @@ class IFDE_CSSStyleSheet : public IFX_Unknown
public:
static IFDE_CSSStyleSheet* LoadHTMLStandardStyleSheet();
static IFDE_CSSStyleSheet* LoadFromStream(const CFX_WideString &szUrl, IFX_Stream *pStream, FX_WORD wCodePage, FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
- static IFDE_CSSStyleSheet* LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, FX_INT32 iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
+ static IFDE_CSSStyleSheet* LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
virtual FX_BOOL GetUrl(CFX_WideString &szUrl) = 0;
virtual FX_DWORD GetMediaList() const = 0;
virtual FX_WORD GetCodePage() const = 0;
- virtual FX_INT32 CountRules() const = 0;
- virtual IFDE_CSSRule* GetRule(FX_INT32 index) = 0;
+ virtual int32_t CountRules() const = 0;
+ virtual IFDE_CSSRule* GetRule(int32_t index) = 0;
};
typedef CFX_ArrayTemplate<IFDE_CSSStyleSheet*> CFDE_CSSStyleSheetArray;
#define FDE_CSSUSERSTYLESHEET (FX_BSTRC("#USERSHEET"))
@@ -474,7 +474,7 @@ class IFDE_CSSStyleSheetCache
public:
static IFDE_CSSStyleSheetCache* Create();
virtual void Release() = 0;
- virtual void SetMaxItems(FX_INT32 iMaxCount = 5) = 0;
+ virtual void SetMaxItems(int32_t iMaxCount = 5) = 0;
virtual void AddStyleSheet(FX_BSTR szKey, IFDE_CSSStyleSheet *pStyleSheet) = 0;
virtual IFDE_CSSStyleSheet* GetStyleSheet(FX_BSTR szKey) const = 0;
virtual void RemoveStyleSheet(FX_BSTR szKey) = 0;
@@ -503,11 +503,11 @@ class IFDE_CSSSyntaxParser
public:
static IFDE_CSSSyntaxParser* Create();
virtual void Release() = 0;
- virtual FX_BOOL Init(IFX_Stream *pStream, FX_INT32 iCSSPlaneSize, FX_INT32 iTextDataSize = 32, FX_BOOL bOnlyDeclaration = FALSE) = 0;
- virtual FX_BOOL Init(FX_LPCWSTR pBuffer, FX_INT32 iBufferSize, FX_INT32 iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE) = 0;
+ virtual FX_BOOL Init(IFX_Stream *pStream, int32_t iCSSPlaneSize, int32_t iTextDataSize = 32, FX_BOOL bOnlyDeclaration = FALSE) = 0;
+ virtual FX_BOOL Init(FX_LPCWSTR pBuffer, int32_t iBufferSize, int32_t iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE) = 0;
virtual FDE_CSSSYNTAXSTATUS DoSyntaxParse() = 0;
- virtual FX_LPCWSTR GetCurrentString(FX_INT32 &iLength) const = 0;
+ virtual FX_LPCWSTR GetCurrentString(int32_t &iLength) const = 0;
};
enum FDE_CSSLENGTHUNIT {
FDE_CSSLENGTHUNIT_Auto,
@@ -526,7 +526,7 @@ struct FDE_CSSLENGTH {
}
FDE_CSSLENGTH& Set(FDE_CSSLENGTHUNIT eUnit, FX_FLOAT fValue)
{
- m_iData = ((FX_INTPTR)(fValue * 1024.0f) << FDE_CSSUNITBITS) | eUnit;
+ m_iData = ((intptr_t)(fValue * 1024.0f) << FDE_CSSUNITBITS) | eUnit;
return *this;
}
FDE_CSSLENGTHUNIT GetUnit() const
@@ -542,7 +542,7 @@ struct FDE_CSSLENGTH {
return (m_iData >> FDE_CSSUNITBITS) != 0;
}
private:
- FX_INTPTR m_iData;
+ intptr_t m_iData;
};
struct FDE_CSSPOINT {
FDE_CSSPOINT& Set(FDE_CSSLENGTHUNIT eUnit)
@@ -867,19 +867,19 @@ public:
class IFDE_CSSGeneratedContentStyle
{
public:
- virtual FX_INT32 CountCounters() = 0;
- virtual FX_LPCWSTR GetCounterIdentifier(FX_INT32 index) = 0;
- virtual FX_BOOL GetCounterReset(FX_INT32 index, FX_INT32 &iValue) = 0;
- virtual FX_BOOL GetCounterIncrement(FX_INT32 index, FX_INT32 &iValue) = 0;
+ virtual int32_t CountCounters() = 0;
+ virtual FX_LPCWSTR GetCounterIdentifier(int32_t index) = 0;
+ virtual FX_BOOL GetCounterReset(int32_t index, int32_t &iValue) = 0;
+ virtual FX_BOOL GetCounterIncrement(int32_t index, int32_t &iValue) = 0;
virtual IFDE_CSSValueList* GetContent() const = 0;
- virtual FX_INT32 CountQuotes() const = 0;
- virtual FX_LPCWSTR GetQuotes(FX_INT32 index) const = 0;
+ virtual int32_t CountQuotes() const = 0;
+ virtual FX_LPCWSTR GetQuotes(int32_t index) const = 0;
};
class IFDE_CSSFontStyle
{
public:
- virtual FX_INT32 CountFontFamilies() const = 0;
- virtual FX_LPCWSTR GetFontFamily(FX_INT32 index) const = 0;
+ virtual int32_t CountFontFamilies() const = 0;
+ virtual FX_LPCWSTR GetFontFamily(int32_t index) const = 0;
virtual FX_WORD GetFontWeight() const = 0;
virtual FDE_CSSFONTVARIANT GetFontVariant() const = 0;
virtual FDE_CSSFONTSTYLE GetFontStyle() const = 0;
@@ -955,12 +955,12 @@ public:
virtual const FDE_CSSLENGTH& GetWordSpacing() const = 0;
virtual FDE_CSSWRITINGMODE GetWritingMode() const = 0;
virtual FDE_CSSWORDBREAK GetWordBreak() const = 0;
- virtual FX_INT32 GetWidows() const = 0;
+ virtual int32_t GetWidows() const = 0;
virtual FX_ARGB GetTextEmphasisColor() const = 0;
virtual FDE_CSSPAGEBREAK GetPageBreakBefore() const = 0;
virtual FDE_CSSPAGEBREAK GetPageBreakAfter() const = 0;
virtual FDE_CSSPAGEBREAK GetPageBreakInside() const = 0;
- virtual FX_INT32 GetOrphans() const = 0;
+ virtual int32_t GetOrphans() const = 0;
virtual FDE_CSSLINEBREAK GetLineBreak() const = 0;
virtual FDE_CSSTEXTEMPHASISMARK GetTextEmphasisMark() const = 0;
virtual FDE_CSSTEXTEMPHASISFILL GetTextEmphasisFill() const = 0;
@@ -980,12 +980,12 @@ public:
virtual void SetWordSpacing(const FDE_CSSLENGTH &wordSpacing) = 0;
virtual void SetWritingMode(FDE_CSSWRITINGMODE eWritingMode) = 0;
virtual void SetWordBreak(FDE_CSSWORDBREAK eWordBreak) = 0;
- virtual void SetWidows(FX_INT32 iWidows) = 0;
+ virtual void SetWidows(int32_t iWidows) = 0;
virtual void SetTextEmphasisColor(FX_ARGB dwTextEmphasisColor) = 0;
virtual void SetPageBreakBefore(FDE_CSSPAGEBREAK ePageBreakBefore) = 0;
virtual void SetPageBreakAfter(FDE_CSSPAGEBREAK ePageBreakAfter) = 0;
virtual void SetPageBreakInside(FDE_CSSPAGEBREAK ePageBreakInside) = 0;
- virtual void SetOrphans(FX_INT32 iOrphans) = 0;
+ virtual void SetOrphans(int32_t iOrphans) = 0;
virtual void SetLineBreak(FDE_CSSLINEBREAK eLineBreak) = 0;
};
class IFDE_CSSBackgroundStyle
@@ -1076,7 +1076,7 @@ public:
virtual void UpdateStyleIndex(FX_DWORD dwMediaList) = 0;
virtual IFDE_CSSAccelerator* InitAccelerator() = 0;
virtual IFDE_CSSComputedStyle* CreateComputedStyle(IFDE_CSSComputedStyle *pParentStyle) = 0;
- virtual FX_INT32 MatchDeclarations(IFDE_CSSTagProvider *pTag, CFDE_CSSDeclarationArray &matchedDecls, FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE) = 0;
- virtual void ComputeStyle(IFDE_CSSTagProvider *pTag, const IFDE_CSSDeclaration **ppDeclArray, FX_INT32 iDeclCount, IFDE_CSSComputedStyle *pDestStyle) = 0;
+ virtual int32_t MatchDeclarations(IFDE_CSSTagProvider *pTag, CFDE_CSSDeclarationArray &matchedDecls, FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE) = 0;
+ virtual void ComputeStyle(IFDE_CSSTagProvider *pTag, const IFDE_CSSDeclaration **ppDeclArray, int32_t iDeclCount, IFDE_CSSComputedStyle *pDestStyle) = 0;
};
#endif
diff --git a/xfa/src/fdp/include/fde_img.h b/xfa/src/fdp/include/fde_img.h
index 808bc4c304..92ed9daac6 100644
--- a/xfa/src/fdp/include/fde_img.h
+++ b/xfa/src/fdp/include/fde_img.h
@@ -18,21 +18,21 @@ class IFDE_Image;
class IFDE_Image
{
public:
- static IFDE_Image* Create(IFX_Stream *pStream, FX_INT32 iFormat = FDE_IMAGEFORMAT_Unknown);
+ static IFDE_Image* Create(IFX_Stream *pStream, int32_t iFormat = FDE_IMAGEFORMAT_Unknown);
virtual void Release() = 0;
virtual FX_BOOL LoadImage() = 0;
virtual void FreeImage() = 0;
- virtual FX_INT32 CountFrames() const = 0;
- virtual FX_BOOL LoadFrame(FX_INT32 index) = 0;
+ virtual int32_t CountFrames() const = 0;
+ virtual FX_BOOL LoadFrame(int32_t index) = 0;
virtual CFX_DIBitmap* GetFrameImage() = 0;
- virtual FX_INT32 GetImageFormat() const = 0;
- virtual FX_INT32 GetImageWidth() const = 0;
- virtual FX_INT32 GetImageHeight() const = 0;
- virtual FX_INT32 GetDelayTime(FX_INT32 iFrameIndex) const = 0;
- virtual FX_INT32 GetLoopCount() const = 0;
- virtual FX_BOOL StartLoadImage(CFX_DIBitmap *pDIBitmap, FX_INT32 dibX, FX_INT32 dibY, FX_INT32 dibCX, FX_INT32 dibCY,
- FX_INT32 imgX, FX_INT32 imgY, FX_INT32 imgCX, FX_INT32 imgCY, FX_INT32 iFrameIndex = 0) = 0;
- virtual FX_INT32 DoLoadImage(IFX_Pause *pPause = NULL) = 0;
+ virtual int32_t GetImageFormat() const = 0;
+ virtual int32_t GetImageWidth() const = 0;
+ virtual int32_t GetImageHeight() const = 0;
+ virtual int32_t GetDelayTime(int32_t iFrameIndex) const = 0;
+ virtual int32_t GetLoopCount() const = 0;
+ virtual FX_BOOL StartLoadImage(CFX_DIBitmap *pDIBitmap, int32_t dibX, int32_t dibY, int32_t dibCX, int32_t dibCY,
+ int32_t imgX, int32_t imgY, int32_t imgCX, int32_t imgCY, int32_t iFrameIndex = 0) = 0;
+ virtual int32_t DoLoadImage(IFX_Pause *pPause = NULL) = 0;
virtual void StopLoadImage() = 0;
};
#define FDE_IMAGEFILTER_Unknown -1
@@ -45,11 +45,11 @@ public:
#define FDE_IMAGEFILTER_Brightness 6
#define FDE_IMAGEFILTER_Contrast 7
typedef struct _FDE_IMAGEFILTERPARAMS : public CFX_Target {
- FX_INT32 iFilterType;
+ int32_t iFilterType;
} FDE_IMAGEFILTERPARAMS, * FDE_LPIMAGEFILTERPARAMS;
typedef FDE_IMAGEFILTERPARAMS const * FDE_LPCIMAGEFILTERPARAMS;
typedef struct _FDE_OPACITYPARAMS : public FDE_IMAGEFILTERPARAMS {
- FX_INT32 iOpacity;
+ int32_t iOpacity;
} FDE_OPACITYPARAMS, * FDE_LPOPACITYPARAMS;
typedef FDE_OPACITYPARAMS const * FDE_LPCOPACITYPARAMS;
typedef struct _FDE_BLACKWHITEPARAMS : public FDE_IMAGEFILTERPARAMS {
@@ -66,11 +66,11 @@ typedef struct _FDE_MASKCOLORPARAMS : public FDE_IMAGEFILTERPARAMS {
} FDE_MASKCOLORPARAMS, * FDE_LPMASKCOLORPARAMS;
typedef FDE_MASKCOLORPARAMS const * FDE_LPCMASKCOLORPARAMS;
typedef struct _FDE_BRIGHTNESSPARAMS : public FDE_IMAGEFILTERPARAMS {
- FX_INT32 iBrightness;
+ int32_t iBrightness;
} FDE_BRIGHTNESSPARAMS, * FDE_LPBRIGHTNESSPARAMS;
typedef FDE_BRIGHTNESSPARAMS const * FDE_LPCBRIGHTNESSPARAMS;
typedef struct _FDE_CONTRASTPARAMS : public FDE_IMAGEFILTERPARAMS {
- FX_INT32 iContrast;
+ int32_t iContrast;
} FDE_CONTRASTPARAMS, * FDE_LPCONTRASTPARAMS;
typedef FDE_CONTRASTPARAMS const * FDE_LPCCONTRASTPARAMS;
#endif
diff --git a/xfa/src/fdp/include/fde_mem.h b/xfa/src/fdp/include/fde_mem.h
index 516e67c945..a7eb40a9e2 100644
--- a/xfa/src/fdp/include/fde_mem.h
+++ b/xfa/src/fdp/include/fde_mem.h
@@ -9,8 +9,8 @@
#ifdef __cplusplus
extern "C" {
#endif
-#define FDE_Alloc(size) FX_Alloc(FX_BYTE, size)
-#define FDE_Realloc(ptr, newSize) FX_Realloc(FX_BYTE, ptr, newSize)
+#define FDE_Alloc(size) FX_Alloc(uint8_t, size)
+#define FDE_Realloc(ptr, newSize) FX_Realloc(uint8_t, ptr, newSize)
#define FDE_Free(ptr) FX_Free(ptr)
#define FDE_New FXTARGET_New
#define FDE_Delete FXTARGET_Delete
diff --git a/xfa/src/fdp/include/fde_pen.h b/xfa/src/fdp/include/fde_pen.h
index 7730b6a964..074dc3c3e7 100644
--- a/xfa/src/fdp/include/fde_pen.h
+++ b/xfa/src/fdp/include/fde_pen.h
@@ -36,25 +36,25 @@ class IFDE_Pen
public:
static IFDE_Pen* Create();
virtual void Release() = 0;
- virtual FX_INT32 GetType() const = 0;
+ virtual int32_t GetType() const = 0;
virtual FX_ARGB GetColor() const = 0;
virtual void SetColor(FX_ARGB color) = 0;
virtual IFDE_Brush* GetBrush() const = 0;
virtual void SetBrush(IFDE_Brush *pBrush, FX_BOOL bAutoRelease) = 0;
- virtual FX_INT32 GetLineCap() const = 0;
- virtual void SetLineCap(FX_INT32 iLineCap) = 0;
- virtual FX_INT32 GetDashStyle() const = 0;
- virtual void SetDashStyle(FX_INT32 iDashStyle) = 0;
+ virtual int32_t GetLineCap() const = 0;
+ virtual void SetLineCap(int32_t iLineCap) = 0;
+ virtual int32_t GetDashStyle() const = 0;
+ virtual void SetDashStyle(int32_t iDashStyle) = 0;
virtual FX_FLOAT GetDashPhase() const = 0;
virtual void SetDashPhase(FX_FLOAT fPhase) = 0;
- virtual FX_INT32 CountDashArray() const = 0;
- virtual FX_INT32 GetDashArray(CFX_FloatArray &dashArray) const = 0;
+ virtual int32_t CountDashArray() const = 0;
+ virtual int32_t GetDashArray(CFX_FloatArray &dashArray) const = 0;
virtual void SetDashArray(const CFX_FloatArray &dashArray) = 0;
- virtual FX_INT32 GetLineJoin() const = 0;
- virtual void SetLineJoin(FX_INT32 iLineJoin) = 0;
+ virtual int32_t GetLineJoin() const = 0;
+ virtual void SetLineJoin(int32_t iLineJoin) = 0;
virtual FX_FLOAT GetMiterLimit() const = 0;
virtual void SetMiterLimit(FX_FLOAT fMiterLimit) = 0;
- virtual FX_INT32 CountCompoundPatterns() const = 0;
+ virtual int32_t CountCompoundPatterns() const = 0;
virtual FX_BOOL GetCompoundPatterns(CFDE_CompoundPatterns &compoundPatterns) const = 0;
virtual FX_BOOL SetCompoundPatterns(const CFDE_CompoundPatterns &compoundPatterns) = 0;
};
diff --git a/xfa/src/fdp/include/fde_psr.h b/xfa/src/fdp/include/fde_psr.h
index 64070e6648..974f4cc879 100644
--- a/xfa/src/fdp/include/fde_psr.h
+++ b/xfa/src/fdp/include/fde_psr.h
@@ -35,12 +35,12 @@ public:
class IFDE_TextSet : public IFDE_VisualSet
{
public:
- virtual FX_INT32 GetString(FDE_HVISUALOBJ hText, CFX_WideString &wsText) = 0;
+ virtual int32_t GetString(FDE_HVISUALOBJ hText, CFX_WideString &wsText) = 0;
virtual IFX_Font* GetFont(FDE_HVISUALOBJ hText) = 0;
virtual FX_FLOAT GetFontSize(FDE_HVISUALOBJ hText) = 0;
virtual FX_ARGB GetFontColor(FDE_HVISUALOBJ hText) = 0;
- virtual FX_INT32 GetDisplayPos(FDE_HVISUALOBJ hText, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode = FALSE, CFX_WideString *pWSForms = NULL) = 0;
- virtual FX_INT32 GetCharRects(FDE_HVISUALOBJ hText, CFX_RectFArray &rtArray) = 0;
+ virtual int32_t GetDisplayPos(FDE_HVISUALOBJ hText, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode = FALSE, CFX_WideString *pWSForms = NULL) = 0;
+ virtual int32_t GetCharRects(FDE_HVISUALOBJ hText, CFX_RectFArray &rtArray) = 0;
};
class IFDE_ImageSet : public IFDE_VisualSet
{
@@ -58,8 +58,8 @@ class IFDE_PathSet : public IFDE_VisualSet
{
public:
virtual IFDE_Path* GetPath(FDE_HVISUALOBJ hPath) = 0;
- virtual FX_INT32 GetFillMode(FDE_HVISUALOBJ hPath) = 0;
- virtual FX_INT32 GetRenderMode(FDE_HVISUALOBJ hPath) = 0;
+ virtual int32_t GetFillMode(FDE_HVISUALOBJ hPath) = 0;
+ virtual int32_t GetRenderMode(FDE_HVISUALOBJ hPath) = 0;
virtual IFDE_Pen* GetPen(FDE_HVISUALOBJ hPath) = 0;
virtual FX_FLOAT GetPenWidth(FDE_HVISUALOBJ hPath) = 0;
virtual IFDE_Brush* GetBrush(FDE_HVISUALOBJ hPath) = 0;
@@ -76,10 +76,10 @@ class IFDE_WidgetSet : public IFDE_VisualSet
{
public:
virtual FDE_WIDGETOBJ GetWidgetType(FDE_HVISUALOBJ hWidget) = 0;
- virtual FX_FLOAT GetFloat(FDE_HVISUALOBJ hWidget, FX_INT32 iParameter, FX_FLOAT fDefVal = 0.0f) = 0;
- virtual FX_INT32 GetInteger(FDE_HVISUALOBJ hWidget, FX_INT32 iParameter, FX_INT32 iDefVal = 0) = 0;
- virtual FX_BOOL GetString(FDE_HVISUALOBJ hWidget, FX_INT32 iParameter, CFX_WideString &wsValue) = 0;
- virtual FX_BOOL GetRects(FDE_HVISUALOBJ hWidget, FX_INT32 iParameter, CFX_RectFArray &rects) = 0;
+ virtual FX_FLOAT GetFloat(FDE_HVISUALOBJ hWidget, int32_t iParameter, FX_FLOAT fDefVal = 0.0f) = 0;
+ virtual int32_t GetInteger(FDE_HVISUALOBJ hWidget, int32_t iParameter, int32_t iDefVal = 0) = 0;
+ virtual FX_BOOL GetString(FDE_HVISUALOBJ hWidget, int32_t iParameter, CFX_WideString &wsValue) = 0;
+ virtual FX_BOOL GetRects(FDE_HVISUALOBJ hWidget, int32_t iParameter, CFX_RectFArray &rects) = 0;
};
class IFDE_VisualSetIterator
{
diff --git a/xfa/src/fdp/include/fde_rdr.h b/xfa/src/fdp/include/fde_rdr.h
index 74c5d24516..cbae1c26fa 100644
--- a/xfa/src/fdp/include/fde_rdr.h
+++ b/xfa/src/fdp/include/fde_rdr.h
@@ -9,7 +9,7 @@
class IFDE_Page;
class IFDE_RenderDevice;
class IFDE_RenderContext;
-void FDE_GetPageMatrix(CFX_Matrix &pageMatrix, const CFX_RectF &docPageRect, const CFX_Rect &devicePageRect, FX_INT32 iRotate, FX_DWORD dwCoordinatesType = 0);
+void FDE_GetPageMatrix(CFX_Matrix &pageMatrix, const CFX_RectF &docPageRect, const CFX_Rect &devicePageRect, int32_t iRotate, FX_DWORD dwCoordinatesType = 0);
enum FDE_RENDERSTATUS {
FDE_RENDERSTATUS_Reset = 0,
FDE_RENDERSTATUS_Paused ,
diff --git a/xfa/src/fdp/include/fde_rdv.h b/xfa/src/fdp/include/fde_rdv.h
index ee1e922c48..eb79a81c9b 100644
--- a/xfa/src/fdp/include/fde_rdv.h
+++ b/xfa/src/fdp/include/fde_rdv.h
@@ -22,8 +22,8 @@ public:
static IFDE_RenderDevice* Create(CFX_RenderDevice *pDevice);
virtual void Release() = 0;
- virtual FX_INT32 GetWidth() const = 0;
- virtual FX_INT32 GetHeight() const = 0;
+ virtual int32_t GetWidth() const = 0;
+ virtual int32_t GetHeight() const = 0;
virtual FDE_HDEVICESTATE SaveState() = 0;
virtual void RestoreState(FDE_HDEVICESTATE hState) = 0;
virtual FX_BOOL SetClipPath(const IFDE_Path *pClip) = 0;
@@ -35,7 +35,7 @@ public:
virtual FX_FLOAT GetDpiY() const = 0;
virtual FX_BOOL DrawImage(CFX_DIBSource *pDib, const CFX_RectF *pSrcRect, const CFX_RectF &dstRect, const CFX_Matrix *pImgMatrix = NULL, const CFX_Matrix *pDevMatrix = NULL) = 0;
- virtual FX_BOOL DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix = NULL) = 0;
+ virtual FX_BOOL DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix = NULL) = 0;
virtual FX_BOOL DrawBezier(IFDE_Pen *pPen, FX_FLOAT fPenWidth, const CFX_PointF &pt1, const CFX_PointF &pt2, const CFX_PointF &pt3, const CFX_PointF &pt4, const CFX_Matrix *pMatrix = NULL) = 0;
virtual FX_BOOL DrawCurve(IFDE_Pen *pPen, FX_FLOAT fPenWidth, const CFX_PointsF &points, FX_BOOL bClosed, FX_FLOAT fTension = 0.5f, const CFX_Matrix *pMatrix = NULL) = 0;
virtual FX_BOOL DrawEllipse(IFDE_Pen *pPen, FX_FLOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL) = 0;
diff --git a/xfa/src/fdp/include/fde_tto.h b/xfa/src/fdp/include/fde_tto.h
index 25dead13ca..8b4d1d4787 100644
--- a/xfa/src/fdp/include/fde_tto.h
+++ b/xfa/src/fdp/include/fde_tto.h
@@ -43,7 +43,7 @@ public:
virtual void SetTabWidth(FX_FLOAT fTabWidth) = 0;
virtual void SetEllipsisString(const CFX_WideString &wsEllipsis) = 0;
virtual void SetParagraphBreakChar(FX_WCHAR wch) = 0;
- virtual void SetAlignment(FX_INT32 iAlignment) = 0;
+ virtual void SetAlignment(int32_t iAlignment) = 0;
virtual void SetLineSpace(FX_FLOAT fLineSpace) = 0;
virtual void SetDIBitmap(CFX_DIBitmap *pDIB) = 0;
virtual void SetRenderDevice(CFX_RenderDevice *pDevice) = 0;
@@ -51,19 +51,19 @@ public:
virtual void SetClipRect(const CFX_RectF &rtClip) = 0;
virtual void SetMatrix(const CFX_Matrix &matrix) = 0;
virtual void SetLineBreakTolerance(FX_FLOAT fTolerance) = 0;
- virtual void CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_Size &size) = 0;
- virtual void CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_SizeF &size) = 0;
- virtual void CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_Rect &rect) = 0;
- virtual void CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF &rect) = 0;
- virtual void DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_INT32 x, FX_INT32 y) = 0;
- virtual void DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_FLOAT x, FX_FLOAT y) = 0;
- virtual void DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_Rect &rect) = 0;
- virtual void DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect) = 0;
+ virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Size &size) = 0;
+ virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size) = 0;
+ virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Rect &rect) = 0;
+ virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect) = 0;
+ virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, int32_t x, int32_t y) = 0;
+ virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y) = 0;
+ virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_Rect &rect) = 0;
+ virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect) = 0;
virtual void SetLogicClipRect(const CFX_RectF &rtClip) = 0;
- virtual void CalcLogicSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_SizeF &size) = 0;
- virtual void CalcLogicSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF &rect) = 0;
- virtual void DrawLogicText(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_FLOAT x, FX_FLOAT y) = 0;
- virtual void DrawLogicText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect) = 0;
- virtual FX_INT32 GetTotalLines() = 0;
+ virtual void CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size) = 0;
+ virtual void CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect) = 0;
+ virtual void DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y) = 0;
+ virtual void DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect) = 0;
+ virtual int32_t GetTotalLines() = 0;
};
#endif
diff --git a/xfa/src/fdp/include/fde_xml.h b/xfa/src/fdp/include/fde_xml.h
index b8b136b5aa..eddb9a1835 100644
--- a/xfa/src/fdp/include/fde_xml.h
+++ b/xfa/src/fdp/include/fde_xml.h
@@ -32,7 +32,7 @@ enum FDE_XMLNODETYPE {
FDE_XMLNODE_CharData ,
};
typedef struct _FDE_XMLNODE {
- FX_INT32 iNodeNum;
+ int32_t iNodeNum;
FDE_XMLNODETYPE eNodeType;
} FDE_XMLNODE, * FDE_LPXMLNODE;
typedef FDE_XMLNODE const * FDE_LPCXMLNODE;
@@ -48,16 +48,16 @@ class IFDE_XMLNode
public:
virtual void Release() = 0;
virtual FDE_XMLNODETYPE GetType() const = 0;
- virtual FX_INT32 CountChildNodes() const = 0;
- virtual IFDE_XMLNode* GetChildNode(FX_INT32 index) const = 0;
- virtual FX_INT32 GetChildNodeIndex(IFDE_XMLNode *pNode) const = 0;
- virtual IFDE_XMLNode* GetPath(FX_LPCWSTR pPath, FX_INT32 iLength = -1, FX_BOOL bQualifiedName = TRUE) const = 0;
- virtual FX_INT32 InsertChildNode(IFDE_XMLNode *pNode, FX_INT32 index = -1) = 0;
+ virtual int32_t CountChildNodes() const = 0;
+ virtual IFDE_XMLNode* GetChildNode(int32_t index) const = 0;
+ virtual int32_t GetChildNodeIndex(IFDE_XMLNode *pNode) const = 0;
+ virtual IFDE_XMLNode* GetPath(FX_LPCWSTR pPath, int32_t iLength = -1, FX_BOOL bQualifiedName = TRUE) const = 0;
+ virtual int32_t InsertChildNode(IFDE_XMLNode *pNode, int32_t index = -1) = 0;
virtual void RemoveChildNode(IFDE_XMLNode *pNode) = 0;
virtual void DeleteChildren() = 0;
enum NodeItem {Root = 0, Parent, FirstSibling, PriorSibling, NextSibling, LastSibling, FirstNeighbor, PriorNeighbor, NextNeighbor, LastNeighbor, FirstChild, LastChild};
virtual IFDE_XMLNode* GetNodeItem(NodeItem eItem) const = 0;
- virtual FX_INT32 GetNodeLevel() const = 0;
+ virtual int32_t GetNodeLevel() const = 0;
virtual FX_BOOL InsertNodeItem(IFDE_XMLNode::NodeItem eItem, IFDE_XMLNode *pNode) = 0;
virtual IFDE_XMLNode* RemoveNodeItem(IFDE_XMLNode::NodeItem eItem) = 0;
virtual IFDE_XMLNode* Clone(FX_BOOL bRecursive) = 0;
@@ -68,20 +68,20 @@ class IFDE_XMLInstruction : public IFDE_XMLNode
public:
static IFDE_XMLInstruction* Create(const CFX_WideString &wsTarget);
virtual void GetTargetName(CFX_WideString &wsTarget) const = 0;
- virtual FX_INT32 CountAttributes() const = 0;
- virtual FX_BOOL GetAttribute(FX_INT32 index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const = 0;
+ virtual int32_t CountAttributes() const = 0;
+ virtual FX_BOOL GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const = 0;
virtual FX_BOOL HasAttribute(FX_LPCWSTR pwsAttriName) const = 0;
virtual void GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue = NULL) const = 0;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue) = 0;
- virtual FX_INT32 GetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iDefValue = 0) const = 0;
- virtual void SetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iAttriValue) = 0;
+ virtual int32_t GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue = 0) const = 0;
+ virtual void SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue) = 0;
virtual FX_FLOAT GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue = 0) const = 0;
virtual void SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue) = 0;
virtual void RemoveAttribute(FX_LPCWSTR pwsAttriName) = 0;
- virtual FX_INT32 CountData() const = 0;
- virtual FX_BOOL GetData(FX_INT32 index, CFX_WideString &wsData) const = 0;
+ virtual int32_t CountData() const = 0;
+ virtual FX_BOOL GetData(int32_t index, CFX_WideString &wsData) const = 0;
virtual void AppendData(const CFX_WideString &wsData) = 0;
- virtual void RemoveData(FX_INT32 index) = 0;
+ virtual void RemoveData(int32_t index) = 0;
};
class IFDE_XMLElement : public IFDE_XMLNode
{
@@ -91,13 +91,13 @@ public:
virtual void GetLocalTagName(CFX_WideString &wsTag) const = 0;
virtual void GetNamespacePrefix(CFX_WideString &wsPrefix) const = 0;
virtual void GetNamespaceURI(CFX_WideString &wsNamespace) const = 0;
- virtual FX_INT32 CountAttributes() const = 0;
- virtual FX_BOOL GetAttribute(FX_INT32 index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const = 0;
+ virtual int32_t CountAttributes() const = 0;
+ virtual FX_BOOL GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const = 0;
virtual FX_BOOL HasAttribute(FX_LPCWSTR pwsAttriName) const = 0;
virtual void GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue = NULL) const = 0;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue) = 0;
- virtual FX_INT32 GetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iDefValue = 0) const = 0;
- virtual void SetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iAttriValue) = 0;
+ virtual int32_t GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue = 0) const = 0;
+ virtual void SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue) = 0;
virtual FX_FLOAT GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue = 0) const = 0;
virtual void SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue) = 0;
virtual void RemoveAttribute(FX_LPCWSTR pwsAttriName) = 0;
@@ -137,9 +137,9 @@ class IFDE_XMLDoc
public:
static IFDE_XMLDoc* Create();
virtual void Release() = 0;
- virtual FX_BOOL LoadXML(IFX_Stream *pXMLStream, FX_INT32 iXMLPlaneSize = 8192, FX_INT32 iTextDataSize = 256, FDE_LPXMLREADERHANDLER pHandler = NULL) = 0;
+ virtual FX_BOOL LoadXML(IFX_Stream *pXMLStream, int32_t iXMLPlaneSize = 8192, int32_t iTextDataSize = 256, FDE_LPXMLREADERHANDLER pHandler = NULL) = 0;
virtual FX_BOOL LoadXML(IFDE_XMLParser *pXMLParser) = 0;
- virtual FX_INT32 DoLoad(IFX_Pause *pPause = NULL) = 0;
+ virtual int32_t DoLoad(IFX_Pause *pPause = NULL) = 0;
virtual void CloseXML() = 0;
virtual IFDE_XMLNode* GetRoot() const = 0;
virtual void SaveXML(IFX_Stream *pXMLStream = NULL, FX_BOOL bSaveBOM = TRUE) = 0;
@@ -149,7 +149,7 @@ class IFDE_XMLParser
{
public:
virtual void Release() = 0;
- virtual FX_INT32 DoParser(IFX_Pause *pPause) = 0;
+ virtual int32_t DoParser(IFX_Pause *pPause) = 0;
};
#define FDE_XMLSYNTAXSTATUS_None 0x00
#define FDE_XMLSYNTAXSTATUS_InstructionOpen 0x01
@@ -171,13 +171,13 @@ class IFDE_XMLSyntaxParser
public:
static IFDE_XMLSyntaxParser* Create();
virtual void Release() = 0;
- virtual void Init(IFX_Stream *pStream, FX_INT32 iXMLPlaneSize, FX_INT32 iTextDataSize = 256) = 0;
+ virtual void Init(IFX_Stream *pStream, int32_t iXMLPlaneSize, int32_t iTextDataSize = 256) = 0;
virtual FX_DWORD DoSyntaxParse() = 0;
- virtual FX_INT32 GetStatus() const = 0;
- virtual FX_INT32 GetCurrentPos() const = 0;
+ virtual int32_t GetStatus() const = 0;
+ virtual int32_t GetCurrentPos() const = 0;
virtual FX_FILESIZE GetCurrentBinaryPos() const = 0;
- virtual FX_INT32 GetCurrentNodeNumber() const = 0;
- virtual FX_INT32 GetLastNodeNumber() const = 0;
+ virtual int32_t GetCurrentNodeNumber() const = 0;
+ virtual int32_t GetLastNodeNumber() const = 0;
virtual void GetTargetName(CFX_WideString &wsTarget) const = 0;
virtual void GetTagName(CFX_WideString &wsTag) const = 0;
virtual void GetAttributeName(CFX_WideString &wsAttriName) const = 0;
diff --git a/xfa/src/fdp/src/css/fde_csscache.h b/xfa/src/fdp/src/css/fde_csscache.h
index f4b8cffd57..82c0e4f7e0 100644
--- a/xfa/src/fdp/src/css/fde_csscache.h
+++ b/xfa/src/fdp/src/css/fde_csscache.h
@@ -22,7 +22,7 @@ public:
FDE_Delete this;
}
- virtual void SetMaxItems(FX_INT32 iMaxCount = 5)
+ virtual void SetMaxItems(int32_t iMaxCount = 5)
{
FXSYS_assert(iMaxCount >= 3);
m_iMaxItems = iMaxCount;
@@ -35,7 +35,7 @@ protected:
void RemoveLowestActivityItem();
CFX_MapByteStringToPtr m_Stylesheets;
IFX_MEMAllocator *m_pFixedStore;
- FX_INT32 m_iMaxItems;
+ int32_t m_iMaxItems;
};
typedef struct _FDE_CSSTAGCACHE : public CFX_Target {
public:
@@ -57,11 +57,11 @@ public:
{
return dwTagHash;
}
- FX_INT32 CountHashClass() const
+ int32_t CountHashClass() const
{
return dwClassHashs.GetSize();
}
- void SetClassIndex(FX_INT32 index)
+ void SetClassIndex(int32_t index)
{
iClassIndex = index;
}
@@ -74,7 +74,7 @@ protected:
_FDE_CSSTAGCACHE *pParent;
FX_DWORD dwIDHash;
FX_DWORD dwTagHash;
- FX_INT32 iClassIndex;
+ int32_t iClassIndex;
CFDE_DWordArray dwClassHashs;
} FDE_CSSTAGCACHE, * FDE_LPCSSTAGCACHE;
typedef CFX_ObjectStackTemplate<FDE_CSSTAGCACHE> CFDE_CSSTagStack;
diff --git a/xfa/src/fdp/src/css/fde_cssdatatable.cpp b/xfa/src/fdp/src/css/fde_cssdatatable.cpp
index ad9f0772f9..7f42d10ad0 100644
--- a/xfa/src/fdp/src/css/fde_cssdatatable.cpp
+++ b/xfa/src/fdp/src/css/fde_cssdatatable.cpp
@@ -417,12 +417,12 @@ extern "C" {
{
return (ePersudo < FDE_CSSPERSUDO_NONE) ? (g_FDE_CSSPersudoType + ePersudo) : NULL;
}
- FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(FX_LPCWSTR pszName, FX_INT32 iLength)
+ FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(FX_LPCWSTR pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE);
- FX_INT32 iEnd = FDE_CSSPROPERTY_MAX - 1;
- FX_INT32 iMid, iStart = 0;
+ int32_t iEnd = FDE_CSSPROPERTY_MAX - 1;
+ int32_t iMid, iStart = 0;
FX_DWORD dwMid;
do {
iMid = (iStart + iEnd) / 2;
@@ -441,12 +441,12 @@ extern "C" {
{
return (eName < FDE_CSSPROPERTY_MAX) ? (g_FDE_CSSProperties + eName) : NULL;
}
- FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(FX_LPCWSTR pszName, FX_INT32 iLength)
+ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(FX_LPCWSTR pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE);
- FX_INT32 iEnd = FDE_CSSPROPERTYVALUE_MAX - 1;
- FX_INT32 iMid, iStart = 0;
+ int32_t iEnd = FDE_CSSPROPERTYVALUE_MAX - 1;
+ int32_t iMid, iStart = 0;
FX_DWORD dwMid;
do {
iMid = (iStart + iEnd) / 2;
@@ -465,12 +465,12 @@ extern "C" {
{
return (eName < FDE_CSSPROPERTYVALUE_MAX) ? (g_FDE_CSSPropertyValues + eName) : NULL;
}
- FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(FX_LPCWSTR pszName, FX_INT32 iLength)
+ FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(FX_LPCWSTR pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_WORD wHash = (FX_WORD)FX_HashCode_String_GetW(pszName, iLength, TRUE);
- FX_INT32 iEnd = sizeof(g_FDE_CSSMediaTypes) / sizeof(FDE_CSSMEDIATYPETABLE) - 1;
- FX_INT32 iMid, iStart = 0;
+ int32_t iEnd = sizeof(g_FDE_CSSMediaTypes) / sizeof(FDE_CSSMEDIATYPETABLE) - 1;
+ int32_t iMid, iStart = 0;
FX_WORD uMid;
do {
iMid = (iStart + iEnd) / 2;
@@ -485,12 +485,12 @@ extern "C" {
} while (iStart <= iEnd);
return NULL;
}
- FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(FX_LPCWSTR pszName, FX_INT32 iLength)
+ FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(FX_LPCWSTR pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_WORD wHash = (FX_WORD)FX_HashCode_String_GetW(pszName, iLength, TRUE);
- FX_INT32 iEnd = sizeof(g_FDE_CSSLengthUnits) / sizeof(FDE_CSSLENGTHUNITTABLE) - 1;
- FX_INT32 iMid, iStart = 0;
+ int32_t iEnd = sizeof(g_FDE_CSSLengthUnits) / sizeof(FDE_CSSLENGTHUNITTABLE) - 1;
+ int32_t iMid, iStart = 0;
FX_WORD wMid;
do {
iMid = (iStart + iEnd) / 2;
@@ -505,12 +505,12 @@ extern "C" {
} while (iStart <= iEnd);
return NULL;
}
- FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(FX_LPCWSTR pszName, FX_INT32 iLength)
+ FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(FX_LPCWSTR pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE);
- FX_INT32 iEnd = sizeof(g_FDE_CSSColors) / sizeof(FDE_CSSCOLORTABLE) - 1;
- FX_INT32 iMid, iStart = 0;
+ int32_t iEnd = sizeof(g_FDE_CSSColors) / sizeof(FDE_CSSCOLORTABLE) - 1;
+ int32_t iMid, iStart = 0;
FX_DWORD dwMid;
do {
iMid = (iStart + iEnd) / 2;
@@ -525,10 +525,10 @@ extern "C" {
} while (iStart <= iEnd);
return NULL;
}
- FX_BOOL FDE_ParseCSSNumber(FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit)
+ FX_BOOL FDE_ParseCSSNumber(FX_LPCWSTR pszValue, int32_t iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
- FX_INT32 iUsedLen = 0;
+ int32_t iUsedLen = 0;
fValue = FX_wcstof(pszValue, iValueLen, &iUsedLen);
if (iUsedLen <= 0) {
return FALSE;
@@ -547,7 +547,7 @@ extern "C" {
return TRUE;
}
- FX_BOOL FDE_ParseCSSString(FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_INT32 &iOffset, FX_INT32 &iLength)
+ FX_BOOL FDE_ParseCSSString(FX_LPCWSTR pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
iOffset = 0;
@@ -561,7 +561,7 @@ extern "C" {
return iValueLen > 0;
}
- FX_BOOL FDE_ParseCSSURI(FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_INT32 &iOffset, FX_INT32 &iLength)
+ FX_BOOL FDE_ParseCSSURI(FX_LPCWSTR pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
if (iValueLen < 6 || pszValue[iValueLen - 1] != ')' || FX_wcsnicmp(L"url(", pszValue, 4)) {
@@ -574,22 +574,22 @@ extern "C" {
return FALSE;
}
- FX_BOOL FDE_ParseCSSColor(FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_ARGB &dwColor)
+ FX_BOOL FDE_ParseCSSColor(FX_LPCWSTR pszValue, int32_t iValueLen, FX_ARGB &dwColor)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
if (*pszValue == '#') {
switch (iValueLen) {
case 4: {
- FX_BYTE red = FX_Hex2Dec((FX_BYTE)pszValue[1], (FX_BYTE)pszValue[1]);
- FX_BYTE green = FX_Hex2Dec((FX_BYTE)pszValue[2], (FX_BYTE)pszValue[2]);
- FX_BYTE blue = FX_Hex2Dec((FX_BYTE)pszValue[3], (FX_BYTE)pszValue[3]);
+ uint8_t red = FX_Hex2Dec((uint8_t)pszValue[1], (uint8_t)pszValue[1]);
+ uint8_t green = FX_Hex2Dec((uint8_t)pszValue[2], (uint8_t)pszValue[2]);
+ uint8_t blue = FX_Hex2Dec((uint8_t)pszValue[3], (uint8_t)pszValue[3]);
dwColor = ArgbEncode(255, red, green, blue);
}
return TRUE;
case 7: {
- FX_BYTE red = FX_Hex2Dec((FX_BYTE)pszValue[1], (FX_BYTE)pszValue[2]);
- FX_BYTE green = FX_Hex2Dec((FX_BYTE)pszValue[3], (FX_BYTE)pszValue[4]);
- FX_BYTE blue = FX_Hex2Dec((FX_BYTE)pszValue[5], (FX_BYTE)pszValue[6]);
+ uint8_t red = FX_Hex2Dec((uint8_t)pszValue[1], (uint8_t)pszValue[2]);
+ uint8_t green = FX_Hex2Dec((uint8_t)pszValue[3], (uint8_t)pszValue[4]);
+ uint8_t blue = FX_Hex2Dec((uint8_t)pszValue[5], (uint8_t)pszValue[6]);
dwColor = ArgbEncode(255, red, green, blue);
}
return TRUE;
@@ -598,11 +598,11 @@ extern "C" {
if (pszValue[iValueLen - 1] != ')' || FX_wcsnicmp(L"rgb(", pszValue, 4)) {
return FALSE;
}
- FX_BYTE rgb[3] = {0};
+ uint8_t rgb[3] = {0};
FX_FLOAT fValue;
FDE_CSSPRIMITIVETYPE eType;
CFDE_CSSValueListParser list(pszValue + 4, iValueLen - 5, ',');
- for (FX_INT32 i = 0; i < 3; ++i) {
+ for (int32_t i = 0; i < 3; ++i) {
if (!list.NextValue(eType, pszValue, iValueLen)) {
return FALSE;
}
@@ -631,11 +631,11 @@ extern "C" {
CFDE_CSSValueList::CFDE_CSSValueList(IFX_MEMAllocator *pStaticStore, const CFDE_CSSValueArray &list)
{
m_iCount = list.GetSize();
- FX_INT32 iByteCount = m_iCount * sizeof(IFDE_CSSValue*);
+ int32_t iByteCount = m_iCount * sizeof(IFDE_CSSValue*);
m_ppList = (IFDE_CSSValue**)pStaticStore->Alloc(iByteCount);
FXSYS_memcpy(m_ppList, list.GetData(), iByteCount);
}
-FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE &eType, FX_LPCWSTR &pStart, FX_INT32 &iLength)
+FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE &eType, FX_LPCWSTR &pStart, int32_t &iLength)
{
while (m_pCur < m_pEnd && (*m_pCur <= ' ' || *m_pCur == m_Separator)) {
++m_pCur;
@@ -689,7 +689,7 @@ FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE &eType, FX_LPCWS
}
return m_pCur <= m_pEnd && iLength > 0;
}
-FX_INT32 CFDE_CSSValueListParser::SkipTo(FX_WCHAR wch, FX_BOOL bWSSeparator , FX_BOOL bBrContinue )
+int32_t CFDE_CSSValueListParser::SkipTo(FX_WCHAR wch, FX_BOOL bWSSeparator , FX_BOOL bBrContinue )
{
FX_LPCWSTR pStart = m_pCur;
if (!bBrContinue) {
@@ -698,7 +698,7 @@ FX_INT32 CFDE_CSSValueListParser::SkipTo(FX_WCHAR wch, FX_BOOL bWSSeparator , FX
else
while (++m_pCur < m_pEnd && *m_pCur != wch) ;
} else {
- FX_INT32 iBracketCount = 0;
+ int32_t iBracketCount = 0;
if (bWSSeparator) {
while (m_pCur < m_pEnd && *m_pCur != wch && *m_pCur > ' ') {
if (*m_pCur == '(') {
diff --git a/xfa/src/fdp/src/css/fde_cssdatatable.h b/xfa/src/fdp/src/css/fde_cssdatatable.h
index 0ebcccfab7..ef8e0fb04e 100644
--- a/xfa/src/fdp/src/css/fde_cssdatatable.h
+++ b/xfa/src/fdp/src/css/fde_cssdatatable.h
@@ -13,11 +13,11 @@ public:
{
FXSYS_assert(pArgList != NULL);
}
- FX_INT32 CountArgs() const
+ int32_t CountArgs() const
{
return m_pArgList->CountValues();
}
- IFDE_CSSValue* GetArgs(FX_INT32 index) const
+ IFDE_CSSValue* GetArgs(int32_t index) const
{
return m_pArgList->GetValue(index);
}
@@ -61,7 +61,7 @@ public:
FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_Number && m_eType <= FDE_CSSPRIMITIVETYPE_PC);
return m_fNumber;
}
- virtual FX_LPCWSTR GetString(FX_INT32 &iLength) const
+ virtual FX_LPCWSTR GetString(int32_t &iLength) const
{
FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_String && m_eType <= FDE_CSSPRIMITIVETYPE_URI);
iLength = FXSYS_wcslen(m_pString);
@@ -77,12 +77,12 @@ public:
FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->GetFuncName();
}
- virtual FX_INT32 CountArgs() const
+ virtual int32_t CountArgs() const
{
FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->CountArgs();
}
- virtual IFDE_CSSValue* GetArgs(FX_INT32 index) const
+ virtual IFDE_CSSValue* GetArgs(int32_t index) const
{
FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->GetArgs(index);
@@ -103,30 +103,30 @@ class CFDE_CSSValueList : public IFDE_CSSValueList, public CFX_Target
{
public:
CFDE_CSSValueList(IFX_MEMAllocator *pStaticStore, const CFDE_CSSValueArray &list);
- virtual FX_INT32 CountValues() const
+ virtual int32_t CountValues() const
{
return m_iCount;
}
- virtual IFDE_CSSValue* GetValue(FX_INT32 index) const
+ virtual IFDE_CSSValue* GetValue(int32_t index) const
{
return m_ppList[index];
}
protected:
IFDE_CSSValue **m_ppList;
- FX_INT32 m_iCount;
+ int32_t m_iCount;
};
class CFDE_CSSValueListParser : public CFX_Target
{
public:
- CFDE_CSSValueListParser(FX_LPCWSTR psz, FX_INT32 iLen, FX_WCHAR separator)
+ CFDE_CSSValueListParser(FX_LPCWSTR psz, int32_t iLen, FX_WCHAR separator)
: m_Separator(separator), m_pCur(psz), m_pEnd(psz + iLen)
{
FXSYS_assert(psz != NULL && iLen > 0);
}
- FX_BOOL NextValue(FDE_CSSPRIMITIVETYPE &eType, FX_LPCWSTR &pStart, FX_INT32 &iLength);
+ FX_BOOL NextValue(FDE_CSSPRIMITIVETYPE &eType, FX_LPCWSTR &pStart, int32_t &iLength);
FX_WCHAR m_Separator;
protected:
- FX_INT32 SkipTo(FX_WCHAR wch, FX_BOOL bWSSeparator = FALSE, FX_BOOL bBrContinue = FALSE);
+ int32_t SkipTo(FX_WCHAR wch, FX_BOOL bWSSeparator = FALSE, FX_BOOL bBrContinue = FALSE);
FX_LPCWSTR m_pCur;
FX_LPCWSTR m_pEnd;
};
@@ -148,7 +148,7 @@ extern "C" {
};
typedef FDE_CSSPROPERTYTABLE const * FDE_LPCCSSPROPERTYTABLE;
- FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(FX_LPCWSTR pszName, FX_INT32 iLength);
+ FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(FX_LPCWSTR pszName, int32_t iLength);
FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName);
struct FDE_CSSPROPERTYVALUETABLE {
FDE_CSSPROPERTYVALUE eName;
@@ -157,26 +157,26 @@ extern "C" {
};
typedef FDE_CSSPROPERTYVALUETABLE const * FDE_LPCCSSPROPERTYVALUETABLE;
- FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(FX_LPCWSTR pszName, FX_INT32 iLength);
+ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(FX_LPCWSTR pszName, int32_t iLength);
FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum(FDE_CSSPROPERTYVALUE eName);
struct FDE_CSSMEDIATYPETABLE {
FX_WORD wHash;
FX_WORD wValue;
};
typedef FDE_CSSMEDIATYPETABLE const * FDE_LPCCSSMEDIATYPETABLE;
- FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(FX_LPCWSTR pszName, FX_INT32 iLength);
+ FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(FX_LPCWSTR pszName, int32_t iLength);
struct FDE_CSSLENGTHUNITTABLE {
FX_WORD wHash;
FX_WORD wValue;
};
typedef FDE_CSSLENGTHUNITTABLE const * FDE_LPCCSSLENGTHUNITTABLE;
- FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(FX_LPCWSTR pszName, FX_INT32 iLength);
+ FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(FX_LPCWSTR pszName, int32_t iLength);
struct FDE_CSSCOLORTABLE {
FX_DWORD dwHash;
FX_ARGB dwValue;
};
typedef FDE_CSSCOLORTABLE const * FDE_LPCCSSCOLORTABLE;
- FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(FX_LPCWSTR pszName, FX_INT32 iLength);
+ FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(FX_LPCWSTR pszName, int32_t iLength);
struct FDE_CSSPERSUDOTABLE {
FDE_CSSPERSUDO eName;
FX_LPCWSTR pszName;
@@ -185,10 +185,10 @@ extern "C" {
typedef FDE_CSSPERSUDOTABLE const * FDE_LPCCSSPERSUDOTABLE;
FDE_LPCCSSPERSUDOTABLE FDE_GetCSSPersudoByEnum(FDE_CSSPERSUDO ePersudo);
- FX_BOOL FDE_ParseCSSNumber(FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit);
- FX_BOOL FDE_ParseCSSString(FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_INT32 &iOffset, FX_INT32 &iLength);
- FX_BOOL FDE_ParseCSSColor(FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_ARGB &dwColor);
- FX_BOOL FDE_ParseCSSURI(FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_INT32 &iOffset, FX_INT32 &iLength);
+ FX_BOOL FDE_ParseCSSNumber(FX_LPCWSTR pszValue, int32_t iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit);
+ FX_BOOL FDE_ParseCSSString(FX_LPCWSTR pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength);
+ FX_BOOL FDE_ParseCSSColor(FX_LPCWSTR pszValue, int32_t iValueLen, FX_ARGB &dwColor);
+ FX_BOOL FDE_ParseCSSURI(FX_LPCWSTR pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength);
#ifdef _cplusplus
};
#endif
diff --git a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
index 59f4a44879..9898708539 100644
--- a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
+++ b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
@@ -43,14 +43,14 @@ void CFDE_CSSDeclaration::GetNextCustom(FX_POSITION &pos, CFX_WideString &wsName
wsValue = pProperty->pwsValue;
pos = (FX_POSITION)pProperty->pNext;
}
-FX_LPCWSTR CFDE_CSSDeclaration::CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen)
+FX_LPCWSTR CFDE_CSSDeclaration::CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
{
FXSYS_assert(iValueLen > 0);
CFX_MapPtrToPtr *pCache = pArgs->pStringCache;
FX_LPVOID pKey = NULL;
if (pCache) {
FX_LPVOID pszCached = NULL;
- pKey = (FX_LPVOID)(FX_UINTPTR)FX_HashCode_String_GetW(pszValue, iValueLen, FALSE);
+ pKey = (FX_LPVOID)(uintptr_t)FX_HashCode_String_GetW(pszValue, iValueLen, FALSE);
if (pCache->Lookup(pKey, pszCached)) {
return (FX_LPCWSTR)pszCached;
}
@@ -92,7 +92,7 @@ void CFDE_CSSDeclaration::AddPropertyHolder(IFX_MEMAllocator *pStaticStore, FDE_
m_pLastProperty = pHolder;
}
}
-FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen)
+FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
{
FXSYS_assert(iValueLen > 0);
FX_BOOL bImportant = FALSE;
@@ -114,8 +114,8 @@ FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWST
FDE_CSSVALUETYPE_MaybeFunction,
FDE_CSSVALUETYPE_MaybeString,
};
- static const FX_INT32 g_ValueGuessCount = sizeof(g_ValueGuessOrder) / sizeof(FX_DWORD);
- for (FX_INT32 i = 0; i < g_ValueGuessCount; ++i) {
+ static const int32_t g_ValueGuessCount = sizeof(g_ValueGuessOrder) / sizeof(FX_DWORD);
+ for (int32_t i = 0; i < g_ValueGuessCount; ++i) {
const FX_DWORD dwMatch = dwType & g_ValueGuessOrder[i];
if (dwMatch == 0) {
continue;
@@ -229,7 +229,7 @@ FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWST
}
return FALSE;
}
-FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszName, FX_INT32 iNameLen, FX_LPCWSTR pszValue, FX_INT32 iValueLen)
+FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszName, int32_t iNameLen, FX_LPCWSTR pszValue, int32_t iValueLen)
{
FDE_LPCSSCUSTOMPROPERTY pProperty = FDE_NewWith(pArgs->pStaticStore) FDE_CSSCUSTOMPROPERTY;
pProperty->pwsName = CopyToLocal(pArgs, pszName, iNameLen);
@@ -243,7 +243,7 @@ FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWST
}
return TRUE;
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
{
FX_FLOAT fValue;
FDE_CSSPRIMITIVETYPE eUnit;
@@ -252,12 +252,12 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, FX
}
return NewNumberValue(pArgs->pStaticStore, eUnit, fValue);
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
{
FDE_LPCCSSPROPERTYVALUETABLE pValue = FDE_GetCSSPropertyValueByName(pszValue, iValueLen);
return pValue ? NewEnumValue(pArgs->pStaticStore, pValue->eName) : NULL;
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
{
FX_ARGB dwColor;
if (!FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
@@ -265,9 +265,9 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, FX_
}
return FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
{
- FX_INT32 iOffset;
+ int32_t iOffset;
if (!FDE_ParseCSSURI(pszValue, iValueLen, iOffset, iValueLen)) {
return NULL;
}
@@ -277,9 +277,9 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, FX_LP
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue ? FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_URI, pszValue) : NULL;
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
{
- FX_INT32 iOffset;
+ int32_t iOffset;
if (!FDE_ParseCSSString(pszValue, iValueLen, iOffset, iValueLen)) {
return NULL;
}
@@ -289,12 +289,12 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(FDE_LPCCSSPROPERTYARGS pArgs, FX
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue ? FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String, pszValue) : NULL;
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
{
if (pszValue[iValueLen - 1] != ')') {
return NULL;
}
- FX_INT32 iStartBracket = 0;
+ int32_t iStartBracket = 0;
while (pszValue[iStartBracket] != '(') {
if (iStartBracket < iValueLen) {
iStartBracket++;
@@ -343,7 +343,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs,
CFDE_CSSFunction *pFunction = FDE_NewWith(pArgs->pStaticStore) CFDE_CSSFunction(pszFuncName, pArgumentList);
return FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(pFunction);
}
-FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator* pStaticStore = (IFX_MEMAllocator*)pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -400,7 +400,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs,
AddPropertyHolder(pStaticStore, pArgs->pProperty->eName, FDE_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, list), bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -447,7 +447,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs,
AddPropertyHolder(pStaticStore, pArgs->pProperty->eName, FDE_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, listFull), bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
FX_WCHAR separator = (pArgs->pProperty->eName == FDE_CSSPROPERTY_FontFamily) ? ',' : ' ';
@@ -557,7 +557,7 @@ FX_BOOL CFDE_CSSDeclaration::Add4ValuesProperty(IFX_MEMAllocator *pStaticStore,
}
return FALSE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR pszValue, FX_INT32 iValueLen, IFDE_CSSValue *&pColor, IFDE_CSSValue *&pStyle, IFDE_CSSValue *&pWidth) const
+FX_BOOL CFDE_CSSDeclaration::ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR pszValue, int32_t iValueLen, IFDE_CSSValue *&pColor, IFDE_CSSValue *&pStyle, IFDE_CSSValue *&pWidth) const
{
pColor = pStyle = pWidth = NULL;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -645,7 +645,7 @@ void CFDE_CSSDeclaration::AddBorderProperty(IFX_MEMAllocator *pStaticStore, IFDE
AddPropertyHolder(pStaticStore, eWidth, pWidth, bImportant);
AddPropertyHolder(pStaticStore, eColor, pColor, bImportant);
}
-FX_BOOL CFDE_CSSDeclaration::ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -718,7 +718,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ListStyleType, pType, bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -844,7 +844,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArg
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_BackgroundAttachment, pAttachment, bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, '/');
@@ -918,7 +918,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_
break;
}
if (eType == FDE_CSSPRIMITIVETYPE_Number) {
- switch ((FX_INT32)fValue) {
+ switch ((int32_t)fValue) {
case 100:
case 200:
case 300:
@@ -971,7 +971,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_
}
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -1058,7 +1058,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArg
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnRuleColor, pColumnRuleColor, bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -1101,7 +1101,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pA
}
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -1150,7 +1150,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs,
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnCount, pColumnCount, bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
diff --git a/xfa/src/fdp/src/css/fde_cssdeclaration.h b/xfa/src/fdp/src/css/fde_cssdeclaration.h
index ca0add9dea..91595d21d9 100644
--- a/xfa/src/fdp/src/css/fde_cssdeclaration.h
+++ b/xfa/src/fdp/src/css/fde_cssdeclaration.h
@@ -8,8 +8,8 @@
#define _FDE_CSSDECLARATION
#include "fde_cssdatatable.h"
typedef struct _FDE_CSSPROPERTYHOLDER : public CFX_Target {
- FX_INT16 eProperty;
- FX_INT16 bImportant;
+ int16_t eProperty;
+ int16_t bImportant;
IFDE_CSSValue *pValue;
_FDE_CSSPROPERTYHOLDER *pNext;
} FDE_CSSPROPERTYHOLDER, *FDE_LPCSSPROPERTYHOLDER;
@@ -33,32 +33,32 @@ public:
virtual void GetNextProperty(FX_POSITION &pos, FDE_CSSPROPERTY &eProperty, IFDE_CSSValue *&pValue, FX_BOOL &bImportant) const;
virtual FX_POSITION GetStartCustom() const;
virtual void GetNextCustom(FX_POSITION &pos, CFX_WideString &wsName, CFX_WideString &wsValue) const;
- FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen);
- FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszName, FX_INT32 iNameLen, FX_LPCWSTR pszValue, FX_INT32 iValueLen);
+ FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
+ FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszName, int32_t iNameLen, FX_LPCWSTR pszValue, int32_t iValueLen);
protected:
- FX_BOOL ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR pszValue, FX_INT32 iValueLen,
+ FX_BOOL ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR pszValue, int32_t iValueLen,
IFDE_CSSValue *&pColor, IFDE_CSSValue *&pStyle, IFDE_CSSValue *&pWidth) const;
void AddBorderProperty(IFX_MEMAllocator *pStaticStore, IFDE_CSSValue *pColor, IFDE_CSSValue *pStyle, IFDE_CSSValue *pWidth, FX_BOOL bImportant,
FDE_CSSPROPERTY eColor, FDE_CSSPROPERTY eStyle, FDE_CSSPROPERTY eWidth);
- FX_BOOL ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
FX_BOOL Add4ValuesProperty(IFX_MEMAllocator *pStaticStore, const CFDE_CSSValueArray &list, FX_BOOL bImportant,
FDE_CSSPROPERTY eLeft, FDE_CSSPROPERTY eTop, FDE_CSSPROPERTY eRight, FDE_CSSPROPERTY eBottom);
- IFDE_CSSValue* ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen);
- IFDE_CSSValue* ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen);
- IFDE_CSSValue* ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen);
- IFDE_CSSValue* ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen);
- IFDE_CSSValue* ParseString(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen);
- IFDE_CSSValue* ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen);
- FX_LPCWSTR CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, FX_INT32 iValueLen);
+ IFDE_CSSValue* ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseString(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
+ FX_LPCWSTR CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
void AddPropertyHolder(IFX_MEMAllocator *pStaticStore, FDE_CSSPROPERTY eProperty, IFDE_CSSValue *pValue, FX_BOOL bImportant);
IFDE_CSSPrimitiveValue* NewNumberValue(IFX_MEMAllocator *pStaticStore, FDE_CSSPRIMITIVETYPE eUnit, FX_FLOAT fValue) const;
IFDE_CSSPrimitiveValue* NewEnumValue(IFX_MEMAllocator *pStaticStore, FDE_CSSPROPERTYVALUE eValue) const;
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
index e21bfe007a..e4c8be6409 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
@@ -8,10 +8,10 @@
#include "fde_csscache.h"
#include "fde_cssdeclaration.h"
#include "fde_cssstyleselector.h"
-FX_INT32 CFDE_CSSCounterStyle::FindIndex(FX_LPCWSTR pszIdentifier)
+int32_t CFDE_CSSCounterStyle::FindIndex(FX_LPCWSTR pszIdentifier)
{
- FX_INT32 iCount = m_arrCounterData.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = m_arrCounterData.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
if (FXSYS_wcscmp(pszIdentifier, m_arrCounterData.ElementAt(i).m_pszIdent) == 0) {
return i;
}
@@ -23,30 +23,30 @@ void CFDE_CSSCounterStyle::DoUpdateIndex(IFDE_CSSValueList *pList)
if (pList == NULL) {
return;
}
- FX_INT32 iCount = pList->CountValues();
+ int32_t iCount = pList->CountValues();
FX_FLOAT fDefValue = 1.0;
FX_BOOL bDefIncrement = TRUE;
if (pList == m_pCounterReset) {
fDefValue = 0.0;
bDefIncrement = FALSE;
}
- for (FX_INT32 i = 0; i < iCount; i++) {
+ for (int32_t i = 0; i < iCount; i++) {
IFDE_CSSValueList *pCounter = (IFDE_CSSValueList*)pList->GetValue(i);
- FX_INT32 iLen;
+ int32_t iLen;
FX_LPCWSTR pszIdentifier = ((IFDE_CSSPrimitiveValue*)(pCounter->GetValue(0)))->GetString(iLen);
FX_FLOAT fValue = fDefValue;
if (pCounter->CountValues() > 1) {
fValue = ((IFDE_CSSPrimitiveValue*)(pCounter->GetValue(1)))->GetFloat();
}
- FX_INT32 iIndex = FindIndex(pszIdentifier);
+ int32_t iIndex = FindIndex(pszIdentifier);
if (iIndex == -1) {
FDE_CSSCOUNTERDATA data;
data.m_pszIdent = pszIdentifier;
if (bDefIncrement) {
data.m_bIncrement = TRUE;
- data.m_iIncVal = (FX_INT32)fValue;
+ data.m_iIncVal = (int32_t)fValue;
} else {
- data.m_iResetVal = (FX_INT32)fValue;
+ data.m_iResetVal = (int32_t)fValue;
data.m_bReset = TRUE;
}
m_arrCounterData.Add(data);
@@ -54,10 +54,10 @@ void CFDE_CSSCounterStyle::DoUpdateIndex(IFDE_CSSValueList *pList)
FDE_CSSCOUNTERDATA &data = m_arrCounterData.ElementAt(iIndex);
if (bDefIncrement) {
data.m_bIncrement = TRUE;
- data.m_iIncVal += (FX_INT32)fValue;
+ data.m_iIncVal += (int32_t)fValue;
} else {
data.m_bReset = TRUE;
- data.m_iResetVal = (FX_INT32)fValue;
+ data.m_iResetVal = (int32_t)fValue;
}
}
}
@@ -107,12 +107,12 @@ void CFDE_CSSRuleCollection::Clear()
}
void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheetArray &sheets, FX_DWORD dwMediaList, IFX_FontMgr *pFontMgr)
{
- FX_INT32 iSheets = sheets.GetSize();
- for (FX_INT32 i = 0; i < iSheets; ++i) {
+ 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) {
- FX_INT32 iRules = pSheet->CountRules();
- for (FX_INT32 j = 0; j < iRules; j++) {
+ int32_t iRules = pSheet->CountRules();
+ for (int32_t j = 0; j < iRules; j++) {
AddRulesFrom(pSheet, pSheet->GetRule(j), dwMatchMedia, pFontMgr);
}
}
@@ -124,8 +124,8 @@ void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet *pStyleSheet, IFDE_
case FDE_CSSRULETYPE_Style: {
IFDE_CSSStyleRule *pStyleRule = (IFDE_CSSStyleRule*)pRule;
IFDE_CSSDeclaration *pDeclaration = pStyleRule->GetDeclaration();
- FX_INT32 iSelectors = pStyleRule->CountSelectorLists();
- for (FX_INT32 i = 0; i < iSelectors; ++i) {
+ int32_t iSelectors = pStyleRule->CountSelectorLists();
+ for (int32_t i = 0; i < iSelectors; ++i) {
IFDE_CSSSelector *pSelector = pStyleRule->GetSelectorList(i);
if (pSelector->GetType() == FDE_CSSSELECTORTYPE_Persudo) {
FDE_LPCSSRULEDATA pData = NewRuleData(pSelector, pDeclaration);
@@ -163,8 +163,8 @@ void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet *pStyleSheet, IFDE_
case FDE_CSSRULETYPE_Media: {
IFDE_CSSMediaRule *pMediaRule = (IFDE_CSSMediaRule*)pRule;
if (pMediaRule->GetMediaList() & dwMediaList) {
- FX_INT32 iRules = pMediaRule->CountRules();
- for (FX_INT32 i = 0; i < iRules; ++i) {
+ int32_t iRules = pMediaRule->CountRules();
+ for (int32_t i = 0; i < iRules; ++i) {
AddRulesFrom(pStyleSheet, pMediaRule->GetRule(i), dwMediaList, pFontMgr);
}
}
@@ -176,7 +176,7 @@ void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet *pStyleSheet, IFDE_
}
void CFDE_CSSRuleCollection::AddRuleTo(CFX_MapPtrToPtr &map, FX_DWORD dwKey, IFDE_CSSSelector *pSel, IFDE_CSSDeclaration *pDecl)
{
- FX_LPVOID pKey = (FX_LPVOID)(FX_UINTPTR)dwKey;
+ FX_LPVOID pKey = (FX_LPVOID)(uintptr_t)dwKey;
FDE_LPCSSRULEDATA pData = NewRuleData(pSel, pDecl);
FDE_LPCSSRULEDATA pList = NULL;
if (!map.Lookup(pKey, (FX_LPVOID&)pList)) {
@@ -292,7 +292,7 @@ void CFDE_CSSStyleSelector::UpdateStyleIndex(FX_DWORD dwMediaList)
Reset();
m_pRuleDataStore = FX_CreateAllocator(FX_ALLOCTYPE_Static, 1024, 0);
FXSYS_assert(m_pRuleDataStore != NULL);
- for (FX_INT32 iGroup = 0; iGroup < FDE_CSSSTYLESHEETGROUP_MAX; ++iGroup) {
+ for (int32_t iGroup = 0; iGroup < FDE_CSSSTYLESHEETGROUP_MAX; ++iGroup) {
CFDE_CSSRuleCollection &rules = m_RuleCollection[iGroup];
rules.m_pStaticStore = m_pRuleDataStore;
rules.AddRulesFrom(m_SheetGroups[iGroup], dwMediaList, m_pFontMgr);
@@ -300,7 +300,7 @@ void CFDE_CSSStyleSelector::UpdateStyleIndex(FX_DWORD dwMediaList)
}
void CFDE_CSSStyleSelector::Reset()
{
- for (FX_INT32 iGroup = 0; iGroup < FDE_CSSSTYLESHEETGROUP_MAX; ++iGroup) {
+ for (int32_t iGroup = 0; iGroup < FDE_CSSSTYLESHEETGROUP_MAX; ++iGroup) {
m_RuleCollection[iGroup].Clear();
}
if (m_pRuleDataStore != NULL) {
@@ -308,13 +308,13 @@ void CFDE_CSSStyleSelector::Reset()
m_pRuleDataStore = NULL;
}
}
-FX_INT32 CFDE_CSSStyleSelector::MatchDeclarations(IFDE_CSSTagProvider *pTag, CFDE_CSSDeclarationArray &matchedDecls, FDE_CSSPERSUDO ePersudoType)
+int32_t CFDE_CSSStyleSelector::MatchDeclarations(IFDE_CSSTagProvider *pTag, CFDE_CSSDeclarationArray &matchedDecls, FDE_CSSPERSUDO ePersudoType)
{
FXSYS_assert(m_pAccelerator != NULL && pTag != NULL);
FDE_LPCSSTAGCACHE pCache = m_pAccelerator->GetTopElement();
FXSYS_assert(pCache != NULL && pCache->GetTag() == pTag);
matchedDecls.RemoveAt(0, matchedDecls.GetSize());
- for (FX_INT32 ePriority = FDE_CSSSTYLESHEETPRIORITY_MAX - 1; ePriority >= 0; --ePriority) {
+ for (int32_t ePriority = FDE_CSSSTYLESHEETPRIORITY_MAX - 1; ePriority >= 0; --ePriority) {
FDE_CSSSTYLESHEETGROUP eGroup = m_ePriorities[ePriority];
CFDE_CSSRuleCollection &rules = m_RuleCollection[eGroup];
if (rules.CountSelectors() == 0) {
@@ -325,8 +325,8 @@ FX_INT32 CFDE_CSSStyleSelector::MatchDeclarations(IFDE_CSSTagProvider *pTag, CFD
if (pCache->HashTag()) {
MatchRules(pCache, rules.GetTagRuleData(pCache->HashTag()), ePersudoType);
}
- FX_INT32 iCount = pCache->CountHashClass();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = pCache->CountHashClass();
+ for (int32_t i = 0; i < iCount; i++) {
pCache->SetClassIndex(i);
MatchRules(pCache, rules.GetClassRuleData(pCache->HashClass()), ePersudoType);
}
@@ -399,10 +399,10 @@ FX_BOOL CFDE_CSSStyleSelector::MatchSelector(FDE_LPCSSTAGCACHE pCache, IFDE_CSSS
}
void CFDE_CSSStyleSelector::SortRulesTo(CFDE_CSSDeclarationArray &matchDecls)
{
- for (FX_INT32 j = m_MatchedRules.GetUpperBound(); j >= 0; --j) {
+ for (int32_t j = m_MatchedRules.GetUpperBound(); j >= 0; --j) {
FDE_LPCSSRULEDATA &pMin = m_MatchedRules.ElementAt(j);
FX_DWORD dwMin = pMin->dwPriority;
- for (FX_INT32 i = j - 1; i >= 0; --i) {
+ for (int32_t i = j - 1; i >= 0; --i) {
FDE_LPCSSRULEDATA &pCur = m_MatchedRules.ElementAt(i);
if (dwMin > pCur->dwPriority) {
dwMin = pCur->dwPriority;
@@ -414,7 +414,7 @@ void CFDE_CSSStyleSelector::SortRulesTo(CFDE_CSSDeclarationArray &matchDecls)
matchDecls.Add(pMin->pDeclaration);
}
}
-void CFDE_CSSStyleSelector::ComputeStyle(IFDE_CSSTagProvider *pTag, const IFDE_CSSDeclaration **ppDeclArray, FX_INT32 iDeclCount, IFDE_CSSComputedStyle *pDestStyle)
+void CFDE_CSSStyleSelector::ComputeStyle(IFDE_CSSTagProvider *pTag, const IFDE_CSSDeclaration **ppDeclArray, int32_t iDeclCount, IFDE_CSSComputedStyle *pDestStyle)
{
CFDE_CSSComputedStyle *pComputedStyle = (CFDE_CSSComputedStyle*)pDestStyle;
FXSYS_assert(pTag && iDeclCount >= 0 && pComputedStyle != NULL);
@@ -464,12 +464,12 @@ void CFDE_CSSStyleSelector::ComputeStyle(IFDE_CSSTagProvider *pTag, const IFDE_C
ApplyDeclarations(FALSE, ppDeclArray, iDeclCount, pDestStyle);
}
}
-void CFDE_CSSStyleSelector::ApplyDeclarations(FX_BOOL bPriority, const IFDE_CSSDeclaration **ppDeclArray, FX_INT32 iDeclCount, IFDE_CSSComputedStyle *pDestStyle)
+void CFDE_CSSStyleSelector::ApplyDeclarations(FX_BOOL bPriority, const IFDE_CSSDeclaration **ppDeclArray, int32_t iDeclCount, IFDE_CSSComputedStyle *pDestStyle)
{
CFDE_CSSComputedStyle *pComputedStyle = (CFDE_CSSComputedStyle*)pDestStyle;
IFDE_CSSValue *pVal;
FX_BOOL bImportant;
- FX_INT32 i;
+ int32_t i;
if (bPriority) {
IFDE_CSSValue *pLastest = NULL, *pImportant = NULL;
for (i = 0; i < iDeclCount; ++i) {
@@ -525,7 +525,7 @@ void CFDE_CSSStyleSelector::ApplyDeclarations(FX_BOOL bPriority, const IFDE_CSSD
}
}
}
-void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPCWSTR psz, FX_INT32 iLen)
+void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPCWSTR psz, int32_t iLen)
{
FXSYS_assert(pDecl != NULL && psz != NULL && iLen > 0);
IFDE_CSSSyntaxParser *pSyntax = IFDE_CSSSyntaxParser::Create();
@@ -533,7 +533,7 @@ void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPC
return;
}
if (pSyntax->Init(psz, iLen, 32, TRUE)) {
- FX_INT32 iLen;
+ int32_t iLen;
FX_LPCWSTR psz;
FDE_CSSPROPERTYARGS args;
args.pStringCache = NULL;
@@ -612,7 +612,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSVal
if (eType == FDE_CSSPRIMITIVETYPE_Enum) {
FDE_CSSINHERITS.m_wFontWeight = ToFontWeight(pPrimitive->GetEnum());
} else if (eType == FDE_CSSPRIMITIVETYPE_Number) {
- FX_INT32 iValue = (FX_INT32)pPrimitive->GetFloat() / 100;
+ int32_t iValue = (int32_t)pPrimitive->GetFloat() / 100;
if (iValue >= 1 && iValue <= 9) {
FDE_CSSINHERITS.m_wFontWeight = iValue * 100;
}
@@ -807,12 +807,12 @@ void CFDE_CSSStyleSelector::ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSVal
break;
case FDE_CSSPROPERTY_Widows:
if (eType == FDE_CSSPRIMITIVETYPE_Number) {
- FDE_CSSINHERITS.m_iWidows = (FX_INT32)pPrimitive->GetFloat();
+ FDE_CSSINHERITS.m_iWidows = (int32_t)pPrimitive->GetFloat();
}
break;
case FDE_CSSPROPERTY_Orphans:
if (eType == FDE_CSSPRIMITIVETYPE_Number) {
- FDE_CSSINHERITS.m_iOrphans = (FX_INT32)pPrimitive->GetFloat();
+ FDE_CSSINHERITS.m_iOrphans = (int32_t)pPrimitive->GetFloat();
}
break;
case FDE_CSSPROPERTY_TextEmphasisColor:
@@ -894,7 +894,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSVal
if (eType == FDE_CSSPRIMITIVETYPE_Enum) {
FDE_CSSNONINHERITS.m_pszBKGImage = NULL;
} else if (eType == FDE_CSSPRIMITIVETYPE_URI) {
- FX_INT32 iLength;
+ int32_t iLength;
FDE_CSSNONINHERITS.m_pszBKGImage = pPrimitive->GetString(iLength);
}
break;
@@ -919,7 +919,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSVal
if (eType == FDE_CSSPRIMITIVETYPE_Enum) {
FDE_CSSINHERITS.m_pszListStyleImage = NULL;
} else if (eType == FDE_CSSPRIMITIVETYPE_URI) {
- FX_INT32 iLength;
+ int32_t iLength;
FDE_CSSINHERITS.m_pszListStyleImage = pPrimitive->GetString(iLength);
}
break;
@@ -961,7 +961,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSVal
}
} else if (pValue->GetType() == FDE_CSSVALUETYPE_List) {
IFDE_CSSValueList *pList = (IFDE_CSSValueList*)pValue;
- FX_INT32 iCount = pList->CountValues();
+ int32_t iCount = pList->CountValues();
if (iCount > 0) {
switch (eProperty) {
case FDE_CSSPROPERTY_FontFamily:
@@ -991,7 +991,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSVal
FDE_CSSINHERITS.m_pQuotes = pList;
break;
case FDE_CSSPROPERTY_TextCombine: {
- for (FX_INT32 i = 0; i < pList->CountValues(); i++) {
+ for (int32_t i = 0; i < pList->CountValues(); i++) {
IFDE_CSSPrimitiveValue *pVal = (IFDE_CSSPrimitiveValue*)pList->GetValue(i);
switch (pVal->GetPrimitiveType()) {
case FDE_CSSPRIMITIVETYPE_Enum: {
@@ -1023,7 +1023,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSVal
case FDE_CSSPROPERTY_TextEmphasisStyle: {
FDE_CSSTEXTEMPHASISFILL eFill;
FDE_CSSTEXTEMPHASISMARK eMark;
- for (FX_INT32 i = 0; i < pList->CountValues(); i++) {
+ for (int32_t i = 0; i < pList->CountValues(); i++) {
IFDE_CSSPrimitiveValue *pVal = (IFDE_CSSPrimitiveValue*)pList->GetValue(i);
switch (pVal->GetPrimitiveType()) {
case FDE_CSSPRIMITIVETYPE_Enum: {
@@ -1037,7 +1037,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSVal
break;
case FDE_CSSPRIMITIVETYPE_String: {
FDE_CSSINHERITS.m_eTextEmphasisMark = FDE_CSSTEXTEMPHASISMARK_Custom;
- FX_INT32 iLen;
+ int32_t iLen;
FDE_CSSINHERITS.m_pszTextEmphasisCustomMark = pVal->GetString(iLen);
}
break;
@@ -1668,7 +1668,7 @@ FDE_CSSWHITESPACE CFDE_CSSStyleSelector::ToWhiteSpace(FDE_CSSPROPERTYVALUE eValu
FX_DWORD CFDE_CSSStyleSelector::ToTextDecoration(IFDE_CSSValueList *pValue)
{
FX_DWORD dwDecoration = 0;
- for (FX_INT32 i = pValue->CountValues() - 1; i >= 0; --i) {
+ for (int32_t i = pValue->CountValues() - 1; i >= 0; --i) {
IFDE_CSSPrimitiveValue *pPrimitive = (IFDE_CSSPrimitiveValue*)pValue->GetValue(i);
if (pPrimitive->GetPrimitiveType() == FDE_CSSPRIMITIVETYPE_Enum) {
switch (pPrimitive->GetEnum()) {
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.h b/xfa/src/fdp/src/css/fde_cssstyleselector.h
index 4100299664..803522bfb4 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.h
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.h
@@ -27,24 +27,24 @@ public:
void AddRulesFrom(const CFDE_CSSStyleSheetArray &sheets, FX_DWORD dwMediaList, IFX_FontMgr *pFontMgr);
void Clear();
- FX_INT32 CountSelectors() const
+ int32_t CountSelectors() const
{
return m_iSelectors;
}
FDE_LPCSSRULEDATA GetIDRuleData(FX_DWORD dwIDHash)
{
FX_LPVOID pData;
- return m_IDRules.Lookup((FX_LPVOID)(FX_UINTPTR)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
+ return m_IDRules.Lookup((FX_LPVOID)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
}
FDE_LPCSSRULEDATA GetTagRuleData(FX_DWORD dwTagHasn)
{
FX_LPVOID pData;
- return m_TagRules.Lookup((FX_LPVOID)(FX_UINTPTR)dwTagHasn, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
+ return m_TagRules.Lookup((FX_LPVOID)(uintptr_t)dwTagHasn, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
}
FDE_LPCSSRULEDATA GetClassRuleData(FX_DWORD dwIDHash)
{
FX_LPVOID pData;
- return m_ClassRules.Lookup((FX_LPVOID)(FX_UINTPTR)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
+ return m_ClassRules.Lookup((FX_LPVOID)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
}
FDE_LPCSSRULEDATA GetUniversalRuleData()
{
@@ -65,7 +65,7 @@ protected:
CFX_MapPtrToPtr m_ClassRules;
FDE_LPCSSRULEDATA m_pUniversalRules;
FDE_LPCSSRULEDATA m_pPersudoRules;
- FX_INT32 m_iSelectors;
+ int32_t m_iSelectors;
};
class CFDE_CSSAccelerator;
class CFDE_CSSComputedStyle;
@@ -88,15 +88,15 @@ public:
virtual void UpdateStyleIndex(FX_DWORD dwMediaList);
virtual IFDE_CSSAccelerator* InitAccelerator();
virtual IFDE_CSSComputedStyle* CreateComputedStyle(IFDE_CSSComputedStyle *pParentStyle);
- virtual FX_INT32 MatchDeclarations(IFDE_CSSTagProvider *pTag, CFDE_CSSDeclarationArray &matchedDecls, FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE);
- virtual void ComputeStyle(IFDE_CSSTagProvider *pTag, const IFDE_CSSDeclaration **ppDeclArray, FX_INT32 iDeclCount, IFDE_CSSComputedStyle *pDestStyle);
+ virtual int32_t MatchDeclarations(IFDE_CSSTagProvider *pTag, CFDE_CSSDeclarationArray &matchedDecls, FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE);
+ virtual void ComputeStyle(IFDE_CSSTagProvider *pTag, const IFDE_CSSDeclaration **ppDeclArray, int32_t iDeclCount, IFDE_CSSComputedStyle *pDestStyle);
protected:
void Reset();
void MatchRules(FDE_LPCSSTAGCACHE pCache, FDE_LPCSSRULEDATA pList, FDE_CSSPERSUDO ePersudoType);
void SortRulesTo(CFDE_CSSDeclarationArray &matchDecls);
FX_BOOL MatchSelector(FDE_LPCSSTAGCACHE pCache, IFDE_CSSSelector *pSel, FDE_CSSPERSUDO ePersudoType);
- void AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPCWSTR psz, FX_INT32 iLen);
- void ApplyDeclarations(FX_BOOL bPriority, const IFDE_CSSDeclaration **ppDeclArray, FX_INT32 iDeclCount, IFDE_CSSComputedStyle *pDestStyle);
+ void AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPCWSTR psz, int32_t iLen);
+ void ApplyDeclarations(FX_BOOL bPriority, const IFDE_CSSDeclaration **ppDeclArray, int32_t iDeclCount, IFDE_CSSComputedStyle *pDestStyle);
void ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSValue *pValue, CFDE_CSSComputedStyle *pComputedStyle);
FX_FLOAT ApplyNumber(FDE_CSSPRIMITIVETYPE eUnit, FX_FLOAT fValue, FX_FLOAT fPercentBase);
@@ -151,12 +151,12 @@ public:
{
FX_memset(this, 0, sizeof(_FDE_CSSCOUNTERDATA));
}
- FX_BOOL GetCounterIncrement(FX_INT32 &iValue)
+ FX_BOOL GetCounterIncrement(int32_t &iValue)
{
iValue = m_iIncVal;
return m_bIncrement;
}
- FX_BOOL GetCounterReset(FX_INT32 &iValue)
+ FX_BOOL GetCounterReset(int32_t &iValue)
{
iValue = m_iResetVal;
return m_bReset;
@@ -164,8 +164,8 @@ public:
FX_LPCWSTR m_pszIdent;
FX_BOOL m_bIncrement;
FX_BOOL m_bReset;
- FX_INT32 m_iIncVal;
- FX_INT32 m_iResetVal;
+ int32_t m_iIncVal;
+ int32_t m_iResetVal;
} FDE_CSSCOUNTERDATA, *FDE_LPCSSCOUNTERDATA;
class CFDE_CSSCounterStyle
{
@@ -181,22 +181,22 @@ public:
m_pCounterReset = pList;
m_bIndexDirty = TRUE;
}
- FX_INT32 CountCounters()
+ int32_t CountCounters()
{
UpdateIndex();
return m_arrCounterData.GetSize();
}
- FX_BOOL GetCounterIncrement(FX_INT32 index, FX_INT32 &iValue)
+ FX_BOOL GetCounterIncrement(int32_t index, int32_t &iValue)
{
UpdateIndex();
return m_arrCounterData.ElementAt(index).GetCounterIncrement(iValue);
}
- FX_BOOL GetCounterReset(FX_INT32 index, FX_INT32 &iValue)
+ FX_BOOL GetCounterReset(int32_t index, int32_t &iValue)
{
UpdateIndex();
return m_arrCounterData.ElementAt(index).GetCounterReset(iValue);
}
- FX_LPCWSTR GetCounterIdentifier(FX_INT32 index)
+ FX_LPCWSTR GetCounterIdentifier(int32_t index)
{
UpdateIndex();
return m_arrCounterData.ElementAt(index).m_pszIdent;
@@ -204,7 +204,7 @@ public:
protected:
void UpdateIndex();
void DoUpdateIndex(IFDE_CSSValueList *pList);
- FX_INT32 FindIndex(FX_LPCWSTR pszIdentifier);
+ int32_t FindIndex(FX_LPCWSTR pszIdentifier);
IFDE_CSSValueList *m_pCounterInc;
IFDE_CSSValueList *m_pCounterReset;
CFX_ArrayTemplate<FDE_CSSCOUNTERDATA> m_arrCounterData;
@@ -240,8 +240,8 @@ public:
FX_ARGB m_dwFontColor;
FX_ARGB m_dwTextEmphasisColor;
FX_WORD m_wFontWeight;
- FX_INT32 m_iWidows;
- FX_INT32 m_iOrphans;
+ int32_t m_iWidows;
+ int32_t m_iOrphans;
FX_LPCWSTR m_pszTextEmphasisCustomMark;
FX_WORD m_eFontVariant : 1;
FX_WORD m_eFontStyle : 1;
@@ -413,7 +413,7 @@ public:
}
virtual FX_BOOL GetCustomStyle(FX_WSTR wsName, CFX_WideString &wsValue) const
{
- for (FX_INT32 i = m_CustomProperties.GetSize() - 2; i > -1; i -= 2) {
+ for (int32_t i = m_CustomProperties.GetSize() - 2; i > -1; i -= 2) {
if (wsName == m_CustomProperties[i]) {
wsValue = m_CustomProperties[i + 1];
return TRUE;
@@ -445,19 +445,19 @@ public:
{
return (FDE_CSSCAPTIONSIDE)m_InheritedData.m_eCaptionSide;
}
- virtual FX_INT32 CountCounters()
+ virtual int32_t CountCounters()
{
return (m_NonInheritedData.m_pCounterStyle == NULL) ? 0 : m_NonInheritedData.m_pCounterStyle->CountCounters();
}
- virtual FX_LPCWSTR GetCounterIdentifier(FX_INT32 index)
+ virtual FX_LPCWSTR GetCounterIdentifier(int32_t index)
{
return m_NonInheritedData.m_pCounterStyle->GetCounterIdentifier(index);
}
- virtual FX_BOOL GetCounterReset(FX_INT32 index, FX_INT32 &iValue)
+ virtual FX_BOOL GetCounterReset(int32_t index, int32_t &iValue)
{
return m_NonInheritedData.m_pCounterStyle->GetCounterReset(index, iValue);
}
- virtual FX_BOOL GetCounterIncrement(FX_INT32 index, FX_INT32 &iValue)
+ virtual FX_BOOL GetCounterIncrement(int32_t index, int32_t &iValue)
{
return m_NonInheritedData.m_pCounterStyle->GetCounterIncrement(index, iValue);
}
@@ -465,11 +465,11 @@ public:
{
return m_NonInheritedData.m_pContentList;
}
- virtual FX_INT32 CountQuotes() const
+ virtual int32_t CountQuotes() const
{
return m_InheritedData.m_pQuotes == NULL ? 0 : m_InheritedData.m_pQuotes->CountValues();
}
- virtual FX_LPCWSTR GetQuotes(FX_INT32 index) const
+ virtual FX_LPCWSTR GetQuotes(int32_t index) const
{
FXSYS_assert(m_InheritedData.m_pQuotes != NULL && m_InheritedData.m_pQuotes->CountValues() > index);
return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pQuotes->GetValue(index)))->GetString(index);
@@ -522,11 +522,11 @@ public:
{
m_NonInheritedData.m_ColumnWidth = columnWidth;
}
- virtual FX_INT32 CountFontFamilies() const
+ virtual int32_t CountFontFamilies() const
{
return m_InheritedData.m_pFontFamily ? m_InheritedData.m_pFontFamily->CountValues() : 0;
}
- virtual FX_LPCWSTR GetFontFamily(FX_INT32 index) const
+ virtual FX_LPCWSTR GetFontFamily(int32_t index) const
{
return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pFontFamily->GetValue(index)))->GetString(index);
}
@@ -782,7 +782,7 @@ public:
{
return (FDE_CSSWORDBREAK)m_InheritedData.m_eWordBreak;
}
- virtual FX_INT32 GetWidows() const
+ virtual int32_t GetWidows() const
{
return m_InheritedData.m_iWidows;
}
@@ -802,7 +802,7 @@ public:
{
return (FDE_CSSPAGEBREAK)m_NonInheritedData.m_ePageBreakInside;
}
- virtual FX_INT32 GetOrphans() const
+ virtual int32_t GetOrphans() const
{
return m_InheritedData.m_iOrphans;
}
@@ -881,7 +881,7 @@ public:
{
m_InheritedData.m_eWordBreak = eWordBreak;
}
- virtual void SetWidows(FX_INT32 iWidows)
+ virtual void SetWidows(int32_t iWidows)
{
m_InheritedData.m_iWidows = iWidows;
}
@@ -901,7 +901,7 @@ public:
{
m_NonInheritedData.m_ePageBreakInside = ePageBreakInside;
}
- virtual void SetOrphans(FX_INT32 iOrphans)
+ virtual void SetOrphans(int32_t iOrphans)
{
m_InheritedData.m_iOrphans = iOrphans;
}
@@ -949,11 +949,11 @@ public:
{
return (FDE_CSSOVERFLOW)m_NonInheritedData.m_eOverflowY;
}
- virtual FX_INT32 CountCursorUrls() const
+ virtual int32_t CountCursorUrls() const
{
return m_InheritedData.m_pCursorUris == NULL ? 0 : m_InheritedData.m_pCursorUris->CountValues();
}
- virtual FX_LPCWSTR GetCursorUrl(FX_INT32 index) const
+ virtual FX_LPCWSTR GetCursorUrl(int32_t index) const
{
FXSYS_assert(m_InheritedData.m_pCursorUris != NULL);
return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pCursorUris->GetValue(index)))->GetString(index);
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
index 1ffce6862e..006995a754 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
@@ -35,7 +35,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString &szU
}
return pStyleSheet;
}
-IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, FX_INT32 iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList )
+IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList )
{
CFDE_CSSStyleSheet *pStyleSheet = FDE_New CFDE_CSSStyleSheet(dwMediaList);
if (pStyleSheet == NULL) {
@@ -61,7 +61,7 @@ CFDE_CSSStyleSheet::~CFDE_CSSStyleSheet()
}
void CFDE_CSSStyleSheet::Reset()
{
- for (FX_INT32 i = m_RuleArray.GetSize() - 1; i >= 0; --i) {
+ for (int32_t i = m_RuleArray.GetSize() - 1; i >= 0; --i) {
IFDE_CSSRule *pRule = m_RuleArray.GetAt(i);
switch (pRule->GetType()) {
case FDE_CSSRULETYPE_Style:
@@ -98,11 +98,11 @@ FX_DWORD CFDE_CSSStyleSheet::Release()
}
return dwRefCount;
}
-FX_INT32 CFDE_CSSStyleSheet::CountRules() const
+int32_t CFDE_CSSStyleSheet::CountRules() const
{
return m_RuleArray.GetSize();
}
-IFDE_CSSRule* CFDE_CSSStyleSheet::GetRule(FX_INT32 index)
+IFDE_CSSRule* CFDE_CSSStyleSheet::GetRule(int32_t index)
{
return m_RuleArray.GetAt(index);
}
@@ -122,7 +122,7 @@ FX_BOOL CFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString &szUrl, IFX_Stre
m_szUrl = szUrl;
return bRet;
}
-FX_BOOL CFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, FX_INT32 iBufSize, FX_WORD wCodePage)
+FX_BOOL CFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, int32_t iBufSize, FX_WORD wCodePage)
{
FXSYS_assert(pBuffer != NULL && iBufSize > 0);
IFDE_CSSSyntaxParser *pSyntax = IFDE_CSSSyntaxParser::Create();
@@ -175,7 +175,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadMediaRule(IFDE_CSSSyntaxParser *pSyn
for (;;) {
switch (pSyntax->DoSyntaxParse()) {
case FDE_CSSSYNTAXSTATUS_MediaType: {
- FX_INT32 iLen;
+ int32_t iLen;
FX_LPCWSTR psz = pSyntax->GetCurrentString(iLen);
FDE_LPCCSSMEDIATYPETABLE pMediaType = FDE_GetCSSMediaTypeByName(psz, iLen);
if (pMediaType != NULL) {
@@ -210,7 +210,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule(IFDE_CSSSyntaxParser *pSyn
m_Selectors.RemoveAt(0, m_Selectors.GetSize());
CFDE_CSSStyleRule *pStyleRule = NULL;
FX_LPCWSTR pszValue = NULL;
- FX_INT32 iValueLen = 0;
+ int32_t iValueLen = 0;
FDE_CSSPROPERTYARGS propertyArgs;
propertyArgs.pStaticStore = m_pAllocator;
propertyArgs.pStringCache = &m_StringCache;
@@ -270,7 +270,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadFontFaceRule(IFDE_CSSSyntaxParser *p
{
CFDE_CSSFontFaceRule *pFontFaceRule = NULL;
FX_LPCWSTR pszValue = NULL;
- FX_INT32 iValueLen = 0;
+ int32_t iValueLen = 0;
FDE_CSSPROPERTYARGS propertyArgs;
propertyArgs.pStaticStore = m_pAllocator;
propertyArgs.pStringCache = &m_StringCache;
@@ -339,13 +339,13 @@ void CFDE_CSSStyleRule::SetSelector(IFX_MEMAllocator *pStaticStore, const CFDE_C
FXSYS_assert(m_ppSelector == NULL);
m_iSelectors = list.GetSize();
m_ppSelector = (IFDE_CSSSelector**)pStaticStore->Alloc(m_iSelectors * sizeof(IFDE_CSSSelector*));
- for (FX_INT32 i = 0; i < m_iSelectors; ++i) {
+ for (int32_t i = 0; i < m_iSelectors; ++i) {
m_ppSelector[i] = list.GetAt(i);
}
}
CFDE_CSSMediaRule::~CFDE_CSSMediaRule()
{
- for (FX_INT32 i = m_RuleArray.GetSize() - 1; i >= 0; --i) {
+ for (int32_t i = m_RuleArray.GetSize() - 1; i >= 0; --i) {
IFDE_CSSRule *pRule = m_RuleArray.GetAt(i);
switch (pRule->GetType()) {
case FDE_CSSRULETYPE_Style:
@@ -361,7 +361,7 @@ inline FX_BOOL FDE_IsCSSChar(FX_WCHAR wch)
{
return (wch >= 'a' && wch <= 'z') || (wch >= 'A' && wch <= 'Z');
}
-FX_INT32 FDE_GetCSSPersudoLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
+int32_t FDE_GetCSSPersudoLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
{
FXSYS_assert(*psz == ':');
FX_LPCWSTR pStart = psz;
@@ -375,7 +375,7 @@ FX_INT32 FDE_GetCSSPersudoLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
}
return psz - pStart;
}
-FX_INT32 FDE_GetCSSNameLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
+int32_t FDE_GetCSSNameLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
{
FX_LPCWSTR pStart = psz;
while (psz < pEnd) {
@@ -390,7 +390,7 @@ FX_INT32 FDE_GetCSSNameLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
}
return psz - pStart;
}
-IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, FX_INT32 iLen)
+IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, int32_t iLen)
{
FXSYS_assert(pStaticStore != NULL && psz != NULL && iLen > 0);
FX_LPCWSTR pStart = psz;
@@ -420,7 +420,7 @@ IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator *pStaticStore, F
pFirst = pLast = p;
}
FXSYS_assert(pLast != NULL);
- FX_INT32 iNameLen = FDE_GetCSSNameLen(++psz, pEnd);
+ int32_t iNameLen = FDE_GetCSSNameLen(++psz, pEnd);
if (iNameLen == 0) {
return NULL;
}
@@ -434,7 +434,7 @@ IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator *pStaticStore, F
pLast = p;
psz += iNameLen;
} else if (FDE_IsCSSChar(wch) || wch == '*') {
- FX_INT32 iNameLen = wch == '*' ? 1 : FDE_GetCSSNameLen(psz, pEnd);
+ int32_t iNameLen = wch == '*' ? 1 : FDE_GetCSSNameLen(psz, pEnd);
if (iNameLen == 0) {
return NULL;
}
@@ -451,7 +451,7 @@ IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator *pStaticStore, F
}
psz += iNameLen;
} else if (wch == ':') {
- FX_INT32 iNameLen = FDE_GetCSSPersudoLen(psz, pEnd);
+ int32_t iNameLen = FDE_GetCSSPersudoLen(psz, pEnd);
if (iNameLen == 0) {
return NULL;
}
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.h b/xfa/src/fdp/src/css/fde_cssstylesheet.h
index 04251a0c6b..fea4176171 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.h
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.h
@@ -10,7 +10,7 @@
class CFDE_CSSSelector : public IFDE_CSSSelector, public CFX_Target
{
public:
- CFDE_CSSSelector(FDE_CSSSELECTORTYPE eType, FX_LPCWSTR psz, FX_INT32 iLen, FX_BOOL bIgnoreCase)
+ CFDE_CSSSelector(FDE_CSSSELECTORTYPE eType, FX_LPCWSTR psz, int32_t iLen, FX_BOOL bIgnoreCase)
: m_eType(eType), m_dwHash(FX_HashCode_String_GetW(psz, iLen, bIgnoreCase)), m_pNext(NULL)
{
}
@@ -28,13 +28,13 @@ public:
{
return m_pNext;
}
- static IFDE_CSSSelector* FromString(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, FX_INT32 iLen);
+ static IFDE_CSSSelector* FromString(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, int32_t iLen);
void SetNext(IFDE_CSSSelector *pNext)
{
m_pNext = pNext;
}
protected:
- static CFDE_CSSSelector* ParseSelector(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, FX_INT32 &iOff, FX_INT32 iLen, FDE_CSSSELECTORTYPE eType);
+ static CFDE_CSSSelector* ParseSelector(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, int32_t &iOff, int32_t iLen, FDE_CSSSELECTORTYPE eType);
void SetType(FDE_CSSSELECTORTYPE eType)
{
m_eType = eType;
@@ -48,11 +48,11 @@ class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target
{
public:
CFDE_CSSStyleRule() : m_ppSelector(NULL), m_iSelectors(0) { }
- virtual FX_INT32 CountSelectorLists() const
+ virtual int32_t CountSelectorLists() const
{
return m_iSelectors;
}
- virtual IFDE_CSSSelector* GetSelectorList(FX_INT32 index) const
+ virtual IFDE_CSSSelector* GetSelectorList(int32_t index) const
{
return m_ppSelector[index];
}
@@ -69,7 +69,7 @@ public:
protected:
CFDE_CSSDeclaration m_Declaration;
IFDE_CSSSelector **m_ppSelector;
- FX_INT32 m_iSelectors;
+ int32_t m_iSelectors;
};
class CFDE_CSSMediaRule : public IFDE_CSSMediaRule, public CFX_Target
{
@@ -82,11 +82,11 @@ public:
return m_dwMediaList;
}
- virtual FX_INT32 CountRules() const
+ virtual int32_t CountRules() const
{
return m_RuleArray.GetSize();
}
- virtual IFDE_CSSRule* GetRule(FX_INT32 index)
+ virtual IFDE_CSSRule* GetRule(int32_t index)
{
return m_RuleArray.GetAt(index);
}
@@ -138,10 +138,10 @@ public:
{
return m_wCodePage;
}
- virtual FX_INT32 CountRules() const;
- virtual IFDE_CSSRule* GetRule(FX_INT32 index);
+ virtual int32_t CountRules() const;
+ virtual IFDE_CSSRule* GetRule(int32_t index);
FX_BOOL LoadFromStream(const CFX_WideString &szUrl, IFX_Stream *pStream, FX_WORD wCodePage);
- FX_BOOL LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, FX_INT32 iBufSize, FX_WORD wCodePage);
+ FX_BOOL LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, int32_t iBufSize, FX_WORD wCodePage);
protected:
void Reset();
FX_BOOL LoadFromSyntax(IFDE_CSSSyntaxParser *pSyntax);
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.cpp b/xfa/src/fdp/src/css/fde_csssyntax.cpp
index b7e5da9d6c..f1cb877b32 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.cpp
+++ b/xfa/src/fdp/src/css/fde_csssyntax.cpp
@@ -38,20 +38,20 @@ CFDE_CSSSyntaxParser::~CFDE_CSSSyntaxParser()
m_TextData.Reset();
m_TextPlane.Reset();
}
-FX_BOOL CFDE_CSSSyntaxParser::Init(IFX_Stream *pStream, FX_INT32 iCSSPlaneSize, FX_INT32 iTextDataSize , FX_BOOL bOnlyDeclaration )
+FX_BOOL CFDE_CSSSyntaxParser::Init(IFX_Stream *pStream, int32_t iCSSPlaneSize, int32_t iTextDataSize , FX_BOOL bOnlyDeclaration )
{
FXSYS_assert(pStream != NULL && iCSSPlaneSize > 0 && iTextDataSize > 0);
Reset(bOnlyDeclaration);
if (!m_TextData.EstimateSize(iTextDataSize)) {
return FALSE;
}
- FX_BYTE bom[4];
+ uint8_t bom[4];
m_pStream = pStream;
m_iStreamPos = m_pStream->GetBOM(bom);
m_iPlaneSize = iCSSPlaneSize;
return TRUE;
}
-FX_BOOL CFDE_CSSSyntaxParser::Init(FX_LPCWSTR pBuffer, FX_INT32 iBufferSize, FX_INT32 iTextDatSize , FX_BOOL bOnlyDeclaration )
+FX_BOOL CFDE_CSSSyntaxParser::Init(FX_LPCWSTR pBuffer, int32_t iBufferSize, int32_t iTextDatSize , FX_BOOL bOnlyDeclaration )
{
FXSYS_assert(pBuffer != NULL && iBufferSize > 0 && iTextDatSize > 0);
Reset(bOnlyDeclaration);
@@ -83,7 +83,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse()
return m_eStatus = FDE_CSSSYNTAXSTATUS_EOS;
}
FX_BOOL bEOS;
- FX_INT32 iLen = m_TextPlane.LoadFromStream(m_pStream, m_iStreamPos, m_iPlaneSize, bEOS);
+ int32_t iLen = m_TextPlane.LoadFromStream(m_pStream, m_iStreamPos, m_iPlaneSize, bEOS);
m_iStreamPos = m_pStream->GetPosition();
if (iLen < 1) {
if (m_eMode == FDE_CSSSYNTAXMODE_PropertyValue && m_TextData.GetLength() > 0) {
@@ -280,7 +280,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse()
return m_eStatus = FDE_CSSSYNTAXSTATUS_Error;
}
if (wch <= ' ' || wch == ';') {
- FX_INT32 iURIStart, iURILength = m_TextData.GetLength();
+ int32_t iURIStart, iURILength = m_TextData.GetLength();
if (iURILength > 0 && FDE_ParseCSSURI(m_TextData.GetBuffer(), iURILength, iURIStart, iURILength)) {
m_TextData.Subtract(iURIStart, iURILength);
SwitchMode(FDE_CSSSYNTAXMODE_MediaType);
@@ -298,7 +298,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse()
if (wch > ' ') {
AppendChar(wch);
} else {
- FX_INT32 iLen = m_TextData.GetLength();
+ int32_t iLen = m_TextData.GetLength();
FX_LPCWSTR psz = m_TextData.GetBuffer();
if (FXSYS_wcsncmp(L"charset", psz, iLen) == 0) {
SwitchMode(FDE_CSSSYNTAXMODE_Charset);
@@ -378,7 +378,7 @@ inline FX_BOOL CFDE_CSSSyntaxParser::AppendChar(FX_WCHAR wch)
}
return FALSE;
}
-inline FX_INT32 CFDE_CSSSyntaxParser::SaveTextData()
+inline int32_t CFDE_CSSSyntaxParser::SaveTextData()
{
m_iTextDatLen = m_TextData.TrimEnd();
m_TextData.Clear();
@@ -389,9 +389,9 @@ inline void CFDE_CSSSyntaxParser::SwitchMode(FDE_CSSSYNTAXMODE eMode)
m_eMode = eMode;
SaveTextData();
}
-inline FX_INT32 CFDE_CSSSyntaxParser::SwitchToComment()
+inline int32_t CFDE_CSSSyntaxParser::SwitchToComment()
{
- FX_INT32 iLength = m_TextData.GetLength();
+ int32_t iLength = m_TextData.GetLength();
m_ModeStack.Push(m_eMode);
SwitchMode(FDE_CSSSYNTAXMODE_Comment);
return iLength;
@@ -406,7 +406,7 @@ inline FX_BOOL CFDE_CSSSyntaxParser::RestoreMode()
m_ModeStack.Pop();
return TRUE;
}
-FX_LPCWSTR CFDE_CSSSyntaxParser::GetCurrentString(FX_INT32 &iLength) const
+FX_LPCWSTR CFDE_CSSSyntaxParser::GetCurrentString(int32_t &iLength) const
{
iLength = m_iTextDatLen;
return m_TextData.GetBuffer();
@@ -431,21 +431,21 @@ void CFDE_CSSTextBuf::Reset()
}
m_iDatPos = m_iDatLen = m_iBufLen;
}
-FX_BOOL CFDE_CSSTextBuf::AttachBuffer(FX_LPCWSTR pBuffer, FX_INT32 iBufLen)
+FX_BOOL CFDE_CSSTextBuf::AttachBuffer(FX_LPCWSTR pBuffer, int32_t iBufLen)
{
Reset();
m_pBuffer = (FX_LPWSTR)pBuffer;
m_iDatLen = m_iBufLen = iBufLen;
return m_bExtBuf = TRUE;
}
-FX_BOOL CFDE_CSSTextBuf::EstimateSize(FX_INT32 iAllocSize)
+FX_BOOL CFDE_CSSTextBuf::EstimateSize(int32_t iAllocSize)
{
FXSYS_assert(iAllocSize > 0);
Clear();
m_bExtBuf = FALSE;
return ExpandBuf(iAllocSize);
}
-FX_INT32 CFDE_CSSTextBuf::LoadFromStream(IFX_Stream *pTxtStream, FX_INT32 iStreamOffset, FX_INT32 iMaxChars, FX_BOOL &bEOS)
+int32_t CFDE_CSSTextBuf::LoadFromStream(IFX_Stream *pTxtStream, int32_t iStreamOffset, int32_t iMaxChars, FX_BOOL &bEOS)
{
FXSYS_assert(iStreamOffset >= 0 && iMaxChars > 0);
Clear();
@@ -461,7 +461,7 @@ FX_INT32 CFDE_CSSTextBuf::LoadFromStream(IFX_Stream *pTxtStream, FX_INT32 iStrea
pTxtStream->Unlock();
return m_iDatLen;
}
-FX_BOOL CFDE_CSSTextBuf::ExpandBuf(FX_INT32 iDesiredSize)
+FX_BOOL CFDE_CSSTextBuf::ExpandBuf(int32_t iDesiredSize)
{
if (m_bExtBuf) {
return FALSE;
@@ -480,7 +480,7 @@ FX_BOOL CFDE_CSSTextBuf::ExpandBuf(FX_INT32 iDesiredSize)
return TRUE;
}
}
-void CFDE_CSSTextBuf::Subtract(FX_INT32 iStart, FX_INT32 iLength)
+void CFDE_CSSTextBuf::Subtract(int32_t iStart, int32_t iLength)
{
FXSYS_assert(iStart >= 0 && iLength > 0);
if (iLength > m_iDatLen - iStart) {
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.h b/xfa/src/fdp/src/css/fde_csssyntax.h
index c18e0f9717..4ab132d2c8 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.h
+++ b/xfa/src/fdp/src/css/fde_csssyntax.h
@@ -11,9 +11,9 @@ class CFDE_CSSTextBuf : public CFX_Target
public:
CFDE_CSSTextBuf();
~CFDE_CSSTextBuf();
- FX_BOOL AttachBuffer(FX_LPCWSTR pBuffer, FX_INT32 iBufLen);
- FX_BOOL EstimateSize(FX_INT32 iAllocSize);
- FX_INT32 LoadFromStream(IFX_Stream *pTxtStream, FX_INT32 iStreamOffset, FX_INT32 iMaxChars, FX_BOOL &bEOS);
+ FX_BOOL AttachBuffer(FX_LPCWSTR pBuffer, int32_t iBufLen);
+ FX_BOOL EstimateSize(int32_t iAllocSize);
+ int32_t LoadFromStream(IFX_Stream *pTxtStream, int32_t iStreamOffset, int32_t iMaxChars, FX_BOOL &bEOS);
FX_BOOL AppendChar(FX_WCHAR wch)
{
if (m_iDatLen >= m_iBufLen && !ExpandBuf(m_iBufLen * 2)) {
@@ -26,7 +26,7 @@ public:
m_iDatPos = m_iDatLen = 0;
}
void Reset();
- FX_INT32 TrimEnd()
+ int32_t TrimEnd()
{
while (m_iDatLen > 0 && m_pBuffer[m_iDatLen - 1] <= ' ') {
--m_iDatLen;
@@ -34,12 +34,12 @@ public:
AppendChar(0);
return --m_iDatLen;
}
- void Subtract(FX_INT32 iStart, FX_INT32 iLength);
+ void Subtract(int32_t iStart, int32_t iLength);
FX_BOOL IsEOF() const
{
return m_iDatPos >= m_iDatLen;
}
- FX_WCHAR GetAt(FX_INT32 index) const
+ FX_WCHAR GetAt(int32_t index) const
{
return m_pBuffer[index];
}
@@ -55,7 +55,7 @@ public:
{
m_iDatPos++;
}
- FX_INT32 GetLength() const
+ int32_t GetLength() const
{
return m_iDatLen;
}
@@ -64,12 +64,12 @@ public:
return m_pBuffer;
}
protected:
- FX_BOOL ExpandBuf(FX_INT32 iDesiredSize);
+ FX_BOOL ExpandBuf(int32_t iDesiredSize);
FX_BOOL m_bExtBuf;
FX_LPWSTR m_pBuffer;
- FX_INT32 m_iBufLen;
- FX_INT32 m_iDatLen;
- FX_INT32 m_iDatPos;
+ int32_t m_iBufLen;
+ int32_t m_iDatLen;
+ int32_t m_iDatPos;
};
#define FDE_CSSSYNTAXCHECK_AllowCharset 1
#define FDE_CSSSYNTAXCHECK_AllowImport 2
@@ -96,18 +96,18 @@ public:
{
FDE_Delete this;
}
- virtual FX_BOOL Init(IFX_Stream *pStream, FX_INT32 iCSSPlaneSize, FX_INT32 iTextDataSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
- virtual FX_BOOL Init(FX_LPCWSTR pBuffer, FX_INT32 iBufferSize, FX_INT32 iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
+ virtual FX_BOOL Init(IFX_Stream *pStream, int32_t iCSSPlaneSize, int32_t iTextDataSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
+ virtual FX_BOOL Init(FX_LPCWSTR pBuffer, int32_t iBufferSize, int32_t iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
virtual FDE_CSSSYNTAXSTATUS DoSyntaxParse();
- virtual FX_LPCWSTR GetCurrentString(FX_INT32 &iLength) const;
+ virtual FX_LPCWSTR GetCurrentString(int32_t &iLength) const;
protected:
void Reset(FX_BOOL bOnlyDeclaration);
void SwitchMode(FDE_CSSSYNTAXMODE eMode);
- FX_INT32 SwitchToComment();
+ int32_t SwitchToComment();
FX_BOOL RestoreMode();
FX_BOOL AppendChar(FX_WCHAR wch);
- FX_INT32 SaveTextData();
+ int32_t SaveTextData();
FX_BOOL IsCharsetEnabled() const
{
return (m_dwCheck & FDE_CSSSYNTAXCHECK_AllowCharset) != 0;
@@ -122,11 +122,11 @@ protected:
m_dwCheck = 0;
}
IFX_Stream *m_pStream;
- FX_INT32 m_iStreamPos;
- FX_INT32 m_iPlaneSize;
+ int32_t m_iStreamPos;
+ int32_t m_iPlaneSize;
CFDE_CSSTextBuf m_TextData;
CFDE_CSSTextBuf m_TextPlane;
- FX_INT32 m_iTextDatLen;
+ int32_t m_iTextDatLen;
FX_DWORD m_dwCheck;
FDE_CSSSYNTAXMODE m_eMode;
FDE_CSSSYNTAXSTATUS m_eStatus;
diff --git a/xfa/src/fdp/src/fde/fde_devbasic.cpp b/xfa/src/fdp/src/fde/fde_devbasic.cpp
index 780f1188c8..f6e893ef2e 100644
--- a/xfa/src/fdp/src/fde/fde_devbasic.cpp
+++ b/xfa/src/fdp/src/fde/fde_devbasic.cpp
@@ -61,7 +61,7 @@ static const FDE_HATCHDATA gs_HatchBitmapData[FDE_HATCHSTYLE_Total] = {
{16, 16, {0x82, 0x82, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x82, 0x82, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x82, 0x82, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x82, 0x82, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,}},
{16, 16, {0x10, 0x10, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}},
};
-FDE_LPCHATCHDATA FDE_DEVGetHatchData(FX_INT32 iHatchStyle)
+FDE_LPCHATCHDATA FDE_DEVGetHatchData(int32_t iHatchStyle)
{
if (iHatchStyle < FDE_HATCHSTYLE_Min || iHatchStyle > FDE_HATCHSTYLE_Max) {
return NULL;
diff --git a/xfa/src/fdp/src/fde/fde_devbasic.h b/xfa/src/fdp/src/fde/fde_devbasic.h
index 36d2471b2c..caf52a9327 100644
--- a/xfa/src/fdp/src/fde/fde_devbasic.h
+++ b/xfa/src/fdp/src/fde/fde_devbasic.h
@@ -7,10 +7,10 @@
#ifndef _FDE_DEVICE_BASIC_IMP
#define _FDE_DEVICE_BASIC_IMP
struct FDE_HATCHDATA {
- FX_INT32 iWidth;
- FX_INT32 iHeight;
- FX_BYTE MaskBits[64];
+ int32_t iWidth;
+ int32_t iHeight;
+ uint8_t MaskBits[64];
};
typedef FDE_HATCHDATA const * FDE_LPCHATCHDATA;
-FDE_LPCHATCHDATA FDE_DEVGetHatchData(FX_INT32 iHatchStyle);
+FDE_LPCHATCHDATA FDE_DEVGetHatchData(int32_t iHatchStyle);
#endif
diff --git a/xfa/src/fdp/src/fde/fde_gdidevice.cpp b/xfa/src/fdp/src/fde/fde_gdidevice.cpp
index ad7f6cc9e5..7f773efd96 100644
--- a/xfa/src/fdp/src/fde/fde_gdidevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gdidevice.cpp
@@ -47,11 +47,11 @@ CFDE_GdiDevice::~CFDE_GdiDevice()
FDE_Free(m_pGlyphBuf);
}
}
-FX_INT32 CFDE_GdiDevice::GetWidth() const
+int32_t CFDE_GdiDevice::GetWidth() const
{
return m_pBitmap->GetWidth();
}
-FX_INT32 CFDE_GdiDevice::GetHeight() const
+int32_t CFDE_GdiDevice::GetHeight() const
{
return m_pBitmap->GetHeight();
}
@@ -144,7 +144,7 @@ FX_BOOL CFDE_GdiDevice::DrawImage(CFX_DIBSource *pDib, const CFX_RectF *pSrcRect
CFDE_GdiImage img(&bmp);
return DrawImage(&img, pSrcRect, dstRect, pImgMatrix, pDevMatrix);
}
-FX_BOOL CFDE_GdiDevice::DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix)
+FX_BOOL CFDE_GdiDevice::DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix)
{
FXSYS_assert(pBrush != NULL && pFont != NULL && pCharPos != NULL);
FX_ARGB argb = 0xFF000000;
diff --git a/xfa/src/fdp/src/fde/fde_gdidevice.h b/xfa/src/fdp/src/fde/fde_gdidevice.h
index c22ed2b4ba..86f7bac176 100644
--- a/xfa/src/fdp/src/fde/fde_gdidevice.h
+++ b/xfa/src/fdp/src/fde/fde_gdidevice.h
@@ -20,8 +20,8 @@ public:
FDE_Delete this;
}
- virtual FX_INT32 GetWidth() const;
- virtual FX_INT32 GetHeight() const;
+ virtual int32_t GetWidth() const;
+ virtual int32_t GetHeight() const;
virtual FDE_HDEVICESTATE SaveState();
virtual void RestoreState(FDE_HDEVICESTATE hState);
virtual FX_BOOL SetClipPath(const IFDE_Path *pClip);
@@ -34,7 +34,7 @@ public:
virtual FX_BOOL DrawImage(CFX_DIBSource *pDib, const CFX_RectF *pSrcRect, const CFX_RectF &dstRect, const CFX_Matrix *pImgMatrix = NULL, const CFX_Matrix *pDevMatrix = NULL);
virtual FX_BOOL DrawImage(IFDE_Image *pImg, const CFX_RectF *pSrcRect, const CFX_RectF &dstRect, const CFX_Matrix *pImgMatrix = NULL, const CFX_Matrix *pDevMatrix = NULL);
- virtual FX_BOOL DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix = NULL);
+ virtual FX_BOOL DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix = NULL);
virtual FX_BOOL DrawArc(IFDE_Pen *pPen, FX_FLOAT fPenWidth, const CFX_RectF &rect, FX_FLOAT startAngle, FX_FLOAT sweepAngle, const CFX_Matrix *pMatrix = NULL);
virtual FX_BOOL DrawBezier(IFDE_Pen *pPen, FX_FLOAT fPenWidth, const CFX_PointF &pt1, const CFX_PointF &pt2, const CFX_PointF &pt3, const CFX_PointF &pt4, const CFX_Matrix *pMatrix = NULL);
virtual FX_BOOL DrawCurve(IFDE_Pen *pPen, FX_FLOAT fPenWidth, const CFX_PointsF &points, FX_BOOL bClosed, FX_FLOAT fTension = 0.5f, const CFX_Matrix *pMatrix = NULL);
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index 81d7ef5a0c..1ecbb1434b 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -12,7 +12,7 @@
#ifdef _cplusplus
exten "C" {
#endif
- FX_BOOL FDE_GetStockHatchMask(FX_INT32 iHatchStyle, CFX_DIBitmap & hatchMask)
+ FX_BOOL FDE_GetStockHatchMask(int32_t iHatchStyle, CFX_DIBitmap & hatchMask)
{
FDE_LPCHATCHDATA pData = FDE_DEVGetHatchData(iHatchStyle);
if (!pData) {
@@ -63,11 +63,11 @@ CFDE_FxgeDevice::~CFDE_FxgeDevice()
delete m_pDevice;
}
}
-FX_INT32 CFDE_FxgeDevice::GetWidth() const
+int32_t CFDE_FxgeDevice::GetWidth() const
{
return m_pDevice->GetWidth();
}
-FX_INT32 CFDE_FxgeDevice::GetHeight() const
+int32_t CFDE_FxgeDevice::GetHeight() const
{
return m_pDevice->GetHeight();
}
@@ -85,8 +85,8 @@ void CFDE_FxgeDevice::RestoreState(FDE_HDEVICESTATE hState)
FX_BOOL CFDE_FxgeDevice::SetClipRect(const CFX_RectF &rtClip)
{
m_rtClip = rtClip;
- FX_RECT rt((FX_INT32)FXSYS_floor(rtClip.left), (FX_INT32)FXSYS_floor(rtClip.top),
- (FX_INT32)FXSYS_ceil(rtClip.right()), (FX_INT32)FXSYS_ceil(rtClip.bottom()));
+ FX_RECT rt((int32_t)FXSYS_floor(rtClip.left), (int32_t)FXSYS_floor(rtClip.top),
+ (int32_t)FXSYS_ceil(rtClip.right()), (int32_t)FXSYS_ceil(rtClip.bottom()));
return m_pDevice->SetClip_Rect(&rt);
}
const CFX_RectF& CFDE_FxgeDevice::GetClipRect()
@@ -140,7 +140,7 @@ FX_BOOL CFDE_FxgeDevice::DrawImage(CFX_DIBSource *pDib, const CFX_RectF *pSrcRec
m_pDevice->CancelDIBits(handle);
return handle != NULL;
}
-FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix)
+FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix)
{
FXSYS_assert(pBrush != NULL && pFont != NULL && pCharPos != NULL && iCount > 0);
CFX_FontCache *pCache = CFX_GEModule::Get()->GetFontCache();
@@ -151,7 +151,7 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const F
if ((pFont->GetFontStyles() & FX_FONTSTYLE_Italic) != 0 && !pFxFont->IsItalic()) {
FXTEXT_CHARPOS *pCP = (FXTEXT_CHARPOS*)pCharPos;
FX_FLOAT *pAM;
- for (FX_INT32 i = 0; i < iCount; ++i) {
+ for (int32_t i = 0; i < iCount; ++i) {
static const FX_FLOAT mc = 0.267949f;
pAM = pCP->m_AdjustMatrix;
pAM[2] = mc * pAM[0] + pAM[2];
@@ -163,7 +163,7 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const F
IFX_Font *pCurFont = NULL;
IFX_Font *pSTFont = NULL;
FXTEXT_CHARPOS *pCurCP = NULL;
- FX_INT32 iCurCount = 0;
+ int32_t iCurCount = 0;
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
FX_DWORD dwFontStyle = pFont->GetFontStyles();
CFX_Font FxFont;
@@ -174,8 +174,8 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const F
SubstFxFont.m_ItalicAngle = dwFontStyle & FX_FONTSTYLE_Italic ? -12 : 0;
SubstFxFont.m_bItlicCJK = dwFontStyle & FX_FONTSTYLE_Italic ? TRUE : FALSE;
#endif
- for (FX_INT32 i = 0; i < iCount; ++i) {
- pSTFont = pFont->GetSubstFont((FX_INT32)pCP->m_GlyphIndex);
+ for (int32_t i = 0; i < iCount; ++i) {
+ pSTFont = pFont->GetSubstFont((int32_t)pCP->m_GlyphIndex);
pCP->m_GlyphIndex &= 0x00FFFFFF;
pCP->m_bFontStyle = FALSE;
if (pCurFont != pSTFont) {
@@ -340,10 +340,10 @@ FX_BOOL CFDE_FxgeDevice::CreatePen(IFDE_Pen *pPen, FX_FLOAT fPenWidth, CFX_Graph
pPen->GetDashArray(dashArray);
break;
}
- FX_INT32 iDashCount = dashArray.GetSize();
+ int32_t iDashCount = dashArray.GetSize();
if (iDashCount > 0) {
graphState.SetDashCount(iDashCount);
- for (FX_INT32 i = 0; i < iDashCount; ++i) {
+ for (int32_t i = 0; i < iDashCount; ++i) {
graphState.m_DashArray[i] = dashArray[i] * fPenWidth;
}
}
@@ -365,7 +365,7 @@ FX_BOOL CFDE_FxgeDevice::FillPath(IFDE_Brush *pBrush, const IFDE_Path *pPath, co
if (pBrush == NULL) {
return FALSE;
}
- FX_INT32 iType = pBrush->GetType();
+ int32_t iType = pBrush->GetType();
if (iType < 0 || iType > FDE_BRUSHTYPE_MAX) {
return FALSE;
}
@@ -381,7 +381,7 @@ FX_BOOL CFDE_FxgeDevice::FillHatchPath(IFDE_Brush *pBrush, const CFX_PathData *p
{
FXSYS_assert(pPath && pBrush && pBrush->GetType() == FDE_BRUSHTYPE_Hatch);
IFDE_HatchBrush *pHatchBrush = (IFDE_HatchBrush*)pBrush;
- FX_INT32 iStyle = pHatchBrush->GetHatchStyle();
+ int32_t iStyle = pHatchBrush->GetHatchStyle();
if (iStyle < FDE_HATCHSTYLE_Min || iStyle > FDE_HATCHSTYLE_Max) {
return FALSE;
}
@@ -401,8 +401,8 @@ FX_BOOL CFDE_FxgeDevice::FillHatchPath(IFDE_Brush *pBrush, const CFX_PathData *p
m_pDevice->StartRendering();
m_pDevice->SetClip_PathFill(pPath, (const CFX_AffineMatrix*)pMatrix, FXFILL_WINDING);
m_pDevice->FillRect(&rect, dwBackColor);
- for (FX_INT32 j = rect.bottom; j < rect.top; j += mask.GetHeight())
- for (FX_INT32 i = rect.left; i < rect.right; i += mask.GetWidth()) {
+ for (int32_t j = rect.bottom; j < rect.top; j += mask.GetHeight())
+ for (int32_t i = rect.left; i < rect.right; i += mask.GetWidth()) {
m_pDevice->SetBitMask(&mask, i, j, dwForeColor);
}
m_pDevice->EndRendering();
@@ -430,7 +430,7 @@ FX_BOOL CFDE_FxgeDevice::FillTexturePath(IFDE_Brush *pBrush, const CFX_PathData
pImage->StopLoadImage();
return WrapTexture(pTextureBrush->GetWrapMode(), &bmp, pPath, pMatrix);
}
-FX_BOOL CFDE_FxgeDevice::WrapTexture(FX_INT32 iWrapMode, const CFX_DIBitmap *pBitmap, const CFX_PathData *pPath, const CFX_Matrix *pMatrix)
+FX_BOOL CFDE_FxgeDevice::WrapTexture(int32_t iWrapMode, const CFX_DIBitmap *pBitmap, const CFX_PathData *pPath, const CFX_Matrix *pMatrix)
{
CFX_FloatRect rectf = pPath->GetBoundingBox();
if (pMatrix) {
@@ -457,12 +457,12 @@ FX_BOOL CFDE_FxgeDevice::WrapTexture(FX_INT32 iWrapMode, const CFX_DIBitmap *pBi
pFlip[0][1] = bFlipX ? pBitmap->FlipImage(TRUE, FALSE) : pBitmap;
pFlip[1][0] = bFlipY ? pBitmap->FlipImage(FALSE, TRUE) : pBitmap;
pFlip[1][1] = (bFlipX || bFlipY) ? pBitmap->FlipImage(bFlipX, bFlipY) : pBitmap;
- FX_INT32 iCounterY = 0;
- for (FX_INT32 j = rect.top; j < rect.bottom; j += pBitmap->GetHeight()) {
- FX_INT32 indexY = iCounterY++ % 2;
- FX_INT32 iCounterX = 0;
- for (FX_INT32 i = rect.left; i < rect.right; i += pBitmap->GetWidth()) {
- FX_INT32 indexX = iCounterX++ % 2;
+ int32_t iCounterY = 0;
+ for (int32_t j = rect.top; j < rect.bottom; j += pBitmap->GetHeight()) {
+ int32_t indexY = iCounterY++ % 2;
+ int32_t iCounterX = 0;
+ for (int32_t i = rect.left; i < rect.right; i += pBitmap->GetWidth()) {
+ int32_t indexX = iCounterX++ % 2;
m_pDevice->SetDIBits(pFlip[indexY][indexX], i, j);
}
}
@@ -516,7 +516,7 @@ FX_BOOL CFDE_FxgeDevice::FillLinearGradientPath(IFDE_Brush *pBrush, const CFX_Pa
CFX_FxgeDevice dev;
dev.Attach(&bmp);
pt1 = pt0;
- FX_INT32 iSteps = FXSYS_round(FXSYS_ceil(fSteps));
+ int32_t iSteps = FXSYS_round(FXSYS_ceil(fSteps));
while (--iSteps >= 0) {
cr0 = ArgbEncode(FXSYS_round(a0), FXSYS_round(r0), FXSYS_round(g0), FXSYS_round(b0));
dev.DrawCosmeticLine(pt0.x, pt0.y, pt1.x, pt1.y, cr0);
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.h b/xfa/src/fdp/src/fde/fde_gedevice.h
index 6290e53390..ab16cc7cae 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.h
+++ b/xfa/src/fdp/src/fde/fde_gedevice.h
@@ -17,8 +17,8 @@ public:
FDE_Delete this;
}
- virtual FX_INT32 GetWidth() const;
- virtual FX_INT32 GetHeight() const;
+ virtual int32_t GetWidth() const;
+ virtual int32_t GetHeight() const;
virtual FDE_HDEVICESTATE SaveState();
virtual void RestoreState(FDE_HDEVICESTATE hState);
virtual FX_BOOL SetClipPath(const IFDE_Path *pClip);
@@ -30,7 +30,7 @@ public:
virtual FX_FLOAT GetDpiY() const;
virtual FX_BOOL DrawImage(CFX_DIBSource *pDib, const CFX_RectF *pSrcRect, const CFX_RectF &dstRect, const CFX_Matrix *pImgMatrix = NULL, const CFX_Matrix *pDevMatrix = NULL);
- virtual FX_BOOL DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix = NULL);
+ virtual FX_BOOL DrawString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix = NULL);
virtual FX_BOOL DrawBezier(IFDE_Pen *pPen, FX_FLOAT fPenWidth, const CFX_PointF &pt1, const CFX_PointF &pt2, const CFX_PointF &pt3, const CFX_PointF &pt4, const CFX_Matrix *pMatrix = NULL);
virtual FX_BOOL DrawCurve(IFDE_Pen *pPen, FX_FLOAT fPenWidth, const CFX_PointsF &points, FX_BOOL bClosed, FX_FLOAT fTension = 0.5f, const CFX_Matrix *pMatrix = NULL);
virtual FX_BOOL DrawEllipse(IFDE_Pen *pPen, FX_FLOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL);
@@ -48,16 +48,16 @@ public:
FX_BOOL FillHatchPath(IFDE_Brush *pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix);
FX_BOOL FillTexturePath(IFDE_Brush *pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix);
FX_BOOL FillLinearGradientPath(IFDE_Brush *pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix);
- FX_BOOL DrawSolidString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix);
- FX_BOOL DrawStringPath(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix);
+ FX_BOOL DrawSolidString(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix);
+ FX_BOOL DrawStringPath(IFDE_Brush *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_FLOAT fFontSize, const CFX_Matrix *pMatrix);
protected:
FX_BOOL CreatePen(IFDE_Pen *pPen, FX_FLOAT fPenWidth, CFX_GraphStateData &graphState);
- FX_BOOL WrapTexture(FX_INT32 iWrapMode, const CFX_DIBitmap *pBitmap, const CFX_PathData *pPath, const CFX_Matrix *pMatrix);
+ FX_BOOL WrapTexture(int32_t iWrapMode, const CFX_DIBitmap *pBitmap, const CFX_PathData *pPath, const CFX_Matrix *pMatrix);
CFX_RenderDevice *m_pDevice;
CFX_RectF m_rtClip;
FX_BOOL m_bOwnerDevice;
FXTEXT_CHARPOS *m_pCharPos;
- FX_INT32 m_iCharCount;
+ int32_t m_iCharCount;
};
#endif
#endif
diff --git a/xfa/src/fdp/src/fde/fde_geobject.cpp b/xfa/src/fdp/src/fde/fde_geobject.cpp
index 9f34cf3051..819563619e 100644
--- a/xfa/src/fdp/src/fde/fde_geobject.cpp
+++ b/xfa/src/fdp/src/fde/fde_geobject.cpp
@@ -24,12 +24,12 @@ FX_BOOL CFDE_Path::CloseFigure()
}
return TRUE;
}
-FX_PATHPOINT* CFDE_Path::GetLastPoint(FX_INT32 iCount ) const
+FX_PATHPOINT* CFDE_Path::GetLastPoint(int32_t iCount ) const
{
if (iCount < 1) {
return NULL;
}
- FX_INT32 iPoints = m_Path.GetPointCount();
+ int32_t iPoints = m_Path.GetPointCount();
if (iCount > iPoints) {
return NULL;
}
@@ -40,12 +40,12 @@ FX_BOOL CFDE_Path::FigureClosed() const
FX_PATHPOINT *pPoint = GetLastPoint();
return pPoint ? (pPoint->m_Flag & FXPT_CLOSEFIGURE) : TRUE;
}
-FX_PATHPOINT* CFDE_Path::AddPoints(FX_INT32 iCount)
+FX_PATHPOINT* CFDE_Path::AddPoints(int32_t iCount)
{
if (iCount < 1) {
return NULL;
}
- FX_INT32 iPoints = m_Path.GetPointCount();
+ int32_t iPoints = m_Path.GetPointCount();
m_Path.AddPointCount(iCount);
return m_Path.GetPoints() + iPoints;
}
@@ -121,7 +121,7 @@ void CFDE_Path::AddBezier(const CFX_PointsF &points)
}
void CFDE_Path::AddBeziers(const CFX_PointsF &points)
{
- FX_INT32 iCount = points.GetSize();
+ int32_t iCount = points.GetSize();
if (iCount < 4) {
return;
}
@@ -134,7 +134,7 @@ void CFDE_Path::AddBeziers(const CFX_PointsF &points)
}
void CFDE_Path::GetCurveTangents(const CFX_PointsF &points, CFX_PointsF &tangents, FX_BOOL bClosed, FX_FLOAT fTension) const
{
- FX_INT32 iCount = points.GetSize();
+ int32_t iCount = points.GetSize();
tangents.SetSize(iCount);
if (iCount < 3) {
return;
@@ -142,9 +142,9 @@ void CFDE_Path::GetCurveTangents(const CFX_PointsF &points, CFX_PointsF &tangent
FX_FLOAT fCoefficient = fTension / 3.0f;
FX_LPCPOINTF pPoints = points.GetData();
FX_LPPOINTF pTangents = tangents.GetData();
- for (FX_INT32 i = 0; i < iCount; ++i) {
- FX_INT32 r = i + 1;
- FX_INT32 s = i - 1;
+ for (int32_t i = 0; i < iCount; ++i) {
+ int32_t r = i + 1;
+ int32_t s = i - 1;
if (r >= iCount) {
r = bClosed ? (r - iCount) : (iCount - 1);
}
@@ -157,7 +157,7 @@ void CFDE_Path::GetCurveTangents(const CFX_PointsF &points, CFX_PointsF &tangent
}
void CFDE_Path::AddCurve(const CFX_PointsF &points, FX_BOOL bClosed, FX_FLOAT fTension)
{
- FX_INT32 iLast = points.GetUpperBound();
+ int32_t iLast = points.GetUpperBound();
if (iLast < 1) {
return;
}
@@ -166,8 +166,8 @@ void CFDE_Path::AddCurve(const CFX_PointsF &points, FX_BOOL bClosed, FX_FLOAT fT
FX_LPCPOINTF pPoints = points.GetData();
FX_LPPOINTF pTangents = tangents.GetData();
MoveTo(pPoints[0]);
- for (FX_INT32 i = 0; i < iLast; ++i) {
- FX_INT32 j = i + 1;
+ for (int32_t i = 0; i < iLast; ++i) {
+ int32_t j = i + 1;
CFX_PointF p1;
p1.Set(pPoints[i].x + pTangents[i].x, pPoints[i].y + pTangents[i].y);
CFX_PointF p2;
@@ -191,7 +191,7 @@ void CFDE_Path::AddEllipse(const CFX_RectF &rect)
{
FX_FLOAT fStartAngle = 0;
FX_FLOAT fEndAngle = FX_PI / 2;
- for (FX_INT32 i = 0; i < 4; ++i) {
+ for (int32_t i = 0; i < 4; ++i) {
ArcTo(i == 0, rect, fStartAngle, fEndAngle);
fStartAngle += FX_PI / 2;
fEndAngle += FX_PI / 2;
@@ -212,7 +212,7 @@ void CFDE_Path::AddPath(const IFDE_Path *pSrc, FX_BOOL bConnect)
if (pPath == NULL) {
return;
}
- FX_INT32 iCount = pPath->m_Path.GetPointCount();
+ int32_t iCount = pPath->m_Path.GetPointCount();
if (iCount < 1) {
return;
}
@@ -223,7 +223,7 @@ void CFDE_Path::AddPath(const IFDE_Path *pSrc, FX_BOOL bConnect)
}
void CFDE_Path::AddPolygon(const CFX_PointsF &points)
{
- FX_INT32 iCount = points.GetSize();
+ int32_t iCount = points.GetSize();
if (iCount < 2) {
return;
}
@@ -236,7 +236,7 @@ void CFDE_Path::AddPolygon(const CFX_PointsF &points)
}
void CFDE_Path::AddLines(const CFX_PointsF &points)
{
- FX_INT32 iCount = points.GetSize();
+ int32_t iCount = points.GetSize();
if (iCount < 2) {
return;
}
diff --git a/xfa/src/fdp/src/fde/fde_geobject.h b/xfa/src/fdp/src/fde/fde_geobject.h
index 8552b6f7b8..3b1b22901d 100644
--- a/xfa/src/fdp/src/fde/fde_geobject.h
+++ b/xfa/src/fdp/src/fde/fde_geobject.h
@@ -31,8 +31,8 @@ public:
virtual void AddRectangle(const CFX_RectF &rect);
virtual void GetBBox(CFX_RectF &bbox) const;
virtual void GetBBox(CFX_RectF &bbox, FX_FLOAT fLineWidth, FX_FLOAT fMiterLimit) const;
- FX_PATHPOINT* AddPoints(FX_INT32 iCount);
- FX_PATHPOINT* GetLastPoint(FX_INT32 iCount = 1) const;
+ FX_PATHPOINT* AddPoints(int32_t iCount);
+ FX_PATHPOINT* GetLastPoint(int32_t iCount = 1) const;
FX_BOOL FigureClosed() const;
void MoveTo(FX_FLOAT fx, FX_FLOAT fy);
void LineTo(FX_FLOAT fx, FX_FLOAT fy);
diff --git a/xfa/src/fdp/src/fde/fde_object.cpp b/xfa/src/fdp/src/fde/fde_object.cpp
index d8a555a7bd..71a1b43991 100644
--- a/xfa/src/fdp/src/fde/fde_object.cpp
+++ b/xfa/src/fdp/src/fde/fde_object.cpp
@@ -10,7 +10,7 @@ IFDE_Pen* IFDE_Pen::Create()
{
return FDE_New CFDE_Pen();
}
-IFDE_Brush* IFDE_Brush::Create(FX_INT32 iType)
+IFDE_Brush* IFDE_Brush::Create(int32_t iType)
{
switch (iType) {
case FDE_BRUSHTYPE_Solid:
diff --git a/xfa/src/fdp/src/fde/fde_object.h b/xfa/src/fdp/src/fde/fde_object.h
index 553d77fb21..190865f612 100644
--- a/xfa/src/fdp/src/fde/fde_object.h
+++ b/xfa/src/fdp/src/fde/fde_object.h
@@ -32,7 +32,7 @@ public:
FDE_Delete this;
}
- virtual FX_INT32 GetType() const
+ virtual int32_t GetType() const
{
return m_pBrush ? m_pBrush->GetType() : FDE_PENTYPE_SolidColor;
}
@@ -57,19 +57,19 @@ public:
m_Color = ((IFDE_SolidBrush*)m_pBrush)->GetColor();
}
}
- virtual FX_INT32 GetLineCap() const
+ virtual int32_t GetLineCap() const
{
return m_iLineCap;
}
- virtual void SetLineCap(FX_INT32 iLineCap)
+ virtual void SetLineCap(int32_t iLineCap)
{
m_iLineCap = iLineCap;
}
- virtual FX_INT32 GetDashStyle() const
+ virtual int32_t GetDashStyle() const
{
return m_iDashStyle;
}
- virtual void SetDashStyle(FX_INT32 iDashStyle)
+ virtual void SetDashStyle(int32_t iDashStyle)
{
m_iDashStyle = iDashStyle;
}
@@ -81,11 +81,11 @@ public:
{
m_fDashPhase = fPhase;
}
- virtual FX_INT32 CountDashArray() const
+ virtual int32_t CountDashArray() const
{
return m_DashArray.GetSize();
}
- virtual FX_INT32 GetDashArray(CFX_FloatArray &dashArray) const
+ virtual int32_t GetDashArray(CFX_FloatArray &dashArray) const
{
dashArray.Copy(m_DashArray);
return dashArray.GetSize();
@@ -94,11 +94,11 @@ public:
{
m_DashArray.Copy(dashArray);
}
- virtual FX_INT32 GetLineJoin() const
+ virtual int32_t GetLineJoin() const
{
return m_iLineJoin;
}
- virtual void SetLineJoin(FX_INT32 iLineJoin)
+ virtual void SetLineJoin(int32_t iLineJoin)
{
m_iLineJoin = iLineJoin;
}
@@ -110,7 +110,7 @@ public:
{
m_fMiterLimit = fMiterLimit;
}
- virtual FX_INT32 CountCompoundPatterns() const
+ virtual int32_t CountCompoundPatterns() const
{
return m_CompoundPatterns.GetSize();
}
@@ -124,9 +124,9 @@ public:
}
FX_ARGB m_Color;
- FX_INT32 m_iLineCap;
- FX_INT32 m_iLineJoin;
- FX_INT32 m_iDashStyle;
+ int32_t m_iLineCap;
+ int32_t m_iLineJoin;
+ int32_t m_iDashStyle;
FX_FLOAT m_fDashPhase;
FX_FLOAT m_fMiterLimit;
FX_BOOL m_bAutoRelease;
@@ -146,7 +146,7 @@ public:
{
FDE_Delete this;
}
- virtual FX_INT32 GetType() const
+ virtual int32_t GetType() const
{
return FDE_BRUSHTYPE_Solid;
}
@@ -202,7 +202,7 @@ public:
{
FDE_Delete this;
}
- virtual FX_INT32 GetType() const
+ virtual int32_t GetType() const
{
return FDE_BRUSHTYPE_Hatch;
}
@@ -247,16 +247,16 @@ public:
}
}
- virtual FX_INT32 GetHatchStyle() const
+ virtual int32_t GetHatchStyle() const
{
return m_iStyle;
};
- virtual FX_BOOL SetHatchStyle(FX_INT32 iHatchStyle)
+ virtual FX_BOOL SetHatchStyle(int32_t iHatchStyle)
{
m_iStyle = iHatchStyle;
return m_iStyle >= FDE_HATCHSTYLE_Min && m_iStyle <= FDE_HATCHSTYLE_Max;
}
- FX_INT32 m_iStyle;
+ int32_t m_iStyle;
FX_ARGB m_BackColor;
FX_ARGB m_ForeColor;
CFX_Matrix m_Matrix;
@@ -276,7 +276,7 @@ public:
{
FDE_Delete this;
}
- virtual FX_INT32 GetType() const
+ virtual int32_t GetType() const
{
return FDE_BRUSHTYPE_Texture;
}
@@ -317,15 +317,15 @@ public:
m_pImage = pImage;
m_bAutoRelease = bAutoRelease;
}
- virtual FX_INT32 GetWrapMode() const
+ virtual int32_t GetWrapMode() const
{
return m_iWrap;
}
- virtual void SetWrapMode(FX_INT32 iWrapMode)
+ virtual void SetWrapMode(int32_t iWrapMode)
{
m_iWrap = iWrapMode;
}
- FX_INT32 m_iWrap;
+ int32_t m_iWrap;
IFDE_Image *m_pImage;
FX_BOOL m_bAutoRelease;
CFX_Matrix m_Matrix;
@@ -343,7 +343,7 @@ public:
{
FDE_Delete this;
}
- virtual FX_INT32 GetType() const
+ virtual int32_t GetType() const
{
return FDE_BRUSHTYPE_LinearGradient;
}
@@ -395,7 +395,7 @@ public:
m_StartColor = startingColor;
m_EndColor = endingColor;
}
- virtual FX_INT32 CountGradientColors() const
+ virtual int32_t CountGradientColors() const
{
return m_GradColors.GetSize();
}
@@ -408,11 +408,11 @@ public:
return m_GradColors.Copy(colors), TRUE;
}
- virtual FX_INT32 GetWrapMode() const
+ virtual int32_t GetWrapMode() const
{
return m_iWrapMode;
}
- virtual void SetWrapMode(FX_INT32 iWrapMode)
+ virtual void SetWrapMode(int32_t iWrapMode)
{
m_iWrapMode = iWrapMode;
}
@@ -421,7 +421,7 @@ public:
FX_ARGB m_EndColor;
FX_ARGB m_StartColor;
CFDE_GradientColors m_GradColors;
- FX_INT32 m_iWrapMode;
+ int32_t m_iWrapMode;
CFX_Matrix m_Matrix;
};
#endif
diff --git a/xfa/src/fdp/src/fde/fde_render.cpp b/xfa/src/fdp/src/fde/fde_render.cpp
index e8e9149e02..7feca48ab8 100644
--- a/xfa/src/fdp/src/fde/fde_render.cpp
+++ b/xfa/src/fdp/src/fde/fde_render.cpp
@@ -6,7 +6,7 @@
#include "../../../foxitlib.h"
#include "fde_render.h"
-void FDE_GetPageMatrix(CFX_Matrix &pageMatrix, const CFX_RectF &docPageRect, const CFX_Rect &devicePageRect, FX_INT32 iRotate, FX_DWORD dwCoordinatesType)
+void FDE_GetPageMatrix(CFX_Matrix &pageMatrix, const CFX_RectF &docPageRect, const CFX_Rect &devicePageRect, int32_t iRotate, FX_DWORD dwCoordinatesType)
{
FXSYS_assert(iRotate >= 0 && iRotate <= 3);
FX_BOOL bFlipX = (dwCoordinatesType & 0x01) != 0;
@@ -108,7 +108,7 @@ FDE_RENDERSTATUS CFDE_RenderContext::DoRender(IFX_Pause *pPause)
IFDE_VisualSet *pVisualSet;
FDE_HVISUALOBJ hVisualObj;
CFX_RectF rtObj;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while(TRUE) {
hVisualObj = m_pIterator->GetNext(pVisualSet);
if (hVisualObj == NULL || pVisualSet == NULL) {
@@ -175,7 +175,7 @@ void CFDE_RenderContext::RenderText(IFDE_TextSet *pTextSet, FDE_HVISUALOBJ hText
if (pFont == NULL) {
return;
}
- FX_INT32 iCount = pTextSet->GetDisplayPos(hText, NULL, FALSE);
+ int32_t iCount = pTextSet->GetDisplayPos(hText, NULL, FALSE);
if (iCount < 1) {
return;
}
@@ -214,7 +214,7 @@ void CFDE_RenderContext::RenderPath(IFDE_PathSet *pPathSet, FDE_HVISUALOBJ hPath
}
FDE_HDEVICESTATE hState;
FX_BOOL bClip = ApplyClip(pPathSet, hPath, hState);
- FX_INT32 iRenderMode = pPathSet->GetRenderMode(hPath);
+ int32_t iRenderMode = pPathSet->GetRenderMode(hPath);
if (iRenderMode & FDE_PATHRENDER_Stroke) {
IFDE_Pen *pPen = pPathSet->GetPen(hPath);
FX_FLOAT fWidth = pPathSet->GetPenWidth(hPath);
diff --git a/xfa/src/fdp/src/fde/fde_render.h b/xfa/src/fdp/src/fde/fde_render.h
index 909987a032..6bec3e070f 100644
--- a/xfa/src/fdp/src/fde/fde_render.h
+++ b/xfa/src/fdp/src/fde/fde_render.h
@@ -36,7 +36,7 @@ protected:
IFDE_SolidBrush *m_pSolidBrush;
CFX_Matrix m_Transform;
FXTEXT_CHARPOS *m_pCharPos;
- FX_INT32 m_iCharPosCount;
+ int32_t m_iCharPosCount;
IFDE_VisualSetIterator *m_pIterator;
};
#endif
diff --git a/xfa/src/fdp/src/tto/fde_textout.cpp b/xfa/src/fdp/src/tto/fde_textout.cpp
index e03620244f..fa45b3e4d0 100644
--- a/xfa/src/fdp/src/tto/fde_textout.cpp
+++ b/xfa/src/fdp/src/tto/fde_textout.cpp
@@ -116,7 +116,7 @@ void CFDE_TextOut::SetParagraphBreakChar(FX_WCHAR wch)
m_wParagraphBkChar = wch;
m_pTxtBreak->SetParagraphBreakChar(wch);
}
-void CFDE_TextOut::SetAlignment(FX_INT32 iAlignment)
+void CFDE_TextOut::SetAlignment(int32_t iAlignment)
{
m_iAlignment = iAlignment;
switch (m_iAlignment) {
@@ -178,19 +178,19 @@ void CFDE_TextOut::SetLineBreakTolerance(FX_FLOAT fTolerance)
m_fTolerance = fTolerance;
m_pTxtBreak->SetLineBreakTolerance(m_fTolerance);
}
-FX_INT32 CFDE_TextOut::GetTotalLines()
+int32_t CFDE_TextOut::GetTotalLines()
{
return m_iTotalLines;
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_Size &size)
+void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Size &size)
{
CFX_RectF rtText;
rtText.Set(0.0f, 0.0f, (FX_FLOAT)size.x, (FX_FLOAT)size.y);
CalcSize(pwsStr, iLength, rtText);
- size.x = (FX_INT32)rtText.Width();
- size.y = (FX_INT32)rtText.Height();
+ size.x = (int32_t)rtText.Width();
+ size.y = (int32_t)rtText.Height();
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_SizeF &size)
+void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size)
{
CFX_RectF rtText;
rtText.Set(0.0f, 0.0f, size.x, size.y);
@@ -198,14 +198,14 @@ void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_SizeF &size
size.x = rtText.Width();
size.y = rtText.Height();
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_Rect &rect)
+void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Rect &rect)
{
CFX_RectF rtText;
rtText.Set((FX_FLOAT)rect.left, (FX_FLOAT)rect.top, (FX_FLOAT)rect.Width(), (FX_FLOAT)rect.Height());
CalcSize(pwsStr, iLength, rtText);
- rect.Set((FX_INT32)rtText.left, (FX_INT32)rtText.top, (FX_INT32)rtText.Width(), (FX_INT32)rtText.Height());
+ rect.Set((int32_t)rtText.left, (int32_t)rtText.top, (int32_t)rtText.Width(), (int32_t)rtText.Height());
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF &rect)
+void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
{
if (pwsStr == NULL || iLength < 1) {
rect.width = 0.0f;
@@ -218,7 +218,7 @@ void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF &rect
m_Matrix.TransformRect(rect);
}
}
-void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_SizeF &size)
+void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size)
{
CFX_RectF rtText;
rtText.Set(0.0f, 0.0f, size.x, size.y);
@@ -226,7 +226,7 @@ void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_SizeF
size.x = rtText.Width();
size.y = rtText.Height();
}
-void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF &rect)
+void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
{
if (pwsStr == NULL || iLength < 1) {
rect.width = 0.0f;
@@ -235,7 +235,7 @@ void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF
CalcTextSize(pwsStr, iLength, rect);
}
}
-void CFDE_TextOut::CalcTextSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF &rect)
+void CFDE_TextOut::CalcTextSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
{
FXSYS_assert(m_pFont != NULL && m_fFontSize >= 1.0f);
SetLineWidth(rect);
@@ -321,8 +321,8 @@ FX_BOOL CFDE_TextOut::RetrieveLineWidth(FX_DWORD dwBreakStatus, FX_FLOAT &fStart
FX_FLOAT fLineStep = (m_fLineSpace > m_fFontSize) ? m_fLineSpace : m_fFontSize;
FX_BOOL bLineWrap = (m_dwStyles & FDE_TTOSTYLE_LineWrap) ? TRUE : FALSE;
FX_FLOAT fLineWidth = 0.0f;
- FX_INT32 iCount = m_pTxtBreak->CountBreakPieces();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = m_pTxtBreak->CountBreakPieces();
+ for (int32_t i = 0; i < iCount; i++) {
const CFX_TxtPiece *pPiece = m_pTxtBreak->GetBreakPiece(i);
fLineWidth += (FX_FLOAT)pPiece->m_iWidth / 20000.0f;
fStartPos = FX_MIN(fStartPos, (FX_FLOAT)pPiece->m_iStartPos / 20000.0f);
@@ -340,25 +340,25 @@ FX_BOOL CFDE_TextOut::RetrieveLineWidth(FX_DWORD dwBreakStatus, FX_FLOAT &fStart
m_iTotalLines++;
return TRUE;
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_INT32 x, FX_INT32 y)
+void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, int32_t x, int32_t y)
{
CFX_RectF rtText;
rtText.Set((FX_FLOAT)x, (FX_FLOAT)y, m_fFontSize * 1000.0f, m_fFontSize * 1000.0f);
DrawText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_FLOAT x, FX_FLOAT y)
+void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y)
{
CFX_RectF rtText;
rtText.Set(x, y, m_fFontSize * 1000.0f, m_fFontSize * 1000.0f);
DrawText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_Rect &rect)
+void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_Rect &rect)
{
CFX_RectF rtText;
rtText.Set((FX_FLOAT)rect.left, (FX_FLOAT)rect.top, (FX_FLOAT)rect.width, (FX_FLOAT)rect.height);
DrawText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect)
+void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect)
{
CFX_RectF rtText;
rtText.Set(rect.left, rect.top, rect.width, rect.height);
@@ -367,20 +367,20 @@ void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF
rm.TransformRect(rtText);
DrawText(pwsStr, iLength, rtText, m_rtClip);
}
-void CFDE_TextOut::DrawLogicText(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_FLOAT x, FX_FLOAT y)
+void CFDE_TextOut::DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y)
{
CFX_RectF rtText;
rtText.Set(x, y, m_fFontSize * 1000.0f, m_fFontSize * 1000.0f);
DrawLogicText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawLogicText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect)
+void CFDE_TextOut::DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect)
{
CFX_RectF rtClip;
rtClip.Set(m_rtLogicClip.left, m_rtLogicClip.top, m_rtLogicClip.width, m_rtLogicClip.height);
m_Matrix.TransformRect(rtClip);
DrawText(pwsStr, iLength, rect, rtClip);
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect, const CFX_RectF &rtClip)
+void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect, const CFX_RectF &rtClip)
{
FXSYS_assert(m_pFont != NULL && m_fFontSize >= 1.0f);
if (pwsStr == NULL || iLength < 1) {
@@ -404,25 +404,25 @@ void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF
DoAlignment(rect);
OnDraw(rtClip);
}
-void CFDE_TextOut::ExpandBuffer(FX_INT32 iSize, FX_INT32 iType)
+void CFDE_TextOut::ExpandBuffer(int32_t iSize, int32_t iType)
{
switch (iType) {
case 0:
if (m_pCharWidths == NULL) {
- m_pCharWidths = (FX_INT32*)FDE_Alloc(iSize * sizeof(FX_INT32));
+ m_pCharWidths = (int32_t*)FDE_Alloc(iSize * sizeof(int32_t));
m_iChars = iSize;
} else if (m_iChars < iSize) {
- m_pCharWidths = (FX_INT32*)FDE_Realloc(m_pCharWidths, iSize * sizeof(FX_INT32));
+ m_pCharWidths = (int32_t*)FDE_Realloc(m_pCharWidths, iSize * sizeof(int32_t));
m_iChars = iSize;
}
FXSYS_memset(m_pCharWidths, 0, iSize);
break;
case 1:
if (m_pEllCharWidths == NULL) {
- m_pEllCharWidths = (FX_INT32*)FDE_Alloc(iSize * sizeof(FX_INT32));
+ m_pEllCharWidths = (int32_t*)FDE_Alloc(iSize * sizeof(int32_t));
m_iEllChars = iSize;
} else if (m_iEllChars < iSize) {
- m_pEllCharWidths = (FX_INT32*)FDE_Realloc(m_pEllCharWidths, iSize * sizeof(FX_INT32));
+ m_pEllCharWidths = (int32_t*)FDE_Realloc(m_pEllCharWidths, iSize * sizeof(int32_t));
m_iEllChars = iSize;
}
FXSYS_memset(m_pEllCharWidths, 0, iSize);
@@ -445,13 +445,13 @@ void CFDE_TextOut::LoadEllipsis()
}
m_bElliChanged = FALSE;
m_iEllipsisWidth = 0;
- FX_INT32 iLength = m_wsEllipsis.GetLength();
+ int32_t iLength = m_wsEllipsis.GetLength();
if (iLength < 1) {
return;
}
ExpandBuffer(iLength, 1);
FX_LPCWSTR pStr = (FX_LPCWSTR)m_wsEllipsis;
- FX_INT32 *pCharWidths = m_pEllCharWidths;
+ int32_t *pCharWidths = m_pEllCharWidths;
FX_DWORD dwBreakStatus;
FX_WCHAR wch;
while (iLength-- > 0) {
@@ -467,14 +467,14 @@ void CFDE_TextOut::LoadEllipsis()
}
m_pTxtBreak->Reset();
}
-void CFDE_TextOut::RetrieveEllPieces(FX_INT32 *&pCharWidths)
+void CFDE_TextOut::RetrieveEllPieces(int32_t *&pCharWidths)
{
- FX_INT32 iCount = m_pTxtBreak->CountBreakPieces();
+ int32_t iCount = m_pTxtBreak->CountBreakPieces();
CFX_Char *pTC;
- for (FX_INT32 i = 0; i < iCount; i++) {
+ for (int32_t i = 0; i < iCount; i++) {
const CFX_TxtPiece *pPiece = m_pTxtBreak->GetBreakPiece(i);
- FX_INT32 iPieceChars = pPiece->GetLength();
- for (FX_INT32 j = 0; j < iPieceChars; j++) {
+ int32_t iPieceChars = pPiece->GetLength();
+ for (int32_t j = 0; j < iPieceChars; j++) {
pTC = pPiece->GetCharPtr(j);
if (pTC->m_iCharWidth <= 0) {
*pCharWidths = 0;
@@ -487,10 +487,10 @@ void CFDE_TextOut::RetrieveEllPieces(FX_INT32 *&pCharWidths)
}
m_pTxtBreak->ClearBreakPieces();
}
-void CFDE_TextOut::LoadText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect)
+void CFDE_TextOut::LoadText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect)
{
FX_LPWSTR pStr = m_wsText.GetBuffer(iLength);
- FX_INT32 iTxtLength = iLength;
+ int32_t iTxtLength = iLength;
ExpandBuffer(iTxtLength, 0);
FX_BOOL bHotKey = (m_dwStyles & FDE_TTOSTYLE_HotKey) ? TRUE : FALSE;
FX_BOOL bVertical = (m_dwStyles & FDE_TTOSTYLE_VerticalLayout) ? TRUE : FALSE;
@@ -502,9 +502,9 @@ void CFDE_TextOut::LoadText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF
fLineStep = -fLineStep;
}
m_hotKeys.RemoveAll();
- FX_INT32 iStartChar = 0;
- FX_INT32 iChars = 0;
- FX_INT32 iPieceWidths = 0;
+ int32_t iStartChar = 0;
+ int32_t iChars = 0;
+ int32_t iPieceWidths = 0;
FX_DWORD dwBreakStatus;
FX_WCHAR wch;
FX_BOOL bRet = FALSE;
@@ -527,7 +527,7 @@ void CFDE_TextOut::LoadText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF
m_fLinePos += fLineStep;
}
if ((bVertical && m_fLinePos + fLineStep < fLineStop) || (!bVertical && m_fLinePos + fLineStep > fLineStop)) {
- FX_INT32 iCurLine = m_iCurLine;
+ int32_t iCurLine = m_iCurLine;
if (bEndofLine) {
iCurLine--;
}
@@ -546,7 +546,7 @@ void CFDE_TextOut::LoadText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF
m_pTxtBreak->Reset();
m_wsText.ReleaseBuffer(iLength);
}
-FX_BOOL CFDE_TextOut::RetriecePieces(FX_DWORD dwBreakStatus, FX_INT32 &iStartChar, FX_INT32 &iPieceWidths, FX_BOOL bReload,
+FX_BOOL CFDE_TextOut::RetriecePieces(FX_DWORD dwBreakStatus, int32_t &iStartChar, int32_t &iPieceWidths, FX_BOOL bReload,
const CFX_RectF &rect)
{
FX_BOOL bSingleLine = (m_dwStyles & FDE_TTOSTYLE_SingleLine) ? TRUE : FALSE;
@@ -559,17 +559,17 @@ FX_BOOL CFDE_TextOut::RetriecePieces(FX_DWORD dwBreakStatus, FX_INT32 &iStartCha
CFX_Char *pTC = NULL;
FX_BOOL bNeedReload = FALSE;
FX_FLOAT fLineWidth = bVertical ? rect.Height() : rect.Width();
- FX_INT32 iLineWidth = FXSYS_round(fLineWidth * 20000.0f);
- FX_INT32 iCount = m_pTxtBreak->CountBreakPieces();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iLineWidth = FXSYS_round(fLineWidth * 20000.0f);
+ int32_t iCount = m_pTxtBreak->CountBreakPieces();
+ for (int32_t i = 0; i < iCount; i++) {
const CFX_TxtPiece *pPiece = m_pTxtBreak->GetBreakPiece(i);
- FX_INT32 iPieceChars = pPiece->GetLength();
- FX_INT32 iChar = iStartChar;
- FX_INT32 iWidth = 0;
- FX_INT32 j = 0;
+ int32_t iPieceChars = pPiece->GetLength();
+ int32_t iChar = iStartChar;
+ int32_t iWidth = 0;
+ int32_t j = 0;
for (; j < iPieceChars; j++) {
pTC = pPiece->GetCharPtr(j);
- FX_INT32 iCurCharWidth = pTC->m_iCharWidth > 0 ? pTC->m_iCharWidth : 0;
+ int32_t iCurCharWidth = pTC->m_iCharWidth > 0 ? pTC->m_iCharWidth : 0;
if (bSingleLine || !bLineWrap) {
if (iLineWidth - iPieceWidths - iWidth < iCurCharWidth) {
bNeedReload = TRUE;
@@ -624,7 +624,7 @@ void CFDE_TextOut::AppendPiece(const FDE_TTOPIECE &ttoPiece, FX_BOOL bNeedReload
pLine->m_bNewReload = bNeedReload;
m_iCurPiece = pLine->AddPiece(m_iCurPiece, ttoPiece);
if (bEnd) {
- FX_INT32 iPieces = pLine->GetSize();
+ int32_t iPieces = pLine->GetSize();
if (m_iCurPiece < iPieces) {
pLine->RemoveLast(iPieces - m_iCurPiece - 1);
}
@@ -637,30 +637,30 @@ void CFDE_TextOut::AppendPiece(const FDE_TTOPIECE &ttoPiece, FX_BOOL bNeedReload
void CFDE_TextOut::ReplaceWidthEllipsis()
{
LoadEllipsis();
- FX_INT32 iLength = m_wsEllipsis.GetLength();
+ int32_t iLength = m_wsEllipsis.GetLength();
if (iLength < 1) {
return;
}
- FX_INT32 iLines = m_ttoLines.GetSize();
- for (FX_INT32 i = 0; i < iLines; i++) {
+ int32_t iLines = m_ttoLines.GetSize();
+ for (int32_t i = 0; i < iLines; i++) {
CFDE_TTOLine *pLine = m_ttoLines.GetPtrAt(i);
if (!pLine->m_bNewReload) {
continue;
}
- FX_INT32 iEllipsisCharIndex = iLength - 1;
- FX_INT32 iCharWidth = 0;
- FX_INT32 iCharCount = 0;
- FX_INT32 iPiece = pLine->GetSize();
+ int32_t iEllipsisCharIndex = iLength - 1;
+ int32_t iCharWidth = 0;
+ int32_t iCharCount = 0;
+ int32_t iPiece = pLine->GetSize();
while (iPiece-- > 0) {
FDE_LPTTOPIECE pPiece = pLine->GetPtrAt(iPiece);
if (pPiece == NULL) {
break;
}
- for (FX_INT32 j = pPiece->iChars - 1; j >= 0; j--) {
+ for (int32_t j = pPiece->iChars - 1; j >= 0; j--) {
if (iEllipsisCharIndex < 0) {
break;
}
- FX_INT32 index = pPiece->iStartChar + j;
+ int32_t index = pPiece->iStartChar + j;
iCharWidth += m_pCharWidths[index];
iCharCount++;
if (iCharCount <= iLength) {
@@ -680,8 +680,8 @@ void CFDE_TextOut::ReplaceWidthEllipsis()
}
void CFDE_TextOut::Reload(const CFX_RectF &rect)
{
- FX_INT32 iCount = m_ttoLines.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = m_ttoLines.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
CFDE_TTOLine *pLine = m_ttoLines.GetPtrAt(i);
if (pLine == NULL || !pLine->m_bNewReload) {
continue;
@@ -695,17 +695,17 @@ void CFDE_TextOut::ReloadLinePiece(CFDE_TTOLine *pLine, const CFX_RectF &rect)
{
FX_LPCWSTR pwsStr = (FX_LPCWSTR)m_wsText;
FX_BOOL bVertical = (m_dwStyles & FDE_TTOSTYLE_VerticalLayout) ? TRUE : FALSE;
- FX_INT32 iPieceWidths = 0;
+ int32_t iPieceWidths = 0;
FDE_LPTTOPIECE pPiece = pLine->GetPtrAt(0);
- FX_INT32 iStartChar = pPiece->iStartChar;
+ int32_t iStartChar = pPiece->iStartChar;
m_fLinePos = bVertical ? pPiece->rtPiece.left : pPiece->rtPiece.top;
- FX_INT32 iPieceCount = pLine->GetSize();
- FX_INT32 iPieceIndex = 0;
+ int32_t iPieceCount = pLine->GetSize();
+ int32_t iPieceIndex = 0;
FX_DWORD dwBreakStatus = 0;
FX_WCHAR wch;
while (iPieceIndex < iPieceCount) {
- FX_INT32 iStar = iStartChar;
- FX_INT32 iEnd = pPiece->iChars + iStar;
+ int32_t iStar = iStartChar;
+ int32_t iEnd = pPiece->iChars + iStar;
while (iStar < iEnd) {
wch = *(pwsStr + iStar);
dwBreakStatus = m_pTxtBreak->AppendChar(wch);
@@ -727,7 +727,7 @@ void CFDE_TextOut::DoAlignment(const CFX_RectF &rect)
{
FX_BOOL bVertical = (m_dwStyles & FDE_TTOSTYLE_VerticalLayout) ? TRUE : FALSE;
FX_FLOAT fLineStopS = bVertical ? rect.right() : rect.bottom();
- FX_INT32 iLines = m_ttoLines.GetSize();
+ int32_t iLines = m_ttoLines.GetSize();
if (iLines < 1) {
return;
}
@@ -746,10 +746,10 @@ void CFDE_TextOut::DoAlignment(const CFX_RectF &rect)
if (fInc < 1.0f) {
return;
}
- for (FX_INT32 i = 0; i < iLines; i++) {
+ for (int32_t i = 0; i < iLines; i++) {
CFDE_TTOLine *pLine = m_ttoLines.GetPtrAt(i);
- FX_INT32 iPieces = pLine->GetSize();
- for (FX_INT32 j = 0; j < iPieces; j++) {
+ int32_t iPieces = pLine->GetSize();
+ for (int32_t j = 0; j < iPieces; j++) {
FDE_LPTTOPIECE pPiece = pLine->GetPtrAt(j);
if (bVertical) {
pPiece->rtPiece.left += fInc;
@@ -764,7 +764,7 @@ void CFDE_TextOut::OnDraw(const CFX_RectF &rtClip)
if (m_pRenderDevice == NULL) {
return;
}
- FX_INT32 iLines = m_ttoLines.GetSize();
+ int32_t iLines = m_ttoLines.GetSize();
if (iLines < 1) {
return;
}
@@ -775,15 +775,15 @@ void CFDE_TextOut::OnDraw(const CFX_RectF &rtClip)
if (rtClip.Width() > 0.0f && rtClip.Height() > 0.0f) {
m_pRenderDevice->SetClipRect(rtClip);
}
- for (FX_INT32 i = 0; i < iLines; i++) {
+ for (int32_t i = 0; i < iLines; i++) {
CFDE_TTOLine *pLine = m_ttoLines.GetPtrAt(i);
- FX_INT32 iPieces = pLine->GetSize();
- for (FX_INT32 j = 0; j < iPieces; j++) {
+ int32_t iPieces = pLine->GetSize();
+ for (int32_t j = 0; j < iPieces; j++) {
FDE_LPTTOPIECE pPiece = pLine->GetPtrAt(j);
if (pPiece == NULL) {
continue;
}
- FX_INT32 iCount = GetDisplayPos(pPiece);
+ int32_t iCount = GetDisplayPos(pPiece);
if (iCount > 0) {
m_pRenderDevice->DrawString(pBrush, m_pFont, m_pCharPos, iCount, m_fFontSize, &m_Matrix);
}
@@ -798,14 +798,14 @@ void CFDE_TextOut::OnDraw(const CFX_RectF &rtClip)
pPen->Release();
}
}
-FX_INT32 CFDE_TextOut::GetDisplayPos(FDE_LPTTOPIECE pPiece)
+int32_t CFDE_TextOut::GetDisplayPos(FDE_LPTTOPIECE pPiece)
{
FX_TXTRUN tr;
ToTextRun(pPiece, tr);
ExpandBuffer(tr.iLength, 2);
return m_pTxtBreak->GetDisplayPos(&tr, m_pCharPos);
}
-FX_INT32 CFDE_TextOut::GetCharRects(FDE_LPTTOPIECE pPiece)
+int32_t CFDE_TextOut::GetCharRects(FDE_LPTTOPIECE pPiece)
{
FX_TXTRUN tr;
ToTextRun(pPiece, tr);
@@ -841,7 +841,7 @@ void CFDE_TextOut::DrawLine(const FDE_LPTTOPIECE pPiece, IFDE_Pen *&pPen)
pPen->SetColor(m_TxtColor);
}
IFDE_Path *pPath = IFDE_Path::Create();
- FX_INT32 iLineCount = 0;
+ int32_t iLineCount = 0;
CFX_RectF rtText = pPiece->rtPiece;
CFX_PointF pt1, pt2;
if (bUnderLine) {
@@ -875,11 +875,11 @@ void CFDE_TextOut::DrawLine(const FDE_LPTTOPIECE pPiece, IFDE_Pen *&pPen)
iLineCount++;
}
if (bHotKey) {
- FX_INT32 iHotKeys = m_hotKeys.GetSize();
- FX_INT32 iCount = GetCharRects(pPiece);
+ int32_t iHotKeys = m_hotKeys.GetSize();
+ int32_t iCount = GetCharRects(pPiece);
if (iCount > 0) {
- for (FX_INT32 i = 0; i < iHotKeys; i++) {
- FX_INT32 iCharIndex = m_hotKeys.GetAt(i);
+ for (int32_t i = 0; i < iHotKeys; i++) {
+ int32_t iCharIndex = m_hotKeys.GetAt(i);
if (iCharIndex >= pPiece->iStartChar && iCharIndex < pPiece->iStartChar + pPiece->iChars) {
CFX_RectF rect = m_rectArray.GetAt(iCharIndex - pPiece->iStartChar);
if (bVertical) {
@@ -920,7 +920,7 @@ CFDE_TTOLine::CFDE_TTOLine(const CFDE_TTOLine &ttoLine)
CFDE_TTOLine::~CFDE_TTOLine()
{
}
-FX_INT32 CFDE_TTOLine::AddPiece(FX_INT32 index, const FDE_TTOPIECE &ttoPiece)
+int32_t CFDE_TTOLine::AddPiece(int32_t index, const FDE_TTOPIECE &ttoPiece)
{
if (index >= m_iPieceCount) {
index = m_pieces.Add(ttoPiece) + 1;
@@ -931,18 +931,18 @@ FX_INT32 CFDE_TTOLine::AddPiece(FX_INT32 index, const FDE_TTOPIECE &ttoPiece)
}
return index;
}
-FX_INT32 CFDE_TTOLine::GetSize() const
+int32_t CFDE_TTOLine::GetSize() const
{
return m_iPieceCount;
}
-FDE_LPTTOPIECE CFDE_TTOLine::GetPtrAt(FX_INT32 index)
+FDE_LPTTOPIECE CFDE_TTOLine::GetPtrAt(int32_t index)
{
if (index >= m_iPieceCount) {
return NULL;
}
return m_pieces.GetPtrAt(index);
}
-void CFDE_TTOLine::RemoveLast(FX_INT32 iCount)
+void CFDE_TTOLine::RemoveLast(int32_t iCount)
{
m_pieces.RemoveLast(iCount);
}
diff --git a/xfa/src/fdp/src/tto/fde_textout.h b/xfa/src/fdp/src/tto/fde_textout.h
index 116ad89d5d..38bc8ebcec 100644
--- a/xfa/src/fdp/src/tto/fde_textout.h
+++ b/xfa/src/fdp/src/tto/fde_textout.h
@@ -8,8 +8,8 @@
#define _FDE_TEXTOUT_IMP
struct FDE_TTOPIECE {
public:
- FX_INT32 iStartChar;
- FX_INT32 iChars;
+ int32_t iStartChar;
+ int32_t iChars;
FX_DWORD dwCharStyles;
CFX_RectF rtPiece;
};
@@ -21,15 +21,15 @@ public:
CFDE_TTOLine();
CFDE_TTOLine(const CFDE_TTOLine &ttoLine);
~CFDE_TTOLine();
- FX_INT32 AddPiece(FX_INT32 index, const FDE_TTOPIECE &ttoPiece);
- FX_INT32 GetSize() const;
- FDE_LPTTOPIECE GetPtrAt(FX_INT32 index);
- void RemoveLast(FX_INT32 iCount);
+ int32_t AddPiece(int32_t index, const FDE_TTOPIECE &ttoPiece);
+ int32_t GetSize() const;
+ FDE_LPTTOPIECE GetPtrAt(int32_t index);
+ void RemoveLast(int32_t iCount);
void RemoveAll(FX_BOOL bLeaveMemory);
FX_BOOL m_bNewReload;
CFDE_TTOPieceArray m_pieces;
protected:
- FX_INT32 m_iPieceCount;
+ int32_t m_iPieceCount;
};
typedef CFX_ObjectMassArrayTemplate<CFDE_TTOLine> CFDE_TTOLineArray;
class CFDE_TextOut : public IFDE_TextOut, public CFX_Target
@@ -48,7 +48,7 @@ public:
virtual void SetTabWidth(FX_FLOAT fTabWidth);
virtual void SetEllipsisString(const CFX_WideString &wsEllipsis);
virtual void SetParagraphBreakChar(FX_WCHAR wch);
- virtual void SetAlignment(FX_INT32 iAlignment);
+ virtual void SetAlignment(int32_t iAlignment);
virtual void SetLineSpace(FX_FLOAT fLineSpace);
virtual void SetDIBitmap(CFX_DIBitmap *pDIB);
virtual void SetRenderDevice(CFX_RenderDevice *pDevice);
@@ -56,41 +56,41 @@ public:
virtual void SetClipRect(const CFX_RectF &rtClip);
virtual void SetMatrix(const CFX_Matrix &matrix);
virtual void SetLineBreakTolerance(FX_FLOAT fTolerance);
- virtual void CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_Size &size);
- virtual void CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_SizeF &size);
- virtual void CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_Rect &rect);
- virtual void CalcSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF &rect);
+ virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Size &size);
+ virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size);
+ virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Rect &rect);
+ virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect);
- virtual void DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_INT32 x, FX_INT32 y);
- virtual void DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_FLOAT x, FX_FLOAT y);
- virtual void DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_Rect &rect);
- virtual void DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect);
+ virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, int32_t x, int32_t y);
+ virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
+ virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_Rect &rect);
+ virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect);
virtual void SetLogicClipRect(const CFX_RectF &rtClip);
- virtual void CalcLogicSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_SizeF &size);
- virtual void CalcLogicSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF &rect);
- virtual void DrawLogicText(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_FLOAT x, FX_FLOAT y);
- virtual void DrawLogicText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect);
- virtual FX_INT32 GetTotalLines();
+ virtual void CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size);
+ virtual void CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect);
+ virtual void DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
+ virtual void DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect);
+ virtual int32_t GetTotalLines();
protected:
- void CalcTextSize(FX_LPCWSTR pwsStr, FX_INT32 iLength, CFX_RectF &rect);
+ void CalcTextSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect);
FX_BOOL RetrieveLineWidth(FX_DWORD dwBreakStatus, FX_FLOAT &fStartPos, FX_FLOAT &fWidth, FX_FLOAT &fHeight);
void SetLineWidth(CFX_RectF &rect);
- void DrawText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect, const CFX_RectF &rtClip);
- void LoadText(FX_LPCWSTR pwsStr, FX_INT32 iLength, const CFX_RectF &rect);
+ void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect, const CFX_RectF &rtClip);
+ void LoadText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect);
void LoadEllipsis();
- void ExpandBuffer(FX_INT32 iSize, FX_INT32 iType);
- void RetrieveEllPieces(FX_INT32 *&pCharWidths);
+ void ExpandBuffer(int32_t iSize, int32_t iType);
+ void RetrieveEllPieces(int32_t *&pCharWidths);
void Reload(const CFX_RectF &rect);
void ReloadLinePiece(CFDE_TTOLine *pLine, const CFX_RectF &rect);
- FX_BOOL RetriecePieces(FX_DWORD dwBreakStatus, FX_INT32 &iStartChar, FX_INT32 &iPieceWidths, FX_BOOL bReload, const CFX_RectF &rect);
+ FX_BOOL RetriecePieces(FX_DWORD dwBreakStatus, int32_t &iStartChar, int32_t &iPieceWidths, FX_BOOL bReload, const CFX_RectF &rect);
void AppendPiece(const FDE_TTOPIECE &ttoPiece, FX_BOOL bNeedReload, FX_BOOL bEnd);
void ReplaceWidthEllipsis();
void DoAlignment(const CFX_RectF &rect);
void OnDraw(const CFX_RectF &rtClip);
- FX_INT32 GetDisplayPos(FDE_LPTTOPIECE pPiece);
- FX_INT32 GetCharRects(FDE_LPTTOPIECE pPiece);
+ int32_t GetDisplayPos(FDE_LPTTOPIECE pPiece);
+ int32_t GetCharRects(FDE_LPTTOPIECE pPiece);
void ToTextRun(const FDE_LPTTOPIECE pPiece, FX_TXTRUN &tr);
void DrawLine(const FDE_LPTTOPIECE pPiece, IFDE_Pen *&pPen);
@@ -102,29 +102,29 @@ protected:
FX_FLOAT m_fLinePos;
FX_FLOAT m_fTolerance;
- FX_INT32 m_iAlignment;
- FX_INT32 m_iTxtBkAlignment;
- FX_INT32 *m_pCharWidths;
- FX_INT32 m_iChars;
- FX_INT32 *m_pEllCharWidths;
- FX_INT32 m_iEllChars;
+ int32_t m_iAlignment;
+ int32_t m_iTxtBkAlignment;
+ int32_t *m_pCharWidths;
+ int32_t m_iChars;
+ int32_t *m_pEllCharWidths;
+ int32_t m_iEllChars;
FX_WCHAR m_wParagraphBkChar;
FX_ARGB m_TxtColor;
FX_DWORD m_dwStyles;
FX_DWORD m_dwTxtBkStyles;
CFX_WideString m_wsEllipsis;
FX_BOOL m_bElliChanged;
- FX_INT32 m_iEllipsisWidth;
+ int32_t m_iEllipsisWidth;
CFX_WideString m_wsText;
CFX_RectF m_rtClip;
CFX_RectF m_rtLogicClip;
CFX_Matrix m_Matrix;
CFDE_TTOLineArray m_ttoLines;
- FX_INT32 m_iCurLine;
- FX_INT32 m_iCurPiece;
- FX_INT32 m_iTotalLines;
+ int32_t m_iCurLine;
+ int32_t m_iCurPiece;
+ int32_t m_iTotalLines;
FXTEXT_CHARPOS *m_pCharPos;
- FX_INT32 m_iCharPosSize;
+ int32_t m_iCharPosSize;
IFDE_RenderDevice *m_pRenderDevice;
CFX_Int32Array m_hotKeys;
CFX_RectFArray m_rectArray;
diff --git a/xfa/src/fdp/src/xml/fde_xml.cpp b/xfa/src/fdp/src/xml/fde_xml.cpp
index f228b69bb1..ab7906b1bc 100644
--- a/xfa/src/fdp/src/xml/fde_xml.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml.cpp
@@ -13,7 +13,7 @@ extern "C" {
static FX_WCHAR g_XMLValidCharRange[FDE_XMLVALIDCHARRANGENUM][2] = {{0x09, 0x09}, {0x0A, 0x0A}, {0x0D, 0x0D}, {0x20, 0xD7FF}, {0xE000, 0xFFFD}};
FX_BOOL FDE_IsXMLValidChar(FX_WCHAR ch)
{
- FX_INT32 iStart = 0, iEnd = FDE_XMLVALIDCHARRANGENUM - 1, iMid;
+ int32_t iStart = 0, iEnd = FDE_XMLVALIDCHARRANGENUM - 1, iMid;
while (iStart <= iEnd) {
iMid = (iStart + iEnd) / 2;
if (ch < g_XMLValidCharRange[iMid][0]) {
@@ -45,7 +45,7 @@ static FDE_XMLNAMECHAR g_XMLNameChars[FDE_XMLNAMECHARSNUM] = {
};
FX_BOOL FDE_IsXMLNameChar(FX_WCHAR ch, FX_BOOL bFirstChar)
{
- FX_INT32 iStart = 0, iEnd = FDE_XMLNAMECHARSNUM - 1, iMid;
+ int32_t iStart = 0, iEnd = FDE_XMLNAMECHARSNUM - 1, iMid;
while (iStart <= iEnd) {
iMid = (iStart + iEnd) / 2;
if (ch < g_XMLNameChars[iMid].wStart) {
@@ -85,9 +85,9 @@ void CFDE_XMLNode::DeleteChildren()
}
m_pChild = NULL;
}
-FX_INT32 CFDE_XMLNode::CountChildNodes() const
+int32_t CFDE_XMLNode::CountChildNodes() const
{
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CFDE_XMLNode *pChild = m_pChild;
while (pChild != NULL) {
iCount ++;
@@ -95,7 +95,7 @@ FX_INT32 CFDE_XMLNode::CountChildNodes() const
}
return iCount;
}
-CFDE_XMLNode* CFDE_XMLNode::GetChildNode(FX_INT32 index) const
+CFDE_XMLNode* CFDE_XMLNode::GetChildNode(int32_t index) const
{
CFDE_XMLNode *pChild = m_pChild;
while (pChild != NULL) {
@@ -107,9 +107,9 @@ CFDE_XMLNode* CFDE_XMLNode::GetChildNode(FX_INT32 index) const
}
return NULL;
}
-FX_INT32 CFDE_XMLNode::GetChildNodeIndex(CFDE_XMLNode *pNode) const
+int32_t CFDE_XMLNode::GetChildNodeIndex(CFDE_XMLNode *pNode) const
{
- FX_INT32 index = 0;
+ int32_t index = 0;
CFDE_XMLNode *pChild = m_pChild;
while (pChild != NULL) {
if (pChild == pNode) {
@@ -120,7 +120,7 @@ FX_INT32 CFDE_XMLNode::GetChildNodeIndex(CFDE_XMLNode *pNode) const
}
return -1;
}
-CFDE_XMLNode* CFDE_XMLNode::GetPath(FX_LPCWSTR pPath, FX_INT32 iLength, FX_BOOL bQualifiedName) const
+CFDE_XMLNode* CFDE_XMLNode::GetPath(FX_LPCWSTR pPath, int32_t iLength, FX_BOOL bQualifiedName) const
{
FXSYS_assert(pPath != NULL);
if (iLength < 0) {
@@ -177,7 +177,7 @@ CFDE_XMLNode* CFDE_XMLNode::GetPath(FX_LPCWSTR pPath, FX_INT32 iLength, FX_BOOL
}
return pFind->GetPath(pStart, iLength, bQualifiedName);
}
-FX_INT32 CFDE_XMLNode::InsertChildNode(CFDE_XMLNode *pNode, FX_INT32 index)
+int32_t CFDE_XMLNode::InsertChildNode(CFDE_XMLNode *pNode, int32_t index)
{
FXSYS_assert(pNode != NULL);
pNode->m_pParent = this;
@@ -193,7 +193,7 @@ FX_INT32 CFDE_XMLNode::InsertChildNode(CFDE_XMLNode *pNode, FX_INT32 index)
m_pChild = pNode;
return 0;
}
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CFDE_XMLNode *pFind = m_pChild;
while (++iCount != index && pFind->m_pNext != NULL) {
pFind = pFind->m_pNext;
@@ -320,9 +320,9 @@ CFDE_XMLNode* CFDE_XMLNode::GetNodeItem(IFDE_XMLNode::NodeItem eItem) const
}
return NULL;
}
-FX_INT32 CFDE_XMLNode::GetNodeLevel() const
+int32_t CFDE_XMLNode::GetNodeLevel() const
{
- FX_INT32 iLevel = 0;
+ int32_t iLevel = 0;
CFDE_XMLNode *pItem = (CFDE_XMLNode*)this;
while ((pItem = pItem->m_pParent) != NULL) {
iLevel ++;
@@ -409,7 +409,7 @@ void CFDE_XMLNode::SaveXMLNode(IFX_Stream *pXMLStream)
ws.Format(L"<?%s", (FX_LPCWSTR)pInstruction->m_wsTarget);
pXMLStream->WriteString(ws, ws.GetLength());
CFX_WideStringArray &attributes = pInstruction->m_Attributes;
- FX_INT32 i, iCount = attributes.GetSize();
+ int32_t i, iCount = attributes.GetSize();
CFX_WideString wsValue;
for (i = 0; i < iCount; i += 2) {
ws = L" ";
@@ -444,9 +444,9 @@ void CFDE_XMLNode::SaveXMLNode(IFX_Stream *pXMLStream)
ws += ((CFDE_XMLElement*)pNode)->m_wsTag;
pXMLStream->WriteString(ws, ws.GetLength());
CFX_WideStringArray &attributes = ((CFDE_XMLElement*)pNode)->m_Attributes;
- FX_INT32 iCount = attributes.GetSize();
+ int32_t iCount = attributes.GetSize();
CFX_WideString wsValue;
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ for (int32_t i = 0; i < iCount; i += 2) {
ws = L" ";
ws += attributes[i];
ws += L"=\"";
@@ -542,15 +542,15 @@ CFDE_XMLNode* CFDE_XMLInstruction::Clone(FX_BOOL bRecursive)
}
return pClone;
}
-FX_INT32 CFDE_XMLInstruction::CountAttributes() const
+int32_t CFDE_XMLInstruction::CountAttributes() const
{
return m_Attributes.GetSize() / 2;
}
-FX_BOOL CFDE_XMLInstruction::GetAttribute(FX_INT32 index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const
+FX_BOOL CFDE_XMLInstruction::GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
+ int32_t iCount = m_Attributes.GetSize();
FXSYS_assert(index > -1 && index < iCount / 2);
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ for (int32_t i = 0; i < iCount; i += 2) {
if (index == 0) {
wsAttriName = m_Attributes[i];
wsAttriValue = m_Attributes[i + 1];
@@ -562,8 +562,8 @@ FX_BOOL CFDE_XMLInstruction::GetAttribute(FX_INT32 index, CFX_WideString &wsAttr
}
FX_BOOL CFDE_XMLInstruction::HasAttribute(FX_LPCWSTR pwsAttriName) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
return TRUE;
}
@@ -572,8 +572,8 @@ FX_BOOL CFDE_XMLInstruction::HasAttribute(FX_LPCWSTR pwsAttriName) const
}
void CFDE_XMLInstruction::GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
wsAttriValue = m_Attributes[i + 1];
return;
@@ -584,8 +584,8 @@ void CFDE_XMLInstruction::GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsA
void CFDE_XMLInstruction::SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue)
{
FXSYS_assert(wsAttriName.GetLength() > 0);
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(wsAttriName) == 0) {
m_Attributes[i] = wsAttriName;
m_Attributes[i + 1] = wsAttriValue;
@@ -595,17 +595,17 @@ void CFDE_XMLInstruction::SetString(const CFX_WideString &wsAttriName, const CFX
m_Attributes.Add(wsAttriName);
m_Attributes.Add(wsAttriValue);
}
-FX_INT32 CFDE_XMLInstruction::GetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iDefValue) const
+int32_t CFDE_XMLInstruction::GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
return FXSYS_wtoi((FX_LPCWSTR)m_Attributes[i + 1]);
}
}
return iDefValue;
}
-void CFDE_XMLInstruction::SetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iAttriValue)
+void CFDE_XMLInstruction::SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%d", iAttriValue);
@@ -613,8 +613,8 @@ void CFDE_XMLInstruction::SetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iAttriVal
}
FX_FLOAT CFDE_XMLInstruction::GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
return FX_wcstof((FX_LPCWSTR)m_Attributes[i + 1]);
}
@@ -629,8 +629,8 @@ void CFDE_XMLInstruction::SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue
}
void CFDE_XMLInstruction::RemoveAttribute(FX_LPCWSTR pwsAttriName)
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
m_Attributes.RemoveAt(i + 1);
m_Attributes.RemoveAt(i);
@@ -638,11 +638,11 @@ void CFDE_XMLInstruction::RemoveAttribute(FX_LPCWSTR pwsAttriName)
}
}
}
-FX_INT32 CFDE_XMLInstruction::CountData() const
+int32_t CFDE_XMLInstruction::CountData() const
{
return m_TargetData.GetSize();
}
-FX_BOOL CFDE_XMLInstruction::GetData(FX_INT32 index, CFX_WideString &wsData) const
+FX_BOOL CFDE_XMLInstruction::GetData(int32_t index, CFX_WideString &wsData) const
{
if (index < 0 || index >= m_TargetData.GetSize()) {
return FALSE;
@@ -654,7 +654,7 @@ void CFDE_XMLInstruction::AppendData(const CFX_WideString &wsData)
{
m_TargetData.Add(wsData);
}
-void CFDE_XMLInstruction::RemoveData(FX_INT32 index)
+void CFDE_XMLInstruction::RemoveData(int32_t index)
{
m_TargetData.RemoveAt(index);
}
@@ -744,15 +744,15 @@ void CFDE_XMLElement::GetNamespaceURI(CFX_WideString &wsNamespace) const
break;
}
}
-FX_INT32 CFDE_XMLElement::CountAttributes() const
+int32_t CFDE_XMLElement::CountAttributes() const
{
return m_Attributes.GetSize() / 2;
}
-FX_BOOL CFDE_XMLElement::GetAttribute(FX_INT32 index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const
+FX_BOOL CFDE_XMLElement::GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
+ int32_t iCount = m_Attributes.GetSize();
FXSYS_assert(index > -1 && index < iCount / 2);
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ for (int32_t i = 0; i < iCount; i += 2) {
if (index == 0) {
wsAttriName = m_Attributes[i];
wsAttriValue = m_Attributes[i + 1];
@@ -764,8 +764,8 @@ FX_BOOL CFDE_XMLElement::GetAttribute(FX_INT32 index, CFX_WideString &wsAttriNam
}
FX_BOOL CFDE_XMLElement::HasAttribute(FX_LPCWSTR pwsAttriName) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
return TRUE;
}
@@ -774,8 +774,8 @@ FX_BOOL CFDE_XMLElement::HasAttribute(FX_LPCWSTR pwsAttriName) const
}
void CFDE_XMLElement::GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
wsAttriValue = m_Attributes[i + 1];
return;
@@ -786,8 +786,8 @@ void CFDE_XMLElement::GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttri
void CFDE_XMLElement::SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue)
{
FXSYS_assert(wsAttriName.GetLength() > 0);
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(wsAttriName) == 0) {
m_Attributes[i] = wsAttriName;
m_Attributes[i + 1] = wsAttriValue;
@@ -797,17 +797,17 @@ void CFDE_XMLElement::SetString(const CFX_WideString &wsAttriName, const CFX_Wid
m_Attributes.Add(wsAttriName);
m_Attributes.Add(wsAttriValue);
}
-FX_INT32 CFDE_XMLElement::GetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iDefValue) const
+int32_t CFDE_XMLElement::GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
return FXSYS_wtoi((FX_LPCWSTR)m_Attributes[i + 1]);
}
}
return iDefValue;
}
-void CFDE_XMLElement::SetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iAttriValue)
+void CFDE_XMLElement::SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%d", iAttriValue);
@@ -815,8 +815,8 @@ void CFDE_XMLElement::SetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iAttriValue)
}
FX_FLOAT CFDE_XMLElement::GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue) const
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
return FX_wcstof((FX_LPCWSTR)m_Attributes[i + 1]);
}
@@ -831,8 +831,8 @@ void CFDE_XMLElement::SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue)
}
void CFDE_XMLElement::RemoveAttribute(FX_LPCWSTR pwsAttriName)
{
- FX_INT32 iCount = m_Attributes.GetSize();
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ int32_t iCount = m_Attributes.GetSize();
+ for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
m_Attributes.RemoveAt(i + 1);
m_Attributes.RemoveAt(i);
@@ -940,7 +940,7 @@ void CFDE_XMLDoc::ReleaseParser()
m_pSyntaxParser = NULL;
}
}
-FX_BOOL CFDE_XMLDoc::LoadXML(IFX_Stream *pXMLStream, FX_INT32 iXMLPlaneSize , FX_INT32 iTextDataSize , FDE_LPXMLREADERHANDLER pHandler )
+FX_BOOL CFDE_XMLDoc::LoadXML(IFX_Stream *pXMLStream, int32_t iXMLPlaneSize , int32_t iTextDataSize , FDE_LPXMLREADERHANDLER pHandler )
{
if (pXMLStream == NULL) {
return FALSE;
@@ -988,7 +988,7 @@ FX_BOOL CFDE_XMLDoc::LoadXML(IFDE_XMLParser *pXMLParser)
m_pXMLParser = pXMLParser;
return m_pXMLParser != NULL;
}
-FX_INT32 CFDE_XMLDoc::DoLoad(IFX_Pause *pPause)
+int32_t CFDE_XMLDoc::DoLoad(IFX_Pause *pPause)
{
if (m_iStatus >= 100) {
return m_iStatus;
@@ -1024,7 +1024,7 @@ void CFDE_XMLDoc::SaveXMLNode(IFX_Stream *pXMLStream, IFDE_XMLNode *pINode)
ws.Format(L"<?%s", (FX_LPCWSTR)pInstruction->m_wsTarget);
pXMLStream->WriteString(ws, ws.GetLength());
CFX_WideStringArray &attributes = pInstruction->m_Attributes;
- FX_INT32 i, iCount = attributes.GetSize();
+ int32_t i, iCount = attributes.GetSize();
CFX_WideString wsValue;
for (i = 0; i < iCount; i += 2) {
ws = L" ";
@@ -1059,9 +1059,9 @@ void CFDE_XMLDoc::SaveXMLNode(IFX_Stream *pXMLStream, IFDE_XMLNode *pINode)
ws += ((CFDE_XMLElement*)pNode)->m_wsTag;
pXMLStream->WriteString(ws, ws.GetLength());
CFX_WideStringArray &attributes = ((CFDE_XMLElement*)pNode)->m_Attributes;
- FX_INT32 iCount = attributes.GetSize();
+ int32_t iCount = attributes.GetSize();
CFX_WideString wsValue;
- for (FX_INT32 i = 0; i < iCount; i += 2) {
+ for (int32_t i = 0; i < iCount; i += 2) {
ws = L" ";
ws += attributes[i];
ws += L"=\"";
@@ -1138,7 +1138,7 @@ void CFDE_XMLDoc::SaveXML(IFX_Stream *pXMLStream, FX_BOOL bSaveBOM)
pNode = pNode->m_pNext;
}
if (pXMLStream == m_pStream) {
- FX_INT32 iPos = pXMLStream->GetPosition();
+ int32_t iPos = pXMLStream->GetPosition();
pXMLStream->SetLength(iPos);
}
}
@@ -1159,10 +1159,10 @@ CFDE_XMLDOMParser::~CFDE_XMLDOMParser()
m_ws1.Empty();
m_ws2.Empty();
}
-FX_INT32 CFDE_XMLDOMParser::DoParser(IFX_Pause *pPause)
+int32_t CFDE_XMLDOMParser::DoParser(IFX_Pause *pPause)
{
FX_DWORD dwRet;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (TRUE) {
dwRet = m_pParser->DoSyntaxParse();
switch (dwRet) {
@@ -1278,10 +1278,10 @@ CFDE_XMLSAXParser::~CFDE_XMLSAXParser()
m_ws1.Empty();
m_ws2.Empty();
}
-FX_INT32 CFDE_XMLSAXParser::DoParser(IFX_Pause *pPause)
+int32_t CFDE_XMLSAXParser::DoParser(IFX_Pause *pPause)
{
FX_DWORD dwRet = 0;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (TRUE) {
dwRet = m_pParser->DoSyntaxParse();
switch (dwRet) {
@@ -1379,7 +1379,7 @@ inline void CFDE_XMLSAXParser::Pop()
m_pTagTop = m_TagStack.GetTopElement();
}
#ifdef _FDE_BLOCK_BUFFER
-CFDE_BlockBuffer::CFDE_BlockBuffer(FX_INT32 iAllocStep)
+CFDE_BlockBuffer::CFDE_BlockBuffer(int32_t iAllocStep)
: m_iAllocStep(iAllocStep),
m_iStartPosition(0),
m_iBufferSize(0),
@@ -1390,14 +1390,14 @@ CFDE_BlockBuffer::~CFDE_BlockBuffer()
{
ClearBuffer();
}
-FX_LPWSTR CFDE_BlockBuffer::GetAvailableBlock(FX_INT32& iIndexInBlock)
+FX_LPWSTR CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock)
{
iIndexInBlock = 0;
- FX_INT32 iBlockNum = m_BlockArray.GetSize();
+ int32_t iBlockNum = m_BlockArray.GetSize();
if (iBlockNum == 0) {
return NULL;
}
- FX_INT32 iRealIndex = m_iStartPosition + m_iDataLength;
+ int32_t iRealIndex = m_iStartPosition + m_iDataLength;
FX_LPWSTR pDataBlock = NULL;
if(iRealIndex == m_iBufferSize) {
FX_LPWSTR pBlock = (FX_LPWSTR)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
@@ -1408,18 +1408,18 @@ FX_LPWSTR CFDE_BlockBuffer::GetAvailableBlock(FX_INT32& iIndexInBlock)
iIndexInBlock = 0;
pDataBlock = pBlock;
} else {
- FX_INT32 iBlockIndex = iRealIndex / m_iAllocStep;
- FX_INT32 iInnerIndex = iRealIndex % m_iAllocStep;
+ int32_t iBlockIndex = iRealIndex / m_iAllocStep;
+ int32_t iInnerIndex = iRealIndex % m_iAllocStep;
iIndexInBlock = iInnerIndex;
pDataBlock = (FX_LPWSTR)m_BlockArray[iBlockIndex];
}
return pDataBlock;
}
-FX_BOOL CFDE_BlockBuffer::InitBuffer(FX_INT32 iBufferSize)
+FX_BOOL CFDE_BlockBuffer::InitBuffer(int32_t iBufferSize)
{
ClearBuffer();
- FX_INT32 iNumOfBlock = (iBufferSize - 1) / m_iAllocStep + 1;
- for (FX_INT32 i = 0; i < iNumOfBlock; i++) {
+ int32_t iNumOfBlock = (iBufferSize - 1) / m_iAllocStep + 1;
+ for (int32_t i = 0; i < iNumOfBlock; i++) {
FX_LPWSTR pBlockBuffer = (FX_LPWSTR)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
if (pBlockBuffer == NULL) {
ClearBuffer();
@@ -1430,17 +1430,17 @@ FX_BOOL CFDE_BlockBuffer::InitBuffer(FX_INT32 iBufferSize)
m_iBufferSize = iNumOfBlock * m_iAllocStep;
return TRUE;
}
-void CFDE_BlockBuffer::SetTextChar(FX_INT32 iIndex, FX_WCHAR ch)
+void CFDE_BlockBuffer::SetTextChar(int32_t iIndex, FX_WCHAR ch)
{
if (iIndex < 0) {
return;
}
- FX_INT32 iRealIndex = m_iStartPosition + iIndex;
- FX_INT32 iBlockIndex = iRealIndex / m_iAllocStep;
- FX_INT32 iInnerIndex = iRealIndex % m_iAllocStep;
- FX_INT32 iBlockSize = m_BlockArray.GetSize();
+ int32_t iRealIndex = m_iStartPosition + iIndex;
+ int32_t iBlockIndex = iRealIndex / m_iAllocStep;
+ int32_t iInnerIndex = iRealIndex % m_iAllocStep;
+ int32_t iBlockSize = m_BlockArray.GetSize();
if (iBlockIndex >= iBlockSize) {
- FX_INT32 iNewBlocks = iBlockIndex - iBlockSize + 1;
+ int32_t iNewBlocks = iBlockIndex - iBlockSize + 1;
do {
FX_LPWSTR pBlock = (FX_LPWSTR)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
if (!pBlock) {
@@ -1456,7 +1456,7 @@ void CFDE_BlockBuffer::SetTextChar(FX_INT32 iIndex, FX_WCHAR ch)
m_iDataLength = iIndex + 1;
}
}
-FX_INT32 CFDE_BlockBuffer::DeleteTextChars(FX_INT32 iCount, FX_BOOL bDirection )
+int32_t CFDE_BlockBuffer::DeleteTextChars(int32_t iCount, FX_BOOL bDirection )
{
if (iCount <= 0) {
return m_iDataLength;
@@ -1473,10 +1473,10 @@ FX_INT32 CFDE_BlockBuffer::DeleteTextChars(FX_INT32 iCount, FX_BOOL bDirection )
}
return m_iDataLength;
}
-void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData, FX_INT32 iStart, FX_INT32 iLength) const
+void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData, int32_t iStart, int32_t iLength) const
{
wsTextData.Empty();
- FX_INT32 iMaybeDataLength = m_iBufferSize - 1 - m_iStartPosition;
+ int32_t iMaybeDataLength = m_iBufferSize - 1 - m_iStartPosition;
if (iStart < 0 || iStart > iMaybeDataLength) {
return;
}
@@ -1490,16 +1490,16 @@ void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData, FX_INT32 iStart,
if (!pBuf) {
return;
}
- FX_INT32 iStartBlockIndex = 0;
- FX_INT32 iStartInnerIndex = 0;
+ int32_t iStartBlockIndex = 0;
+ int32_t iStartInnerIndex = 0;
TextDataIndex2BufIndex(iStart, iStartBlockIndex, iStartInnerIndex);
- FX_INT32 iEndBlockIndex = 0;
- FX_INT32 iEndInnerIndex = 0;
+ int32_t iEndBlockIndex = 0;
+ int32_t iEndInnerIndex = 0;
TextDataIndex2BufIndex(iStart + iLength, iEndBlockIndex, iEndInnerIndex);
- FX_INT32 iPointer = 0;
- for (FX_INT32 i = iStartBlockIndex; i <= iEndBlockIndex; i++) {
- FX_INT32 iBufferPointer = 0;
- FX_INT32 iCopyLength = m_iAllocStep;
+ int32_t iPointer = 0;
+ for (int32_t i = iStartBlockIndex; i <= iEndBlockIndex; i++) {
+ int32_t iBufferPointer = 0;
+ int32_t iCopyLength = m_iAllocStep;
if (i == iStartBlockIndex) {
iCopyLength -= iStartInnerIndex;
iBufferPointer = iStartInnerIndex;
@@ -1513,18 +1513,18 @@ void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData, FX_INT32 iStart,
}
wsTextData.ReleaseBuffer(iLength);
}
-void CFDE_BlockBuffer::TextDataIndex2BufIndex(const FX_INT32 iIndex, FX_INT32& iBlockIndex, FX_INT32& iInnerIndex) const
+void CFDE_BlockBuffer::TextDataIndex2BufIndex(const int32_t iIndex, int32_t& iBlockIndex, int32_t& iInnerIndex) const
{
FXSYS_assert(iIndex >= 0);
- FX_INT32 iRealIndex = m_iStartPosition + iIndex;
+ int32_t iRealIndex = m_iStartPosition + iIndex;
iBlockIndex = iRealIndex / m_iAllocStep;
iInnerIndex = iRealIndex % m_iAllocStep;
}
void CFDE_BlockBuffer::ClearBuffer()
{
m_iBufferSize = 0;
- FX_INT32 iSize = m_BlockArray.GetSize();
- for (FX_INT32 i = 0; i < iSize; i++) {
+ int32_t iSize = m_BlockArray.GetSize();
+ for (int32_t i = 0; i < iSize; i++) {
FDE_Free(m_BlockArray[i]);
m_BlockArray[i] = NULL;
}
@@ -1565,15 +1565,15 @@ CFDE_XMLSyntaxParser::CFDE_XMLSyntaxParser()
m_CurNode.iNodeNum = -1;
m_CurNode.eNodeType = FDE_XMLNODE_Unknown;
}
-void CFDE_XMLSyntaxParser::Init(IFX_Stream *pStream, FX_INT32 iXMLPlaneSize, FX_INT32 iTextDataSize )
+void CFDE_XMLSyntaxParser::Init(IFX_Stream *pStream, int32_t iXMLPlaneSize, int32_t iTextDataSize )
{
FXSYS_assert(m_pStream == NULL && m_pBuffer == NULL);
FXSYS_assert(pStream != NULL && iXMLPlaneSize > 0);
- FX_INT32 iStreamLength = pStream->GetLength();
+ int32_t iStreamLength = pStream->GetLength();
FXSYS_assert(iStreamLength > 0);
m_pStream = pStream;
m_iXMLPlaneSize = FX_MIN(iXMLPlaneSize, iStreamLength);
- FX_BYTE bom[4];
+ uint8_t bom[4];
m_iCurrentPos = m_pStream->GetBOM(bom);
FXSYS_assert(m_pBuffer == NULL);
m_pBuffer = (FX_LPWSTR)FDE_Alloc(m_iXMLPlaneSize * sizeof(FX_WCHAR));
@@ -1590,8 +1590,8 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
return m_dwStatus;
}
FXSYS_assert(m_pStream != NULL && m_pBuffer != NULL && m_BlockBuffer.IsInitialized());
- FX_INT32 iStreamLength = m_pStream->GetLength();
- FX_INT32 iPos;
+ int32_t iStreamLength = m_pStream->GetLength();
+ int32_t iPos;
FX_WCHAR ch;
FX_DWORD dwStatus = FDE_XMLSYNTAXSTATUS_None;
while (TRUE) {
@@ -2066,16 +2066,16 @@ CFDE_XMLSyntaxParser::CFDE_XMLSyntaxParser()
m_CurNode.iNodeNum = -1;
m_CurNode.eNodeType = FDE_XMLNODE_Unknown;
}
-void CFDE_XMLSyntaxParser::Init(IFX_Stream *pStream, FX_INT32 iXMLPlaneSize, FX_INT32 iTextDataSize )
+void CFDE_XMLSyntaxParser::Init(IFX_Stream *pStream, int32_t iXMLPlaneSize, int32_t iTextDataSize )
{
FXSYS_assert(m_pStream == NULL && m_pBuffer == NULL);
FXSYS_assert(pStream != NULL && iXMLPlaneSize > 0 && iTextDataSize > 0);
- FX_INT32 iStreamLength = pStream->GetLength();
+ int32_t iStreamLength = pStream->GetLength();
FXSYS_assert(iStreamLength > 0);
m_pStream = pStream;
m_iXMLPlaneSize = FX_MIN(iXMLPlaneSize, iStreamLength);
m_iTextDataSize = iTextDataSize;
- FX_BYTE bom[4];
+ uint8_t bom[4];
m_iCurrentPos = m_pStream->GetBOM(bom);
FXSYS_assert(m_pBuffer == NULL);
m_pBuffer = (FX_LPWSTR)FDE_Alloc(m_iXMLPlaneSize * sizeof(FX_WCHAR));
@@ -2091,8 +2091,8 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
return m_dwStatus;
}
FXSYS_assert(m_pStream != NULL && m_pBuffer != NULL && m_pwsTextData != NULL);
- FX_INT32 iStreamLength = m_pStream->GetLength();
- FX_INT32 iPos;
+ int32_t iStreamLength = m_pStream->GetLength();
+ int32_t iPos;
FX_WCHAR ch;
FX_DWORD dwStatus = FDE_XMLSYNTAXSTATUS_None;
while (TRUE) {
@@ -2506,12 +2506,12 @@ CFDE_XMLSyntaxParser::~CFDE_XMLSyntaxParser()
FDE_Free(m_pBuffer);
}
}
-FX_INT32 CFDE_XMLSyntaxParser::GetStatus() const
+int32_t CFDE_XMLSyntaxParser::GetStatus() const
{
if (m_pStream == NULL) {
return -1;
}
- FX_INT32 iStreamLength = m_pStream->GetLength();
+ int32_t iStreamLength = m_pStream->GetLength();
if (iStreamLength < 1) {
return 100;
}
@@ -2523,10 +2523,10 @@ FX_INT32 CFDE_XMLSyntaxParser::GetStatus() const
}
return m_iParsedBytes * 100 / iStreamLength;
}
-static FX_INT32 FX_GetUTF8EncodeLength(FX_LPCWSTR pSrc, FX_INT32 iSrcLen)
+static int32_t FX_GetUTF8EncodeLength(FX_LPCWSTR pSrc, int32_t iSrcLen)
{
FX_DWORD unicode = 0;
- FX_INT32 iDstNum = 0;
+ int32_t iDstNum = 0;
while (iSrcLen -- > 0) {
unicode = *pSrc ++;
int nbytes = 0;
@@ -2552,8 +2552,8 @@ FX_FILESIZE CFDE_XMLSyntaxParser::GetCurrentBinaryPos() const
if (m_pStream == NULL) {
return 0;
}
- FX_INT32 nSrcLen = m_pStart - m_pBuffer;
- FX_INT32 nDstLen = FX_GetUTF8EncodeLength(m_pBuffer, nSrcLen);
+ int32_t nSrcLen = m_pStart - m_pBuffer;
+ int32_t nDstLen = FX_GetUTF8EncodeLength(m_pBuffer, nSrcLen);
return m_iParsedBytes + nDstLen;
}
#ifdef _FDE_BLOCK_BUFFER
@@ -2570,13 +2570,13 @@ void CFDE_XMLSyntaxParser::ParseTextChar(FX_WCHAR ch)
if (m_iEntityStart > -1 && ch == L';') {
CFX_WideString csEntity;
m_BlockBuffer.GetTextData(csEntity, m_iEntityStart + 1, (m_iDataLength - 1) - m_iEntityStart - 1);
- FX_INT32 iLen = csEntity.GetLength();
+ int32_t iLen = csEntity.GetLength();
if (iLen > 0) {
if (csEntity[0] == L'#') {
ch = 0;
FX_WCHAR w;
if (iLen > 1 && csEntity[1] == L'x') {
- for (FX_INT32 i = 2; i < iLen; i ++) {
+ for (int32_t i = 2; i < iLen; i ++) {
w = csEntity[i];
if (w >= L'0' && w <= L'9') {
ch = (ch << 4) + w - L'0';
@@ -2589,7 +2589,7 @@ void CFDE_XMLSyntaxParser::ParseTextChar(FX_WCHAR ch)
}
}
} else {
- for (FX_INT32 i = 1; i < iLen; i ++) {
+ for (int32_t i = 1; i < iLen; i ++) {
w = csEntity[i];
if (w < L'0' || w > L'9') {
break;
@@ -2639,13 +2639,13 @@ void CFDE_XMLSyntaxParser::ParseTextChar(FX_WCHAR ch)
m_pwsTextData[m_iDataPos] = ch;
if (m_iEntityStart > -1 && ch == L';') {
CFX_WideString csEntity(m_pwsTextData + m_iEntityStart + 1, m_iDataPos - m_iEntityStart - 1);
- FX_INT32 iLen = csEntity.GetLength();
+ int32_t iLen = csEntity.GetLength();
if (iLen > 0) {
if (csEntity[0] == L'#') {
ch = 0;
FX_WCHAR w;
if (iLen > 1 && csEntity[1] == L'x') {
- for (FX_INT32 i = 2; i < iLen; i ++) {
+ for (int32_t i = 2; i < iLen; i ++) {
w = csEntity[i];
if (w >= L'0' && w <= L'9') {
ch = (ch << 4) + w - L'0';
@@ -2658,7 +2658,7 @@ void CFDE_XMLSyntaxParser::ParseTextChar(FX_WCHAR ch)
}
}
} else {
- for (FX_INT32 i = 1; i < iLen; i ++) {
+ for (int32_t i = 1; i < iLen; i ++) {
w = csEntity[i];
if (w < L'0' || w > L'9') {
break;
diff --git a/xfa/src/fdp/src/xml/fde_xml.h b/xfa/src/fdp/src/xml/fde_xml.h
index edbf01584a..9353561264 100644
--- a/xfa/src/fdp/src/xml/fde_xml.h
+++ b/xfa/src/fdp/src/xml/fde_xml.h
@@ -31,15 +31,15 @@ public:
{
return FDE_XMLNODE_Unknown;
}
- virtual FX_INT32 CountChildNodes() const;
- virtual CFDE_XMLNode* GetChildNode(FX_INT32 index) const;
- virtual FX_INT32 GetChildNodeIndex(CFDE_XMLNode *pNode) const;
- virtual CFDE_XMLNode* GetPath(FX_LPCWSTR pPath, FX_INT32 iLength = -1, FX_BOOL bQualifiedName = TRUE) const;
- virtual FX_INT32 InsertChildNode(CFDE_XMLNode *pNode, FX_INT32 index = -1);
+ virtual int32_t CountChildNodes() const;
+ virtual CFDE_XMLNode* GetChildNode(int32_t index) const;
+ virtual int32_t GetChildNodeIndex(CFDE_XMLNode *pNode) const;
+ virtual CFDE_XMLNode* GetPath(FX_LPCWSTR pPath, int32_t iLength = -1, FX_BOOL bQualifiedName = TRUE) const;
+ virtual int32_t InsertChildNode(CFDE_XMLNode *pNode, int32_t index = -1);
virtual void RemoveChildNode(CFDE_XMLNode *pNode);
virtual void DeleteChildren();
virtual CFDE_XMLNode* GetNodeItem(IFDE_XMLNode::NodeItem eItem) const;
- virtual FX_INT32 GetNodeLevel() const;
+ virtual int32_t GetNodeLevel() const;
virtual FX_BOOL InsertNodeItem(IFDE_XMLNode::NodeItem eItem, CFDE_XMLNode *pNode);
virtual CFDE_XMLNode* RemoveNodeItem(IFDE_XMLNode::NodeItem eItem);
virtual CFDE_XMLNode* Clone(FX_BOOL bRecursive);
@@ -69,20 +69,20 @@ public:
{
wsTarget = m_wsTarget;
}
- virtual FX_INT32 CountAttributes() const;
- virtual FX_BOOL GetAttribute(FX_INT32 index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const;
+ virtual int32_t CountAttributes() const;
+ virtual FX_BOOL GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const;
virtual FX_BOOL HasAttribute(FX_LPCWSTR pwsAttriName) const;
virtual void GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue = NULL) const;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue);
- virtual FX_INT32 GetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iDefValue = 0) const;
- virtual void SetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iAttriValue);
+ virtual int32_t GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue = 0) const;
+ virtual void SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue);
virtual FX_FLOAT GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue = 0) const;
virtual void SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue);
virtual void RemoveAttribute(FX_LPCWSTR pwsAttriName);
- virtual FX_INT32 CountData() const;
- virtual FX_BOOL GetData(FX_INT32 index, CFX_WideString &wsData) const;
+ virtual int32_t CountData() const;
+ virtual FX_BOOL GetData(int32_t index, CFX_WideString &wsData) const;
virtual void AppendData(const CFX_WideString &wsData);
- virtual void RemoveData(FX_INT32 index);
+ virtual void RemoveData(int32_t index);
public:
~CFDE_XMLInstruction() {}
CFX_WideString m_wsTarget;
@@ -106,13 +106,13 @@ public:
virtual void GetLocalTagName(CFX_WideString &wsTag) const;
virtual void GetNamespacePrefix(CFX_WideString &wsPrefix) const;
virtual void GetNamespaceURI(CFX_WideString &wsNamespace) const;
- virtual FX_INT32 CountAttributes() const;
- virtual FX_BOOL GetAttribute(FX_INT32 index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const;
+ virtual int32_t CountAttributes() const;
+ virtual FX_BOOL GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const;
virtual FX_BOOL HasAttribute(FX_LPCWSTR pwsAttriName) const;
virtual void GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue = NULL) const;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue);
- virtual FX_INT32 GetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iDefValue = 0) const;
- virtual void SetInteger(FX_LPCWSTR pwsAttriName, FX_INT32 iAttriValue);
+ virtual int32_t GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue = 0) const;
+ virtual void SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue);
virtual FX_FLOAT GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue = 0) const;
virtual void SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue);
virtual void RemoveAttribute(FX_LPCWSTR pwsAttriName);
@@ -190,9 +190,9 @@ public:
{
FDE_Delete this;
}
- virtual FX_BOOL LoadXML(IFX_Stream *pXMLStream, FX_INT32 iXMLPlaneSize = 8192, FX_INT32 iTextDataSize = 256, FDE_LPXMLREADERHANDLER pHandler = NULL);
+ virtual FX_BOOL LoadXML(IFX_Stream *pXMLStream, int32_t iXMLPlaneSize = 8192, int32_t iTextDataSize = 256, FDE_LPXMLREADERHANDLER pHandler = NULL);
virtual FX_BOOL LoadXML(IFDE_XMLParser *pXMLParser);
- virtual FX_INT32 DoLoad(IFX_Pause *pPause = NULL);
+ virtual int32_t DoLoad(IFX_Pause *pPause = NULL);
virtual void CloseXML();
virtual CFDE_XMLNode* GetRoot() const
{
@@ -202,7 +202,7 @@ public:
virtual void SaveXMLNode(IFX_Stream *pXMLStream, IFDE_XMLNode *pNode);
protected:
IFX_Stream *m_pStream;
- FX_INT32 m_iStatus;
+ int32_t m_iStatus;
CFDE_XMLNode *m_pRoot;
IFDE_XMLSyntaxParser *m_pSyntaxParser;
IFDE_XMLParser *m_pXMLParser;
@@ -220,7 +220,7 @@ public:
{
FDE_Delete this;
}
- virtual FX_INT32 DoParser(IFX_Pause *pPause);
+ virtual int32_t DoParser(IFX_Pause *pPause);
private:
CFDE_XMLNode *m_pRoot;
IFDE_XMLSyntaxParser *m_pParser;
@@ -249,7 +249,7 @@ public:
{
FDE_Delete this;
}
- virtual FX_INT32 DoParser(IFX_Pause *pPause);
+ virtual int32_t DoParser(IFX_Pause *pPause);
private:
void Push(const CFDE_XMLTAG &xmlTag);
void Pop();
@@ -264,10 +264,10 @@ private:
class CFDE_BlockBuffer : public CFX_Target
{
public:
- CFDE_BlockBuffer(FX_INT32 iAllocStep = 1024 * 1024);
+ CFDE_BlockBuffer(int32_t iAllocStep = 1024 * 1024);
~CFDE_BlockBuffer();
- FX_BOOL InitBuffer(FX_INT32 iBufferSize = 1024 * 1024);
+ FX_BOOL InitBuffer(int32_t iBufferSize = 1024 * 1024);
FX_BOOL IsInitialized()
{
return m_iBufferSize / m_iAllocStep >= 1;
@@ -276,12 +276,12 @@ public:
{
FDE_Delete this;
}
- FX_LPWSTR GetAvailableBlock(FX_INT32& iIndexInBlock);
- inline FX_INT32 GetAllocStep() const
+ FX_LPWSTR GetAvailableBlock(int32_t& iIndexInBlock);
+ inline int32_t GetAllocStep() const
{
return m_iAllocStep;
}
- inline FX_INT32& GetDataLengthRef()
+ inline int32_t& GetDataLengthRef()
{
return m_iDataLength;
}
@@ -292,18 +292,18 @@ public:
}
m_iDataLength = 0;
}
- void SetTextChar(FX_INT32 iIndex, FX_WCHAR ch);
- FX_INT32 DeleteTextChars(FX_INT32 iCount, FX_BOOL bDirection = TRUE);
- void GetTextData(CFX_WideString& wsTextData, FX_INT32 iStart = 0, FX_INT32 iLength = -1) const;
+ void SetTextChar(int32_t iIndex, FX_WCHAR ch);
+ int32_t DeleteTextChars(int32_t iCount, FX_BOOL bDirection = TRUE);
+ void GetTextData(CFX_WideString& wsTextData, int32_t iStart = 0, int32_t iLength = -1) const;
protected:
- inline void TextDataIndex2BufIndex(const FX_INT32 iIndex, FX_INT32& iBlockIndex, FX_INT32& iInnerIndex) const;
+ inline void TextDataIndex2BufIndex(const int32_t iIndex, int32_t& iBlockIndex, int32_t& iInnerIndex) const;
void ClearBuffer();
CFX_PtrArray m_BlockArray;
- FX_INT32 m_iDataLength;
- FX_INT32 m_iBufferSize;
- FX_INT32 m_iAllocStep;
- FX_INT32 m_iStartPosition;
+ int32_t m_iDataLength;
+ int32_t m_iBufferSize;
+ int32_t m_iAllocStep;
+ int32_t m_iStartPosition;
};
#endif
#define FDE_XMLSYNTAXMODE_Text 0
@@ -334,19 +334,19 @@ public:
{
FDE_Delete this;
}
- virtual void Init(IFX_Stream *pStream, FX_INT32 iXMLPlaneSize, FX_INT32 iTextDataSize = 256);
+ virtual void Init(IFX_Stream *pStream, int32_t iXMLPlaneSize, int32_t iTextDataSize = 256);
virtual FX_DWORD DoSyntaxParse();
- virtual FX_INT32 GetStatus() const;
- virtual FX_INT32 GetCurrentPos() const
+ virtual int32_t GetStatus() const;
+ virtual int32_t GetCurrentPos() const
{
return m_iParsedChars + (m_pStart - m_pBuffer);
}
virtual FX_FILESIZE GetCurrentBinaryPos() const;
- virtual FX_INT32 GetCurrentNodeNumber() const
+ virtual int32_t GetCurrentNodeNumber() const
{
return m_iCurrentNodeNum;
}
- virtual FX_INT32 GetLastNodeNumber() const
+ virtual int32_t GetLastNodeNumber() const
{
return m_iLastNodeNum;
}
@@ -403,14 +403,14 @@ public:
#endif
protected:
IFX_Stream *m_pStream;
- FX_INT32 m_iXMLPlaneSize;
- FX_INT32 m_iCurrentPos;
- FX_INT32 m_iCurrentNodeNum;
- FX_INT32 m_iLastNodeNum;
- FX_INT32 m_iParsedChars;
- FX_INT32 m_iParsedBytes;
+ int32_t m_iXMLPlaneSize;
+ int32_t m_iCurrentPos;
+ int32_t m_iCurrentNodeNum;
+ int32_t m_iLastNodeNum;
+ int32_t m_iParsedChars;
+ int32_t m_iParsedBytes;
FX_LPWSTR m_pBuffer;
- FX_INT32 m_iBufferChars;
+ int32_t m_iBufferChars;
FX_BOOL m_bEOS;
FX_LPWSTR m_pStart;
FX_LPWSTR m_pEnd;
@@ -418,20 +418,20 @@ protected:
CFDE_XMLNodeStack m_XMLNodeStack;
#ifdef _FDE_BLOCK_BUFFER
CFDE_BlockBuffer m_BlockBuffer;
- FX_INT32 m_iAllocStep;
- FX_INT32& m_iDataLength;
+ int32_t m_iAllocStep;
+ int32_t& m_iDataLength;
FX_LPWSTR m_pCurrentBlock;
- FX_INT32 m_iIndexInBlock;
+ int32_t m_iIndexInBlock;
#else
- FX_INT32 m_iTextDataSize;
+ int32_t m_iTextDataSize;
FX_LPWSTR m_pwsTextData;
- FX_INT32 m_iDataPos;
+ int32_t m_iDataPos;
#endif
- FX_INT32 m_iTextDataLength;
+ int32_t m_iTextDataLength;
FX_DWORD m_dwStatus;
FX_DWORD m_dwMode;
FX_WCHAR m_wQuotationMark;
- FX_INT32 m_iEntityStart;
+ int32_t m_iEntityStart;
CFX_DWordStack m_SkipStack;
FX_WCHAR m_SkipChar;
inline void ParseTextChar(FX_WCHAR ch);