summaryrefslogtreecommitdiff
path: root/xfa
AgeCommit message (Collapse)Author
2017-01-04Remove CFX_ArrayTemplate in BC_QRCoderEncoder.tsepez
Also, class Make_Pair is confusing given std::make_pair(). No need for vectors of pointers when there are reasonable copy ctors. Save 288 bytes in a table while we're at it, and make local to file. Fix spelling of "Numberic". Review-Url: https://codereview.chromium.org/2595203002
2017-01-03remove some CFX_ArrayTemplate in xfa_ffdocview.hchromium/2971tsepez
Review-Url: https://codereview.chromium.org/2593163002
2017-01-03Cleanup ThemeProvider codeDan Sinclair
Remove unused methods, fold the arrow data into the CFWL_WidgetTP instead of a custom class and global object. Change-Id: Ie942052555d6c8668d27072c1fcc5e8e00597518 Reviewed-on: https://pdfium-review.googlesource.com/2139 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
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-03Convert CFWL_MonthCalendar to use return valuesDan Sinclair
This CL updates CFWL_MonthCalendar to return values instead of taking an out parameter. Change-Id: I347d0e85897be1359bad7971d82c70dfad0d69a0 Reviewed-on: https://pdfium-review.googlesource.com/2132 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-03Remove more CFX_ArrayTemplate in cfwl_notedriver.h.tsepez
Also pass some unqiue_ptr further down while we're at it. Review-Url: https://codereview.chromium.org/2594103002
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-03Remove CFWL_ListBox::GetDataProviderItemTextDan Sinclair
This method just proxies to the provided item now. Remove the method and call GetText() directly if possible. Change-Id: Ida49e0e878f859a69f7d5bec9d0f734feb7a763d Reviewed-on: https://pdfium-review.googlesource.com/2130 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
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>
2017-01-03Use return values in CFWL_Scrollbar instead of out paramsDan Sinclair
This CL updates CFWL_Scrollbar use return values instead of using out params. In some cases, the same values is assigned and passed in, but passing in the const ref is a lot clearer as to what is happening. Change-Id: Iff72a845e09ac73ff8eac938482547eaf251f835 Reviewed-on: https://pdfium-review.googlesource.com/2133 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2016-12-16Better tests for password protected documents.chromium/2954tsepez
- Add unit tests for sha256 implementation. - Remove void* types from API in favor of correct actual types. Review-Url: https://codereview.chromium.org/2577223002
2016-12-15Move window type mask up with masked flagsdsinclair
Move code to make clear what is being masked. Review-Url: https://codereview.chromium.org/2573163002
2016-12-15Remove widget offscreen code.dsinclair
The Offscreen state was never set, removed. Review-Url: https://codereview.chromium.org/2569663006
2016-12-15Cleanup widget edge related codedsinclair
CFWL_Widget::HasEdge() always returns false. This CL removes it and the supporting code. Review-Url: https://codereview.chromium.org/2575093002
2016-12-15Remove more unused widget stylesdsinclair
Remove more FWL Widget Styles which are never set. Review-Url: https://codereview.chromium.org/2578473003
2016-12-15Remove unused widget state flagsdsinclair
These widget state flags are not set and mostly unused. Removed. Review-Url: https://codereview.chromium.org/2573133002
2016-12-15Remove unused sysbtn codedsinclair
This CL removes the unused FWL_WGTSTYLE_MinimizeBox, FWL_WGTSTYLE_MaximizeBox, and FWL_WGTSTYLE_CloseBox along with the supporting code. Review-Url: https://codereview.chromium.org/2578603002
2016-12-14Return unique_ptr from CXFA_FFApp::CreateDoc.tsepez
Remove one unused CreateDoc variant. Review-Url: https://codereview.chromium.org/2576893002
2016-12-14More unique_ptr returns from DIB methods.tsepez
Review-Url: https://codereview.chromium.org/2572293002
2016-12-14Remove unused flags in CFWL_PushButtonchromium/2952dsinclair
Review-Url: https://codereview.chromium.org/2571863002
2016-12-14Cleanup CFWL_MonthCalendar flagsdsinclair
Remove unused flags in CFWL_MonthCalendar. Review-Url: https://codereview.chromium.org/2570943002
2016-12-14Remove unused CFWL_Form flagsdsinclair
Cleanup flags in CFWL_Form which are never set. Review-Url: https://codereview.chromium.org/2575573002
2016-12-14Remove unused CFWL_Edit flags.dsinclair
This CL removes the flags from CFWL_Edit which are never set. In turn, the coresponding text edit engine flags are removed. Review-Url: https://codereview.chromium.org/2570033003
2016-12-14This CL removes some of the unused CFWL widget flags.dsinclair
Several of the widgets have flags which are no longer set. This CL removes the flags and any flag conditional code. Review-Url: https://codereview.chromium.org/2570083002
2016-12-14Remove unused CFWL_ListBox codedsinclair
This CL removes states and settings from the CFWL_ListBox code which were never enabled. Review-Url: https://codereview.chromium.org/2576483002
2016-12-14Update CFWL_ListBox to return instead of using out params.dsinclair
This CL updates the CFWL_ListBox code to work with return values instead of out params. This also extracts the CFWL_ListItem code out of CFWL_ListBox and puts into the correct class. Review-Url: https://codereview.chromium.org/2572783002
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-13Replace CFX_FloatArray with std::vectortsepez
Review-Url: https://codereview.chromium.org/2567503002
2016-12-08Change CFWL_Widget::GetMatrix to return the matrixdsinclair
This CL switches to using a return value instead of an out parameter. The global flag was also removed and the call sites changed to just SetIdentity as appropriate. Review-Url: https://codereview.chromium.org/2564443003
2016-12-08Replace CFX_WideStringCArray with std::vector.chromium/2946tsepez
Review-Url: https://codereview.chromium.org/2562833002
2016-12-08Change layout item in CFWL_Widget type from voiddsinclair
Previously the LayoutItem was a void*. This Cl changes the LayoutItem to explicity be a CXFA_FFWidget. Review-Url: https://codereview.chromium.org/2559643004
2016-12-08Cleanup CFWL_Widget code to return CFX_RectFs where appropriatedsinclair
This Cl changes the various Get*Rect methods in CFWL_Widget to return CFX_RectF classes instead of taking an out parameter. The Repaint method is split into Repaint() and RepaintRect() in order to change the param to a const CFX_RectF& from a CFX_RectF*. Review-Url: https://codereview.chromium.org/2560873005
2016-12-08Remove unused list data pointerdsinclair
The list item data pointer was never assigned. Removed pointer and referencing code. Review-Url: https://codereview.chromium.org/2563693003
2016-12-08Remove last usage of CFX_ObjectArray.tsepez
Review-Url: https://codereview.chromium.org/2558373002
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-08Move xfa/fwl/core to xfa/fwl.dsinclair
The core/ directory in FWL no-longer provides any context. This Cl moves all of the core/ files up to the fwl/ folder. As well, the CFWL_EvtFoo files are renamed CFWL_EventFoo and the CFWL_MsgFoo files are renamed CFWL_MessageFoo. The event and message preceed the type in order to keep the files sorted together and to make it clear that they're all related. Review-Url: https://codereview.chromium.org/2559173002
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-07Replace CFX_ByteStringArray with std::vector.tsepez
Also convernt one nearby array to vector as well. Review-Url: https://codereview.chromium.org/2559903002
2016-12-07Convert GetWidgetRect to return rect.dsinclair
Current GetWidgetRect accepts the rect as an out-param. This CL converts the code to return the rect instead. Review-Url: https://codereview.chromium.org/2556873004
2016-12-07Split CFWL_Widget::GetWidgetRect into two partsdsinclair
This CL splits the inflation logic out of GetWidgetRect to allow subclasses to call that directly instead of the CFWL_Widget::GetWidgetRect method. Review-Url: https://codereview.chromium.org/2555253002
2016-12-07Cleanup return values in CFWL_ComboBoxdsinclair
This CL changes methods in CFWL_ComboBox to return values instead of taking out params. Review-Url: https://codereview.chromium.org/2555103005
2016-12-07Cleanup FWL default values part II.dsinclair
This CL cleans up the remaining default values in the fwl/core directory. Some methods are renamed to better represent what they do. Review-Url: https://codereview.chromium.org/2557103002
2016-12-07Cleanup default FWL params part Idsinclair
This Cl removes some of the default FWL parameters. Review-Url: https://codereview.chromium.org/2533623002
2016-12-07Cleanup caret show/hide codedsinclair
This CL splits the cursor code into specific show/hide methods to make it clearer what is happening at each point. Review-Url: https://codereview.chromium.org/2535623002
2016-12-07Cleanup FWL Event and Message code.dsinclair
This CL removes any CFWL_Evt classes for which nothing was listening to the events. For events with no parameters the override class was removed and the event type passed into CFWL_Event which is used instead. Any event or message parameters which are un-read have been removed. Review-Url: https://codereview.chromium.org/2530993002
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-07Properly ref count IFX_FileAccess.tsepez
Review-Url: https://codereview.chromium.org/2562563002
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