aboutsummaryrefslogtreecommitdiffstats
path: root/fxbarcode/utils.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove remaining "exceptions" in fxbarcode.Lei Zhang2018-11-291-4/+0
| | | | | | | Change-Id: I19eb6736b72e4bfdf9ccab7a6f11e6b53b7aed85 Reviewed-on: https://pdfium-review.googlesource.com/c/45771 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Get rid of "exceptions" in CBC_OneDimWriter::AppendPattern().Lei Zhang2018-11-281-1/+0
| | | | | | | | | | They can never happen. Also delete CBC_QRCoder::At() which throws "exceptions" but it never gets called. Change-Id: I1b46352d97bb20f1da79e1e67b4523ee8131db79 Reviewed-on: https://pdfium-review.googlesource.com/c/45770 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Get rid of "exceptions" in CBC_QRCoderMaskUtil::GetDataMaskBit().Lei Zhang2018-11-281-1/+0
| | | | | | | | | | It can never occur with the existing caller. Clean up CBC_QRCoderMaskUtil along the way. Change-Id: Iad7fcef8de6b0a866030d03a52510653930b7945 Reviewed-on: https://pdfium-review.googlesource.com/c/45769 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Get rid of "exceptions" in CBC_QRCoderMode::GetCharacterCountBits().Lei Zhang2018-11-281-1/+0
| | | | | | | | | It already returns 0 on failure. Change-Id: If71ac2722084d294ff9a929cd7092b61a03a1765 Reviewed-on: https://pdfium-review.googlesource.com/c/45768 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Get rid of "exceptions" in CBC_QRCoderBitVector::At().Lei Zhang2018-11-281-1/+0
| | | | | | | | | | Replace it with a CHECK() that should not fail since all the existing callers check the bit vector's size. Change-Id: Id90ca612766661959c7879754dc34ad401402fbd Reviewed-on: https://pdfium-review.googlesource.com/c/45767 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Get rid of "exceptions" in CBC_SymbolInfo::Lookup().Lei Zhang2018-11-281-1/+0
| | | | | | | | | Lookup() already returns nullptr when the lookup fails. Change-Id: I831738ab46616d5ffb9aa037e02f4cca4d7e1e3d Reviewed-on: https://pdfium-review.googlesource.com/c/45766 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Get rid of "exceptions" from CBC_EncoderContext ctor.Lei Zhang2018-11-281-1/+0
| | | | | | | | | | | | | The caller can call HasCharactersOutsideISO88591Encoding() after constructing the context to see if the context is valid. Also initialize CBC_EncoderContext members in the header or initializer list when possible. Change-Id: Ieb06b7806fc4cbbde736c4fad6b52fb6f67f5db1 Reviewed-on: https://pdfium-review.googlesource.com/c/45765 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Remove BC_Utils.cpp.Tom Sepez2018-11-171-20/+0
| | | | | | | | | Its not used. Also remove spurious includes from header file. Change-Id: Ib98d08caca43b7bc5272b0dd61220d10e105ffff Reviewed-on: https://pdfium-review.googlesource.com/c/45761 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
* Remove CBC_QRCoder{Mode,ErrorCorrectionLevel}::ForBits().Tom Sepez2018-11-171-1/+0
| | | | | | | | | They aren't called anywhere. Change-Id: Idb574261da9fa195941e1c316d9c3e01a7e9e167 Reviewed-on: https://pdfium-review.googlesource.com/c/45760 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
* Get rid of "exceptions" in CBC_C40Encoder::HandleEOD().Lei Zhang2018-11-171-1/+0
| | | | | | | | | Also change more code to not pass by non-const reference. Change-Id: I8bb4f6131ad2355f698a8317fc5c11a1af3ff174 Reviewed-on: https://pdfium-review.googlesource.com/c/45759 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Get rid of "exceptions" in CBC_Encoder::Encode().Lei Zhang2018-11-171-1/+0
| | | | | | | | | | Just return a boolean instead. Fix all Encode() impls. Also change Encode() to pass the context by pointer instead of by non-const ref. Change-Id: I1a97e5cf28d3b00f77accd386c1dc0e6f282288c Reviewed-on: https://pdfium-review.googlesource.com/c/45758 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Remove "exceptions" from CBC_PDF417HighLevelEncoder.Lei Zhang2018-11-161-1/+0
| | | | | | | | | | Also move CBC_PDF417HighLevelEncoder::Inverse() into an anonymous namespace. Change-Id: I3b6f663f71257996a7e4bc2d097745bcf91d9706 Reviewed-on: https://pdfium-review.googlesource.com/c/45693 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Remove some "exceptions" from reedsolomon code.Lei Zhang2018-10-011-2/+0
| | | | | | | Change-Id: If8c45af624ed6df7b6d7416bb4e195f4097b0574 Reviewed-on: https://pdfium-review.googlesource.com/43191 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
* Get rid of "exceptions" in CBC_QRCoderMatrixUtil.Lei Zhang2018-09-251-5/+0
| | | | | | | Change-Id: I186e39c60a2e87983f05a3407b668e15160c2372 Reviewed-on: https://pdfium-review.googlesource.com/42456 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
* Remove BCExceptionInvalidateCharacter.Lei Zhang2018-09-171-1/+0
| | | | | | | Change-Id: Ia165095864ffe2865a5e433d09d0bccad1164d2c Reviewed-on: https://pdfium-review.googlesource.com/42453 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
* Remove dead CBC_QRCoderEncoder code.Lei Zhang2018-09-151-1/+0
| | | | | | | Change-Id: I096ba8681d779bb0cc1d7aaaedcd9f68020d5b37 Reviewed-on: https://pdfium-review.googlesource.com/42452 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
* Clean up CBC_ASCIIEncoder.Lei Zhang2018-05-151-2/+0
| | | | | | | | | Get rid of a few more fxbarcode exception codes. Change-Id: Ia9c9cdcef581174e25be8dc2fba181915dc6d729 Reviewed-on: https://pdfium-review.googlesource.com/32471 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
* More define cleanupDan Sinclair2017-10-021-19/+5
| | | | | | | | | | Remove unused defines; Move to .cpp files where possible; Fixup values. Change-Id: I88cd5deb04b14ab8e9f8097a695c3d0b52d64b4c Reviewed-on: https://pdfium-review.googlesource.com/15130 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
* Simplify some OS checks to PLATFORM checksDan Sinclair2017-09-281-14/+11
| | | | | | | | | | This CL simplifies the OS == WIN{32|64} checks to be PLATFORM == WINDOWS checks. Change-Id: I1493d316dd457b0228e4ef39db4cf1d2b8abf97d Reviewed-on: https://pdfium-review.googlesource.com/14870 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
* Cleanup FX macrosDan Sinclair2017-09-271-8/+8
| | | | | | | | | | This CL renames the FX_OS defines to have _OS_ in their names and drops the _DESKTOP suffix. The FXM defines have been changed to just FX. Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74 Reviewed-on: https://pdfium-review.googlesource.com/14833 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
* Remove _FX_IOS_Dan Sinclair2017-09-261-5/+4
| | | | | | | | | | The _FX_IOS_ define is never defined, so it isn't useful to check _FX_OS_ against. Remove. Change-Id: I90b50a1a0dc165073ed223cbfe861b9a227818dd Reviewed-on: https://pdfium-review.googlesource.com/14831 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Fix checks for FX_WIN64_DESKTOPDan Sinclair2017-09-261-9/+12
| | | | | | | | | | | | Several of the OS checks were mis-typed as FX_WIN64 instead of FX_WIN64_DESKTOP. This CL updates the defines to check for the correct OS define. Bug: pdfium:906 Change-Id: Ib58a6472d1bc26c34d509edf32ac00b18d852a3b Reviewed-on: https://pdfium-review.googlesource.com/14813 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
* Convert string class namesRyan Harrison2017-09-181-4/+3
| | | | | | | | | | | | | | | | | Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
* Remove fx_basic.hDan Sinclair2017-08-311-1/+1
| | | | | | | | | This CL removes the fx_basic.h header and fixes up includes as needed. Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040 Reviewed-on: https://pdfium-review.googlesource.com/12670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Clean up CBC_SymbolInfo.Lei Zhang2017-05-231-1/+0
| | | | | | | | | | | - Remove rectangular ctor param. It can be derived from dimensions. - Make members private and add accessors. - Remove exceptions that cannot occur. Change-Id: Iec113205241562a0559e594fe257f5b9064ed97e Reviewed-on: https://pdfium-review.googlesource.com/5737 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
* Remove dead dimensions code in fxbarcode.Lei Zhang2017-04-281-8/+0
| | | | | | | | | Remove more exceptions. Change-Id: I3b8b8b9837b0010b1e0060ddd56e93c78f9f0fb5 Reviewed-on: https://pdfium-review.googlesource.com/4410 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
* Change more fxbarcode to use return values.Lei Zhang2017-04-211-19/+0
| | | | | | | Change-Id: Idcc05fb8c5a1448f552b4db5ae131ad82aef4d59 Reviewed-on: https://pdfium-review.googlesource.com/4258 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
* Change some fxbarcode to use return values.Lei Zhang2017-04-061-51/+0
| | | | | | | | | | No caller cares about the exception values anyway. Remove the unused ones. Also use more std::unique_ptr to stop potential leaks. Change-Id: Ic5955fb0d879f55e1c6a005c0204df50246dab19 Reviewed-on: https://pdfium-review.googlesource.com/3715 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Clean up QRCoderBitVector.Lei Zhang2017-04-041-7/+1
| | | | | | | | | Use std::vector and return booleans results when possible. Change-Id: If3ce4559f137fb449fd1ab818750558a1b5f8df0 Reviewed-on: https://pdfium-review.googlesource.com/3561 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
* Move xfa/fxbarcode fxbarcode/Dan Sinclair2017-03-291-0/+171
Nothing in fxbarcode/ depends on XFA code. This CL moves xfa/fxbarcode to be fxbarcode/ and creates a static_library for fxbarcode which is depend on by the xfa library. Change-Id: I0b708737b07efb94b769a5238d92af92bc62880d Reviewed-on: https://pdfium-review.googlesource.com/3291 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>