summaryrefslogtreecommitdiff
path: root/xfa
AgeCommit message (Collapse)Author
2016-06-20Fix clang_use_chrome_plugin for Mac and Skia buildsweili
These changes are specific to Mac and Skia builds. They are needed for these builds to compile with clang_use_chrome_plugin. BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2081523002
2016-06-20Change func(void) to func()weili
Since PDFium is compiled as C++ code, the void keyword is not needed. BUG=pdfium:519 Review-Url: https://codereview.chromium.org/2084603003
2016-06-20Split the XFA_OBJECTTYPE enum into two parts.dsinclair
Currently the object type and the node flags are both mixed into the single XFA_OBJECTTYPE_* enum. These two things are un-related and should not share a single type. This Cl creates an XFA_ObjectType enum class and a XFA_NodeFlag enum to hold the two types. Accessors are added to determine if the flags are set (or called where they already existed. Review-Url: https://codereview.chromium.org/2083453003
2016-06-20Another round of fx_ge cleanup.thestig
- Clean up CFX_GEModule. - Remove duplicate #defines in fx_ge.h - Remove IsFontStyleFromCharCode() that always returns true. - Mark a FXTEXT_CHARPOS field as Mac only. Review-Url: https://codereview.chromium.org/2075333002
2016-06-18Make code compile with clang_use_chrome_plugin (final)weili
This change mainly contains files in xfa/ and fxjse/ directories which were not covered by previous changes. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. After this change, PDFium can be compiled with "clang_use_chrome_plugin=true" for GN build. Since clang_use_chrome_plugin is true by default, we no longer need to set this parameter explicitly. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2072803002
2016-06-18Make code compile with clang_use_chrome_plugin (part VI)weili
This change mainly contains files in xfa/fwl directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2070583003
2016-06-16Remove unused code.dsinclair
This cl removes code that exists but is never called. This includes: * cfwl_formtp * cfwl_widgetdelegate * cfwl_scrollbar * cfwl_theme * cfwl_tooltip * PWL_Label * PWL_ListCtrl * PWL_Signature * PWL_IconList * BC_ResultPoint * BC_CommonPerspectiveTransform * BC_CommonBitSource * BC_PDF417Codeword * fx_codec_flate.h (the .cpp file still exists) Review-Url: https://codereview.chromium.org/2071953002
2016-06-16Remove unused XFA_GetElementChildren.dsinclair
This CL removes the method and the backing data. Review-Url: https://codereview.chromium.org/2079493002
2016-06-16Remove barcode reading code.dsinclair
We never read barcodes, we only write them. Remove code related to barcode reading. Review-Url: https://codereview.chromium.org/2071633002
2016-06-16Rename fxmath_barcodeimp to cfx_barcodedsinclair
Renames the files to make their contents clearer. Review-Url: https://codereview.chromium.org/2073793002
2016-06-16Cleanup FWL RenderWidget method parameters.dsinclair
This CL removes the default values from pMatrix and dwStatus as they are always set and removes the iRotate parameter as it is never set and never used. Review-Url: https://codereview.chromium.org/2071903002
2016-06-16Make code compile with clang_use_chrome_plugin (part V)chromium/2770weili
This change mainly contains files in xfa/fxfa directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2071683002
2016-06-16Cleanup XML parser code.dsinclair
This Cl removes the CFDE_XMLSAXParser and CFDE_XMLDOMParser along with the ::LoadXML() method which would create them, it was never called. It also cleans up the use of virtual in the various XML classes. Review-Url: https://codereview.chromium.org/2067253002
2016-06-15Make code compile with clang_use_chrome_plugin (part IV)weili
This change mainly contains files in fpdfsdk/ directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups plus removing an unused file and splitting cxfa_eventparam out from fxfa.h BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2062313002
2016-06-14Make code compile with clang_use_chrome_plugin (part III)weili
This change contains files in xfa/fxbarcode directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2067903002
2016-06-14Cleanup ownership in CXFA_ScriptContext.dsinclair
This Cl substitutes some unique_ptrs for various bits of manual memory management in CXFA_ScriptContext. Review-Url: https://codereview.chromium.org/2062113002
2016-06-14Add fuzzer for FDE CSS syntax parser.dsinclair
This CL adds a fuzzer for the CSS Syntax parser in XFA. BUG=chromium:587126 Review-Url: https://codereview.chromium.org/2068513002
2016-06-13Optionally skip image type detection in progressive decoder.dsinclair
The progressive decoder will attempt to verify that the provided image type matches the actual image content. We need to disable this check when running the fuzzer in order to target the fuzzing to specific decoders otherwise each fuzzer will end up fuzzing all of the decoders. BUG=chromium:587126 Review-Url: https://codereview.chromium.org/2061733002
2016-06-10Trust the compiler to do array indexing and superclass promotion.tsepez
Review-Url: https://codereview.chromium.org/2063463002
2016-06-10Add missing const, remove casts in BC_QRCoderErrorCorrectionLeveltsepez
Review-Url: https://codereview.chromium.org/2053043004
2016-06-10Remove redundant make_pair* cast in fxbarcodetsepez
Review-Url: https://codereview.chromium.org/2052413002
2016-06-10Remove redundant casts, part 9.tsepez
Make CFDE_TxtEdtParag::m_lpData a int32_t*, not void*, since it is cast to int32_t everywhere it is used. Many fxbarcode casts are redundant, likely the result of previous generic PtrArray replacement with templated type. Review-Url: https://codereview.chromium.org/2059953002
2016-06-10Get rid of NULLs in xfa/fde/thestig
Review-Url: https://codereview.chromium.org/2039923004
2016-06-09remove redundant CFX_Matrix* cast in one-d barcodechromium/2766chromium/2765tsepez
Review-Url: https://codereview.chromium.org/2055103002
2016-06-09Avoid casts via correct types in fgas_textbreaktsepez
FLW_DATEINFO cast not required. Review-Url: https://codereview.chromium.org/2053963002
2016-06-09Get rid of NULLs in xfa/fxbarcode/thestig
Review-Url: https://codereview.chromium.org/2048983002
2016-06-09Remove more casts, part 7.tsepez
Replacing a void* member in CFX_SAXItem saves lots of casts. Review-Url: https://codereview.chromium.org/2051233002
2016-06-09Move xfa/fxjse/ to fxjse/dsinclair
This makes it clear that fxjse/ is a standalone component and should not be entangled with other xfa/ components. BUG=pdfium:506 Review-Url: https://codereview.chromium.org/2056663004
2016-06-09Change CFXJSE_Context::GetGlobalObject to returndsinclair
This Cl changes CFXJSE_Context::GetGlobalObject to return a std::unique_ptr<CFXJSE_Value> instead of accepting a CFXJSE_Value out parameter. All usages created the CFXJSE_Value with the same runtime as the caller. Review-Url: https://codereview.chromium.org/2056733003
2016-06-09Convert CFXJSE_Value::ToString to return.dsinclair
ThiS Cl updates CFXJSE_Value::ToString() to return a CFX_ByteString instead of taking an out parameter. It also adds a ToStringC() and ToWideString() to hide the common conversions that are done on the string value. Review-Url: https://codereview.chromium.org/2044293004
2016-06-09xfa_fm2jscontext method cleanup - pt IX of IXdsinclair
Clean up ::ExtractDouble, ::ValueToDouble, ::ValueToFloat, ::ValueToInteger, ::ParseResolveResult, ::ResolveObjects, ::GetObjectByName, ::unfoldArgs, ::simpleValueCompare, ::ValueIsNull, ::concat_fm_object, ::fm_var_filter, ::get_fm_value, ::is_fm_array, ::is_fm_object, ::eval_translation, ::dotdot_accessor and ::dot_accessor Review-Url: https://codereview.chromium.org/2053583003
2016-06-09Use static_cast<CXFA_WidgetAcc*> in xfa.tsepez
Remove a few other unused casts, simplify. Review-Url: https://codereview.chromium.org/2052593003
2016-06-09Remove C-style casts in xfa/fde.tsepez
Review-Url: https://codereview.chromium.org/2040323004
2016-06-09Fix crash in CXFA_Node::TryUserData() (speculative)tsepez
Fix is speculative because I can't repro locally, but I know the current code is wrong. I fixed this intially in https://codereview.chromium.org/2015143005/ I then broke it again in https://codereview.chromium.org/2019333006/ There is another spot where we are still casting through void*, and the CXFA_Node*'s alignment is getting messed up when it fails to adjust for it's vtable. Using CFXJSE_HostObject consistently avoids the issue. Adding a virtual dtor to CFXJSE_HostObject might skirt the issue, but I want to be able to wrap simple objects without that penalty if desired. BUG=616339 Review-Url: https://codereview.chromium.org/2055473004
2016-06-08xfa_fm2jscontext method cleanup - pt VIIIdsinclair
Cleanup ::logical_not_operator, ::negative_operator, ::positive_operator, ::divide_operator, ::multiple_operator, ::minus_operator, ::plus_operator, ::greaterequal_operator, ::greater_operator, ::lessequal_operator, ::less_operator, ::fm_ref_equal, ::notequality_operator, ::equality_operator, ::logical_and_operator, ::logical_or_operator, ::assign_value_operator, ::Put, ::Post, ::Get, ::TrillionUS and ::WordUS. Review-Url: https://codereview.chromium.org/2046123004
2016-06-08xfa_fm2jscontext method cleanup - pt VIIdsinclair
This CL formats ::WordNum, ::Upper, ::Uuid, ::Substr, ::Stuff, ::Str, ::Space, ::RTrim, ::Right, ::Replace, ::Parse, ::Ltrim, ::Lower, ::Len, ::Left, ::Format, ::HTMLSTR2Code, ::HTMLCode2STR, ::EncodeXML, ::EncodeHTML, ::EncodeURL and ::Encode. Review-Url: https://codereview.chromium.org/2047103004
2016-06-08Remove more FXJSE c-method wrappers.dsinclair
This Cl cleans up a bunch of the FXJSE_* methods and moves others into the classes where they most make sense. Review-Url: https://codereview.chromium.org/2045883004
2016-06-08Fix GetPageIndex() for dynamic XFA documents.thestig
BUG=614211 Review-Url: https://codereview.chromium.org/2045013004
2016-06-07Remove various FXJSE Value methods.dsinclair
This CL removes the FXJSE_Value_Set*, FXJSE_Value_To*, FXJSE_Value_Get* and FXJSE_Value_Delete* methods. Review-Url: https://codereview.chromium.org/2043153002
2016-06-07Remove dead code in CFGAS_FontMgrImp.thestig
And also CFGAS_StdFontMgrImp. Review-Url: https://codereview.chromium.org/2033673002
2016-06-07Replace IFGAS_Font with underlying concrete typethestig
Review-Url: https://codereview.chromium.org/2037563002
2016-06-07xfa_fm2jscontext method cleanup - pt VIchromium/2763dsinclair
Cleans up ::DecodeXML, ::DecodeHTML, ::DecodeURL, ::Decode, ::Concat, ::At, ::UnitValue, ::UnitType, ::Ref, ::Eval, ::If, ::Within. Review-Url: https://codereview.chromium.org/2043133002
2016-06-07Remove casts to same type in xfa_script_imp.cpptsepez
Review-Url: https://codereview.chromium.org/2046133002
2016-06-07Remove some casts to same type in cfx_graphics.cpptsepez
Review-Url: https://codereview.chromium.org/2048663004
2016-06-07Fix more code which has shadow variablesweili
The code has local variables that shadow struct or class member variables. Also, when this happens, different variable names should be used instead of namespaces. These were discovered by /Wshadow warning flag in Clang. Review-Url: https://codereview.chromium.org/2034253003
2016-06-07Get rid of NULLs in core/thestig
Review-Url: https://codereview.chromium.org/2032613003
2016-06-07Remove FDE_HVISUALOBJ.dsinclair
This CL removes the FDE_HVISUALOBJ in favour of the concrete FDE_TEXTEDITPIECE class. The parameter was removed from any method which didn't use it and the non-implemented methods were removed. Review-Url: https://codereview.chromium.org/2047693002
2016-06-07xfa_fm2jscontext method cleanup - pt Vdsinclair
Cleans up ::Oneof, ::HasValue, ::Exists, ::Choose, ::Term, ::Rate, ::PV, ::PPmt, ::Pmt, ::NPV, ::IPmt, ::FV, ::CTerm and ::Apr Review-Url: https://codereview.chromium.org/2042843003
2016-06-06Remove unused CFDE_TxtEdtEngine::SetBufChunkSize().tsepez
In turn, CFDE_TxtEdtBuf::SetChunkSize becomes unused. Review-Url: https://codereview.chromium.org/2042743003
2016-06-06Remove FWL_HTIMER in favor of IWFL_TimerInfotsepez
Review-Url: https://codereview.chromium.org/2037573003