summaryrefslogtreecommitdiff
path: root/xfa/fde
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-03 15:05:11 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-03 20:39:56 +0000
commit1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca (patch)
tree315955cce6b29093dcddfc48c0811957a172bedf /xfa/fde
parent2ae80f52cec81c080515724f99deb06b2fee3cc9 (diff)
downloadpdfium-1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca.tar.xz
Drop FXSYS_ from mem methods
This Cl drops the FXSYS_ from mem methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I9d5ae905997dbaaec5aa0b2ae4c07358ed9c6236 Reviewed-on: https://pdfium-review.googlesource.com/3613 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde')
-rw-r--r--xfa/fde/cfde_txtedtbuf.cpp20
-rw-r--r--xfa/fde/cfde_txtedtdorecord_insert.cpp2
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp24
-rw-r--r--xfa/fde/cfde_txtedtpage.cpp4
-rw-r--r--xfa/fde/css/cfde_csstextbuf.cpp2
-rw-r--r--xfa/fde/xml/fde_xml_imp.cpp4
6 files changed, 27 insertions, 29 deletions
diff --git a/xfa/fde/cfde_txtedtbuf.cpp b/xfa/fde/cfde_txtedtbuf.cpp
index ba9f5cdca0..dc88704a6c 100644
--- a/xfa/fde/cfde_txtedtbuf.cpp
+++ b/xfa/fde/cfde_txtedtbuf.cpp
@@ -53,8 +53,7 @@ void CFDE_TxtEdtBuf::SetText(const CFX_WideString& wsText) {
}
ChunkHeader* chunk = m_chunks[i].get();
- FXSYS_memcpy(chunk->wChars.get(), lpSrcBuf,
- nCopyedLength * sizeof(wchar_t));
+ memcpy(chunk->wChars.get(), lpSrcBuf, nCopyedLength * sizeof(wchar_t));
nLeave -= nCopyedLength;
lpSrcBuf += nCopyedLength;
chunk->nUsed = nCopyedLength;
@@ -108,7 +107,7 @@ CFX_WideString CFDE_TxtEdtBuf::GetRange(int32_t nBegin, int32_t nLength) const {
if (nLeave <= nCopyLength) {
nCopyLength = nLeave;
}
- FXSYS_memcpy(lpDstBuf, lpSrcBuf, nCopyLength * sizeof(wchar_t));
+ memcpy(lpDstBuf, lpSrcBuf, nCopyLength * sizeof(wchar_t));
nChunkIndex++;
if (nChunkIndex >= nCount) {
break;
@@ -141,8 +140,8 @@ void CFDE_TxtEdtBuf::Insert(int32_t nPos,
ChunkHeader* chunk = m_chunks[chunkIndex].get();
int32_t nCopy = chunk->nUsed - charIndex;
- FXSYS_memcpy(newChunk->wChars.get(), chunk->wChars.get() + charIndex,
- nCopy * sizeof(wchar_t));
+ memcpy(newChunk->wChars.get(), chunk->wChars.get() + charIndex,
+ nCopy * sizeof(wchar_t));
chunk->nUsed -= nCopy;
chunkIndex++;
@@ -157,8 +156,8 @@ void CFDE_TxtEdtBuf::Insert(int32_t nPos,
chunkIndex--;
int32_t nFree = GetChunkSize() - chunk->nUsed;
int32_t nCopy = std::min(nLengthTemp, nFree);
- FXSYS_memcpy(chunk->wChars.get() + chunk->nUsed, lpText,
- nCopy * sizeof(wchar_t));
+ memcpy(chunk->wChars.get() + chunk->nUsed, lpText,
+ nCopy * sizeof(wchar_t));
lpText += nCopy;
nLengthTemp -= nCopy;
chunk->nUsed += nCopy;
@@ -170,7 +169,7 @@ void CFDE_TxtEdtBuf::Insert(int32_t nPos,
auto chunk = NewChunk();
int32_t nCopy = std::min(nLengthTemp, GetChunkSize());
- FXSYS_memcpy(chunk->wChars.get(), lpText, nCopy * sizeof(wchar_t));
+ memcpy(chunk->wChars.get(), lpText, nCopy * sizeof(wchar_t));
lpText += nCopy;
nLengthTemp -= nCopy;
chunk->nUsed = nCopy;
@@ -193,9 +192,8 @@ void CFDE_TxtEdtBuf::Delete(int32_t nIndex, int32_t nLength) {
int32_t nMovePart = chunk->nUsed - nFirstPart;
if (nMovePart != 0) {
int32_t nDelete = std::min(nFirstPart, nLength);
- FXSYS_memmove(chunk->wChars.get() + nFirstPart - nDelete,
- chunk->wChars.get() + nFirstPart,
- nMovePart * sizeof(wchar_t));
+ memmove(chunk->wChars.get() + nFirstPart - nDelete,
+ chunk->wChars.get() + nFirstPart, nMovePart * sizeof(wchar_t));
chunk->nUsed -= nDelete;
nLength -= nDelete;
endChunkIndex--;
diff --git a/xfa/fde/cfde_txtedtdorecord_insert.cpp b/xfa/fde/cfde_txtedtdorecord_insert.cpp
index 0e3f9218dd..fe79960ebc 100644
--- a/xfa/fde/cfde_txtedtdorecord_insert.cpp
+++ b/xfa/fde/cfde_txtedtdorecord_insert.cpp
@@ -17,7 +17,7 @@ CFDE_TxtEdtDoRecord_Insert::CFDE_TxtEdtDoRecord_Insert(
: m_pEngine(pEngine), m_nCaret(nCaret) {
ASSERT(pEngine);
wchar_t* lpBuffer = m_wsInsert.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
+ memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
m_wsInsert.ReleaseBuffer();
}
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 37e3e118d1..633e0bc68e 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -142,7 +142,7 @@ void CFDE_TxtEdtEngine::SetText(const CFX_WideString& wsText) {
if (nLength > 0) {
CFX_WideString wsTemp;
wchar_t* lpBuffer = wsTemp.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, wsText.c_str(), nLength * sizeof(wchar_t));
+ memcpy(lpBuffer, wsText.c_str(), nLength * sizeof(wchar_t));
ReplaceParagEnd(lpBuffer, nLength, false);
wsTemp.ReleaseBuffer(nLength);
if (m_nLimit > 0 && nLength > m_nLimit) {
@@ -312,7 +312,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart,
CFX_WideString wsTemp;
wchar_t* lpBuffer = wsTemp.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
+ memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
ReplaceParagEnd(lpBuffer, nLength, false);
wsTemp.ReleaseBuffer(nLength);
bool bPart = false;
@@ -730,10 +730,10 @@ CFX_WideString CFDE_TxtEdtEngine::GetPreInsertText(int32_t nIndex,
int32_t nOldLength = wsText.GetLength();
const wchar_t* pOldBuffer = wsText.c_str();
wchar_t* lpBuffer = wsTemp.GetBuffer(nOldLength + nLength);
- FXSYS_memcpy(lpBuffer, pOldBuffer, (nIndex) * sizeof(wchar_t));
- FXSYS_memcpy(lpBuffer + nIndex, lpText, nLength * sizeof(wchar_t));
- FXSYS_memcpy(lpBuffer + nIndex + nLength, pOldBuffer + nIndex,
- (nOldLength - nIndex) * sizeof(wchar_t));
+ memcpy(lpBuffer, pOldBuffer, (nIndex) * sizeof(wchar_t));
+ memcpy(lpBuffer + nIndex, lpText, nLength * sizeof(wchar_t));
+ memcpy(lpBuffer + nIndex + nLength, pOldBuffer + nIndex,
+ (nOldLength - nIndex) * sizeof(wchar_t));
wsTemp.ReleaseBuffer(nOldLength + nLength);
wsText = wsTemp;
return wsText;
@@ -1028,8 +1028,8 @@ bool CFDE_TxtEdtEngine::ReplaceParagEnd(wchar_t*& lpText,
if (bPreIsCR == true) {
int32_t nNext = i + 1;
if (nNext < nLength) {
- FXSYS_memmove(lpText + i, lpText + nNext,
- (nLength - nNext) * sizeof(wchar_t));
+ memmove(lpText + i, lpText + nNext,
+ (nLength - nNext) * sizeof(wchar_t));
}
i--;
nLength--;
@@ -1079,16 +1079,16 @@ void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString& wsText) const {
for (int32_t i = 0; i < nCount; i++) {
int32_t nPos = PosArr[i];
int32_t nCopyLen = nPos - nSrcPos + 1;
- FXSYS_memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
- nCopyLen * sizeof(wchar_t));
+ memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
+ nCopyLen * sizeof(wchar_t));
nDstPos += nCopyLen;
nSrcPos += nCopyLen;
lpDstBuf[nDstPos] = L'\n';
nDstPos++;
}
if (nSrcPos < nLength) {
- FXSYS_memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
- (nLength - nSrcPos) * sizeof(wchar_t));
+ memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
+ (nLength - nSrcPos) * sizeof(wchar_t));
}
wsTemp.ReleaseBuffer(nLength + nCount);
wsText = wsTemp;
diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp
index 122eb40f7d..5bd731f8f5 100644
--- a/xfa/fde/cfde_txtedtpage.cpp
+++ b/xfa/fde/cfde_txtedtpage.cpp
@@ -158,7 +158,7 @@ int32_t CFDE_TxtEdtPage::GetDisplayPos(const CFX_RectF& rtClip,
}
if ((nCharPosCount * 5) < (m_nCharCount << 2)) {
FXTEXT_CHARPOS* pTemp = FX_Alloc(FXTEXT_CHARPOS, nCharPosCount);
- FXSYS_memcpy(pTemp, pCharPos, sizeof(FXTEXT_CHARPOS) * nCharPosCount);
+ memcpy(pTemp, pCharPos, sizeof(FXTEXT_CHARPOS) * nCharPosCount);
FX_Free(pCharPos);
pCharPos = pTemp;
}
@@ -298,7 +298,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
for (int32_t j = 0; j < nPieceCount; j++) {
const CFX_BreakPiece* pPiece = pBreak->GetBreakPieceUnstable(j);
FDE_TEXTEDITPIECE TxtEdtPiece;
- FXSYS_memset(&TxtEdtPiece, 0, sizeof(FDE_TEXTEDITPIECE));
+ memset(&TxtEdtPiece, 0, sizeof(FDE_TEXTEDITPIECE));
TxtEdtPiece.nBidiLevel = pPiece->m_iBidiLevel;
TxtEdtPiece.nCount = pPiece->GetLength();
TxtEdtPiece.nStart = nPieceStart;
diff --git a/xfa/fde/css/cfde_csstextbuf.cpp b/xfa/fde/css/cfde_csstextbuf.cpp
index 6f74db2a78..b8d8b197ae 100644
--- a/xfa/fde/css/cfde_csstextbuf.cpp
+++ b/xfa/fde/css/cfde_csstextbuf.cpp
@@ -81,6 +81,6 @@ void CFDE_CSSTextBuf::Subtract(int32_t iStart, int32_t iLength) {
ASSERT(iStart >= 0 && iLength >= 0);
iLength = pdfium::clamp(iLength, 0, m_iDatLen - iStart);
- FXSYS_memmove(m_pBuffer, m_pBuffer + iStart, iLength * sizeof(wchar_t));
+ memmove(m_pBuffer, m_pBuffer + iStart, iLength * sizeof(wchar_t));
m_iDatLen = iLength;
}
diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp
index 68a4978209..2de48ef1f4 100644
--- a/xfa/fde/xml/fde_xml_imp.cpp
+++ b/xfa/fde/xml/fde_xml_imp.cpp
@@ -1161,8 +1161,8 @@ void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData,
iCopyLength -= ((m_iAllocStep - 1) - iEndInnerIndex);
}
wchar_t* pBlockBuf = m_BlockArray[i].get();
- FXSYS_memcpy(pBuf + iPointer, pBlockBuf + iBufferPointer,
- iCopyLength * sizeof(wchar_t));
+ memcpy(pBuf + iPointer, pBlockBuf + iBufferPointer,
+ iCopyLength * sizeof(wchar_t));
iPointer += iCopyLength;
}
wsTextData.ReleaseBuffer(iLength);