[PATCH] fdo#45678: EasyHack: kill hwpfilter/source/list.hxx with fire

Dézsi Szabolcs dezsiszabi at hotmail.com
Fri Mar 2 07:39:38 PST 2012


Hi!

I removed every use of LinkedList and replaced it with std::list
I hope everything's correct. Tested it with the .hwp file in
hwpfilter/qa/cppunit/data (pass and fail). Working as expected.

LinkedList had a find(int n) method, which returned the underlying
std::vector's nth element, unfortunately this isn't possible with std::list, so
the calls to find(...) and replaced with iterating with a for loop i times,
thus pointing the iterator to the nth element of the list.

Don't know if it's a very good solution though. The original find method had an
assertion that the parameter is between 0 and the size of the underlying
vector.

If something is wrong, let me know, and i try to enhance/work on it. Or feel
free to improve it :)

https://bugs.freedesktop.org/show_bug.cgi?id=45678

Szabolcs 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120302/45a7dff9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Killed-LinkedList-in-hwpfilter.patch
Type: text/x-patch
Size: 55445 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120302/45a7dff9/attachment-0001.bin>


More information about the LibreOffice mailing list