summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_fftextedit.cpp
AgeCommit message (Collapse)Author
2016-11-24Change TxtEdtEngine to return CFX_WideStringchromium/2935chromium/2934chromium/2933chromium/2932dan sinclair
This Cl updates the TxtEdtEngine and TxtEdtBuf to return CFX_WideStrings on a Get instead of taking an out param. The change is propagated out through the various Get methods that call into the edit engine. Change-Id: Iccf10a8ee06678ae3b59f3afd6e65308dacd16bd Reviewed-on: https://pdfium-review.googlesource.com/2070 Commit-Queue: ooo 11-24 -- 12-05 (dsinclair) <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2016-11-23Merge IFWL and CFWL classes.dsinclair
This CL merges the IFWL hierarchy into the CFWL hierachy. All CFWL proxy methods have been replaced by the IFWL implementations. Review-Url: https://codereview.chromium.org/2524173002
2016-11-21Split fwl/core class pt II.dsinclair
Split classes in FWL to be single class per file. In the case of data providers which added no new methods, removed and used the IFWL_Widget::DataProvider directly. Review-Url: https://codereview.chromium.org/2520063002
2016-11-17Unify the three CFWL_EventType::SelectChange classes.dsinclair
This CL removes the ListBox SelectChange class as it is never processed. The other two have been unified into a single classs. Review-Url: https://codereview.chromium.org/2509283003
2016-11-17Move the IFWL_Edit Events out of ifwl_edit.hdsinclair
This Cl moves the edit events to actual class files and renames to drop the Edt from the names. Review-Url: https://codereview.chromium.org/2515463002
2016-11-16Move the message definitions to their own files.chromium/2923dsinclair
Currently the CFWL messages are created by a macro in the CFWL_Message header file. This Cl splits out the class to their own files and writes them directly instead of using the macro. Review-Url: https://codereview.chromium.org/2510823003
2016-11-10IFWL method and param cleanupdsinclair
Cleaning up virtual methods, unused methods, and visibility. Review-Url: https://codereview.chromium.org/2491103002
2016-11-02Remove FX_BOOL from xfa.tsepez
Review-Url: https://codereview.chromium.org/2467203003
2016-11-02Merge delegates into IFWL_* classes.dsinclair
This Cl removes ownership of the delgates from IFWL_Widget and puts it in the hand of the creating classes. In doing so, merge the delegates back into the IFWL_* classes to simplify logic. Review-Url: https://codereview.chromium.org/2467993003
2016-11-01Rename IFWL_Widget::SetDelegatedsinclair
The ::SetDelegate method was misleading. The primary use was SetDelegate(nullptr) which returned the current delegate and didn't actually set anything. When a value was passed it would set the |m_pCurDelegate| not the |m_pDelegate|. This Cl breaks ::SetDelegate into ::GetCurrentDelegate and ::SetCurrentDelegate to make it clear what is happening and that this does not effect the |m_pDelegate| variable. Review-Url: https://codereview.chromium.org/2459423003
2016-10-31Remove unused parameter to CFWL_* Initialize methods.dsinclair
This parameter is always nullptr, removed. Review-Url: https://codereview.chromium.org/2463073002
2016-10-31Remove FWL globals.dsinclair
This CL removes the FWL_GetApp, FWL_SetApp and FWL_GetWidgetAdapter methods. In the process it changes the various Initialize methods to return void. Review-Url: https://codereview.chromium.org/2436103002
2016-10-27Fix some FX_BOOL / int noise in fxfatsepez
Review-Url: https://codereview.chromium.org/2457673003
2016-10-20Move fwl/lightwidget to fwl/coredsinclair
This CL moves the code from fwl/lightwidget into fwl/core. In anticipation of merging the two hierarchies. Review-Url: https://chromiumcodereview.appspot.com/2430923006
2016-10-20Merge the CFWL_*Imp classes into the IFWL_* classes.dsinclair
This Cl merges the implementation classes up into the IFWL classes as the intermediate classes were just acting as proxies. Review-Url: https://chromiumcodereview.appspot.com/2432423002
2016-10-19Remove FWL Create methods, use new insteaddsinclair
Review-Url: https://chromiumcodereview.appspot.com/2422303003
2016-09-29Move xfa/fxfa/include to xfa/fxfadsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2383593002
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-08-08Use virtual function to retrieve interface pointerweili
Use virtual function to return the actual interface type instead of the base interface type to avoid a lot of casts. Also tidy up CFWL_Widget by encapsulating variables, and use smart pointers for class owned member variables. Review-Url: https://codereview.chromium.org/2209153002
2016-06-23Remove NULL in xfa/dsinclair
This CL converts all NULL's to nullptr. All instances of comparison to nullptr have been removed. Review-Url: https://codereview.chromium.org/2095653002
2016-06-21Convert XFA_ELEMENT to an enum classdsinclair
This CL changes XFA_ELEMENT From an enum to an enum class. The type name was updated to XFA_Element. Review-Url: https://codereview.chromium.org/2089443002
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-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-09Use static_cast<CXFA_WidgetAcc*> in xfa.tsepez
Remove a few other unused casts, simplify. Review-Url: https://codereview.chromium.org/2052593003
2016-05-26Add opaque "layout item" to widgets for caller's use.tsepez
This avoids another use of CFX_PrivateData. Note that in the old code, we'd be calling through a m_pImpl onto the same underlying object as we passed as the "key" argument when setting the value, which explains why the get calls, happening one object lower, pass the same argument as which they are being inovked against. Review-Url: https://codereview.chromium.org/2010923002
2016-05-17XFA_WIDGETSTATUS cleanup.dsinclair
This CL moves all of the XFA_WIDGETSTATUS values into a single enum instead of multiple defines. The values are also normalized. The name was updated to be XFA_WidgetStatus. The XFA_WIDGETFILTER and XFA_LAYOUTSTATUS defines had to match up to XFA_WIDGETSTATUS. This Cl replaces those so we just have a single enum to work with. Review-Url: https://codereview.chromium.org/1986503002
2016-05-16Remove some c_str() calls from StringCs in xfa docs.tsepez
Avoids the risk of possibly getting a non-null terminated buffer if the StringC happened to be created by Mid(), etc. Doesn't seem to happen in practice. Review-Url: https://codereview.chromium.org/1983683003
2016-05-04Convert FWL_ERR into an enum class.dsinclair
This Cl updates FWL_ERR to be an FWL_Error enum class. It removes FX_ERR and replaces it with FWL_Error as well as the values were the same. There were many places where we either returned other values for FWL_ERR results. This Cl is the same as: https://codereview.chromium.org/1943413002/ but I seem to have messed up the base URL in that one. TBR=tsepez@chromium.org Review-Url: https://codereview.chromium.org/1952693003
2016-05-04More define cleanup.dsinclair
This CL converts defines into constants, enums, enum classes or removes them as needed. Review-Url: https://codereview.chromium.org/1938163002
2016-04-28More FWL interface cleanup.dsinclair
This CL merges the IFWL_Target class into IFWL_Widget and IFWL_Thread into IFWL_App. The IFWL_WidgetMgrDelegate, IFWL_NoteDriver and IFWL_NotThread are removed in favour of their concrete classes. Review-Url: https://codereview.chromium.org/1921853006
2016-04-21Remove CFWL_Note.dsinclair
This CL removes the CFWL_Note class. The two subclasses, CFWL_Event and CFWL_Message are distinct types and should not be related by the subclass. The code has been updated to pass the correct types as needed. The various FWL_EVTHASH and FWL_MSGHASH defines have all been removed and turned into an FWL_EventType and FWL_MessageType enum classes. BUG=pdfium:474 Review URL: https://codereview.chromium.org/1901183002
2016-04-15Avoid narrowing of strings in FWL SetEditText methods.tsepez
Review URL: https://codereview.chromium.org/1892813004
2016-04-13Remove implicit cast from CFX_WideString to (const wchar_t*)tsepez
BUG= Review URL: https://codereview.chromium.org/1882043004
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-06Move remaining xfa/include/fxfa filesdsinclair
This CL moves the remaining files in xfa/include/fxfa to xfa/fxfa/include. Review URL: https://codereview.chromium.org/1864973005
2016-04-05Make down-conversion explicit from CFX_Widetring to CFX_WideStringC.tsepez
Companion to https://codereview.chromium.org/1853233002 BUG= Review URL: https://codereview.chromium.org/1857073002
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-04-04Cleanup the FF Handler proxy methods.dsinclair
This CL removes the proxy methods from CXFA_FFWidgetHandler and CXFA_DocHandler and removes CXFA_FFMenuHandler as it was only proxy methods. The calls are made directly on the object now. Review URL: https://codereview.chromium.org/1857893002
2016-03-31Remove IXFA_* interfaces.dsinclair
This CL removes the IXFA_* interfaces which are: - Implemented once. - Not implemented by an fpdfsdk class. This requires making a few classes visible to fpdfsdk so we can have the correct instances available instead of the IXFA types. Review URL: https://codereview.chromium.org/1846993002
2016-03-29Move xfa/include/fwl/{theme,lightwidget} to xfa/fwldsinclair
This CL moves and splits the remaining FWL files out of xfa/include and into their proper locations. Review URL: https://codereview.chromium.org/1834323003
2016-03-25Remove FX_DWORD from XFA.tsepez
Review URL: https://codereview.chromium.org/1830323006
2016-03-23Move xfa/include/fwl/{core,basewidget} to xfa/fwl/{core,basewidget}.Dan Sinclair
This CL moves and splits the FWL files from the core and basewidget directories into the non-include folders. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1827923002 .
2016-03-14Move xfa/src up to xfa/.Dan Sinclair
This CL moves the xfa/src files up to the xfa/ directory and fixes the includes, include guards, and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1803723002 .