summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
AgeCommit message (Collapse)Author
2017-02-06More CXFA_ItemLayoutProcessor cleanupchromium/3005Dan Sinclair
Continuing cleaning up members and methods of CXFA_ItemLayoutProcessor. Change-Id: Ie74fb83337c85820072b43352b734eafc3a0d5af Reviewed-on: https://pdfium-review.googlesource.com/2513 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-02-06Cleanup xfa layout codedan sinclair
Split XFA layout code into correct files, move static methods into anonymous namespace blocks. Cleanup formatting where possible. Change-Id: Ia342d7db42f947db02a52aa86bfa69e4fda916fd Reviewed-on: https://pdfium-review.googlesource.com/2512 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-02-04Remove unused parameterchromium/3004dan sinclair
The pPageView parameter is always set to nullptr when creating XFA widgets. Change-Id: I4259ff7e523dc462242d2e37f0e2a919c5543035 Reviewed-on: https://pdfium-review.googlesource.com/2511 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@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-23Replace CXFA_StrokeArray and CXFA_WidgetArray with std::vectortsepez
Review-Url: https://codereview.chromium.org/2648773003
2017-01-23Remove some |void Release() { delete this; }| anti-pattern.tsepez
m_pSyntaxParser was unused. Review-Url: https://codereview.chromium.org/2646203002
2017-01-20Replace CFX_ByteArray with CFX_ArrayTemplate<uint8_t>chromium/2990chromium/2989chromium/2988tsepez
Also replace CFX_Int32Array typedef with CFX_ArrayTemplate<int32_t>. Removing the typedefs makes subsequent conversion to std::vector<> easier on a case-by-case basis. Review-Url: https://codereview.chromium.org/2649563003
2017-01-19Split fde/css files into individual class files.Dan Sinclair
This CL splits the files in xfa/fde/css into class per file and renames any needed files to match the class names. Update some of the classes to use std::stack. Change-Id: I4eca0fb3556d949a15a873bb0f0fd732f47e4fb1 Reviewed-on: https://pdfium-review.googlesource.com/2253 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-01-06Remove CFX_MapPtrToPtr and templates.chromium/2976chromium/2975tsepez
All usage is now replaced with stl equivalents. Move one definition from fx_basic.h to where it's actually needed. Review-Url: https://codereview.chromium.org/2612773007
2017-01-05use unique_ptr in cxfa_layoutprocessor.htsepez
Review-Url: https://codereview.chromium.org/2617483005
2017-01-05Remove CFX_MapPtrToPtr from xfa/fxfa.tsepez
Review-Url: https://codereview.chromium.org/2612923002
2017-01-03Remove the ::GetCapacity methods.Dan Sinclair
The GetCapacity methods return a void* because they return different types of internal class memory based on what the calling parameter was. This is confusing and makes it difficult to tell when then enum values can be removed. This CL removes GetCapacity and adds methods as needed to get the real values. Change-Id: I64c2edc858220624880e27f4ed49c2dae080f462 Reviewed-on: https://pdfium-review.googlesource.com/2137 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-03Create individual exception methods.Dan Sinclair
This CL removes the LoadString method from CPDFXFA_Context and, instead, creates individual exception methods for each of the loaded strings and calls as needed. BUG=pdfium:549 Change-Id: I1d975f01f13f45a885946a9952f24b13387dc3e4 Reviewed-on: https://pdfium-review.googlesource.com/2135 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-03Kill last use of CFX_PtrList.tsepez
I'd been waiting on this hoping the code would be refactored out of existence, but it looks to be used. Use tests against x.end() in place of a "null position". This is greatly complicated by the use of "tail position", which now calcluated by std::prev(x.end()) unless the list is empty. Review-Url: https://codereview.chromium.org/2592163002
2017-01-03Cleaning out params in CPDFXFA_ContextDan Sinclair
This CL cleans up some of the out params in CPDFXFA_Context. In the process several of the strings returned by ::LoadString() are inlined in their call sites and the defines removed. BUG=pdfium:549 Change-Id: I41a7ceeba3962299eecd0cb714ddb03d28dbb0ea Reviewed-on: https://pdfium-review.googlesource.com/2134 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2016-12-14Avoid the ptr.reset(new XXX()) anti-patterntsepez
Be suspicious of |new|. This removes some of the easy cases. Review-Url: https://codereview.chromium.org/2571913002
2016-12-08Replace CFX_WideStringArray with std::vectortsepez
Minimalist changes with the tidying of the code to use better loop iterators as a follow-up. Review-Url: https://codereview.chromium.org/2556963004
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-07Remove CFX_FormatString::Release()tsepez
Avoid the |delete this| anti-pattern. Remove some checks which don't avoid other segvs anyways. Review-Url: https://codereview.chromium.org/2557173002
2016-12-07Catch stray Retains() and Releases() outside of RetainPtr<>.tsepez
The previous CLs made the code clean, so now we can mark more things private, and add friends as appropriate. Review-Url: https://codereview.chromium.org/2560783003
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-30Convert loose FX_Create* functions into static methodstsepez
Also remove a bool that is always false. Review-Url: https://codereview.chromium.org/2539203002
2016-11-21Fixup lint flags.Dan Sinclair
The -build/include setting was masking out build/include_what_you_use. This CL restores them, fixes any build errors, and adds NOLINT as needed. As well, the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd. lint cleanups Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f Reviewed-on: https://pdfium-review.googlesource.com/2030 Reviewed-by: Tom Sepez <tsepez@chromium.org>
2016-11-11Add fpdfppo_embeddertest.cpp.tsepez
The lack of coverage of the fpdfppo APIs was noticed while trying to diagnose another issue. Adding basic calls to these APIs then kicked out an assert in XFA, where duplicate global CFXA_TimeZoneProviders were not expected. These are cheap to create except for the global C RTL tzset() call, so keep track of that and make these on demand. Review-Url: https://codereview.chromium.org/2488403004
2016-11-02Remove FX_BOOL from xfa.tsepez
Review-Url: https://codereview.chromium.org/2467203003
2016-11-01Reland: Make the CPDFXFA_App non-globalchromium/2907dsinclair
This reverts commit a282c7380f3964de41ea93c9980b12c4513d3473. This CL changes CPDFXFA_App from a global object to a child of the CPDFXFA_Document objects. BUG=pdfium:623 Review-Url: https://codereview.chromium.org/2421603002
2016-10-27Fix more FX_BOOL / int noise in fxfa/parser.tsepez
Review-Url: https://codereview.chromium.org/2460723002
2016-10-27Fix some FX_BOOL / int noise in fxfatsepez
Review-Url: https://codereview.chromium.org/2457673003
2016-10-27Fix some FX_BOOL / int noise in XFA barcodestsepez
Review-Url: https://codereview.chromium.org/2447163007
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-10-13Cleanup CPDFXFA_App methodsdsinclair
This CL removes methods which are never called, or are only called once and return a static value. Those values are inlined at the calling site. Review-Url: https://codereview.chromium.org/2418633002
2016-10-04Cleanup DEPS filesdsinclair
Remove redundant DEPS files and DEPS file entries. Review-Url: https://codereview.chromium.org/2390833003
2016-09-29Move xfa/fxfa/include to xfa/fxfadsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2383593002
2016-09-29Move xfa/{fwl,fxbarcode,fxgraphics}/include up to parentdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2383583002
2016-09-29Move fxjs/include to fxjsdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2380713005
2016-09-29Move core/fxge/include to core/fxgedsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2377393002
2016-09-29Move core/fxcrt/include to core/fxcrtdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2382723003
2016-09-29Move core/fxcodec/codec/include and core/fxcodec/include files updsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2381063002
2016-09-22Move CPDFSDK_Environment code to cpp filedsinclair
This CL moves the code from the .h file into the .cpp file. Review-Url: https://codereview.chromium.org/2354363003
2016-09-21Make the I in IFormFiller explicitdsinclair
Typically the I prefix means Interface, except for CFFL_IFormFiller where it means Interactive. Rename CFFL_IFormFiller to CFFL_InteractiveFormFiller to make the meaning explicit. Review-Url: https://codereview.chromium.org/2357203003
2016-09-14Remove FFI_ from CPDFSDK_Environment method namesdsinclair
The prefix doesn't add anything when used in CPDFSDK_Environment, remove. Review-Url: https://codereview.chromium.org/2338303002
2016-09-14Split CPDFXFA_Document apartdsinclair
[DO NOT COMMIT] This CL renames IXFA_DocProvider to IXFA_DocEnvironment to better describe the purpose. Then, CPDFXFA_Document has all of the IXFA_DocEnvironment methods removed and placed in CPDFXFA_DocEnvironment. The CPDFXFA_Document then has a CPDFXFA_DocEnvironment. This splits the code related to the document apart from the XFA callback methods to work with that document. Review-Url: https://codereview.chromium.org/2328573002
2016-09-14Cleanup CPDFXFA_Document.dsinclair
Remove unused params and methods. Cleanup formatting. Review-Url: https://codereview.chromium.org/2322003002
2016-09-14Remove unused code in CPDFXFA_Documentdsinclair
Remove methods that always just return without doing any work. Clean up the IXFA_DocProvider interface calls for those methods and cleanup the callers that were calling the methods. Review-Url: https://codereview.chromium.org/2323523002
2016-09-07Fix spelling of "Formated" in several variableschromium/2854tsepez
Review-Url: https://codereview.chromium.org/2318423002
2016-08-15Clean up XFA locale and locale managerweili
Return unique_ptr for GetLocale(), directly use destructors instead of Release() functions, use vectors to manage arrays. Review-Url: https://codereview.chromium.org/2241863002
2016-08-11Remove fgas_system files.dsinclair
The two methods in fgas_system also exist in core/fxcrt/include/fx_ext with the FXSYS_ prefix instead of FX_. Remove the fgas_system files and use the fx_ext versions instead. Review-Url: https://codereview.chromium.org/2233133002