summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser
AgeCommit message (Collapse)Author
2016-04-21Remove CFX_ArrayTemplate from fpdf_parser_decode.cpptsepez
Replace two parallel arrays with single array of pairs. Review URL: https://codereview.chromium.org/1911673002
2016-04-20Standalone GN build.dsinclair
This CL setups up a standalone GN build. You'll need to set gn args similar to: use_goma = true clang_use_chrome_plugins = false pdf_enable_xfa = true pdf_enable_v8 = true pdf_is_standalone = true The third_party/pymock files are needed to make git cl upload work correctly. BUG=pdfium:106 Review URL: https://codereview.chromium.org/1904563002
2016-04-19Remove IPDF_CryptoHandler and IPDF_SecurityHandler.dsinclair
This CL replaces the interfaces with the concrete classes. The concrete classes are also renamed to remove the Standard from their names. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1898173002
2016-04-15Avoid narrowing to StringC in CPDF_Name and CPDF_NameTreetsepez
Remove redundant CPDF_Name constructors given promotion rules. Rework one char* in CPDF_PageContentGenerator. Review URL: https://codereview.chromium.org/1890973006
2016-04-14Rename CFX_ByteTextBuf::GetByteString() to AsStringC().tsepez
Do the same for CFX_WideTextBuf as well. The name is confusing because these return CFX_ByteStringC, not CFX_ByteString. The AsStringC naming gives parallelism with the string types themselves, and may help to indicate that the result is only good for the lifetime of the object being operated upon. Review URL: https://codereview.chromium.org/1886263003
2016-04-14Make CPDF_Dictionary methods take CFX_ByteString argumentstsepez
This will help avoid duplicate allocation of CFX_ByteStrings when the caller already has one. It may seem counter-intuitive that requiring the caller to pass an allocated CFX_ByteString rather than a static CFX_ByteStringC would improve the situation, but due to the idiosyncrasies of std::map, the CPDF_Dictionary methods must always do an allocation under the covers which can't be avoided. The changed callers in this CL are places where we would previously demote to CFX_ByteStringC and then allocate a a duplicate CFX_ByteString in the dictionary method. Review URL: https://codereview.chromium.org/1889863002
2016-04-13Remove implicit cast from CFX_ByteString to (const char*).tsepez
BUG= Review URL: https://codereview.chromium.org/1885973002
2016-04-13Add iterators and unit tests for CPDF_Array classweili
Add iterators to enable range based for loop. Also add unit tests for recent modified functions. Review URL: https://codereview.chromium.org/1878803002
2016-04-12Remove ICodec_* Interfaces.dsinclair
All of the ICodec_* interfaces had a single implementation. This CL removes the interfaces and uses the concrete classes in their place. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1876023003
2016-04-11Remove CPDF_Object::GetConstString and overridestsepez
GetConstString() has sharp edges in that when applied to a CPDF_Number, it must return null whereas GetString() returns a the stringified number, because of the inability to control the lifetime of the underlying allocated string. Deleting this method showed several places where we actually wanted a *String, not a *StringC, so we were re-allocating a string we already had. Review URL: https://codereview.chromium.org/1879683002
2016-04-11fix infinite loops when rebuild the cross reference tablejinming_wang
BUG=chromium:401189 Review URL: https://codereview.chromium.org/1871373002
2016-04-11Use std::vector as internal storage for CPDF_ArrayWei Li
Replace the usage of CFX_ArrayTemplate inside CPDF_Array, which has non-standard APIs such as GetSize() returns int. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1867183002 .
2016-04-08Make converstion explicit from CFX_ByteString to uint8_t*tsepez
BUG= Review URL: https://codereview.chromium.org/1868293002
2016-04-08Rename both As{Byte,Wide}StringC() helpers to AsStringC().tsepez
The naming is redundant given the base type, and will stand in the way of consolidating Byte and Wide code. BUG= Review URL: https://codereview.chromium.org/1862123003
2016-04-08Remove CFX_ByteString::Load() and operator= for CFX_ByteTextBuftsepez
The few places these are called are better served by explicit calls to CFX_ByteString() itself. This helps make Byte and Wide strings more similar. Also prevents fx_string.h from having any knowledge of fx_basic.h's ByteTextBuf class. Review URL: https://codereview.chromium.org/1870043003
2016-04-06Move include/fxcodec to fxcodec/includedsinclair
Review URL: https://codereview.chromium.org/1864153002
2016-04-06Rename FX_SAFE_DWORD to FX_SAFE_UINT32dsinclair
We removed the FX_DWORD typedef in favour of uint32_t. This CL cleans up the FX_SAFE_DWORD naming to match. BUG=pdfium:81, pdfium:470 Review URL: https://codereview.chromium.org/1861403002
2016-04-06Move core/include/fxge to core/fxge/include.dsinclair
This CL is a straight move of the fxge includes into core/fxge/include. Review URL: https://codereview.chromium.org/1868533002
2016-04-05Rename GetCStr and GetPtr to match CFX_ByteString.dsinclair
This CL updates CFX_ByteStringC to use the more common c_str and raw_str instead of GetCStr and GetPtr. Review URL: https://codereview.chromium.org/1857713003
2016-04-04Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC.tsepez
Having this happen implicitly can be dangerous because the lifetime has to be considered; we should have caught the "red bots" in https://codereview.chromium.org/1847333004/#ps60001 at compile time. Review URL: https://codereview.chromium.org/1853233002
2016-03-31Re-enable all the windows warnings except 4267weili
The code is changed or had been changed to no longer generate these warnings. It is safe to re-enabled these warnings. In this code change, we fixed some code which generates warnings 4018 (signed/unsigned mismatch) and 4146 (unary minus operator applied to unsigned type, result still unsigned). Warning 4333 (right shift by too large amount, data loss) and 4345 (an object of POD type constructed with an initializer of the form () will be default-initialized) are no longer generated. The same setting is applied and verified for GN build as well. BUG=pdfium:29 Review URL: https://codereview.chromium.org/1849443003
2016-03-29Code change to avoid signed/unsigned mismatch warnings.Wei Li
This makes pdfium code on Linux and Mac sign-compare warning free. The warning flag will be re-enabled after checking on windows clang build. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1841643002 .
2016-03-29Rename GetElementValue() to GetDirectObject{By,At}().tsepez
Every time I read this code, I have to make the mental substituion that "Element value" means "de-ref indirect object", so it might as well just say so. BUG= Review URL: https://codereview.chromium.org/1841173002
2016-03-28Reduce signed/unsigned comparison warningsWei Li
The warnings generated by Clang. This is part 1 for some simple cases. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1840483003 .
2016-03-25Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692tsepez
Review URL: https://codereview.chromium.org/1832173003
2016-03-25Replace CFX_DWordArray with CFX_ArrayTemplate<FX_DWORD>.Tom Sepez
First step to getting rid of FX_DWORD. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1832113003 .
2016-03-24Remove strange integral constants for "true", "false", "%PDF".Tom Sepez
Compilers have good inline memcmp nowadays, so we don't have to resort to old tricks. Remove FXDWORD_FROM_LSBFIRST and FXDWORD_FROM_MSBFIRST while we're at it. MSBFIRST was technically wrong due to promotion to int. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1834553002 .
2016-03-23Split core/include/fpdfapi/fpdf_resource.hdan sinclair
This CL splits apart the core/include/fpdfapi/fpdf_resource.h file and places the classes into individual files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1824033002 .
2016-03-23Move core/include/fxcrt to core/fxcrt/include.Dan Sinclair
This CL moves the fxcrt code into the core/fxcrt directory. The only exception was fx_bidi.h which was moved into core/fxcrt as it is not used outside of core/. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1825953002 .
2016-03-21Remove FX_WORD in favor of uint16_t.Tom Sepez
It isn't buying us anthing, and it looks strange in a struct when other uint types are already present. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821043003 .
2016-03-21Re-enable several MSVC warningsWei Li
Re-enable the following warnings: 4245: signed/unsigned conversion mismatch; 4310: cast may truncate data; 4389: operator on signed/unsigned mismatch; 4701: use potentially uninitialized local variable; 4706: assignment within conditional expression Clean up the code to avoid those warnings. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1801383002 .
2016-03-21Move core/include/fpdfapi/fpdf_pageobj.h into core/fpdfapi.Dan Sinclair
This CL splits the file into individual classes and moves them into core/fpdfapi/fpdf_page as needed. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1811053002 .
2016-03-15core/include/fdpfapi cleanup Part I.Dan Sinclair
This Cl moves a bunch of the files from core/include/fpdfapi to their correct location outside the core/include tree. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1805603002 .
2016-03-15Split CPDF_Stream/CPDF_StreamAcc into separate filesTom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1783933003 .
2016-03-14Move fx_crypto.h and fpdf_text.h out of core/include.Dan Sinclair
This CL moves the two files and breaks fpdf_text.h apart into individual pieces. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1801973002 .
2016-03-14Fix offset outside bounds warning on GCCTom Sepez
Alterntive to part of https://codereview.chromium.org/1785943002/ BUG=589724 R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1802553004 .
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 .