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/fxbarcode | |
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/fxbarcode')
14 files changed, 30 insertions, 30 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp index bdcbc4c418..5a4a2066fc 100644 --- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp +++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp @@ -46,7 +46,7 @@ CBC_DataMatrixDetector::~CBC_DataMatrixDetector() }
m_rectangleDetector = NULL;
}
-inline FX_BOOL ResultPointsAndTransitionsComparator(FX_LPVOID a, FX_LPVOID b)
+inline FX_BOOL ResultPointsAndTransitionsComparator(void* a, void* b)
{
return ((CBC_ResultPointsAndTransitions *)b)->GetTransitions() > ((CBC_ResultPointsAndTransitions *)a)->GetTransitions();
}
diff --git a/xfa/src/fxbarcode/datamatrix/BC_EdifactEncoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_EdifactEncoder.cpp index 8a0271f1a0..cc46b8156d 100644 --- a/xfa/src/fxbarcode/datamatrix/BC_EdifactEncoder.cpp +++ b/xfa/src/fxbarcode/datamatrix/BC_EdifactEncoder.cpp @@ -131,7 +131,7 @@ CFX_WideString CBC_EdifactEncoder::encodeToCodewords(CFX_WideString sb, int32_t int32_t len = sb.GetLength() - startPos;
if (len == 0) {
e = BCExceptionNoContents;
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
FX_WCHAR c1 = sb.GetAt(startPos);
FX_WCHAR c2 = len >= 2 ? sb.GetAt(startPos + 1) : 0;
diff --git a/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp index e574742b54..89b920825f 100644 --- a/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp +++ b/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp @@ -106,14 +106,14 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, CBC_S {
if (codewords.GetLength() != symbolInfo->m_dataCapacity) {
e = BCExceptionIllegalArgument;
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
CFX_WideString sb;
sb += codewords;
int32_t blockCount = symbolInfo->getInterleavedBlockCount();
if (blockCount == 1) {
CFX_WideString ecc = createECCBlock(codewords, symbolInfo->m_errorCodewords, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
sb += ecc;
} else {
CFX_Int32Array dataSizes;
@@ -136,7 +136,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, CBC_S temp += (FX_WCHAR)codewords.GetAt(d);
}
CFX_WideString ecc = createECCBlock(temp, errorSizes[block], e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
int32_t pos = 0;
for (int32_t l = block; l < errorSizes[block] * blockCount; l += blockCount) {
sb.SetAt(symbolInfo->m_dataCapacity + l, ecc.GetAt(pos++));
@@ -160,7 +160,7 @@ CFX_WideString CBC_ErrorCorrection::createECCBlock(CFX_WideString codewords, int }
if (table < 0) {
e = BCExceptionIllegalArgument;
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
FX_WORD* ecc = FX_Alloc(FX_WORD, numECWords);
FXSYS_memset32(ecc, 0, numECWords * sizeof(FX_WORD));
diff --git a/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp index 3866f45a5e..3aded2d349 100644 --- a/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp +++ b/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp @@ -72,7 +72,7 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, CFX_Wid CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, CFX_WideString ecLevel, SymbolShapeHint shape, CBC_Dimension* minSize, CBC_Dimension* maxSize, int32_t &e)
{
CBC_EncoderContext context(msg, ecLevel, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
context.setSymbolShape(shape);
context.setSizeConstraints(minSize, maxSize);
if ((msg.Mid(0, 6) == MACRO_05_HEADER) && (msg.Mid(msg.GetLength() - 1, 1) == MACRO_TRAILER)) {
@@ -99,7 +99,7 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, CFX_Wi delete (CBC_Encoder*)encoders.GetAt(i);
}
encoders.RemoveAll();
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
if (context.m_newEncoding >= 0) {
encodingMode = context.m_newEncoding;
@@ -113,7 +113,7 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, CFX_Wi delete (CBC_Encoder*)encoders.GetAt(i);
}
encoders.RemoveAll();
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
int32_t capacity = context.m_symbolInfo->m_dataCapacity;
if (len < capacity) {
diff --git a/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp b/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp index 0044683a5c..587bdd3128 100644 --- a/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp +++ b/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp @@ -217,24 +217,24 @@ int32_t CBC_SymbolInfo::getErrorLengthForInterleavedBlock(int32_t index) CFX_WideString CBC_SymbolInfo::toString(int32_t &e)
{
CFX_WideString sb;
- sb += (FX_LPWSTR)(m_rectangular ? "Rectangular Symbol:" : "Square Symbol:");
- sb += (FX_LPWSTR)" data region ";
+ sb += (FX_WCHAR*)(m_rectangular ? "Rectangular Symbol:" : "Square Symbol:");
+ sb += (FX_WCHAR*)" data region ";
sb += m_matrixWidth;
sb += (FX_WCHAR)'x';
sb += m_matrixHeight;
- sb += (FX_LPWSTR)", symbol size ";
+ sb += (FX_WCHAR*)", symbol size ";
sb += getSymbolWidth(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
sb += (FX_WCHAR)'x';
sb += getSymbolHeight(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
- sb += (FX_LPWSTR)", symbol data size ";
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
+ sb += (FX_WCHAR*)", symbol data size ";
sb += getSymbolDataWidth(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
sb += (FX_WCHAR)'x';
sb += getSymbolDataHeight(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
- sb += (FX_LPWSTR)", codewords ";
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
+ sb += (FX_WCHAR*)", codewords ";
sb += m_dataCapacity;
sb += (FX_WCHAR)'+';
sb += m_errorCodewords;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp index ca115391ef..7f7a69c1b7 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp @@ -26,7 +26,7 @@ #include "../oned/BC_OneDReader.h"
#include "../oned/BC_OnedCode39Reader.h"
#include "../oned/BC_OnedCodaBarReader.h"
-FX_LPCSTR CBC_OnedCodaBarReader::ALPHABET_STRING = "0123456789-$:/.+ABCDTN";
+const FX_CHAR* CBC_OnedCodaBarReader::ALPHABET_STRING = "0123456789-$:/.+ABCDTN";
const int32_t CBC_OnedCodaBarReader::CHARACTER_ENCODINGS[22] = {
0x003, 0x006, 0x009, 0x060, 0x012, 0x042, 0x021, 0x024, 0x030, 0x048,
0x00c, 0x018, 0x045, 0x051, 0x054, 0x015, 0x01A, 0x029, 0x00B, 0x00E,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h index 18aab8ba8d..dbd2559dc6 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h +++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h @@ -18,7 +18,7 @@ public: CFX_Int32Array *FindAsteriskPattern(CBC_CommonBitArray *row, int32_t &e);
FX_BOOL ArrayContains(const FX_CHAR array[], FX_CHAR key);
FX_CHAR ToNarrowWidePattern(CFX_Int32Array *counter);
- static FX_LPCSTR ALPHABET_STRING;
+ static const FX_CHAR* ALPHABET_STRING;
const static int32_t CHARACTER_ENCODINGS[22];
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp index e5e6392c17..a678338894 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp @@ -25,8 +25,8 @@ #include "../common/BC_CommonBitArray.h"
#include "BC_OneDReader.h"
#include "BC_OnedCode39Reader.h"
-FX_LPCSTR CBC_OnedCode39Reader::ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%";
-FX_LPCSTR CBC_OnedCode39Reader::CHECKSUM_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%";
+const FX_CHAR* CBC_OnedCode39Reader::ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%";
+const FX_CHAR* CBC_OnedCode39Reader::CHECKSUM_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%";
const int32_t CBC_OnedCode39Reader::CHARACTER_ENCODINGS[44] = {
0x034, 0x121, 0x061, 0x160, 0x031, 0x130, 0x070, 0x025, 0x124, 0x064,
0x109, 0x049, 0x148, 0x019, 0x118, 0x058, 0x00D, 0x10C, 0x04C, 0x01C,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h index 3e7db70f95..fa1e2e2dd6 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h +++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h @@ -12,8 +12,8 @@ class CBC_OnedCoda39Reader; class CBC_OnedCode39Reader : public CBC_OneDReader
{
public:
- static FX_LPCSTR ALPHABET_STRING;
- static FX_LPCSTR CHECKSUM_STRING;
+ static const FX_CHAR* ALPHABET_STRING;
+ static const FX_CHAR* CHECKSUM_STRING;
const static int32_t CHARACTER_ENCODINGS[44];
const static int32_t ASTERISK_ENCODING;
CBC_OnedCode39Reader();
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp index 85c01d60b0..38efe93339 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp @@ -62,7 +62,7 @@ CFX_WideString CBC_PDF417HighLevelEncoder::encodeHighLevel(CFX_WideString wideMs FX_WCHAR ch = (FX_WCHAR)(bytes.GetAt(i) & 0xff);
if (ch == '?' && bytes.GetAt(i) != '?') {
e = BCExceptionCharactersOutsideISO88591Encoding;
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
msg += ch;
}
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp index b521222f00..ab2702e343 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp @@ -28,7 +28,7 @@ #include "../common/BC_CommonDecoderResult.h"
#include "BC_QRCoderMode.h"
#include "BC_QRDecodedBitStreamParser.h"
-FX_LPCSTR CBC_QRDecodedBitStreamParser::UTF_8 = "utf8";
+const FX_CHAR* CBC_QRDecodedBitStreamParser::UTF_8 = "utf8";
const FX_CHAR CBC_QRDecodedBitStreamParser::ALPHANUMERIC_CHARS[45] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h index d607e72da8..e6b556e1e1 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h @@ -15,7 +15,7 @@ class CBC_QRDecodedBitStreamParser {
private:
const static FX_CHAR ALPHANUMERIC_CHARS[45];
- static FX_LPCSTR UTF_8;
+ static const FX_CHAR* UTF_8;
CBC_QRDecodedBitStreamParser();
public:
virtual ~CBC_QRDecodedBitStreamParser();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp index 975776db3f..0ff22c77dd 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp @@ -412,7 +412,7 @@ FX_BOOL CBC_QRFinderPatternFinder::HaveMultiplyConfirmedCenters() }
return totalDeviation <= 0.05f * totalModuleSize;
}
-inline FX_BOOL centerComparator(FX_LPVOID a, FX_LPVOID b)
+inline FX_BOOL centerComparator(void* a, void* b)
{
return ((CBC_QRFinderPattern*)b)->GetCount() < ((CBC_QRFinderPattern*)a)->GetCount();
}
diff --git a/xfa/src/fxbarcode/utils.h b/xfa/src/fxbarcode/utils.h index 9639ba8504..95b5ff05e6 100644 --- a/xfa/src/fxbarcode/utils.h +++ b/xfa/src/fxbarcode/utils.h @@ -6,11 +6,11 @@ #ifndef _BC_UTILS_H_
#define _BC_UTILS_H_
-typedef CFX_MapPtrTemplate<FX_LPVOID, int32_t> CFX_PtrToInt32;
+typedef CFX_MapPtrTemplate<void*, int32_t> CFX_PtrToInt32;
FX_BOOL BC_FX_ByteString_Replace(CFX_ByteString &dst, FX_DWORD first, FX_DWORD last, int32_t count, FX_CHAR c);
void BC_FX_ByteString_Append(CFX_ByteString &dst, int32_t count, FX_CHAR c);
void BC_FX_ByteString_Append(CFX_ByteString &dst, const CFX_ByteArray &ba);
-typedef FX_BOOL (*BC_PtrArrayCompareCallback)(FX_LPVOID l, FX_LPVOID r);
+typedef FX_BOOL (*BC_PtrArrayCompareCallback)(void* l, void* r);
void BC_FX_PtrArray_Sort(CFX_PtrArray &src, BC_PtrArrayCompareCallback fun);
template<class _Ty>
class CBC_AutoPtr
|