summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget/fwl_editimp.cpp
AgeCommit message (Collapse)Author
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-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-07Replace IFGAS_Font with underlying concrete typethestig
Review-Url: https://codereview.chromium.org/2037563002
2016-06-03Rename IFX_Font to IFGAS_Fonttsepez
Avoid confusion with CFX_Font, which is defined in fxcrt, and does not inherit from nor bear any resemblence to IFX_Font. Review-Url: https://codereview.chromium.org/2036173003
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-25Rename fwl_widgetmgrimp.{cpp,h} to cfwl_widgetmgr.{cpp,h}tsepez
Review-Url: https://codereview.chromium.org/2004293004
2016-05-24Remove IWFL_WidgetMgr in favor of CFWL_WidgetMgr.tsepez
The pure virtual class isn't buying us anything, and is costing us an otherwise unneeded vtable. Fix pre-existing presubmit warning in fwl_noteimp.cpp:88: If statement had no body and no else clause ... Remove switch on enum() and make separate GetWidget() methods. Review-Url: https://codereview.chromium.org/2004213002
2016-05-19Work around sign compare error from commit be9b894.thestig
Review-Url: https://codereview.chromium.org/1989203007
2016-05-18Remove Release() from CFDE_TxtEdit* classestsepez
Review-Url: https://codereview.chromium.org/1987223003
2016-05-18Split xfa/fee files into individual class files.dsinclair
This CL splits the xfa/fee files into individual class files and moves them into the xfa/fde directory where they belong. Review-Url: https://codereview.chromium.org/1994693002
2016-05-18Pass objects instead of strings for undo/redo records.dsinclair
Currently the Undo/Redo records are serialized as byte strings and stored into a CFX_ByteStringArray. They are deserialized when used. This CL removes the serialization and stores the objects in a deque of unique pointers. Review-Url: https://codereview.chromium.org/1980293004
2016-05-13Make CFX_ByteString(const CFX_ByteStringC&) explicit.tsepez
Add missing helper function to CFX_ByteTextBuf to avoid the anti-pattern CFX_ByteString(sBuf.AsStringC()), using the name "Make" to indicate there's an allocation going on in this case. Change some method arguments to take pre-existing ByteStrings where possible. Review-Url: https://codereview.chromium.org/1977093002
2016-05-13Make CFX_WideString(const CFX_WideString&) explicit.tsepez
BUG= Review-Url: https://codereview.chromium.org/1979723003
2016-05-13ReplaceSelections() methods never called.tsepez
Review-Url: https://codereview.chromium.org/1973883005
2016-05-11Replace some calls to Release() with direct delete, part 1.tsepez
Searching for the anti-pattern: void Release() { delete this; } We must be explicit on the ownership model. Add unique_ptrs as a result. Review-Url: https://codereview.chromium.org/1960673003
2016-05-05Remove CLASSHASH defines in favour of an enum class.dsinclair
This Cl updates all the CLASSHASH defines to use an enum class. A few defines where unabled and were either updated or removed if the number no longer exists in the code base. Review-Url: https://codereview.chromium.org/1946213003
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-04Cleanup IFWL_Adapter interfaces.dsinclair
This CL removes: * IFWL_AdapterNative * IFWL_Adapter{Widget|Thread}Mgr * IFWL_WidgetMgrDelegate * CFWL_SDAdapter{Widget|Thread}Mgr Methods which just returned have also been removed. Review-Url: https://codereview.chromium.org/1928963004
2016-05-04Cleanup CFWL_ThemePart data.dsinclair
The m_dwData pointer was being used as a generic way to pass around data. There were only two places we were reading that data. This Cl changes to have two specific flags and removes the generic pointer. Review-Url: https://codereview.chromium.org/1950973003
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-05-04Return bool rather than bitwise-and for FX_BOOLtsepez
Investigate results of: git grep -ni 'return [(]*[a-z0-9_]* &[^&]' git grep -ni 'BOOL.*= [(]*[a-z0-9_]* &[^&]' Review-Url: https://codereview.chromium.org/1951653002
2016-05-03Remove FWL_WGTHITTEST_* defines in favour of enum class.dsinclair
This Cl updates the FWL_WGTHITTEST_ defines to an enum class and fixes up any code issues. Review-Url: https://codereview.chromium.org/1948583002
2016-05-02Remove IFDE_TxtEdt interfaces where possible.dsinclair
This CL removes the following and uses the only instance instead. * IFDE_TxtEdtParag * IFDE_TxtEdtEventSink * IFDE_TxtEdtEngine * IFDE_TxtEdtBuf Review-Url: https://codereview.chromium.org/1927973003
2016-04-29Subtract instead of adding the negation.thestig
Do more cleanup in modified files. Review-Url: https://codereview.chromium.org/1938613003
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-21Cleanup FDE interfaces.dsinclair
This CL removes IFDE_TextOut, IFDE_Path, IFDE_RenderContext, IFDE_RenderDevice, and IFDE_VisualSetIterator in favour of the concrete classes. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1896893003
2016-04-21Convert some FWL defines to enums.dsinclair
This CL converts FWL_WGTCAPACITY_* defines to the CFWL_WidgetCapacity enum class. The FWL_PART_* defines to the FWL_Part enum class and the FWL_PartState_* defines to an enum. Review URL: https://codereview.chromium.org/1898713003
2016-04-14Replace calls to deprecated CFX_{Wide,Byte}String::Empty()tsepez
Use the more standard name "clear()" instead. Review URL: https://codereview.chromium.org/1888103002
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-25Remove FX_DWORD from XFA.tsepez
Review URL: https://codereview.chromium.org/1830323006
2016-03-25Cleanup some extern method declarations.dsinclair
This CL removes _FPDFAPI_GetInternalFontData which is not implemented, FWL_PostMessageToMainRoop which has no body and the PostMessage which was the only caller. FWL_ShowCaret is moved to the only place where it's used. BUG=pdfium:112 Review URL: https://codereview.chromium.org/1827343003
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-17Move xfa/include/fxgraphics/fx_graphics.h to xfa/fxgraphics.Dan Sinclair
This Cl moves and splits apart the fx_graphics.h file into individual classes. The .cpp files are renamed to match the .h files. pre.h was removed at the same time and its contents moved to the correct places as needed. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1810563002 .
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 .