diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-10 14:33:37 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-10 14:33:37 -0700 |
commit | d7e5cc754a937605d1f73db5e7967c58ddd80742 (patch) | |
tree | ed28e012c4d6a46b7f29f15a0c060474c27d4286 /xfa/src/fee | |
parent | bfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (diff) | |
download | pdfium-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/fee')
-rw-r--r-- | xfa/src/fee/include/ifde_txtedtbuf.h | 2 | ||||
-rw-r--r-- | xfa/src/fee/include/ifde_txtedtengine.h | 4 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtblock.cpp | 28 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtbuf.cpp | 8 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtbuf.h | 2 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtengine.cpp | 100 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtengine.h | 14 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtpage.cpp | 12 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtpage.h | 4 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtparag.h | 2 | ||||
-rw-r--r-- | xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp | 2 |
11 files changed, 89 insertions, 89 deletions
diff --git a/xfa/src/fee/include/ifde_txtedtbuf.h b/xfa/src/fee/include/ifde_txtedtbuf.h index 921b17a518..3aa24ffe69 100644 --- a/xfa/src/fee/include/ifde_txtedtbuf.h +++ b/xfa/src/fee/include/ifde_txtedtbuf.h @@ -21,7 +21,7 @@ public: virtual FX_WCHAR GetCharByIndex(int32_t nIndex) const = 0;
virtual void GetRange(CFX_WideString &wsText, int32_t nBegin, int32_t nCount = - 1) const = 0;
- virtual void Insert(int32_t nPos, FX_LPCWSTR lpText, int32_t nLength = 1) = 0;
+ virtual void Insert(int32_t nPos, const FX_WCHAR* lpText, int32_t nLength = 1) = 0;
virtual void Delete(int32_t nIndex, int32_t nLength = 1) = 0;
virtual void Clear(FX_BOOL bRelease = TRUE) = 0;
diff --git a/xfa/src/fee/include/ifde_txtedtengine.h b/xfa/src/fee/include/ifde_txtedtengine.h index 10f90881bd..4dcfa69cc8 100644 --- a/xfa/src/fee/include/ifde_txtedtengine.h +++ b/xfa/src/fee/include/ifde_txtedtengine.h @@ -16,7 +16,7 @@ class IFDE_TxtEdtParag; #define FDE_TXTEDT_FIND_FLAGS_WholeWord (1L << 1)
#define FDE_TXTEDT_FIND_FLAGS_NoCase (1L << 2)
typedef struct _FDE_HTXTEDTFIND {
- FX_LPVOID pData;
+ void* pData;
} * FDE_HTXTEDTFIND;
#define FDE_TEXTEDITMODE_MultiLines (1L << 0)
#define FDE_TEXTEDITMODE_AutoLineWrap (1L << 1)
@@ -192,7 +192,7 @@ public: virtual void Unlock() = 0;
virtual FX_BOOL IsLocked() const = 0;
- virtual int32_t Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength) = 0;
+ virtual int32_t Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength) = 0;
virtual int32_t Delete(int32_t nStart, FX_BOOL bBackspace = FALSE) = 0;
virtual int32_t DeleteRange(int32_t nStart, int32_t nCount = -1) = 0;
virtual int32_t Replace(int32_t nStart, int32_t nLength, const CFX_WideString &wsReplace) = 0;
diff --git a/xfa/src/fee/src/fee/fde_txtedtblock.cpp b/xfa/src/fee/src/fee/fde_txtedtblock.cpp index 2d71cd3a99..7b8ecf4f1f 100644 --- a/xfa/src/fee/src/fee/fde_txtedtblock.cpp +++ b/xfa/src/fee/src/fee/fde_txtedtblock.cpp @@ -18,7 +18,7 @@ CFDE_TxtEdtBlock::CFDE_TxtEdtBlock(CFDE_TxtEdtEngine * pEngine, const CFX_WideSt , m_nIndex(0)
, m_nPosition(nPosition)
{
- FX_LPCWSTR lpBuf = FX_LPCWSTR(wsBlock);
+ const FX_WCHAR* lpBuf = const FX_WCHAR*(wsBlock);
int32_t nCount = wsBlock.GetLength();
int32_t i = 0;
CFX_WideString wsFix;
@@ -166,7 +166,7 @@ CFDE_TxtEdtFieldFormatParser::~CFDE_TxtEdtFieldFormatParser() FX_BOOL CFDE_TxtEdtFieldFormatParser::Parse(const CFX_WideString &wsFormat)
{
m_wsFormat = wsFormat;
- FX_LPCWSTR pBuf = FX_LPCWSTR(m_wsFormat);
+ const FX_WCHAR* pBuf = const FX_WCHAR*(m_wsFormat);
int32_t nCount = m_wsFormat.GetLength();
nCount -= 2;
int32_t i = 0;
@@ -206,8 +206,8 @@ int32_t CFDE_TxtEdtFieldFormatParser::CountItems() const void CFDE_TxtEdtFieldFormatParser::GetItem(int32_t nIndex, CFX_WideString &wsKey, CFX_WideString &wsValue) const
{
FDE_LPTXTEDTFORMATITEM lpItem = m_ItemArr[nIndex];
- FX_LPCWSTR lpSrcBuf = FX_LPCWSTR(m_wsFormat);
- FX_LPWSTR lpDstBuf = wsKey.GetBuffer(lpItem->nKeyCount);
+ const FX_WCHAR* lpSrcBuf = const FX_WCHAR*(m_wsFormat);
+ FX_WCHAR* lpDstBuf = wsKey.GetBuffer(lpItem->nKeyCount);
FXSYS_memcpy(lpDstBuf, lpSrcBuf + lpItem->nKeyStart, lpItem->nKeyCount * sizeof(FX_WCHAR));
wsKey.ReleaseBuffer(lpItem->nKeyCount);
lpDstBuf = wsValue.GetBuffer(lpItem->nValCount);
@@ -300,8 +300,8 @@ int32_t CFDE_TxtEdtField::Delete(int32_t nIndex, int32_t nCount, default:
break;
}
- FX_LPWSTR lpBuf = wsDel.GetBuffer(nCount);
- FXSYS_memcpy(lpBuf, FX_LPCWSTR(m_wsField) + nInnerIndex, nCount * sizeof(FX_WCHAR));
+ FX_WCHAR* lpBuf = wsDel.GetBuffer(nCount);
+ FXSYS_memcpy(lpBuf, const FX_WCHAR*(m_wsField) + nInnerIndex, nCount * sizeof(FX_WCHAR));
wsDel.ReleaseBuffer(nCount);
m_wsField = wsTemp;
nCaret = nIndex + (m_bReserveSpace && !m_bLeftAlignment) ? nCount : 0;
@@ -336,8 +336,8 @@ int32_t CFDE_TxtEdtField::Replace(int32_t nIndex, int32_t nCount, const CFX_Wide default:
break;
}
- FX_LPWSTR lpBuffer = wsDel.GetBuffer(nCount);
- FX_LPCWSTR lpSrcBuf = FX_LPCWSTR(m_wsField);
+ FX_WCHAR* lpBuffer = wsDel.GetBuffer(nCount);
+ const FX_WCHAR* lpSrcBuf = const FX_WCHAR*(m_wsField);
FXSYS_memcpy(lpBuffer, lpSrcBuf + nInnerIndexBK, nCount * sizeof(FX_WCHAR));
wsDel.ReleaseBuffer(nCount);
m_wsField = wsTemp;
@@ -349,12 +349,12 @@ void CFDE_TxtEdtField::GetDisplayText(CFX_WideString &wsDisplay) CFX_WideString wsField;
GetNormalizedFieldText(wsField);
int32_t nLength = wsField.GetLength() + FDE_FORMAT_EDIT_FIELD_HADERSIZE + FDE_FORMAT_EDIT_FIELD_TAILSIZE;
- FX_LPWSTR lpBuffer = wsDisplay.GetBuffer(nLength);
+ FX_WCHAR* lpBuffer = wsDisplay.GetBuffer(nLength);
lpBuffer[0] = FDE_TXTEDT_FORMATBLOCK_BGN;
lpBuffer[nLength - 1] = FDE_TXTEDT_FORMATBLOCK_END;
FX_DWORD nAddress = (FX_DWORD)this;
FXSYS_memcpy(lpBuffer + 1, &nAddress, sizeof(FX_DWORD));
- FXSYS_memcpy(lpBuffer + 3, FX_LPCWSTR(wsField), (nLength - 4) * sizeof(FX_WCHAR));
+ FXSYS_memcpy(lpBuffer + 3, const FX_WCHAR*(wsField), (nLength - 4) * sizeof(FX_WCHAR));
wsDisplay.ReleaseBuffer(nLength);
}
int32_t CFDE_TxtEdtField::GetDisplayLength()
@@ -548,7 +548,7 @@ int32_t CFDE_TxtEdtField_Float::Validate(const CFX_WideString & wsText) const if (m_nLength != -1 && (nLength > m_nLength)) {
return FDE_FORMAT_FIELD_VALIDATE_F_FULL;
}
- FX_LPCWSTR lpBuf = FX_LPCWSTR(wsText);
+ const FX_WCHAR* lpBuf = const FX_WCHAR*(wsText);
int32_t i = 0;
if (m_bSigned) {
FX_WCHAR wcTemp = lpBuf[0];
@@ -613,7 +613,7 @@ void CFDE_TxtEdtField_Password::GetNormalizedFieldText(CFX_WideString &wsField) {
int32_t nFiledLength = m_wsField.GetLength();
int32_t nLength = m_bReserveSpace ? m_nLength : nFiledLength;
- FX_LPWSTR lpBuf = wsField.GetBuffer(nLength);
+ FX_WCHAR* lpBuf = wsField.GetBuffer(nLength);
int32_t nSpaceLength = nLength - nFiledLength;
int32_t nFirstPart = m_bLeftAlignment ? nFiledLength : nSpaceLength;
FX_WCHAR wFirstChar = m_bLeftAlignment ? m_wcAlias : L' ';
@@ -655,12 +655,12 @@ CFDE_TxtEdtField_Fixed::CFDE_TxtEdtField_Fixed(const CFX_WideString &wsField, in void CFDE_TxtEdtField_Fixed::GetDisplayText(CFX_WideString &wsDisplay)
{
int32_t nLength = m_wsField.GetLength() + FDE_FORMAT_EDIT_FIELD_HADERSIZE + FDE_FORMAT_EDIT_FIELD_TAILSIZE;
- FX_LPWSTR lpBuffer = wsDisplay.GetBuffer(nLength);
+ FX_WCHAR* lpBuffer = wsDisplay.GetBuffer(nLength);
lpBuffer[0] = FDE_TXTEDT_FORMATBLOCK_BGN;
lpBuffer[nLength - 1] = FDE_TXTEDT_FORMATBLOCK_END;
FX_DWORD nAddress = (FX_DWORD)this;
FXSYS_memcpy(lpBuffer + 1, &nAddress, sizeof(FX_DWORD));
- FXSYS_memcpy(lpBuffer + 3, FX_LPCWSTR(m_wsField), (nLength - 4) * sizeof(FX_WCHAR));
+ FXSYS_memcpy(lpBuffer + 3, const FX_WCHAR*(m_wsField), (nLength - 4) * sizeof(FX_WCHAR));
wsDisplay.ReleaseBuffer(nLength);
}
int32_t CFDE_TxtEdtField_Fixed::NormalizeCaretPos(int32_t nIndex, FDE_FORMAT_CARET_DIRECTION eDirection ) const
diff --git a/xfa/src/fee/src/fee/fde_txtedtbuf.cpp b/xfa/src/fee/src/fee/fde_txtedtbuf.cpp index 1b2c01d3da..b1d3927c8a 100644 --- a/xfa/src/fee/src/fee/fde_txtedtbuf.cpp +++ b/xfa/src/fee/src/fee/fde_txtedtbuf.cpp @@ -190,7 +190,7 @@ void CFDE_TxtEdtBuf::SetText(const CFX_WideString &wsText) m_Chunks.Add(lpChunk);
}
int32_t nTotalCount = m_Chunks.GetSize();
- FX_LPCWSTR lpSrcBuf = FX_LPCWSTR(wsText);
+ const FX_WCHAR* lpSrcBuf = wsText.c_str();
int32_t nLeave = nTextLength;
int32_t nCopyedLength = m_nChunkSize;
for (i = 0; i < nTotalCount && nLeave > 0; i ++) {
@@ -233,11 +233,11 @@ void CFDE_TxtEdtBuf::GetRange(CFX_WideString &wsText, int32_t nBegin, int32_t nL Index2CP(nBegin, cp);
int32_t nLeave = nLength;
int32_t nCount = m_Chunks.GetSize();
- FX_LPWSTR lpDstBuf = wsText.GetBuffer(nLength);
+ FX_WCHAR* lpDstBuf = wsText.GetBuffer(nLength);
int32_t nChunkIndex = cp.nChunkIndex;
FDE_LPCHUNKHEADER lpChunkHeader = (FDE_LPCHUNKHEADER)m_Chunks[nChunkIndex];
int32_t nCopyLength = lpChunkHeader->nUsed - cp.nCharIndex;
- FX_LPWSTR lpSrcBuf = lpChunkHeader->wChars + cp.nCharIndex;
+ FX_WCHAR* lpSrcBuf = lpChunkHeader->wChars + cp.nCharIndex;
while (nLeave > 0) {
if (nLeave <= nCopyLength) {
nCopyLength = nLeave;
@@ -255,7 +255,7 @@ void CFDE_TxtEdtBuf::GetRange(CFX_WideString &wsText, int32_t nBegin, int32_t nL }
wsText.ReleaseBuffer();
}
-void CFDE_TxtEdtBuf::Insert(int32_t nPos, FX_LPCWSTR lpText, int32_t nLength )
+void CFDE_TxtEdtBuf::Insert(int32_t nPos, const FX_WCHAR* lpText, int32_t nLength )
{
FXSYS_assert(nPos >= 0 && nPos <= m_nTotal);
FDE_CHUNKPLACE cp;
diff --git a/xfa/src/fee/src/fee/fde_txtedtbuf.h b/xfa/src/fee/src/fee/fde_txtedtbuf.h index 9e54a0d2f3..67e3cae942 100644 --- a/xfa/src/fee/src/fee/fde_txtedtbuf.h +++ b/xfa/src/fee/src/fee/fde_txtedtbuf.h @@ -67,7 +67,7 @@ public: virtual FX_WCHAR GetCharByIndex(int32_t nIndex) const;
virtual void GetRange(CFX_WideString &wsText, int32_t nBegine, int32_t nCount = -1) const;
- virtual void Insert(int32_t nPos, FX_LPCWSTR lpText, int32_t nLength = 1);
+ virtual void Insert(int32_t nPos, const FX_WCHAR* lpText, int32_t nLength = 1);
virtual void Delete(int32_t nIndex, int32_t nLength = 1);
virtual void Clear(FX_BOOL bRelease = TRUE);
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.cpp b/xfa/src/fee/src/fee/fde_txtedtengine.cpp index 78486835ac..9546a2b270 100644 --- a/xfa/src/fee/src/fee/fde_txtedtengine.cpp +++ b/xfa/src/fee/src/fee/fde_txtedtengine.cpp @@ -135,7 +135,7 @@ void CFDE_TxtEdtEngine::SetTextByStream(IFX_Stream *pStream) pStream->Seek(FX_STREAMSEEK_Begin, nPos);
int32_t bEos = FALSE;
int32_t nPlateSize = FX_MIN(nStreamLength, m_pTxtBuf->GetChunkSize());
- FX_LPWSTR lpwstr = (FX_LPWSTR)FDE_Alloc(nPlateSize * sizeof(FX_WCHAR));
+ FX_WCHAR* lpwstr = (FX_WCHAR*)FDE_Alloc(nPlateSize * sizeof(FX_WCHAR));
FXSYS_assert(lpwstr);
int32_t nRead = 0;
while (!bEos) {
@@ -156,8 +156,8 @@ void CFDE_TxtEdtEngine::SetText(const CFX_WideString &wsText) int32_t nLength = wsText.GetLength();
if (nLength > 0) {
CFX_WideString wsTemp;
- FX_LPWSTR lpBuffer = wsTemp.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, FX_LPCWSTR(wsText), nLength * sizeof(FX_WCHAR));
+ FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nLength);
+ FXSYS_memcpy(lpBuffer, wsText.c_str(), nLength * sizeof(FX_WCHAR));
ReplaceParagEnd(lpBuffer, nLength, FALSE);
wsTemp.ReleaseBuffer(nLength);
if (m_nLimit > 0 && nLength > m_nLimit) {
@@ -186,8 +186,8 @@ void CFDE_TxtEdtEngine::GetText(CFX_WideString &wsText, int32_t nStart, int32_t return;
}
CFX_WideString wsTemp;
- FX_LPCWSTR lpFixBuffer = FX_LPCWSTR(m_wsFixText);
- FX_LPWSTR lpBuffer = wsTemp.GetBuffer(nTextBufLength);
+ const FX_WCHAR* lpFixBuffer = const FX_WCHAR*(m_wsFixText);
+ FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nTextBufLength);
int32_t nRealLength = 0;
int32_t nPrePos = 0;
for (int32_t i = 0; i < nBlockCount; i ++) {
@@ -200,7 +200,7 @@ void CFDE_TxtEdtEngine::GetText(CFX_WideString &wsText, int32_t nStart, int32_t CFX_WideString wsBlock;
pBlock->GetRealText(wsBlock);
nCopyLength = wsBlock.GetLength();
- FXSYS_memcpy(lpBuffer + nRealLength, FX_LPCWSTR(wsBlock), nCopyLength * sizeof(FX_WCHAR));
+ FXSYS_memcpy(lpBuffer + nRealLength, const FX_WCHAR*(wsBlock), nCopyLength * sizeof(FX_WCHAR));
nRealLength += nCopyLength;
}
int32_t nLeftLength = m_wsFixText.GetLength() - nPrePos;
@@ -212,8 +212,8 @@ void CFDE_TxtEdtEngine::GetText(CFX_WideString &wsText, int32_t nStart, int32_t int32_t nRealBgn = GetRealIndex(nStart);
int32_t nRealEnd = GetRealIndex(nStart + nCount - 1);
int32_t nRealCount = nRealEnd - nRealBgn;
- FX_LPWSTR lpDestBuf = wsText.GetBuffer(nRealCount);
- FXSYS_memcpy(lpDestBuf, FX_LPCWSTR(wsTemp) + nRealBgn, nRealCount * sizeof(FX_WCHAR));
+ FX_WCHAR* lpDestBuf = wsText.GetBuffer(nRealCount);
+ FXSYS_memcpy(lpDestBuf, const FX_WCHAR*(wsTemp) + nRealBgn, nRealCount * sizeof(FX_WCHAR));
wsText.ReleaseBuffer();
#else
m_pTxtBuf->GetRange(wsText, nStart, nCount);
@@ -427,7 +427,7 @@ FX_BOOL CFDE_TxtEdtEngine::IsLocked() const {
return m_bLock;
}
-int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength)
+int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength)
{
if (IsLocked()) {
return FDE_TXTEDT_MODIFY_RET_F_Locked;
@@ -482,7 +482,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe pField->GetDisplayText(wsDisplay);
if ((m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Vert) || (m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Horz)) {
CFX_WideString wsText;
- GetPreReplaceText(wsText, nBgn, nEnd - nBgn + 1, FX_LPCWSTR(wsDisplay), wsDisplay.GetLength());
+ GetPreReplaceText(wsText, nBgn, nEnd - nBgn + 1, const FX_WCHAR*(wsDisplay), wsDisplay.GetLength());
if (!IsFitArea(wsText)) {
pField->Restore();
return FDE_TXTEDT_MODIFY_RET_F_Full;
@@ -537,7 +537,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe pField->GetDisplayText(wsDisplay);
if ((m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Vert) || (m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Horz)) {
CFX_WideString wsText;
- GetPreReplaceText(wsText, nBgn, nEnd - nBgn + 1, FX_LPCWSTR(wsDisplay), wsDisplay.GetLength());
+ GetPreReplaceText(wsText, nBgn, nEnd - nBgn + 1, const FX_WCHAR*(wsDisplay), wsDisplay.GetLength());
if (!IsFitArea(wsText)) {
pField->Restore();
return FDE_TXTEDT_MODIFY_RET_F_Full;
@@ -568,7 +568,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe }
#endif
CFX_WideString wsTemp;
- FX_LPWSTR lpBuffer = wsTemp.GetBuffer(nLength);
+ FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nLength);
FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(FX_WCHAR));
ReplaceParagEnd(lpBuffer, nLength, FALSE);
wsTemp.ReleaseBuffer(nLength);
@@ -597,7 +597,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe while (nLength > 0) {
GetPreInsertText(wsText, m_nCaret, lpBuffer, nLength);
int32_t nTotal = wsText.GetLength();
- FX_LPWSTR lpBuf = wsText.GetBuffer(nTotal);
+ FX_WCHAR* lpBuf = wsText.GetBuffer(nTotal);
for (int32_t i = 0; i < nTotal; i ++) {
lpBuf[i] = m_wcAliasChar;
}
@@ -795,7 +795,7 @@ int32_t CFDE_TxtEdtEngine::Replace(int32_t nStart, int32_t nLength, const CFX_Wi }
if (m_Param.dwMode & FDE_TEXTEDITMODE_Validate) {
CFX_WideString wsText;
- GetPreReplaceText(wsText, nStart, nLength, FX_LPCWSTR(wsReplace), wsReplace.GetLength());
+ GetPreReplaceText(wsText, nStart, nLength, wsReplace.c_str(), wsReplace.GetLength());
if (!m_Param.pEventSink->On_Validate(this, wsText)) {
return FDE_TXTEDT_MODIFY_RET_F_Invalidate;
}
@@ -810,9 +810,9 @@ int32_t CFDE_TxtEdtEngine::Replace(int32_t nStart, int32_t nLength, const CFX_Wi }
int32_t nTextLength = wsReplace.GetLength();
if (nTextLength > 0) {
- Inner_Insert(nStart, FX_LPCWSTR(wsReplace), nTextLength);
+ Inner_Insert(nStart, wsReplace.c_str(), nTextLength);
}
- m_ChangeInfo.wsInsert = CFX_WideString(FX_LPCWSTR(wsReplace), nTextLength);
+ m_ChangeInfo.wsInsert = CFX_WideString(wsReplace.c_str(), nTextLength);
nStart += nTextLength;
FX_WCHAR wChar = m_pTxtBuf->GetCharByIndex(nStart - 1);
FX_BOOL bBefore = TRUE;
@@ -877,7 +877,7 @@ void CFDE_TxtEdtEngine::SetFormatBlock(int32_t nIndex, const CFX_WideString &wsB pEditBlock->GetDisplayText(wsDisplay);
m_nCaret = nBlockPos;
if (wsDisplay.GetLength() > 0) {
- RawInsert(nBlockPos, FX_LPCWSTR(wsDisplay), wsDisplay.GetLength());
+ RawInsert(nBlockPos, const FX_WCHAR*(wsDisplay), wsDisplay.GetLength());
}
#endif
}
@@ -1167,7 +1167,7 @@ void CFDE_TxtEdtEngine::GetPreDeleteText(CFX_WideString &wsText, int32_t nIndex, GetText(wsText, 0, GetTextBufLength());
wsText.Delete(nIndex, nLength);
}
-void CFDE_TxtEdtEngine::GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, FX_LPCWSTR lpText, int32_t nLength)
+void CFDE_TxtEdtEngine::GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, const FX_WCHAR* lpText, int32_t nLength)
{
GetText(wsText, 0, GetTextBufLength());
int32_t nSelIndex = 0;
@@ -1180,15 +1180,15 @@ void CFDE_TxtEdtEngine::GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, }
CFX_WideString wsTemp;
int32_t nOldLength = wsText.GetLength();
- FX_LPCWSTR pOldBuffer = FX_LPCWSTR(wsText);
- FX_LPWSTR lpBuffer = wsTemp.GetBuffer(nOldLength + nLength);
+ const FX_WCHAR* pOldBuffer = wsText.c_str();
+ FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nOldLength + nLength);
FXSYS_memcpy(lpBuffer, pOldBuffer, (nIndex) * sizeof(FX_WCHAR));
FXSYS_memcpy(lpBuffer + nIndex, lpText, nLength * sizeof(FX_WCHAR));
FXSYS_memcpy(lpBuffer + nIndex + nLength, pOldBuffer + nIndex, (nOldLength - nIndex) * sizeof(FX_WCHAR));
wsTemp.ReleaseBuffer(nOldLength + nLength);
wsText = wsTemp;
}
-void CFDE_TxtEdtEngine::GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex, int32_t nOriginLength, FX_LPCWSTR lpText, int32_t nLength)
+void CFDE_TxtEdtEngine::GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex, int32_t nOriginLength, const FX_WCHAR* lpText, int32_t nLength)
{
GetText(wsText, 0, GetTextBufLength());
int32_t nSelIndex = 0;
@@ -1204,7 +1204,7 @@ void CFDE_TxtEdtEngine::GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex wsText.Insert(nIndex ++, lpText[i]);
}
}
-void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength)
+void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength)
{
FXSYS_assert(nLength > 0);
FDE_TXTEDTPARAGPOS ParagPos;
@@ -1222,7 +1222,7 @@ void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t int32_t nCutPart = pParag->m_nCharCount - ParagPos.nCharIndex;
int32_t nTextStart = 0;
FX_WCHAR wCurChar = L' ';
- FX_LPCWSTR lpPos = lpText;
+ const FX_WCHAR* lpPos = lpText;
FX_BOOL bFirst = TRUE;
int32_t nParagIndex = ParagPos.nParagIndex;
for (i = 0; i < nLength; i ++, lpPos ++) {
@@ -1267,7 +1267,7 @@ void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t UpdatePages();
}
#ifdef FDE_USEFORMATBLOCK
-void CFDE_TxtEdtEngine::RawInsert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength)
+void CFDE_TxtEdtEngine::RawInsert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength)
{
FXSYS_assert(nLength > 0);
FDE_TXTEDTPARAGPOS ParagPos;
@@ -1284,7 +1284,7 @@ void CFDE_TxtEdtEngine::RawInsert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe int32_t nCutPart = pParag->m_nCharCount - ParagPos.nCharIndex;
int32_t nTextStart = 0;
FX_WCHAR wCurChar = L' ';
- FX_LPCWSTR lpPos = lpText;
+ const FX_WCHAR* lpPos = lpText;
FX_BOOL bFirst = TRUE;
int32_t nParagIndex = ParagPos.nParagIndex;
for (i = 0; i < nLength; i ++, lpPos ++) {
@@ -1605,7 +1605,7 @@ void CFDE_TxtEdtEngine::UpdateTxtBreak() m_pTextBreak->SetHorizontalScale(m_Param.nHorzScale);
m_pTextBreak->SetCharSpace(m_Param.fCharSpace);
}
-FX_BOOL CFDE_TxtEdtEngine::ReplaceParagEnd(FX_LPWSTR &lpText, int32_t &nLength, FX_BOOL bPreIsCR )
+FX_BOOL CFDE_TxtEdtEngine::ReplaceParagEnd(FX_WCHAR* &lpText, int32_t &nLength, FX_BOOL bPreIsCR )
{
for (int32_t i = 0; i < nLength; i ++) {
FX_WCHAR wc = lpText[i];
@@ -1656,17 +1656,17 @@ void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString &wsText) CFX_ArrayTemplate<int32_t> PosArr;
int32_t nLength = wsText.GetLength();
int32_t i = 0;
- FX_LPWSTR lpPos = (FX_LPWSTR)(FX_LPCWSTR)wsText;
+ FX_WCHAR* lpPos = (FX_WCHAR*)(const FX_WCHAR*)wsText;
for (i = 0; i < nLength; i ++, lpPos ++) {
if (*lpPos == m_wLineEnd) {
*lpPos = wc;
PosArr.Add(i);
}
}
- FX_LPCWSTR lpSrcBuf = FX_LPCWSTR(wsText);
+ const FX_WCHAR* lpSrcBuf = wsText.c_str();
CFX_WideString wsTemp;
int32_t nCount = PosArr.GetSize();
- FX_LPWSTR lpDstBuf = wsTemp.GetBuffer(nLength + nCount);
+ FX_WCHAR* lpDstBuf = wsTemp.GetBuffer(nLength + nCount);
int32_t nDstPos = 0;
int32_t nSrcPos = 0;
for (i = 0; i < nCount; i ++) {
@@ -1685,7 +1685,7 @@ void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString &wsText) wsText = wsTemp;
} else {
int32_t nLength = wsText.GetLength();
- FX_LPWSTR lpBuf = (FX_LPWSTR)(FX_LPCWSTR)wsText;
+ FX_WCHAR* lpBuf = (FX_WCHAR*)(const FX_WCHAR*)wsText;
for (int32_t i = 0; i < nLength; i ++, lpBuf++) {
if (*lpBuf == m_wLineEnd) {
*lpBuf = wc;
@@ -2398,7 +2398,7 @@ void CFDE_TxtEdtEngine::DeleteSelect() }
IFDE_TxtEdtDoRecord * IFDE_TxtEdtDoRecord::Create(FX_BSTR bsDoRecord)
{
- FX_LPCSTR lpBuf = bsDoRecord.GetCStr();
+ const FX_CHAR* lpBuf = bsDoRecord.GetCStr();
int32_t nType = *((int32_t*)lpBuf);
switch(nType) {
case FDE_TXTEDT_DORECORD_INS:
@@ -2424,13 +2424,13 @@ CFDE_TxtEdtDoRecord_Insert::CFDE_TxtEdtDoRecord_Insert(FX_BSTR bsDoRecord) }
CFDE_TxtEdtDoRecord_Insert::CFDE_TxtEdtDoRecord_Insert(CFDE_TxtEdtEngine * pEngine,
int32_t nCaret,
- FX_LPCWSTR lpText,
+ const FX_WCHAR* lpText,
int32_t nLength)
: m_pEngine(pEngine)
, m_nCaret(nCaret)
{
FXSYS_assert(pEngine);
- FX_LPWSTR lpBuffer = m_wsInsert.GetBuffer(nLength);
+ FX_WCHAR* lpBuffer = m_wsInsert.GetBuffer(nLength);
FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(FX_WCHAR));
m_wsInsert.ReleaseBuffer();
}
@@ -2456,7 +2456,7 @@ FX_BOOL CFDE_TxtEdtDoRecord_Insert::Undo() }
FX_BOOL CFDE_TxtEdtDoRecord_Insert::Redo()
{
- m_pEngine->Inner_Insert(m_nCaret, FX_LPCWSTR(m_wsInsert), m_wsInsert.GetLength());
+ m_pEngine->Inner_Insert(m_nCaret, m_wsInsert.c_str(), m_wsInsert.GetLength());
FDE_TXTEDTPARAMS& Param = m_pEngine->m_Param;
m_pEngine->m_ChangeInfo.nChangeType = FDE_TXTEDT_TEXTCHANGE_TYPE_Insert;
m_pEngine->m_ChangeInfo.wsDelete = m_wsInsert;
@@ -2472,14 +2472,14 @@ void CFDE_TxtEdtDoRecord_Insert::Serialize(CFX_ByteString &bsDoRecord) const ArchiveSaver << m_nCaret;
ArchiveSaver << m_wsInsert;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_Insert::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_INS);
@@ -2518,7 +2518,7 @@ FX_BOOL CFDE_TxtEdtDoRecord_DeleteRange::Undo() if (m_pEngine->IsSelect()) {
m_pEngine->ClearSelection();
}
- m_pEngine->Inner_Insert(m_nIndex, FX_LPCWSTR(m_wsRange), m_wsRange.GetLength());
+ m_pEngine->Inner_Insert(m_nIndex, m_wsRange.c_str(), m_wsRange.GetLength());
if (m_bSel) {
m_pEngine->AddSelRange(m_nIndex, m_wsRange.GetLength());
}
@@ -2552,14 +2552,14 @@ void CFDE_TxtEdtDoRecord_DeleteRange::Serialize(CFX_ByteString &bsDoRecord) cons ArchiveSaver << m_nCaret;
ArchiveSaver << m_wsRange;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_DeleteRange::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_DEL);
@@ -2644,14 +2644,14 @@ void CFDE_TxtEdtDoRecord_FieldInsert::Serialize(CFX_ByteString &bsDoRecord) cons ArchiveSaver << m_wsIns;
ArchiveSaver << m_bSel;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_FieldInsert::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_FORMATINS);
@@ -2741,14 +2741,14 @@ void CFDE_TxtEdtDoRecord_FieldDelete::Serialize(CFX_ByteString &bsDoRecord) cons ArchiveSaver << m_wsDel;
ArchiveSaver << m_bSel;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_FieldDelete::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_FORMATDEL);
@@ -2842,14 +2842,14 @@ void CFDE_TxtEdtDoRecord_FieldReplace::Serialize(CFX_ByteString &bsDoRecord) con ArchiveSaver << m_wsIns;
ArchiveSaver << m_bSel;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_FieldReplace::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_FORMATREP);
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.h b/xfa/src/fee/src/fee/fde_txtedtengine.h index 43a98fa7db..9b555131f6 100644 --- a/xfa/src/fee/src/fee/fde_txtedtengine.h +++ b/xfa/src/fee/src/fee/fde_txtedtengine.h @@ -83,7 +83,7 @@ public: virtual void Unlock();
virtual FX_BOOL IsLocked() const;
- virtual int32_t Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength);
+ virtual int32_t Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength);
virtual int32_t Delete(int32_t nStart, FX_BOOL bBackspace = FALSE);
virtual int32_t DeleteRange(int32_t nStart, int32_t nCount = -1);
virtual int32_t Replace(int32_t nStart, int32_t nLength, const CFX_WideString &wsReplace);
@@ -132,13 +132,13 @@ public: protected:
virtual ~CFDE_TxtEdtEngine();
private:
- void Inner_Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength);
+ void Inner_Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength);
#ifdef FDE_USEFORMATBLOCK
- void RawInsert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength);
+ void RawInsert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength);
#endif
void GetPreDeleteText(CFX_WideString &wsText, int32_t nIndex, int32_t nLength);
- void GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, FX_LPCWSTR lpText, int32_t nLength);
- void GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex, int32_t nOriginLength, FX_LPCWSTR lpText, int32_t nLength);
+ void GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, const FX_WCHAR* lpText, int32_t nLength);
+ void GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex, int32_t nOriginLength, const FX_WCHAR* lpText, int32_t nLength);
void Inner_DeleteRange(int32_t nStart, int32_t nCount = -1);
void DeleteRange_DoRecord(int32_t nStart, int32_t nCount, FX_BOOL bSel = FALSE);
@@ -150,7 +150,7 @@ private: void UpdatePages();
void UpdateTxtBreak();
- FX_BOOL ReplaceParagEnd(FX_LPWSTR &lpText, int32_t &nLength, FX_BOOL bPreIsCR = FALSE);
+ FX_BOOL ReplaceParagEnd(FX_WCHAR* &lpText, int32_t &nLength, FX_BOOL bPreIsCR = FALSE);
void RecoverParagEnd(CFX_WideString &wsText);
int32_t MovePage2Char(int32_t nIndex);
void TextPos2ParagPos(int32_t nIndex, FDE_TXTEDTPARAGPOS &ParagPos) const;
@@ -203,7 +203,7 @@ public: CFDE_TxtEdtDoRecord_Insert(FX_BSTR bsDoRecord);
CFDE_TxtEdtDoRecord_Insert( CFDE_TxtEdtEngine * pEngine,
int32_t nCaret,
- FX_LPCWSTR lpText,
+ const FX_WCHAR* lpText,
int32_t nLength);
virtual void Release();
virtual FX_BOOL Undo();
diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.cpp b/xfa/src/fee/src/fee/fde_txtedtpage.cpp index 30b4d1bf3e..894245d615 100644 --- a/xfa/src/fee/src/fee/fde_txtedtpage.cpp +++ b/xfa/src/fee/src/fee/fde_txtedtpage.cpp @@ -49,9 +49,9 @@ FX_BOOL CFDE_TxtEdtTextSet::GetClip(FDE_HVISUALOBJ hVisualObj, CFX_RectF &rt) int32_t CFDE_TxtEdtTextSet::GetString(FDE_HVISUALOBJ hText, CFX_WideString &wsText)
{
FDE_LPTEXTEDITPIECE pPiece = (FDE_LPTEXTEDITPIECE)hText;
- FX_LPWSTR pBuffer = wsText.GetBuffer(pPiece->nCount);
+ FX_WCHAR* pBuffer = wsText.GetBuffer(pPiece->nCount);
for (int32_t i = 0; i < pPiece->nCount; i++) {
- pBuffer[i] = m_pPage->GetChar((FX_LPVOID)hText, i);
+ pBuffer[i] = m_pPage->GetChar((void*)hText, i);
}
wsText.ReleaseBuffer(pPiece->nCount);
return pPiece->nCount;
@@ -84,7 +84,7 @@ int32_t CFDE_TxtEdtTextSet::GetDisplayPos(FDE_HVISUALOBJ hText, FXTEXT_CHARPOS * FX_DWORD dwLayoutStyle = pBreak->GetLayoutStyles();
FX_TXTRUN tr;
tr.pAccess = m_pPage;
- tr.pIdentity = (FX_LPVOID)hText;
+ tr.pIdentity = (void*)hText;
tr.pStr = NULL;
tr.pWidths = NULL;
tr.iLength = nLength;
@@ -116,7 +116,7 @@ int32_t CFDE_TxtEdtTextSet::GetCharRects_Impl(FDE_HVISUALOBJ hText, CFX_RectFArr FX_DWORD dwLayoutStyle = pEngine->GetTextBreak()->GetLayoutStyles();
FX_TXTRUN tr;
tr.pAccess = m_pPage;
- tr.pIdentity = (FX_LPVOID)hText;
+ tr.pIdentity = (void*)hText;
tr.pStr = NULL;
tr.pWidths = NULL;
tr.iLength = nLength;
@@ -614,7 +614,7 @@ FDE_HVISUALOBJ CFDE_TxtEdtPage::GetParentCanvas(FDE_HVISUALOBJ hCanvas, IFDE_Vis {
return NULL;
}
-FX_WCHAR CFDE_TxtEdtPage::GetChar(FX_LPVOID pIdentity, int32_t index) const
+FX_WCHAR CFDE_TxtEdtPage::GetChar(void* pIdentity, int32_t index) const
{
int32_t nIndex = m_nPageStart + ((FDE_LPTEXTEDITPIECE)pIdentity)->nStart + index;
if (nIndex != m_pIter->GetAt()) {
@@ -624,7 +624,7 @@ FX_WCHAR CFDE_TxtEdtPage::GetChar(FX_LPVOID pIdentity, int32_t index) const m_pIter->Next();
return wChar;
}
-int32_t CFDE_TxtEdtPage::GetWidth(FX_LPVOID pIdentity, int32_t index) const
+int32_t CFDE_TxtEdtPage::GetWidth(void* pIdentity, int32_t index) const
{
int32_t nWidth = m_pCharWidth[((FDE_LPTEXTEDITPIECE)pIdentity)->nStart + index];
return nWidth;
diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.h b/xfa/src/fee/src/fee/fde_txtedtpage.h index b2854d4afb..1f5cae2153 100644 --- a/xfa/src/fee/src/fee/fde_txtedtpage.h +++ b/xfa/src/fee/src/fee/fde_txtedtpage.h @@ -102,8 +102,8 @@ public: virtual FX_POSITION GetFirstPosition(FDE_HVISUALOBJ hCanvas);
virtual FDE_HVISUALOBJ GetNext(FDE_HVISUALOBJ hCanvas, FX_POSITION &pos, IFDE_VisualSet *&pVisualSet);
virtual FDE_HVISUALOBJ GetParentCanvas(FDE_HVISUALOBJ hCanvas, IFDE_VisualSet *&pVisualSet);
- virtual FX_WCHAR GetChar(FX_LPVOID pIdentity, int32_t index) const;
- virtual int32_t GetWidth(FX_LPVOID pIdentity, int32_t index) const;
+ virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const;
+ virtual int32_t GetWidth(void* pIdentity, int32_t index) const;
protected:
virtual ~CFDE_TxtEdtPage();
private:
diff --git a/xfa/src/fee/src/fee/fde_txtedtparag.h b/xfa/src/fee/src/fee/fde_txtedtparag.h index aca5d8febc..934dd5405d 100644 --- a/xfa/src/fee/src/fee/fde_txtedtparag.h +++ b/xfa/src/fee/src/fee/fde_txtedtparag.h @@ -33,7 +33,7 @@ public: int32_t m_nCharCount;
int32_t m_nLineCount;
private:
- FX_LPVOID m_lpData;
+ void* m_lpData;
CFDE_TxtEdtEngine* m_pEngine;
};
#endif
diff --git a/xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp b/xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp index ff8dafcf0f..1fad023bbf 100644 --- a/xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp +++ b/xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp @@ -144,7 +144,7 @@ void CFX_WordBreak::GetWord(CFX_WideString &wsWord) const if (nWordLength <= 0) {
return;
}
- FX_LPWSTR lpBuf = wsWord.GetBuffer(nWordLength);
+ FX_WCHAR* lpBuf = wsWord.GetBuffer(nWordLength);
IFX_CharIter * pTempIter = m_pPreIter->Clone();
int32_t i = 0;
while (pTempIter->GetAt() <= m_pCurIter->GetAt()) {
|