TOXControlList is used more like a list<> then a vector<>; however, the code was written using mostly [] style accessors. Thus, I had to rewrite a lot of control logic and would like someone else to review it before it gets installed. Two methods where looping through the list list.size() times. Looking at the code, I couldn't determine why this had to be done so I changed the code to only process the list once. The methods are: IMPL_LINK(SwTokenWindow, TbxFocusHdl, SwTOXEdit*, pEdit) IMPL_LINK(SwTokenWindow, TbxFocusBtnHdl, SwTOXButton*, pBtn ) I played around in writer a little bit but couldn't figure out where this code was being used. If someone could point me in the right direction, I'll do a little more testing. |
Attachment:
0001-Remove-DECLARE_LIST-TOXControlList-Control.patch
Description: Binary data
------------------------------------------------------------------------------------ I'm having some issues removing DECLARE_LIST( SwXMLTableLinesCache_Impl, SwXMLTableLinesPtr ) from sw/source/filter/xml/xmltble.cxx. The main issue is that my compiler (g++ 4.0) doesn't allow the following: class Foo; class Bar { Foo* myFoo; } class Foo { int mySomething; } typedef ::std::vector< Foo* > typeFoo; Because of this, I need to move enough information from the .cxx into .hxx to define Foo before Bar; however, Foo is build using some more magic Macros so I don't know how much code I can safely move to the header. Any suggestions on this would be nice. The only two DECLARE_LIST() instances left in writer are the above and DECLARE_LIST( SwXMLFrmFmts_Impl, SwFrmFmtPtr ) which is declared in the same .cxx as the one problem one. I'm going to see if it has the same issue. Thanks for your help, Joe P. |