summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_simple_parser.cpp
AgeCommit message (Collapse)Author
2017-04-05Check first then cast in XFA_FDEExtension_ResolveNamespaceQualifierTom Sepez
Bug: 708383 Change-Id: I6d59fb40bbddd4bdc7224d72bfb789d360f029ca Reviewed-on: https://pdfium-review.googlesource.com/3770 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-04-05Move XML attribute handling to a base class.Dan Sinclair
This CL moves the attribute handling out of CFDE_XMLElement and CFDE_XMLInstruction into a common CFDE_XMLAttributeNode. The handling is also converted to a std::map from either a) a vector storing name,value,name,value or b) two vectors one for names and the other for values. The unused Get/Set methods for interger and float are removed and the iteration is converted to use iterators. Change-Id: Icda00ae898a595d58b06af0ced337f55f47c317c Reviewed-on: https://pdfium-review.googlesource.com/3753 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-04-04Cleanup CFDE_XMLCharData and CFDE_XMLTextDan Sinclair
This Cl switchs CFDE_XMLCharData to subclass CFDE_XMLText and cleans up the code which was the same except for the accessor names. Change-Id: I85ebf4f3f19f0d15be4dd77a71b89ca8083f4b1e Reviewed-on: https://pdfium-review.googlesource.com/3672 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-04-03Split the FDE XML file into indiviual class files.Dan Sinclair
This Cl splits the fde_xml_int file apart into individual class files. Includes are fixed as needed. fde_xml.h is also removed and the needed defines moved to more appropiate places. Change-Id: I29774dabc4d0fb2d5092fcbbe7853f03401b6ec7 Reviewed-on: https://pdfium-review.googlesource.com/3616 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-03-30Move CXFA_XMLParser to CFDE_XMLParserDan Sinclair
There is nothing XFA specific in the CXFA_XMLParser. This Cl moves it to the CFDE_XMLParser and co-locates with the other XML code. Change-Id: I86c12da3f6f5732be54b8019562978f88234e2fc Reviewed-on: https://pdfium-review.googlesource.com/3432 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-30Add some calls to MakeUniqueDan Sinclair
This CL replaces some new's with pdfium::MakeUnique. Change-Id: I50faf3ed55e7730b094c14a7989a9dd51cf33cbb Reviewed-on: https://pdfium-review.googlesource.com/3430 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-03-30Move CFX files into fxcrtDan Sinclair
This Cl moves more of the CFX classes defined in the xfa/ directory to the core/fxcrt directory and conditionally builds them. Change-Id: I811e6c6acd31dfbe75b49880be43661f78334013 Reviewed-on: https://pdfium-review.googlesource.com/3372 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-29Split xfa_object.h apart.Dan Sinclair
This Cl splits the xfa_object.h into individual class header files and fixes the needed includes. Change-Id: Ia011ee9bc5deee5e44b8a956fa54bc2c3849cff0 Reviewed-on: https://pdfium-review.googlesource.com/3254 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-23Cleanup some xfa/fxfa code.Dan Sinclair
This CL moves the .h files to have names corresponding to the contained classes. The .cpp files are moved alongside the .h files. Any extra classes in the .h files have been split into their own files. Change-Id: I14b4efc02417f0df946500e87b6c502e77020db8 Reviewed-on: https://pdfium-review.googlesource.com/3160 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-02-02Remove FX_WSTRC usagechromium/3003chromium/3002dan sinclair
Not needed with modern compilers, removed. Change-Id: Ia8977262b5791bd4445f02be8456641d1a7e18f3 Reviewed-on: https://pdfium-review.googlesource.com/2431 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-23Remove some |void Release() { delete this; }| anti-pattern.tsepez
m_pSyntaxParser was unused. Review-Url: https://codereview.chromium.org/2646203002
2016-12-07Use unique_ptr for CXFA_XMLParser.tsepez
Also rename CFDE_XMLParser to IFDE_XMLParser since its an interface. Review-Url: https://codereview.chromium.org/2555373002
2016-12-07Refcount IFGAS_ streams all the time, tootsepez
IFGAS_Streams are not part of the IFX_Stream hierarchy, but can be made from such. Review-Url: https://codereview.chromium.org/2559763002
2016-12-07Refcount all the IFX_ stream classes all the time.tsepez
We can remove a lot of "bOwnsStream" logic in the process. Always pass these by const reference, in case the called method wants to hang on to the stream (one exception is where we stick a raw pointer into a void* slot in a context from another layer). Review-Url: https://codereview.chromium.org/2451493002
2016-12-02Rename IFX_Stream to IFGAS_Stream.tsepez
It's a separate hierarchy unrelated to the IFX_*Stream classes. Also rename CFX_Stream to CFGAS_Stream, and so forth. Review-Url: https://codereview.chromium.org/2535723010
2016-11-02Remove FX_BOOL from xfa.tsepez
Review-Url: https://codereview.chromium.org/2467203003
2016-10-25Fix some return FALSE in functions that return pointerschromium/2901tsepez
This previously compiled because FALSE is #defined to 0, and 0 is a perfectly fine value for a pointer. Review-Url: https://codereview.chromium.org/2448943003
2016-10-24Rename IFX_ stream nameschromium/2900tsepez
It's been troubling for some time that an IFX_FileStream might actually be an in-memory buffer with no backing file. Review-Url: https://codereview.chromium.org/2443723002
2016-09-29Move xfa/fxfa/include to xfa/fxfadsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2383593002
2016-09-29Move core/fxcrt/include to core/fxcrtdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2382723003
2016-07-21Remove default parameters from CXFA_SimpleParser.dsinclair
This CL removes default params from CXFA_SimpleParser and updates the call sites as necessary. Review-Url: https://codereview.chromium.org/2164963003
2016-07-21Move xfa_document to cxfa_documentdsinclair
This moves the code to match the actual class name. Review-Url: https://codereview.chromium.org/2163133004
2016-07-21Move xfa_basic_imp to cxfa_widetextread.dsinclair
This Cl splits out the CXFA_WideTextRead class into it's own file. The helper methods have been moved into xfa_utils.cpp and their pre-declarations into xfa_utils.h. Review-Url: https://codereview.chromium.org/2165993002
2016-07-11Cleanup CXFA_SimpleParser.dsinclair
This CL moves the static methods to an anonymous namespace and cleans up various formatting issues. Review-Url: https://codereview.chromium.org/2138833002
2016-07-11Cleanup ownership of parser membersdsinclair
Change m_pXMLDoc and m_pStream in CXFA_SimpleParser to be a unique_ptr. This allows removing the CloseParser() call from CXFA_DocumentParser as the items will get cleaned up automatically. Review-Url: https://codereview.chromium.org/2131653002
2016-07-11Break xfa_parser_imp apartdsinclair
This CL splits the three parsers into individual files to make working with the code easier. Review-Url: https://codereview.chromium.org/2129963002