diff options
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fee/fde_txtedtengine.cpp | 14 | ||||
-rw-r--r-- | xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp | 6 |
2 files changed, 8 insertions, 12 deletions
diff --git a/xfa/fee/fde_txtedtengine.cpp b/xfa/fee/fde_txtedtengine.cpp index dfbf02e881..71f510205b 100644 --- a/xfa/fee/fde_txtedtengine.cpp +++ b/xfa/fee/fde_txtedtengine.cpp @@ -1603,9 +1603,9 @@ void CFDE_TxtEdtEngine::DeleteSelect() { IFDE_TxtEdtDoRecord* IFDE_TxtEdtDoRecord::Create( const CFX_ByteStringC& bsDoRecord) { - const FX_CHAR* lpBuf = bsDoRecord.c_str(); - int32_t nType = *((int32_t*)lpBuf); - switch (nType) { + const uint32_t* lpBuf = + reinterpret_cast<const uint32_t*>(bsDoRecord.raw_str()); + switch (*lpBuf) { case FDE_TXTEDT_DORECORD_INS: return new CFDE_TxtEdtDoRecord_Insert(bsDoRecord); case FDE_TXTEDT_DORECORD_DEL: @@ -1669,9 +1669,7 @@ void CFDE_TxtEdtDoRecord_Insert::Serialize(CFX_ByteString& bsDoRecord) const { } void CFDE_TxtEdtDoRecord_Insert::Deserialize( const CFX_ByteStringC& bsDoRecord) { - CFX_ArchiveLoader ArchiveLoader( - reinterpret_cast<const uint8_t*>(bsDoRecord.c_str()), - bsDoRecord.GetLength()); + CFX_ArchiveLoader ArchiveLoader(bsDoRecord.raw_str(), bsDoRecord.GetLength()); int32_t nType = 0; ArchiveLoader >> nType; ASSERT(nType == FDE_TXTEDT_DORECORD_INS); @@ -1746,9 +1744,7 @@ void CFDE_TxtEdtDoRecord_DeleteRange::Serialize( } void CFDE_TxtEdtDoRecord_DeleteRange::Deserialize( const CFX_ByteStringC& bsDoRecord) { - CFX_ArchiveLoader ArchiveLoader( - reinterpret_cast<const uint8_t*>(bsDoRecord.c_str()), - bsDoRecord.GetLength()); + CFX_ArchiveLoader ArchiveLoader(bsDoRecord.raw_str(), bsDoRecord.GetLength()); int32_t nType = 0; ArchiveLoader >> nType; ASSERT(nType == FDE_TXTEDT_DORECORD_DEL); diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp b/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp index 88a52b9e74..53c5a84656 100644 --- a/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp +++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp @@ -36,9 +36,9 @@ const FX_CHAR CBC_DataMatrixDecodedBitStreamParser::TEXT_BASIC_SET_CHARS[] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; const FX_CHAR CBC_DataMatrixDecodedBitStreamParser::TEXT_SHIFT3_SET_CHARS[] = { - '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', - 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', (FX_CHAR)127}; + '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', 127}; const int32_t CBC_DataMatrixDecodedBitStreamParser::PAD_ENCODE = 0; const int32_t CBC_DataMatrixDecodedBitStreamParser::ASCII_ENCODE = 1; const int32_t CBC_DataMatrixDecodedBitStreamParser::C40_ENCODE = 2; |