summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_wstring.cpp
AgeCommit message (Collapse)Author
2016-03-14Move core/src/ up to core/.Dan Sinclair
This CL moves the core/src/ files up to core/ and fixes up the include guards, includes and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1800523005 .
2016-03-11Re-enable MSVC warning 4800 for compiling with chromium_codeWei Li
Mainly change the code to avoid the warnings; in a few cases we have to use explicit casts. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1783023002 .
2016-03-09Review and cleanup lint warnings.Dan Sinclair
This CL goes through the remaining list of list warnings and records why they are currently blacklisted, or fixes and enables them. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1773733002 .
2016-03-03Combine StrToInt methods.Dan Sinclair
This Cl combines the two StrToInt implementations. In doing so I had to add some more overrides to toDecimalDigit() and add a isDecimalDigit(). BUG=pdfium:423 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1757283002 .
2016-02-22Switch from _DEBUG to NDEBUG.Lei Zhang
- NDEBUG is more widely used in Chromium - _DEBUG is not defined on Mac in Chromium - Leaving _DEBUG in for standalone debug builds for the benefit of third party libraries / Windows. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1721073004 .
2016-02-22Define NDEBUG for Release builds.Lei Zhang
Also fix -Wunused warnings as a result of this change. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1717063002 .
2016-02-19Get rid of CFX_CharMap instantiations.Lei Zhang
The only thing left are a couple of static methods. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1711273002 .
2016-02-19Remove CFX_{Byte,Wide}String::ConvertFrom().Lei Zhang
Use/add CFX_{Byte,Wide}String::FromFoo() instead. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1711893003 .
2016-01-11Merge to XFA: Switch most min/max macros to std::min/max.Lei Zhang
Fix lint errors along the way. R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1567343002 . (cherry picked from commit 9adfbb0920a258e916003b1ee9515e97879db82a) Review URL: https://codereview.chromium.org/1577503002 .
2015-12-14Merge to XFA: Fix Windows build failure due to double vs float mismatch.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1525853003 . (cherry picked from commit 4d4c61ea4e39135b126879dd6d7bc99a59a3a843) Review URL: https://codereview.chromium.org/1524023002 .
2015-12-14Merge to XFA: Get rid of most instance of 'foo == NULL'Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1520063002 . (cherry picked from commit e385244f8cd6ae376f6b3cf1265a0795d5d30eff) Review URL: https://codereview.chromium.org/1528763003 .
2015-12-14Merge to XFA: Get rid of most instance of 'foo != NULL'Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 .
2015-12-14Merge to XFA: Remove FX_BSTRC.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1521563002 . (cherry picked from commit 1956a174020686f91cd3b34294e91f4560fe45aa) Review URL: https://codereview.chromium.org/1526823002 .
2015-12-09XFA: Revert UTF16LE_Encode changesOliver Chang
Revert "Fix embedder test failures introduced by commit c70b19aad245" This reverts commit 8d89e65897d8b6cf7899e7a82d9d381c3ad327cb. Revert "Fix invalid buffer length set in CFX_WideString::UTF16LE_Encode()" This reverts commit c70b19aad245fb1ed39bf8c264d991555f4c5a58. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1516643002 .
2015-11-25Fix invalid buffer length set in CFX_WideString::UTF16LE_Encode()Jun Fang
BUG=pdfium:275 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1443603002 .
2015-11-16Merge to XFA: Reland "Cleanup some numeric code.""Dan Sinclair
This reverts commit 0569ab0b11b723d9bca4ddd642b0cf8828c4bdd1. This changes the various comparisons of char >= '0' && char <= '9' and char < '0' || char > '9' to use std::isdigit checks. It also cleans up a handful of hex to digit conversions to call one common method. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1449873003 . (cherry picked from commit 3f148915d12f54a946a0c0bf526162b79c39d650) Review URL: https://codereview.chromium.org/1452673002 .
2015-11-10Merge to XFA: Fix relative includes within core/Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1427633010 . (cherry picked from commit 9fb27cb9797937499c9678bc74cf7846cbf5d2b8) Review URL: https://codereview.chromium.org/1438573002 .
2015-11-06Merge to XFA: Fix all relative includes to third_party.Lei Zhang
- In non-standalone builds, use the provided jpeg library. - Run gn format over all the GN files. - Also roll DEPS for buildtools to c2f2598. - And fix XFA's lack of #includes. BUG=541704 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425153006 . (cherry picked from commit 34bb6c58fe60206a08dc0a1f37b7cfe83e8c762c) Review URL: https://codereview.chromium.org/1434543003 .
2015-10-13Merge to XFA: wstring allocations waste up to 7 wasted bytes.Tom Sepez
Original Review URL: https://codereview.chromium.org/1399983003 . (cherry picked from commit 6eeffab789800e2afa1b9d10de70c9116db32355) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1399893003 .
2015-08-04XFA: clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
2015-07-23Merge to XFA - else after returns.Tom Sepez
(cherry picked from commit 3c012fef2bb72c8ec1faa73e11ee35539b2559d6) Original Review URL: https://codereview.chromium.org/1243953004 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1239313005 .
2015-06-11Merge to XFA: Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.Tom Sepez
Only manual merge was core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp follwed by scripts. Original Review URL: https://codereview.chromium.org/1179693003. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1179953002.
2015-06-10Merge to XFA: Remove typdefs for pointer types in fx_system.h.Tom Sepez
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.
2015-06-09Merge to XFA: Use stdint.h types throughout PDFium.Tom Sepez
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
2015-05-20Merge to XFA: Remove FX_Alloc() null checks now that it can't return NULL.Tom Sepez
Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1143663008
2015-05-15Merge to XFA: Fix potential UAF in ConcatInPlace.Tom Sepez
Original Review URL: https://codereview.chromium.org/1130763007 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1123333004
2015-05-14Merge to XFA: Make CFX_StringData be scoped by CFX_Bytestring and add methods.Tom Sepez
Original Review URL: https://codereview.chromium.org/1142533002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1135673003
2015-05-13Merge to XFA: Fix comparison of CFX_ByteString and CFX_WideString.Tom Sepez
Original Review URL: https://codereview.chromium.org/1141763002 BUG=pdfium:160 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1140093003
2015-05-06Merge to XFA:Remove FX_STRSIZE casts, use safe conversionsTom Sepez
Original Review URL: https://codereview.chromium.org/1124043003 BUG=pdfium:153 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1132443002
2015-05-05Merge to XFA: Make sure string constructors are efficient on literalsTom Sepez
Besides the merge, there's one place where a wchar vs. wstring comparison was being made that no longer compiled. Original Review URL: https://codereview.chromium.org/1117263004 BUG=pdfium:151 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1116163003
2015-05-04Merge to XFA: Fix issues with != and == in fx_basic_wstringTom Sepez
Original Review URL: https://codereview.chromium.org/1127753002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1119753004
2015-05-01Merge to XFA: CFX_ByteString/WideString header changesTom Sepez
Original Review URL: https://codereview.chromium.org/1117413002 Original Review URL: https://codereview.chromium.org/1118983003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1125493002
2015-04-30Merge to XFA: Take adavange of unused bytes at end of CFX stringsTom Sepez
Original Review URL: https://codereview.chromium.org/1112423003 Original Review URL: https://codereview.chromium.org/1120703003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1120813003
2015-04-28Merge to XFA: Make CFX_WideString::LockBuffer() completely unused.Tom Sepez
Original Review URL: https://codereview.chromium.org/1053613004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1115493002
2015-04-27Merge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString().Tom Sepez
Original Review URL: https://codereview.chromium.org/1101933003 TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1108903002
2015-04-10Merge to XFA: Better fix for snprintf non-termination on windows.Tom Sepez
TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1073313003
2015-04-07Merge to XFA: Fix a stack overflow issue caused by an invalid usage of snprintfJun Fang
BUG=469244 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1062983002
2015-02-05Merge to XFA: Add namespace and-re-arrange PDFium's local copy of /base.Tom Sepez
Original revieww URL: https://codereview.chromium.org/900753002 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/880603004
2015-01-21Merge to XFA: Simplify UTF16LE_Encode and add unittest.Bo Xu
Previously, UTF16LE_Encode take an optional flag to indicate if the returned byte string has trailing zeros. In fact, no where needs the flag to be false. So just get rid of it so callers won't misuse. The bug is found by https://codereview.chromium.org/837723009 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/860973002
2014-11-17Merge to XFA: patch from CL 730993002Bo Xu
2014-11-14Merge to XFA: Patch from CL 726143002Bo Xu
BUG=https://code.google.com/p/pdfium/issues/detail?id=78 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/726143002
2014-07-14Fix an out-of-boundary issue for wide stringBo Xu
BUG=381521 R=palmer@chromium.org Review URL: https://codereview.chromium.org/383563002
2014-07-08Remove custom memory managerBo Xu
BUG= R=palmer@chromium.org Review URL: https://codereview.chromium.org/372473003
2014-07-08Fix integer overflow in fx_basic_[bw]string.cpp.Chris Palmer
BUG=382601 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/336003004
2014-05-23Convert all line endings to LF.John Abd-El-Malek
2014-05-17Initial commit.John Abd-El-Malek