[Libreoffice] [PATCH] Remove DECLARE_LIST(TOXControlList, Control*)

Joseph Powers jpowers27 at cox.net
Sun Dec 12 20:26:02 PST 2010


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.





------------------------------------------------------------------------------------

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20101212/506f70a6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-DECLARE_LIST-TOXControlList-Control.patch
Type: application/octet-stream
Size: 24138 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20101212/506f70a6/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20101212/506f70a6/attachment-0002.htm>


More information about the LibreOffice mailing list