summaryrefslogtreecommitdiff
path: root/xfa/src/fdp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
commitd7e5cc754a937605d1f73db5e7967c58ddd80742 (patch)
treeed28e012c4d6a46b7f29f15a0c060474c27d4286 /xfa/src/fdp
parentbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (diff)
downloadpdfium-d7e5cc754a937605d1f73db5e7967c58ddd80742.tar.xz
Merge to XFA: Remove typdefs for pointer types in fx_system.h.
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.
Diffstat (limited to 'xfa/src/fdp')
-rw-r--r--xfa/src/fdp/include/fde_css.h22
-rw-r--r--xfa/src/fdp/include/fde_psr.h2
-rw-r--r--xfa/src/fdp/include/fde_rdv.h2
-rw-r--r--xfa/src/fdp/include/fde_tto.h24
-rw-r--r--xfa/src/fdp/include/fde_xml.h32
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.cpp10
-rw-r--r--xfa/src/fdp/src/css/fde_cssdatatable.cpp22
-rw-r--r--xfa/src/fdp/src/css/fde_cssdatatable.h46
-rw-r--r--xfa/src/fdp/src/css/fde_cssdeclaration.cpp52
-rw-r--r--xfa/src/fdp/src/css/fde_cssdeclaration.h44
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.cpp12
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.h40
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.cpp26
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.h8
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.cpp14
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.h10
-rw-r--r--xfa/src/fdp/src/fde/fde_gdidevice.h2
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.cpp2
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.cpp40
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.h30
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.cpp83
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.h42
22 files changed, 283 insertions, 282 deletions
diff --git a/xfa/src/fdp/include/fde_css.h b/xfa/src/fdp/include/fde_css.h
index 0c9b323954..c55f6c471e 100644
--- a/xfa/src/fdp/include/fde_css.h
+++ b/xfa/src/fdp/include/fde_css.h
@@ -242,9 +242,9 @@ public:
virtual FDE_CSSPRIMITIVETYPE GetPrimitiveType() const = 0;
virtual FX_ARGB GetRGBColor() const = 0;
virtual FX_FLOAT GetFloat() const = 0;
- virtual FX_LPCWSTR GetString(int32_t &iLength) const = 0;
+ virtual const FX_WCHAR* GetString(int32_t &iLength) const = 0;
virtual FDE_CSSPROPERTYVALUE GetEnum() const = 0;
- virtual FX_LPCWSTR GetFuncName() const = 0;
+ virtual const FX_WCHAR* GetFuncName() const = 0;
virtual int32_t CountArgs() const = 0;
virtual IFDE_CSSValue* GetArgs(int32_t index) const = 0;
};
@@ -458,7 +458,7 @@ 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, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
+ static IFDE_CSSStyleSheet* LoadFromBuffer(const CFX_WideString &szUrl, const FX_WCHAR* 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;
@@ -504,10 +504,10 @@ public:
static IFDE_CSSSyntaxParser* Create();
virtual void Release() = 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 FX_BOOL Init(const FX_WCHAR* pBuffer, int32_t iBufferSize, int32_t iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE) = 0;
virtual FDE_CSSSYNTAXSTATUS DoSyntaxParse() = 0;
- virtual FX_LPCWSTR GetCurrentString(int32_t &iLength) const = 0;
+ virtual const FX_WCHAR* GetCurrentString(int32_t &iLength) const = 0;
};
enum FDE_CSSLENGTHUNIT {
FDE_CSSLENGTHUNIT_Auto,
@@ -868,18 +868,18 @@ class IFDE_CSSGeneratedContentStyle
{
public:
virtual int32_t CountCounters() = 0;
- virtual FX_LPCWSTR GetCounterIdentifier(int32_t index) = 0;
+ virtual const FX_WCHAR* 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 int32_t CountQuotes() const = 0;
- virtual FX_LPCWSTR GetQuotes(int32_t index) const = 0;
+ virtual const FX_WCHAR* GetQuotes(int32_t index) const = 0;
};
class IFDE_CSSFontStyle
{
public:
virtual int32_t CountFontFamilies() const = 0;
- virtual FX_LPCWSTR GetFontFamily(int32_t index) const = 0;
+ virtual const FX_WCHAR* GetFontFamily(int32_t index) const = 0;
virtual FX_WORD GetFontWeight() const = 0;
virtual FDE_CSSFONTVARIANT GetFontVariant() const = 0;
virtual FDE_CSSFONTSTYLE GetFontStyle() const = 0;
@@ -964,7 +964,7 @@ public:
virtual FDE_CSSLINEBREAK GetLineBreak() const = 0;
virtual FDE_CSSTEXTEMPHASISMARK GetTextEmphasisMark() const = 0;
virtual FDE_CSSTEXTEMPHASISFILL GetTextEmphasisFill() const = 0;
- virtual FX_LPCWSTR GetTextEmphasisCustom() const = 0;
+ virtual const FX_WCHAR* GetTextEmphasisCustom() const = 0;
virtual FDE_CSSTEXTCOMBINE GetTextCombineType() const = 0;
virtual FX_BOOL HasTextCombineNumber() const = 0;
virtual FX_FLOAT GetTextCombineNumber() const = 0;
@@ -992,7 +992,7 @@ class IFDE_CSSBackgroundStyle
{
public:
virtual FX_ARGB GetBKGColor() const = 0;
- virtual FX_LPCWSTR GetBKGImage() const = 0;
+ virtual const FX_WCHAR* GetBKGImage() const = 0;
virtual FDE_CSSBKGREPEAT GetBKGRepeat() const = 0;
virtual FDE_CSSBKGATTACHMENT GetBKGAttachment() const = 0;
virtual const FDE_CSSPOINT& GetBKGPosition() const = 0;
@@ -1004,7 +1004,7 @@ class IFDE_CSSListStyle
public:
virtual FDE_CSSLISTSTYLETYPE GetListStyleType() const = 0;
virtual FDE_CSSLISTSTYLEPOSITION GetListStylePosition() const = 0;
- virtual FX_LPCWSTR GetListStyleImage() const = 0;
+ virtual const FX_WCHAR* GetListStyleImage() const = 0;
virtual void SetListStyleType(FDE_CSSLISTSTYLETYPE eListStyleType) = 0;
virtual void SetListStylePosition(FDE_CSSLISTSTYLEPOSITION eListStylePosition) = 0;
};
diff --git a/xfa/src/fdp/include/fde_psr.h b/xfa/src/fdp/include/fde_psr.h
index 974f4cc879..9934cfae09 100644
--- a/xfa/src/fdp/include/fde_psr.h
+++ b/xfa/src/fdp/include/fde_psr.h
@@ -14,7 +14,7 @@ enum FDE_VISUALOBJTYPE {
FDE_VISUALOBJ_Widget = 0x08 ,
};
typedef struct _FDE_HVISUALOBJ {
- FX_LPVOID pData;
+ void* pData;
} const * FDE_HVISUALOBJ;
class IFDE_VisualSet
{
diff --git a/xfa/src/fdp/include/fde_rdv.h b/xfa/src/fdp/include/fde_rdv.h
index eb79a81c9b..41e8d5c43d 100644
--- a/xfa/src/fdp/include/fde_rdv.h
+++ b/xfa/src/fdp/include/fde_rdv.h
@@ -13,7 +13,7 @@ class CFX_DIBitmap;
class CFX_DIBSource;
class IFDE_RenderDevice;
typedef struct _FDE_HDEVICESTATE {
- FX_LPVOID pData;
+ void* pData;
} * FDE_HDEVICESTATE;
class IFDE_RenderDevice
{
diff --git a/xfa/src/fdp/include/fde_tto.h b/xfa/src/fdp/include/fde_tto.h
index 8b4d1d4787..ec27490cfd 100644
--- a/xfa/src/fdp/include/fde_tto.h
+++ b/xfa/src/fdp/include/fde_tto.h
@@ -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, 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 CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Size &size) = 0;
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size) = 0;
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Rect &rect) = 0;
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect) = 0;
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, int32_t x, int32_t y) = 0;
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y) = 0;
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_Rect &rect) = 0;
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect) = 0;
virtual void SetLogicClipRect(const CFX_RectF &rtClip) = 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 void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size) = 0;
+ virtual void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect) = 0;
+ virtual void DrawLogicText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y) = 0;
+ virtual void DrawLogicText(const FX_WCHAR* 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 eddb9a1835..2ffa30c0fd 100644
--- a/xfa/src/fdp/include/fde_xml.h
+++ b/xfa/src/fdp/include/fde_xml.h
@@ -51,7 +51,7 @@ public:
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 IFDE_XMLNode* GetPath(const FX_WCHAR* 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;
@@ -70,14 +70,14 @@ public:
virtual void GetTargetName(CFX_WideString &wsTarget) 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 FX_BOOL HasAttribute(const FX_WCHAR* pwsAttriName) const = 0;
+ virtual void GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue = NULL) const = 0;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue) = 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 int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const = 0;
+ virtual void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue) = 0;
+ virtual FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const = 0;
+ virtual void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue) = 0;
+ virtual void RemoveAttribute(const FX_WCHAR* pwsAttriName) = 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;
@@ -93,14 +93,14 @@ public:
virtual void GetNamespaceURI(CFX_WideString &wsNamespace) 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 FX_BOOL HasAttribute(const FX_WCHAR* pwsAttriName) const = 0;
+ virtual void GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue = NULL) const = 0;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue) = 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 int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const = 0;
+ virtual void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue) = 0;
+ virtual FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const = 0;
+ virtual void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue) = 0;
+ virtual void RemoveAttribute(const FX_WCHAR* pwsAttriName) = 0;
virtual void GetTextData(CFX_WideString &wsText) const = 0;
virtual void SetTextData(const CFX_WideString &wsText) = 0;
};
@@ -124,7 +124,7 @@ public:
virtual void SetCharData(const CFX_WideString &wsCData) = 0;
};
typedef struct _FDE_XMLREADERHANDLER {
- FX_LPVOID pData;
+ void* pData;
void (*OnTagEnter)(_FDE_XMLREADERHANDLER *pThis, FDE_XMLNODETYPE eType, const CFX_WideString &wsTagName);
void (*OnTagBreak)(_FDE_XMLREADERHANDLER *pThis, const CFX_WideString &wsTagName);
diff --git a/xfa/src/fdp/src/css/fde_csscache.cpp b/xfa/src/fdp/src/css/fde_csscache.cpp
index 7b91401ac5..3c061082e2 100644
--- a/xfa/src/fdp/src/css/fde_csscache.cpp
+++ b/xfa/src/fdp/src/css/fde_csscache.cpp
@@ -31,7 +31,7 @@ CFDE_CSSStyleSheetCache::~CFDE_CSSStyleSheetCache()
FX_POSITION pos = m_Stylesheets.GetStartPosition();
if (pos != NULL) {
CFX_ByteString szKey;
- FX_LPVOID pValue;
+ void* pValue;
while (pos != NULL) {
m_Stylesheets.GetNextAssoc(pos, szKey, pValue);
FDE_DeleteWith(FDE_CSSCACHEITEM, m_pFixedStore, (FDE_LPCSSCACHEITEM)pValue);
@@ -49,7 +49,7 @@ void CFDE_CSSStyleSheetCache::AddStyleSheet(FX_BSTR szKey, IFDE_CSSStyleSheet *p
m_pFixedStore = FX_CreateAllocator(FX_ALLOCTYPE_Fixed, FX_MAX(10, m_iMaxItems), sizeof(FDE_CSSCACHEITEM));
FXSYS_assert(m_pFixedStore != NULL);
}
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (m_Stylesheets.Lookup(szKey, pValue)) {
FDE_LPCSSCACHEITEM pItem = (FDE_LPCSSCACHEITEM)pValue;
if (pItem->pStylesheet != pStyleSheet) {
@@ -69,7 +69,7 @@ void CFDE_CSSStyleSheetCache::AddStyleSheet(FX_BSTR szKey, IFDE_CSSStyleSheet *p
}
IFDE_CSSStyleSheet* CFDE_CSSStyleSheetCache::GetStyleSheet(FX_BSTR szKey) const
{
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (m_Stylesheets.Lookup(szKey, pValue)) {
FDE_LPCSSCACHEITEM pItem = (FDE_LPCSSCACHEITEM)pValue;
pItem->dwActivity++;
@@ -80,7 +80,7 @@ IFDE_CSSStyleSheet* CFDE_CSSStyleSheetCache::GetStyleSheet(FX_BSTR szKey) const
}
void CFDE_CSSStyleSheetCache::RemoveStyleSheet(FX_BSTR szKey)
{
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (!m_Stylesheets.Lookup(szKey, pValue)) {
return;
}
@@ -91,7 +91,7 @@ void CFDE_CSSStyleSheetCache::RemoveLowestActivityItem()
{
FX_POSITION pos = m_Stylesheets.GetStartPosition();
CFX_ByteString szKey;
- FX_LPVOID pValue;
+ void* pValue;
FDE_LPCSSCACHEITEM pItem = NULL;
CFX_ByteString szItem;
while (pos != NULL) {
diff --git a/xfa/src/fdp/src/css/fde_cssdatatable.cpp b/xfa/src/fdp/src/css/fde_cssdatatable.cpp
index 7f42d10ad0..126a3748dd 100644
--- a/xfa/src/fdp/src/css/fde_cssdatatable.cpp
+++ b/xfa/src/fdp/src/css/fde_cssdatatable.cpp
@@ -417,7 +417,7 @@ extern "C" {
{
return (ePersudo < FDE_CSSPERSUDO_NONE) ? (g_FDE_CSSPersudoType + ePersudo) : NULL;
}
- FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -441,7 +441,7 @@ extern "C" {
{
return (eName < FDE_CSSPROPERTY_MAX) ? (g_FDE_CSSProperties + eName) : NULL;
}
- FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -465,7 +465,7 @@ extern "C" {
{
return (eName < FDE_CSSPROPERTYVALUE_MAX) ? (g_FDE_CSSPropertyValues + eName) : NULL;
}
- FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_WORD wHash = (FX_WORD)FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -485,7 +485,7 @@ extern "C" {
} while (iStart <= iEnd);
return NULL;
}
- FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_WORD wHash = (FX_WORD)FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -505,7 +505,7 @@ extern "C" {
} while (iStart <= iEnd);
return NULL;
}
- FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -525,7 +525,7 @@ extern "C" {
} while (iStart <= iEnd);
return NULL;
}
- FX_BOOL FDE_ParseCSSNumber(FX_LPCWSTR pszValue, int32_t iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit)
+ FX_BOOL FDE_ParseCSSNumber(const FX_WCHAR* pszValue, int32_t iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
int32_t iUsedLen = 0;
@@ -547,7 +547,7 @@ extern "C" {
return TRUE;
}
- FX_BOOL FDE_ParseCSSString(FX_LPCWSTR pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength)
+ FX_BOOL FDE_ParseCSSString(const FX_WCHAR* 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, int32_t iValueLen, int32_t &iOffset, int32_t &iLength)
+ FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* 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,7 +574,7 @@ extern "C" {
return FALSE;
}
- FX_BOOL FDE_ParseCSSColor(FX_LPCWSTR pszValue, int32_t iValueLen, FX_ARGB &dwColor)
+ FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue, int32_t iValueLen, FX_ARGB &dwColor)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
if (*pszValue == '#') {
@@ -635,7 +635,7 @@ CFDE_CSSValueList::CFDE_CSSValueList(IFX_MEMAllocator *pStaticStore, const CFDE_
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, int32_t &iLength)
+FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE &eType, const FX_WCHAR* &pStart, int32_t &iLength)
{
while (m_pCur < m_pEnd && (*m_pCur <= ' ' || *m_pCur == m_Separator)) {
++m_pCur;
@@ -691,7 +691,7 @@ FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE &eType, FX_LPCWS
}
int32_t CFDE_CSSValueListParser::SkipTo(FX_WCHAR wch, FX_BOOL bWSSeparator , FX_BOOL bBrContinue )
{
- FX_LPCWSTR pStart = m_pCur;
+ const FX_WCHAR* pStart = m_pCur;
if (!bBrContinue) {
if (bWSSeparator)
while (++m_pCur < m_pEnd && *m_pCur != wch && *m_pCur > ' ') ;
diff --git a/xfa/src/fdp/src/css/fde_cssdatatable.h b/xfa/src/fdp/src/css/fde_cssdatatable.h
index ef8e0fb04e..05cd2ae00c 100644
--- a/xfa/src/fdp/src/css/fde_cssdatatable.h
+++ b/xfa/src/fdp/src/css/fde_cssdatatable.h
@@ -9,7 +9,7 @@
class CFDE_CSSFunction: public CFX_Target
{
public:
- CFDE_CSSFunction(FX_LPCWSTR pszFuncName, IFDE_CSSValueList *pArgList): m_pszFuncName(pszFuncName), m_pArgList(pArgList)
+ CFDE_CSSFunction(const FX_WCHAR* pszFuncName, IFDE_CSSValueList *pArgList): m_pszFuncName(pszFuncName), m_pArgList(pArgList)
{
FXSYS_assert(pArgList != NULL);
}
@@ -21,14 +21,14 @@ public:
{
return m_pArgList->GetValue(index);
}
- FX_LPCWSTR GetFuncName() const
+ const FX_WCHAR* GetFuncName() const
{
return m_pszFuncName;
};
protected:
IFDE_CSSValueList *m_pArgList;
- FX_LPCWSTR m_pszFuncName;
+ const FX_WCHAR* m_pszFuncName;
};
class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue, public CFX_Target
{
@@ -40,7 +40,7 @@ public:
CFDE_CSSPrimitiveValue(FX_ARGB color) : m_eType(FDE_CSSPRIMITIVETYPE_RGB), m_dwColor(color) { }
CFDE_CSSPrimitiveValue(FDE_CSSPROPERTYVALUE eValue) : m_eType(FDE_CSSPRIMITIVETYPE_Enum) , m_eEnum(eValue) { }
CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, FX_FLOAT fValue) : m_eType(eType), m_fNumber(fValue) { }
- CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, FX_LPCWSTR pValue) : m_eType(eType), m_pString(pValue)
+ CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, const FX_WCHAR* pValue) : m_eType(eType), m_pString(pValue)
{
FXSYS_assert(m_pString != NULL);
}
@@ -61,7 +61,7 @@ public:
FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_Number && m_eType <= FDE_CSSPRIMITIVETYPE_PC);
return m_fNumber;
}
- virtual FX_LPCWSTR GetString(int32_t &iLength) const
+ virtual const FX_WCHAR* GetString(int32_t &iLength) const
{
FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_String && m_eType <= FDE_CSSPRIMITIVETYPE_URI);
iLength = FXSYS_wcslen(m_pString);
@@ -72,7 +72,7 @@ public:
FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Enum);
return m_eEnum;
}
- virtual FX_LPCWSTR GetFuncName() const
+ virtual const FX_WCHAR* GetFuncName() const
{
FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->GetFuncName();
@@ -92,7 +92,7 @@ public:
union {
FX_ARGB m_dwColor;
FX_FLOAT m_fNumber;
- FX_LPCWSTR m_pString;
+ const FX_WCHAR* m_pString;
FDE_CSSPROPERTYVALUE m_eEnum;
CFDE_CSSFunction *m_pFunction;
};
@@ -118,17 +118,17 @@ protected:
class CFDE_CSSValueListParser : public CFX_Target
{
public:
- CFDE_CSSValueListParser(FX_LPCWSTR psz, int32_t iLen, FX_WCHAR separator)
+ CFDE_CSSValueListParser(const FX_WCHAR* 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, int32_t &iLength);
+ FX_BOOL NextValue(FDE_CSSPRIMITIVETYPE &eType, const FX_WCHAR* &pStart, int32_t &iLength);
FX_WCHAR m_Separator;
protected:
int32_t SkipTo(FX_WCHAR wch, FX_BOOL bWSSeparator = FALSE, FX_BOOL bBrContinue = FALSE);
- FX_LPCWSTR m_pCur;
- FX_LPCWSTR m_pEnd;
+ const FX_WCHAR* m_pCur;
+ const FX_WCHAR* m_pEnd;
};
#ifdef _cplusplus
extern "C" {
@@ -142,53 +142,53 @@ extern "C" {
#define FDE_IsOnlyValue(type,enum) (((type) & ~(enum)) == FDE_CSSVALUETYPE_Primitive)
struct FDE_CSSPROPERTYTABLE {
FDE_CSSPROPERTY eName;
- FX_LPCWSTR pszName;
+ const FX_WCHAR* pszName;
FX_DWORD dwHash;
FX_DWORD dwType;
};
typedef FDE_CSSPROPERTYTABLE const * FDE_LPCCSSPROPERTYTABLE;
- FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(FX_LPCWSTR pszName, int32_t iLength);
+ FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const FX_WCHAR* pszName, int32_t iLength);
FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName);
struct FDE_CSSPROPERTYVALUETABLE {
FDE_CSSPROPERTYVALUE eName;
- FX_LPCWSTR pszName;
+ const FX_WCHAR* pszName;
FX_DWORD dwHash;
};
typedef FDE_CSSPROPERTYVALUETABLE const * FDE_LPCCSSPROPERTYVALUETABLE;
- FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(FX_LPCWSTR pszName, int32_t iLength);
+ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(const FX_WCHAR* 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, int32_t iLength);
+ FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* 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, int32_t iLength);
+ FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* 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, int32_t iLength);
+ FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const FX_WCHAR* pszName, int32_t iLength);
struct FDE_CSSPERSUDOTABLE {
FDE_CSSPERSUDO eName;
- FX_LPCWSTR pszName;
+ const FX_WCHAR* pszName;
FX_DWORD dwHash;
};
typedef FDE_CSSPERSUDOTABLE const * FDE_LPCCSSPERSUDOTABLE;
FDE_LPCCSSPERSUDOTABLE FDE_GetCSSPersudoByEnum(FDE_CSSPERSUDO ePersudo);
- 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);
+ FX_BOOL FDE_ParseCSSNumber(const FX_WCHAR* pszValue, int32_t iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit);
+ FX_BOOL FDE_ParseCSSString(const FX_WCHAR* pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength);
+ FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue, int32_t iValueLen, FX_ARGB &dwColor);
+ FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* 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 9898708539..297357850e 100644
--- a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
+++ b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
@@ -43,19 +43,19 @@ 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, int32_t iValueLen)
+const FX_WCHAR* CFDE_CSSDeclaration::CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
FXSYS_assert(iValueLen > 0);
CFX_MapPtrToPtr *pCache = pArgs->pStringCache;
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (pCache) {
- FX_LPVOID pszCached = NULL;
- pKey = (FX_LPVOID)(uintptr_t)FX_HashCode_String_GetW(pszValue, iValueLen, FALSE);
+ void* pszCached = NULL;
+ pKey = (void*)(uintptr_t)FX_HashCode_String_GetW(pszValue, iValueLen, FALSE);
if (pCache->Lookup(pKey, pszCached)) {
- return (FX_LPCWSTR)pszCached;
+ return (const FX_WCHAR*)pszCached;
}
}
- FX_LPWSTR psz = (FX_LPWSTR)pArgs->pStaticStore->Alloc((iValueLen + 1) * sizeof(FX_WCHAR));
+ FX_WCHAR* psz = (FX_WCHAR*)pArgs->pStaticStore->Alloc((iValueLen + 1) * sizeof(FX_WCHAR));
if (psz == NULL) {
return NULL;
}
@@ -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, int32_t iValueLen)
+FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
FXSYS_assert(iValueLen > 0);
FX_BOOL bImportant = FALSE;
@@ -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, int32_t iNameLen, FX_LPCWSTR pszValue, int32_t iValueLen)
+FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszName, int32_t iNameLen, const FX_WCHAR* 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, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
FX_ARGB dwColor;
if (!FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
@@ -265,7 +265,7 @@ 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, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
int32_t iOffset;
if (!FDE_ParseCSSURI(pszValue, iValueLen, iOffset, iValueLen)) {
@@ -277,7 +277,7 @@ 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, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
int32_t iOffset;
if (!FDE_ParseCSSString(pszValue, iValueLen, iOffset, iValueLen)) {
@@ -289,7 +289,7 @@ 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, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
if (pszValue[iValueLen - 1] != ')') {
return NULL;
@@ -305,7 +305,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs,
if (iStartBracket == 0) {
return NULL;
}
- FX_LPCWSTR pszFuncName = CopyToLocal(pArgs, pszValue, iStartBracket);
+ const FX_WCHAR* pszFuncName = CopyToLocal(pArgs, pszValue, iStartBracket);
pszValue += (iStartBracket + 1);
iValueLen -= (iStartBracket + 2);
CFDE_CSSValueArray argumentArr;
@@ -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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen, IFDE_CSSValue *&pColor, IFDE_CSSValue *&pStyle, IFDE_CSSValue *&pWidth) const
+FX_BOOL CFDE_CSSDeclaration::ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* 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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, '/');
@@ -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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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 91595d21d9..c8c80cce2f 100644
--- a/xfa/src/fdp/src/css/fde_cssdeclaration.h
+++ b/xfa/src/fdp/src/css/fde_cssdeclaration.h
@@ -14,8 +14,8 @@ typedef struct _FDE_CSSPROPERTYHOLDER : public CFX_Target {
_FDE_CSSPROPERTYHOLDER *pNext;
} FDE_CSSPROPERTYHOLDER, *FDE_LPCSSPROPERTYHOLDER;
typedef struct _FDE_CSSCUSTOMPROPERTY : public CFX_Target {
- FX_LPCWSTR pwsName;
- FX_LPCWSTR pwsValue;
+ const FX_WCHAR* pwsName;
+ const FX_WCHAR* pwsValue;
_FDE_CSSCUSTOMPROPERTY *pNext;
} FDE_CSSCUSTOMPROPERTY, * FDE_LPCSSCUSTOMPROPERTY;
typedef struct _FDE_CSSPROPERTYARGS : public CFX_Target {
@@ -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, int32_t iValueLen);
- FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszName, int32_t iNameLen, FX_LPCWSTR pszValue, int32_t iValueLen);
+ FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszName, int32_t iNameLen, const FX_WCHAR* pszValue, int32_t iValueLen);
protected:
- 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,
+ FX_BOOL ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* 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, 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 ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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, 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);
+ IFDE_CSSValue* ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseString(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ const FX_WCHAR* CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* 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 e4c8be6409..6cb024cbf8 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
@@ -8,7 +8,7 @@
#include "fde_csscache.h"
#include "fde_cssdeclaration.h"
#include "fde_cssstyleselector.h"
-int32_t CFDE_CSSCounterStyle::FindIndex(FX_LPCWSTR pszIdentifier)
+int32_t CFDE_CSSCounterStyle::FindIndex(const FX_WCHAR* pszIdentifier)
{
int32_t iCount = m_arrCounterData.GetSize();
for (int32_t i = 0; i < iCount; i++) {
@@ -33,7 +33,7 @@ void CFDE_CSSCounterStyle::DoUpdateIndex(IFDE_CSSValueList *pList)
for (int32_t i = 0; i < iCount; i++) {
IFDE_CSSValueList *pCounter = (IFDE_CSSValueList*)pList->GetValue(i);
int32_t iLen;
- FX_LPCWSTR pszIdentifier = ((IFDE_CSSPrimitiveValue*)(pCounter->GetValue(0)))->GetString(iLen);
+ const FX_WCHAR* pszIdentifier = ((IFDE_CSSPrimitiveValue*)(pCounter->GetValue(0)))->GetString(iLen);
FX_FLOAT fValue = fDefValue;
if (pCounter->CountValues() > 1) {
fValue = ((IFDE_CSSPrimitiveValue*)(pCounter->GetValue(1)))->GetFloat();
@@ -176,10 +176,10 @@ 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)(uintptr_t)dwKey;
+ void* pKey = (void*)(uintptr_t)dwKey;
FDE_LPCSSRULEDATA pData = NewRuleData(pSel, pDecl);
FDE_LPCSSRULEDATA pList = NULL;
- if (!map.Lookup(pKey, (FX_LPVOID&)pList)) {
+ if (!map.Lookup(pKey, (void*&)pList)) {
map.SetAt(pKey, pData);
} else if (AddRuleTo(pList, pData)) {
map.SetAt(pKey, pList);
@@ -525,7 +525,7 @@ void CFDE_CSSStyleSelector::ApplyDeclarations(FX_BOOL bPriority, const IFDE_CSSD
}
}
}
-void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPCWSTR psz, int32_t iLen)
+void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration *pDecl, const FX_WCHAR* psz, int32_t iLen)
{
FXSYS_assert(pDecl != NULL && psz != NULL && iLen > 0);
IFDE_CSSSyntaxParser *pSyntax = IFDE_CSSSyntaxParser::Create();
@@ -534,7 +534,7 @@ void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPC
}
if (pSyntax->Init(psz, iLen, 32, TRUE)) {
int32_t iLen;
- FX_LPCWSTR psz;
+ const FX_WCHAR* psz;
FDE_CSSPROPERTYARGS args;
args.pStringCache = NULL;
args.pStaticStore = m_pInlineStyleStore;
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.h b/xfa/src/fdp/src/css/fde_cssstyleselector.h
index 803522bfb4..36bf3f179d 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.h
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.h
@@ -33,18 +33,18 @@ public:
}
FDE_LPCSSRULEDATA GetIDRuleData(FX_DWORD dwIDHash)
{
- FX_LPVOID pData;
- return m_IDRules.Lookup((FX_LPVOID)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
+ void* pData;
+ return m_IDRules.Lookup((void*)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
}
FDE_LPCSSRULEDATA GetTagRuleData(FX_DWORD dwTagHasn)
{
- FX_LPVOID pData;
- return m_TagRules.Lookup((FX_LPVOID)(uintptr_t)dwTagHasn, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
+ void* pData;
+ return m_TagRules.Lookup((void*)(uintptr_t)dwTagHasn, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
}
FDE_LPCSSRULEDATA GetClassRuleData(FX_DWORD dwIDHash)
{
- FX_LPVOID pData;
- return m_ClassRules.Lookup((FX_LPVOID)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
+ void* pData;
+ return m_ClassRules.Lookup((void*)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
}
FDE_LPCSSRULEDATA GetUniversalRuleData()
{
@@ -95,7 +95,7 @@ protected:
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, int32_t iLen);
+ void AppendInlineStyle(CFDE_CSSDeclaration *pDecl, const FX_WCHAR* 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);
@@ -161,7 +161,7 @@ public:
iValue = m_iResetVal;
return m_bReset;
}
- FX_LPCWSTR m_pszIdent;
+ const FX_WCHAR* m_pszIdent;
FX_BOOL m_bIncrement;
FX_BOOL m_bReset;
int32_t m_iIncVal;
@@ -196,7 +196,7 @@ public:
UpdateIndex();
return m_arrCounterData.ElementAt(index).GetCounterReset(iValue);
}
- FX_LPCWSTR GetCounterIdentifier(int32_t index)
+ const FX_WCHAR* 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);
- int32_t FindIndex(FX_LPCWSTR pszIdentifier);
+ int32_t FindIndex(const FX_WCHAR* pszIdentifier);
IFDE_CSSValueList *m_pCounterInc;
IFDE_CSSValueList *m_pCounterReset;
CFX_ArrayTemplate<FDE_CSSCOUNTERDATA> m_arrCounterData;
@@ -227,7 +227,7 @@ public:
m_bTextEmphasisColorCurrent = TRUE;
m_iOrphans = 2;
}
- FX_LPCWSTR m_pszListStyleImage;
+ const FX_WCHAR* m_pszListStyleImage;
FDE_CSSLENGTH m_LetterSpacing;
FDE_CSSLENGTH m_WordSpacing;
FDE_CSSLENGTH m_TextIndent;
@@ -242,7 +242,7 @@ public:
FX_WORD m_wFontWeight;
int32_t m_iWidows;
int32_t m_iOrphans;
- FX_LPCWSTR m_pszTextEmphasisCustomMark;
+ const FX_WCHAR* m_pszTextEmphasisCustomMark;
FX_WORD m_eFontVariant : 1;
FX_WORD m_eFontStyle : 1;
FX_WORD m_bTextEmphasisColorCurrent: 1;
@@ -289,7 +289,7 @@ public:
FDE_CSSSIZE m_MinBoxSize;
FDE_CSSSIZE m_MaxBoxSize;
FDE_CSSPOINT m_BKGPosition;
- FX_LPCWSTR m_pszBKGImage;
+ const FX_WCHAR* m_pszBKGImage;
FX_ARGB m_dwBKGColor;
FX_ARGB m_dwBDRLeftColor;
FX_ARGB m_dwBDRTopColor;
@@ -449,7 +449,7 @@ public:
{
return (m_NonInheritedData.m_pCounterStyle == NULL) ? 0 : m_NonInheritedData.m_pCounterStyle->CountCounters();
}
- virtual FX_LPCWSTR GetCounterIdentifier(int32_t index)
+ virtual const FX_WCHAR* GetCounterIdentifier(int32_t index)
{
return m_NonInheritedData.m_pCounterStyle->GetCounterIdentifier(index);
}
@@ -469,7 +469,7 @@ public:
{
return m_InheritedData.m_pQuotes == NULL ? 0 : m_InheritedData.m_pQuotes->CountValues();
}
- virtual FX_LPCWSTR GetQuotes(int32_t index) const
+ virtual const FX_WCHAR* 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);
@@ -526,7 +526,7 @@ public:
{
return m_InheritedData.m_pFontFamily ? m_InheritedData.m_pFontFamily->CountValues() : 0;
}
- virtual FX_LPCWSTR GetFontFamily(int32_t index) const
+ virtual const FX_WCHAR* GetFontFamily(int32_t index) const
{
return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pFontFamily->GetValue(index)))->GetString(index);
}
@@ -815,7 +815,7 @@ public:
{
return (FDE_CSSTEXTEMPHASISFILL)m_InheritedData.m_eTextEmphasisFill;
}
- virtual FX_LPCWSTR GetTextEmphasisCustom() const
+ virtual const FX_WCHAR* GetTextEmphasisCustom() const
{
FXSYS_assert(m_InheritedData.m_eTextEmphasisMark == FDE_CSSTEXTEMPHASISMARK_Custom);
return m_InheritedData.m_pszTextEmphasisCustomMark;
@@ -913,7 +913,7 @@ public:
{
return m_NonInheritedData.m_dwBKGColor;
}
- virtual FX_LPCWSTR GetBKGImage() const
+ virtual const FX_WCHAR* GetBKGImage() const
{
return m_NonInheritedData.m_pszBKGImage;
}
@@ -953,7 +953,7 @@ public:
{
return m_InheritedData.m_pCursorUris == NULL ? 0 : m_InheritedData.m_pCursorUris->CountValues();
}
- virtual FX_LPCWSTR GetCursorUrl(int32_t index) const
+ virtual const FX_WCHAR* GetCursorUrl(int32_t index) const
{
FXSYS_assert(m_InheritedData.m_pCursorUris != NULL);
return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pCursorUris->GetValue(index)))->GetString(index);
@@ -974,7 +974,7 @@ public:
{
return (FDE_CSSLISTSTYLEPOSITION)m_NonInheritedData.m_eListStylePosition;
}
- virtual FX_LPCWSTR GetListStyleImage() const
+ virtual const FX_WCHAR* GetListStyleImage() const
{
return m_InheritedData.m_pszListStyleImage;
}
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
index 006995a754..dd692ec718 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
@@ -10,7 +10,7 @@
#include "fde_cssstylesheet.h"
IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet()
{
- static const FX_LPCWSTR s_pStyle = L"html,address,blockquote,body,dd,div,dl,dt,fieldset,form,frame,frameset,h1,h2,h3,h4,h5,h6,noframes,ol,p,ul,center,dir,hr,menu,pre{display:block}"
+ static const FX_WCHAR* s_pStyle = L"html,address,blockquote,body,dd,div,dl,dt,fieldset,form,frame,frameset,h1,h2,h3,h4,h5,h6,noframes,ol,p,ul,center,dir,hr,menu,pre{display:block}"
L"li{display:list-item}head{display:none}table{display:table}tr{display:table-row}thead{display:table-header-group}tbody{display:table-row-group}tfoot{display:table-footer-group}"
L"col{display:table-column}colgroup{display:table-column-group}td,th{display:table-cell}caption{display:table-caption}th{font-weight:bolder;text-align:center}caption{text-align:center}"
L"body{margin:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.75em 0}h3{font-size:1.17em;margin:.83em 0}h4,p,blockquote,ul,fieldset,form,ol,dl,dir,menu{margin:1.12em 0}"
@@ -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, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList )
+IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, const FX_WCHAR* pBuffer, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList )
{
CFDE_CSSStyleSheet *pStyleSheet = FDE_New CFDE_CSSStyleSheet(dwMediaList);
if (pStyleSheet == NULL) {
@@ -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, int32_t iBufSize, FX_WORD wCodePage)
+FX_BOOL CFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, const FX_WCHAR* pBuffer, int32_t iBufSize, FX_WORD wCodePage)
{
FXSYS_assert(pBuffer != NULL && iBufSize > 0);
IFDE_CSSSyntaxParser *pSyntax = IFDE_CSSSyntaxParser::Create();
@@ -176,7 +176,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadMediaRule(IFDE_CSSSyntaxParser *pSyn
switch (pSyntax->DoSyntaxParse()) {
case FDE_CSSSYNTAXSTATUS_MediaType: {
int32_t iLen;
- FX_LPCWSTR psz = pSyntax->GetCurrentString(iLen);
+ const FX_WCHAR* psz = pSyntax->GetCurrentString(iLen);
FDE_LPCCSSMEDIATYPETABLE pMediaType = FDE_GetCSSMediaTypeByName(psz, iLen);
if (pMediaType != NULL) {
dwMediaList |= pMediaType->wValue;
@@ -209,7 +209,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule(IFDE_CSSSyntaxParser *pSyn
{
m_Selectors.RemoveAt(0, m_Selectors.GetSize());
CFDE_CSSStyleRule *pStyleRule = NULL;
- FX_LPCWSTR pszValue = NULL;
+ const FX_WCHAR* pszValue = NULL;
int32_t iValueLen = 0;
FDE_CSSPROPERTYARGS propertyArgs;
propertyArgs.pStaticStore = m_pAllocator;
@@ -269,7 +269,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule(IFDE_CSSSyntaxParser *pSyn
FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadFontFaceRule(IFDE_CSSSyntaxParser *pSyntax, CFDE_CSSRuleArray &ruleArray)
{
CFDE_CSSFontFaceRule *pFontFaceRule = NULL;
- FX_LPCWSTR pszValue = NULL;
+ const FX_WCHAR* pszValue = NULL;
int32_t iValueLen = 0;
FDE_CSSPROPERTYARGS propertyArgs;
propertyArgs.pStaticStore = m_pAllocator;
@@ -361,10 +361,10 @@ inline FX_BOOL FDE_IsCSSChar(FX_WCHAR wch)
{
return (wch >= 'a' && wch <= 'z') || (wch >= 'A' && wch <= 'Z');
}
-int32_t FDE_GetCSSPersudoLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
+int32_t FDE_GetCSSPersudoLen(const FX_WCHAR* psz, const FX_WCHAR* pEnd)
{
FXSYS_assert(*psz == ':');
- FX_LPCWSTR pStart = psz;
+ const FX_WCHAR* pStart = psz;
while (psz < pEnd) {
FX_WCHAR wch = *psz;
if (FDE_IsCSSChar(wch) || wch == ':') {
@@ -375,9 +375,9 @@ int32_t FDE_GetCSSPersudoLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
}
return psz - pStart;
}
-int32_t FDE_GetCSSNameLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
+int32_t FDE_GetCSSNameLen(const FX_WCHAR* psz, const FX_WCHAR* pEnd)
{
- FX_LPCWSTR pStart = psz;
+ const FX_WCHAR* pStart = psz;
while (psz < pEnd) {
FX_WCHAR wch = *psz;
if (FDE_IsCSSChar(wch)
@@ -390,11 +390,11 @@ int32_t FDE_GetCSSNameLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
}
return psz - pStart;
}
-IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, int32_t iLen)
+IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* psz, int32_t iLen)
{
FXSYS_assert(pStaticStore != NULL && psz != NULL && iLen > 0);
- FX_LPCWSTR pStart = psz;
- FX_LPCWSTR pEnd = psz + iLen;
+ const FX_WCHAR* pStart = psz;
+ const FX_WCHAR* pEnd = psz + iLen;
for (; psz < pEnd; ++psz) {
switch (*psz) {
case '>':
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.h b/xfa/src/fdp/src/css/fde_cssstylesheet.h
index fea4176171..435998f017 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, int32_t iLen, FX_BOOL bIgnoreCase)
+ CFDE_CSSSelector(FDE_CSSSELECTORTYPE eType, const FX_WCHAR* 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, int32_t iLen);
+ static IFDE_CSSSelector* FromString(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* psz, int32_t iLen);
void SetNext(IFDE_CSSSelector *pNext)
{
m_pNext = pNext;
}
protected:
- static CFDE_CSSSelector* ParseSelector(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, int32_t &iOff, int32_t iLen, FDE_CSSSELECTORTYPE eType);
+ static CFDE_CSSSelector* ParseSelector(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* psz, int32_t &iOff, int32_t iLen, FDE_CSSSELECTORTYPE eType);
void SetType(FDE_CSSSELECTORTYPE eType)
{
m_eType = eType;
@@ -141,7 +141,7 @@ public:
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, int32_t iBufSize, FX_WORD wCodePage);
+ FX_BOOL LoadFromBuffer(const CFX_WideString &szUrl, const FX_WCHAR* 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 f1cb877b32..058c7c0a3c 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.cpp
+++ b/xfa/src/fdp/src/css/fde_csssyntax.cpp
@@ -51,7 +51,7 @@ FX_BOOL CFDE_CSSSyntaxParser::Init(IFX_Stream *pStream, int32_t iCSSPlaneSize, i
m_iPlaneSize = iCSSPlaneSize;
return TRUE;
}
-FX_BOOL CFDE_CSSSyntaxParser::Init(FX_LPCWSTR pBuffer, int32_t iBufferSize, int32_t iTextDatSize , FX_BOOL bOnlyDeclaration )
+FX_BOOL CFDE_CSSSyntaxParser::Init(const FX_WCHAR* pBuffer, int32_t iBufferSize, int32_t iTextDatSize , FX_BOOL bOnlyDeclaration )
{
FXSYS_assert(pBuffer != NULL && iBufferSize > 0 && iTextDatSize > 0);
Reset(bOnlyDeclaration);
@@ -299,7 +299,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse()
AppendChar(wch);
} else {
int32_t iLen = m_TextData.GetLength();
- FX_LPCWSTR psz = m_TextData.GetBuffer();
+ const FX_WCHAR* psz = m_TextData.GetBuffer();
if (FXSYS_wcsncmp(L"charset", psz, iLen) == 0) {
SwitchMode(FDE_CSSSYNTAXMODE_Charset);
} else if (FXSYS_wcsncmp(L"import", psz, iLen) == 0) {
@@ -406,7 +406,7 @@ inline FX_BOOL CFDE_CSSSyntaxParser::RestoreMode()
m_ModeStack.Pop();
return TRUE;
}
-FX_LPCWSTR CFDE_CSSSyntaxParser::GetCurrentString(int32_t &iLength) const
+const FX_WCHAR* CFDE_CSSSyntaxParser::GetCurrentString(int32_t &iLength) const
{
iLength = m_iTextDatLen;
return m_TextData.GetBuffer();
@@ -431,10 +431,10 @@ void CFDE_CSSTextBuf::Reset()
}
m_iDatPos = m_iDatLen = m_iBufLen;
}
-FX_BOOL CFDE_CSSTextBuf::AttachBuffer(FX_LPCWSTR pBuffer, int32_t iBufLen)
+FX_BOOL CFDE_CSSTextBuf::AttachBuffer(const FX_WCHAR* pBuffer, int32_t iBufLen)
{
Reset();
- m_pBuffer = (FX_LPWSTR)pBuffer;
+ m_pBuffer = (FX_WCHAR*)pBuffer;
m_iDatLen = m_iBufLen = iBufLen;
return m_bExtBuf = TRUE;
}
@@ -466,9 +466,9 @@ FX_BOOL CFDE_CSSTextBuf::ExpandBuf(int32_t iDesiredSize)
if (m_bExtBuf) {
return FALSE;
} else if (m_pBuffer == NULL) {
- m_pBuffer = (FX_LPWSTR)FDE_Alloc(iDesiredSize * sizeof(FX_WCHAR));
+ m_pBuffer = (FX_WCHAR*)FDE_Alloc(iDesiredSize * sizeof(FX_WCHAR));
} else if (m_iBufLen != iDesiredSize) {
- m_pBuffer = (FX_LPWSTR)FDE_Realloc(m_pBuffer, iDesiredSize * sizeof(FX_WCHAR));
+ m_pBuffer = (FX_WCHAR*)FDE_Realloc(m_pBuffer, iDesiredSize * sizeof(FX_WCHAR));
} else {
return TRUE;
}
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.h b/xfa/src/fdp/src/css/fde_csssyntax.h
index 4ab132d2c8..6071b76910 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.h
+++ b/xfa/src/fdp/src/css/fde_csssyntax.h
@@ -11,7 +11,7 @@ class CFDE_CSSTextBuf : public CFX_Target
public:
CFDE_CSSTextBuf();
~CFDE_CSSTextBuf();
- FX_BOOL AttachBuffer(FX_LPCWSTR pBuffer, int32_t iBufLen);
+ FX_BOOL AttachBuffer(const FX_WCHAR* 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)
@@ -59,14 +59,14 @@ public:
{
return m_iDatLen;
}
- FX_LPCWSTR GetBuffer() const
+ const FX_WCHAR* GetBuffer() const
{
return m_pBuffer;
}
protected:
FX_BOOL ExpandBuf(int32_t iDesiredSize);
FX_BOOL m_bExtBuf;
- FX_LPWSTR m_pBuffer;
+ FX_WCHAR* m_pBuffer;
int32_t m_iBufLen;
int32_t m_iDatLen;
int32_t m_iDatPos;
@@ -97,9 +97,9 @@ public:
FDE_Delete this;
}
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 FX_BOOL Init(const FX_WCHAR* pBuffer, int32_t iBufferSize, int32_t iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
virtual FDE_CSSSYNTAXSTATUS DoSyntaxParse();
- virtual FX_LPCWSTR GetCurrentString(int32_t &iLength) const;
+ virtual const FX_WCHAR* GetCurrentString(int32_t &iLength) const;
protected:
void Reset(FX_BOOL bOnlyDeclaration);
void SwitchMode(FDE_CSSSYNTAXMODE eMode);
diff --git a/xfa/src/fdp/src/fde/fde_gdidevice.h b/xfa/src/fdp/src/fde/fde_gdidevice.h
index 86f7bac176..f7336c9b0a 100644
--- a/xfa/src/fdp/src/fde/fde_gdidevice.h
+++ b/xfa/src/fdp/src/fde/fde_gdidevice.h
@@ -66,7 +66,7 @@ protected:
Gdiplus::GraphicsState m_GraphicsState;
Gdiplus::Graphics *m_pGraphics;
Gdiplus::Bitmap *m_pBitmap;
- FX_LPBYTE m_pGlyphBuf;
+ uint8_t* m_pGlyphBuf;
FX_DWORD m_dwGlyphLen;
CFX_RectF m_rtClipRect;
CFDE_GdiPath *m_pClipPath;
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index 1ecbb1434b..9e475cdb67 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -134,7 +134,7 @@ FX_BOOL CFDE_FxgeDevice::DrawImage(CFX_DIBSource *pDib, const CFX_RectF *pSrcRec
if (pDevMatrix) {
dib2fxdev.Concat(*pDevMatrix);
}
- FX_LPVOID handle = NULL;
+ void* handle = NULL;
m_pDevice->StartDIBits(pDib, 255, 0, (const CFX_AffineMatrix*)&dib2fxdev, 0, handle);
while (m_pDevice->ContinueDIBits(handle, NULL)) { }
m_pDevice->CancelDIBits(handle);
diff --git a/xfa/src/fdp/src/tto/fde_textout.cpp b/xfa/src/fdp/src/tto/fde_textout.cpp
index fa45b3e4d0..7b7ea1c63b 100644
--- a/xfa/src/fdp/src/tto/fde_textout.cpp
+++ b/xfa/src/fdp/src/tto/fde_textout.cpp
@@ -182,7 +182,7 @@ int32_t CFDE_TextOut::GetTotalLines()
{
return m_iTotalLines;
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Size &size)
+void CFDE_TextOut::CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Size &size)
{
CFX_RectF rtText;
rtText.Set(0.0f, 0.0f, (FX_FLOAT)size.x, (FX_FLOAT)size.y);
@@ -190,7 +190,7 @@ void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Size &size)
size.x = (int32_t)rtText.Width();
size.y = (int32_t)rtText.Height();
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size)
+void CFDE_TextOut::CalcSize(const FX_WCHAR* 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, int32_t iLength, CFX_SizeF &size)
size.x = rtText.Width();
size.y = rtText.Height();
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Rect &rect)
+void CFDE_TextOut::CalcSize(const FX_WCHAR* 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((int32_t)rtText.left, (int32_t)rtText.top, (int32_t)rtText.Width(), (int32_t)rtText.Height());
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
+void CFDE_TextOut::CalcSize(const FX_WCHAR* 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, int32_t iLength, CFX_RectF &rect)
m_Matrix.TransformRect(rect);
}
}
-void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size)
+void CFDE_TextOut::CalcLogicSize(const FX_WCHAR* 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, int32_t iLength, CFX_SizeF &
size.x = rtText.Width();
size.y = rtText.Height();
}
-void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
+void CFDE_TextOut::CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect)
{
if (pwsStr == NULL || iLength < 1) {
rect.width = 0.0f;
@@ -235,12 +235,12 @@ void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &
CalcTextSize(pwsStr, iLength, rect);
}
}
-void CFDE_TextOut::CalcTextSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
+void CFDE_TextOut::CalcTextSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect)
{
FXSYS_assert(m_pFont != NULL && m_fFontSize >= 1.0f);
SetLineWidth(rect);
m_iTotalLines = 0;
- FX_LPCWSTR pStr = pwsStr;
+ const FX_WCHAR* pStr = pwsStr;
FX_BOOL bHotKey = (m_dwStyles & FDE_TTOSTYLE_HotKey) ? TRUE : FALSE;
FX_BOOL bVertical = (m_dwStyles & FDE_TTOSTYLE_VerticalLayout) ? TRUE : FALSE;
FX_FLOAT fWidth = 0.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, int32_t iLength, int32_t x, int32_t y)
+void CFDE_TextOut::DrawText(const FX_WCHAR* 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, int32_t iLength, FX_FLOAT x, FX_FLOAT y)
+void CFDE_TextOut::DrawText(const FX_WCHAR* 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, int32_t iLength, const CFX_Rect &rect)
+void CFDE_TextOut::DrawText(const FX_WCHAR* 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, int32_t iLength, const CFX_RectF &rect)
+void CFDE_TextOut::DrawText(const FX_WCHAR* 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, int32_t iLength, const CFX_RectF
rm.TransformRect(rtText);
DrawText(pwsStr, iLength, rtText, m_rtClip);
}
-void CFDE_TextOut::DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y)
+void CFDE_TextOut::DrawLogicText(const FX_WCHAR* 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, int32_t iLength, const CFX_RectF &rect)
+void CFDE_TextOut::DrawLogicText(const FX_WCHAR* 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, int32_t iLength, const CFX_RectF &rect, const CFX_RectF &rtClip)
+void CFDE_TextOut::DrawText(const FX_WCHAR* 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) {
@@ -450,7 +450,7 @@ void CFDE_TextOut::LoadEllipsis()
return;
}
ExpandBuffer(iLength, 1);
- FX_LPCWSTR pStr = (FX_LPCWSTR)m_wsEllipsis;
+ const FX_WCHAR* pStr = (const FX_WCHAR*)m_wsEllipsis;
int32_t *pCharWidths = m_pEllCharWidths;
FX_DWORD dwBreakStatus;
FX_WCHAR wch;
@@ -487,9 +487,9 @@ void CFDE_TextOut::RetrieveEllPieces(int32_t *&pCharWidths)
}
m_pTxtBreak->ClearBreakPieces();
}
-void CFDE_TextOut::LoadText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect)
+void CFDE_TextOut::LoadText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect)
{
- FX_LPWSTR pStr = m_wsText.GetBuffer(iLength);
+ FX_WCHAR* pStr = m_wsText.GetBuffer(iLength);
int32_t iTxtLength = iLength;
ExpandBuffer(iTxtLength, 0);
FX_BOOL bHotKey = (m_dwStyles & FDE_TTOSTYLE_HotKey) ? TRUE : FALSE;
@@ -693,7 +693,7 @@ void CFDE_TextOut::Reload(const CFX_RectF &rect)
}
void CFDE_TextOut::ReloadLinePiece(CFDE_TTOLine *pLine, const CFX_RectF &rect)
{
- FX_LPCWSTR pwsStr = (FX_LPCWSTR)m_wsText;
+ const FX_WCHAR* pwsStr = (const FX_WCHAR*)m_wsText;
FX_BOOL bVertical = (m_dwStyles & FDE_TTOSTYLE_VerticalLayout) ? TRUE : FALSE;
int32_t iPieceWidths = 0;
FDE_LPTTOPIECE pPiece = pLine->GetPtrAt(0);
@@ -816,7 +816,7 @@ void CFDE_TextOut::ToTextRun(const FDE_LPTTOPIECE pPiece, FX_TXTRUN &tr)
{
tr.pAccess = NULL;
tr.pIdentity = NULL;
- tr.pStr = (FX_LPCWSTR)m_wsText + pPiece->iStartChar;
+ tr.pStr = (const FX_WCHAR*)m_wsText + pPiece->iStartChar;
tr.pWidths = m_pCharWidths + pPiece->iStartChar;
tr.iLength = pPiece->iChars;
tr.pFont = m_pFont;
diff --git a/xfa/src/fdp/src/tto/fde_textout.h b/xfa/src/fdp/src/tto/fde_textout.h
index 38bc8ebcec..c7a46e3d73 100644
--- a/xfa/src/fdp/src/tto/fde_textout.h
+++ b/xfa/src/fdp/src/tto/fde_textout.h
@@ -56,28 +56,28 @@ 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, 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 CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Size &size);
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size);
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Rect &rect);
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, 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 DrawText(const FX_WCHAR* pwsStr, int32_t iLength, int32_t x, int32_t y);
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_Rect &rect);
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect);
virtual void SetLogicClipRect(const CFX_RectF &rtClip);
- 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 void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size);
+ virtual void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect);
+ virtual void DrawLogicText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
+ virtual void DrawLogicText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect);
virtual int32_t GetTotalLines();
protected:
- void CalcTextSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect);
+ void CalcTextSize(const FX_WCHAR* 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, int32_t iLength, const CFX_RectF &rect, const CFX_RectF &rtClip);
- void LoadText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect);
+ void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect, const CFX_RectF &rtClip);
+ void LoadText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect);
void LoadEllipsis();
void ExpandBuffer(int32_t iSize, int32_t iType);
void RetrieveEllPieces(int32_t *&pCharWidths);
diff --git a/xfa/src/fdp/src/xml/fde_xml.cpp b/xfa/src/fdp/src/xml/fde_xml.cpp
index ab7906b1bc..989969633b 100644
--- a/xfa/src/fdp/src/xml/fde_xml.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml.cpp
@@ -120,7 +120,7 @@ int32_t CFDE_XMLNode::GetChildNodeIndex(CFDE_XMLNode *pNode) const
}
return -1;
}
-CFDE_XMLNode* CFDE_XMLNode::GetPath(FX_LPCWSTR pPath, int32_t iLength, FX_BOOL bQualifiedName) const
+CFDE_XMLNode* CFDE_XMLNode::GetPath(const FX_WCHAR* pPath, int32_t iLength, FX_BOOL bQualifiedName) const
{
FXSYS_assert(pPath != NULL);
if (iLength < 0) {
@@ -130,7 +130,8 @@ CFDE_XMLNode* CFDE_XMLNode::GetPath(FX_LPCWSTR pPath, int32_t iLength, FX_BOOL b
return NULL;
}
CFX_WideString csPath;
- FX_LPCWSTR pStart = pPath, pEnd = pPath + iLength;
+ const FX_WCHAR* pStart = pPath;
+ const FX_WCHAR* pEnd = pPath + iLength;
FX_WCHAR ch;
while (pStart < pEnd) {
ch = *pStart ++;
@@ -406,7 +407,7 @@ void CFDE_XMLNode::SaveXMLNode(IFX_Stream *pXMLStream)
ws += L"\"?>";
pXMLStream->WriteString(ws, ws.GetLength());
} else {
- ws.Format(L"<?%s", (FX_LPCWSTR)pInstruction->m_wsTarget);
+ ws.Format(L"<?%s", (const FX_WCHAR*)pInstruction->m_wsTarget);
pXMLStream->WriteString(ws, ws.GetLength());
CFX_WideStringArray &attributes = pInstruction->m_Attributes;
int32_t i, iCount = attributes.GetSize();
@@ -560,7 +561,7 @@ FX_BOOL CFDE_XMLInstruction::GetAttribute(int32_t index, CFX_WideString &wsAttri
}
return FALSE;
}
-FX_BOOL CFDE_XMLInstruction::HasAttribute(FX_LPCWSTR pwsAttriName) const
+FX_BOOL CFDE_XMLInstruction::HasAttribute(const FX_WCHAR* pwsAttriName) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -570,7 +571,7 @@ FX_BOOL CFDE_XMLInstruction::HasAttribute(FX_LPCWSTR pwsAttriName) const
}
return FALSE;
}
-void CFDE_XMLInstruction::GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue) const
+void CFDE_XMLInstruction::GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -595,39 +596,39 @@ void CFDE_XMLInstruction::SetString(const CFX_WideString &wsAttriName, const CFX
m_Attributes.Add(wsAttriName);
m_Attributes.Add(wsAttriValue);
}
-int32_t CFDE_XMLInstruction::GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue) const
+int32_t CFDE_XMLInstruction::GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue) const
{
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 FXSYS_wtoi((const FX_WCHAR*)m_Attributes[i + 1]);
}
}
return iDefValue;
}
-void CFDE_XMLInstruction::SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue)
+void CFDE_XMLInstruction::SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%d", iAttriValue);
SetString(pwsAttriName, wsValue);
}
-FX_FLOAT CFDE_XMLInstruction::GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue) const
+FX_FLOAT CFDE_XMLInstruction::GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue) const
{
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]);
+ return FX_wcstof((const FX_WCHAR*)m_Attributes[i + 1]);
}
}
return fDefValue;
}
-void CFDE_XMLInstruction::SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue)
+void CFDE_XMLInstruction::SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%f", fAttriValue);
SetString(pwsAttriName, wsValue);
}
-void CFDE_XMLInstruction::RemoveAttribute(FX_LPCWSTR pwsAttriName)
+void CFDE_XMLInstruction::RemoveAttribute(const FX_WCHAR* pwsAttriName)
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -762,7 +763,7 @@ FX_BOOL CFDE_XMLElement::GetAttribute(int32_t index, CFX_WideString &wsAttriName
}
return FALSE;
}
-FX_BOOL CFDE_XMLElement::HasAttribute(FX_LPCWSTR pwsAttriName) const
+FX_BOOL CFDE_XMLElement::HasAttribute(const FX_WCHAR* pwsAttriName) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -772,7 +773,7 @@ FX_BOOL CFDE_XMLElement::HasAttribute(FX_LPCWSTR pwsAttriName) const
}
return FALSE;
}
-void CFDE_XMLElement::GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue) const
+void CFDE_XMLElement::GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -797,39 +798,39 @@ void CFDE_XMLElement::SetString(const CFX_WideString &wsAttriName, const CFX_Wid
m_Attributes.Add(wsAttriName);
m_Attributes.Add(wsAttriValue);
}
-int32_t CFDE_XMLElement::GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue) const
+int32_t CFDE_XMLElement::GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue) const
{
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 FXSYS_wtoi((const FX_WCHAR*)m_Attributes[i + 1]);
}
}
return iDefValue;
}
-void CFDE_XMLElement::SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue)
+void CFDE_XMLElement::SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%d", iAttriValue);
SetString(pwsAttriName, wsValue);
}
-FX_FLOAT CFDE_XMLElement::GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue) const
+FX_FLOAT CFDE_XMLElement::GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue) const
{
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]);
+ return FX_wcstof((const FX_WCHAR*)m_Attributes[i + 1]);
}
}
return fDefValue;
}
-void CFDE_XMLElement::SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue)
+void CFDE_XMLElement::SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%f", fAttriValue);
SetString(pwsAttriName, wsValue);
}
-void CFDE_XMLElement::RemoveAttribute(FX_LPCWSTR pwsAttriName)
+void CFDE_XMLElement::RemoveAttribute(const FX_WCHAR* pwsAttriName)
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -1021,7 +1022,7 @@ void CFDE_XMLDoc::SaveXMLNode(IFX_Stream *pXMLStream, IFDE_XMLNode *pINode)
ws += L"\"?>";
pXMLStream->WriteString(ws, ws.GetLength());
} else {
- ws.Format(L"<?%s", (FX_LPCWSTR)pInstruction->m_wsTarget);
+ ws.Format(L"<?%s", (const FX_WCHAR*)pInstruction->m_wsTarget);
pXMLStream->WriteString(ws, ws.GetLength());
CFX_WideStringArray &attributes = pInstruction->m_Attributes;
int32_t i, iCount = attributes.GetSize();
@@ -1390,7 +1391,7 @@ CFDE_BlockBuffer::~CFDE_BlockBuffer()
{
ClearBuffer();
}
-FX_LPWSTR CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock)
+FX_WCHAR* CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock)
{
iIndexInBlock = 0;
int32_t iBlockNum = m_BlockArray.GetSize();
@@ -1398,9 +1399,9 @@ FX_LPWSTR CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock)
return NULL;
}
int32_t iRealIndex = m_iStartPosition + m_iDataLength;
- FX_LPWSTR pDataBlock = NULL;
+ FX_WCHAR* pDataBlock = NULL;
if(iRealIndex == m_iBufferSize) {
- FX_LPWSTR pBlock = (FX_LPWSTR)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
+ FX_WCHAR* pBlock = (FX_WCHAR*)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
if (pBlock) {
m_BlockArray.Add(pBlock);
m_iBufferSize += m_iAllocStep;
@@ -1411,7 +1412,7 @@ FX_LPWSTR CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock)
int32_t iBlockIndex = iRealIndex / m_iAllocStep;
int32_t iInnerIndex = iRealIndex % m_iAllocStep;
iIndexInBlock = iInnerIndex;
- pDataBlock = (FX_LPWSTR)m_BlockArray[iBlockIndex];
+ pDataBlock = (FX_WCHAR*)m_BlockArray[iBlockIndex];
}
return pDataBlock;
}
@@ -1420,7 +1421,7 @@ FX_BOOL CFDE_BlockBuffer::InitBuffer(int32_t iBufferSize)
ClearBuffer();
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));
+ FX_WCHAR* pBlockBuffer = (FX_WCHAR*)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
if (pBlockBuffer == NULL) {
ClearBuffer();
return FALSE;
@@ -1442,7 +1443,7 @@ void CFDE_BlockBuffer::SetTextChar(int32_t iIndex, FX_WCHAR ch)
if (iBlockIndex >= iBlockSize) {
int32_t iNewBlocks = iBlockIndex - iBlockSize + 1;
do {
- FX_LPWSTR pBlock = (FX_LPWSTR)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
+ FX_WCHAR* pBlock = (FX_WCHAR*)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
if (!pBlock) {
return;
}
@@ -1450,7 +1451,7 @@ void CFDE_BlockBuffer::SetTextChar(int32_t iIndex, FX_WCHAR ch)
m_iBufferSize += m_iAllocStep;
} while (--iNewBlocks);
}
- FX_LPWSTR pTextData = (FX_LPWSTR)m_BlockArray[iBlockIndex];
+ FX_WCHAR* pTextData = (FX_WCHAR*)m_BlockArray[iBlockIndex];
*(pTextData + iInnerIndex) = ch;
if (m_iDataLength <= iIndex) {
m_iDataLength = iIndex + 1;
@@ -1486,7 +1487,7 @@ void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData, int32_t iStart,
if (iLength <= 0) {
return;
}
- FX_LPWSTR pBuf = wsTextData.GetBuffer(iLength);
+ FX_WCHAR* pBuf = wsTextData.GetBuffer(iLength);
if (!pBuf) {
return;
}
@@ -1507,7 +1508,7 @@ void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData, int32_t iStart,
if (i == iEndBlockIndex) {
iCopyLength -= ((m_iAllocStep - 1) - iEndInnerIndex);
}
- FX_LPWSTR pBlockBuf = (FX_LPWSTR)m_BlockArray[i];
+ FX_WCHAR* pBlockBuf = (FX_WCHAR*)m_BlockArray[i];
FXSYS_memcpy(pBuf + iPointer, pBlockBuf + iBufferPointer, iCopyLength * sizeof(FX_WCHAR));
iPointer += iCopyLength;
}
@@ -1576,7 +1577,7 @@ void CFDE_XMLSyntaxParser::Init(IFX_Stream *pStream, int32_t iXMLPlaneSize, int3
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));
+ m_pBuffer = (FX_WCHAR*)FDE_Alloc(m_iXMLPlaneSize * sizeof(FX_WCHAR));
m_pStart = m_pEnd = m_pBuffer;
FXSYS_assert(!m_BlockBuffer.IsInitialized());
m_BlockBuffer.InitBuffer();
@@ -1892,7 +1893,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
break;
}
m_SkipStack.Pop();
- FX_LPDWORD pDWord = m_SkipStack.GetTopElement();
+ FX_DWORD* pDWord = m_SkipStack.GetTopElement();
if (pDWord == NULL) {
m_dwMode = FDE_XMLSYNTAXMODE_Text;
} else {
@@ -1923,7 +1924,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
default:
if (ch == m_SkipChar) {
m_SkipStack.Pop();
- FX_LPDWORD pDWord = m_SkipStack.GetTopElement();
+ FX_DWORD* pDWord = m_SkipStack.GetTopElement();
if (pDWord == NULL) {
if (m_iDataLength >= 9) {
CFX_WideString wsHeader;
@@ -2078,10 +2079,10 @@ void CFDE_XMLSyntaxParser::Init(IFX_Stream *pStream, int32_t iXMLPlaneSize, int3
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));
+ m_pBuffer = (FX_WCHAR*)FDE_Alloc(m_iXMLPlaneSize * sizeof(FX_WCHAR));
m_pStart = m_pEnd = m_pBuffer;
FXSYS_assert(m_pwsTextData == NULL);
- m_pwsTextData = (FX_LPWSTR)FDE_Alloc(m_iTextDataSize * sizeof(FX_WCHAR));
+ m_pwsTextData = (FX_WCHAR*)FDE_Alloc(m_iTextDataSize * sizeof(FX_WCHAR));
m_iParsedBytes = m_iParsedChars = 0;
m_iBufferChars = 0;
}
@@ -2370,7 +2371,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
break;
}
m_SkipStack.Pop();
- FX_LPDWORD pDWord = m_SkipStack.GetTopElement();
+ FX_DWORD* pDWord = m_SkipStack.GetTopElement();
if (pDWord == NULL) {
m_dwMode = FDE_XMLSYNTAXMODE_Text;
} else {
@@ -2401,7 +2402,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
default:
if (ch == m_SkipChar) {
m_SkipStack.Pop();
- FX_LPDWORD pDWord = m_SkipStack.GetTopElement();
+ FX_DWORD* pDWord = m_SkipStack.GetTopElement();
if (pDWord == NULL) {
m_iTextDataLength = m_iDataPos;
m_iDataPos = 0;
@@ -2523,7 +2524,7 @@ int32_t CFDE_XMLSyntaxParser::GetStatus() const
}
return m_iParsedBytes * 100 / iStreamLength;
}
-static int32_t FX_GetUTF8EncodeLength(FX_LPCWSTR pSrc, int32_t iSrcLen)
+static int32_t FX_GetUTF8EncodeLength(const FX_WCHAR* pSrc, int32_t iSrcLen)
{
FX_DWORD unicode = 0;
int32_t iDstNum = 0;
@@ -2701,11 +2702,11 @@ void CFDE_XMLSyntaxParser::ReallocTextDataBuffer()
} else {
m_iTextDataSize += 1024 * 1024;
}
- m_pwsTextData = (FX_LPWSTR)FDE_Realloc(m_pwsTextData, m_iTextDataSize * sizeof(FX_WCHAR));
+ m_pwsTextData = (FX_WCHAR*)FDE_Realloc(m_pwsTextData, m_iTextDataSize * sizeof(FX_WCHAR));
}
void CFDE_XMLSyntaxParser::GetData(CFX_WideString &wsData) const
{
- FX_LPWSTR pBuf = wsData.GetBuffer(m_iTextDataLength);
+ FX_WCHAR* pBuf = wsData.GetBuffer(m_iTextDataLength);
FXSYS_memcpy(pBuf, m_pwsTextData, m_iTextDataLength * sizeof(FX_WCHAR));
wsData.ReleaseBuffer(m_iTextDataLength);
}
diff --git a/xfa/src/fdp/src/xml/fde_xml.h b/xfa/src/fdp/src/xml/fde_xml.h
index 9353561264..b158e0d80c 100644
--- a/xfa/src/fdp/src/xml/fde_xml.h
+++ b/xfa/src/fdp/src/xml/fde_xml.h
@@ -34,7 +34,7 @@ public:
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 CFDE_XMLNode* GetPath(const FX_WCHAR* 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();
@@ -71,14 +71,14 @@ public:
}
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 FX_BOOL HasAttribute(const FX_WCHAR* pwsAttriName) const;
+ virtual void GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue = NULL) const;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue);
- 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 int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const;
+ virtual void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue);
+ virtual FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const;
+ virtual void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue);
+ virtual void RemoveAttribute(const FX_WCHAR* pwsAttriName);
virtual int32_t CountData() const;
virtual FX_BOOL GetData(int32_t index, CFX_WideString &wsData) const;
virtual void AppendData(const CFX_WideString &wsData);
@@ -108,14 +108,14 @@ public:
virtual void GetNamespaceURI(CFX_WideString &wsNamespace) 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 FX_BOOL HasAttribute(const FX_WCHAR* pwsAttriName) const;
+ virtual void GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue = NULL) const;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue);
- 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 int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const;
+ virtual void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue);
+ virtual FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const;
+ virtual void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue);
+ virtual void RemoveAttribute(const FX_WCHAR* pwsAttriName);
virtual void GetTextData(CFX_WideString &wsText) const;
virtual void SetTextData(const CFX_WideString &wsText);
public:
@@ -276,7 +276,7 @@ public:
{
FDE_Delete this;
}
- FX_LPWSTR GetAvailableBlock(int32_t& iIndexInBlock);
+ FX_WCHAR* GetAvailableBlock(int32_t& iIndexInBlock);
inline int32_t GetAllocStep() const
{
return m_iAllocStep;
@@ -409,22 +409,22 @@ protected:
int32_t m_iLastNodeNum;
int32_t m_iParsedChars;
int32_t m_iParsedBytes;
- FX_LPWSTR m_pBuffer;
+ FX_WCHAR* m_pBuffer;
int32_t m_iBufferChars;
FX_BOOL m_bEOS;
- FX_LPWSTR m_pStart;
- FX_LPWSTR m_pEnd;
+ FX_WCHAR* m_pStart;
+ FX_WCHAR* m_pEnd;
FDE_XMLNODE m_CurNode;
CFDE_XMLNodeStack m_XMLNodeStack;
#ifdef _FDE_BLOCK_BUFFER
CFDE_BlockBuffer m_BlockBuffer;
int32_t m_iAllocStep;
int32_t& m_iDataLength;
- FX_LPWSTR m_pCurrentBlock;
+ FX_WCHAR* m_pCurrentBlock;
int32_t m_iIndexInBlock;
#else
int32_t m_iTextDataSize;
- FX_LPWSTR m_pwsTextData;
+ FX_WCHAR* m_pwsTextData;
int32_t m_iDataPos;
#endif
int32_t m_iTextDataLength;