[Libreoffice] [PATCH] Removed some SvStringsSortDtor

Daisuke Nishino niboshi000 at gmail.com
Tue Nov 8 05:43:32 PST 2011


Hi all,

I removed some uses of SvStringsSortDtor, which is listed in
http://wiki.documentfoundation.org/Easy_Hacks#Easy_Hacks

There's uses of SvStringsSortDtor which I couldn't understand, so I left
them untouched.

They are sc/source/filter/html/htmlexp.cxx and
sw/source/filter/writer/writer.cxx,
which are very similar; two SvStringsSortDtors (pSrcArr and pDstArr) are
used in pair.

Looking at htmlexp.cxx:1320, pSrcArr is used to lookup for an index of a
string, and then the index is applied to pDstArr.
In my understanding indices of two arrays are unrelated, because arrays are
sorted by their respective contents.

            if( pSrcArr->Seek_Entry( &rFileNm, &nPos ))
>             {
>                 rFileNm = *(*pDestArr)[ nPos ];
>                 return sal_True;
>             }
>

where rFileNm is of type String&.


I guess what is intended here is mapping of strings, from pSrcArr to
pDstArr (with incorrect implementation).
If so, I'll replace them with std::map<String, String>.

How do you think?

Cheers,

-- 
Daisuke Nishino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111108/d9709961/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Removed-some-SvStringsSortDtor.core.patch
Type: application/octet-stream
Size: 18416 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111108/d9709961/attachment-0001.obj>


More information about the LibreOffice mailing list