Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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

Attachment: 0001-Removed-some-SvStringsSortDtor.core.patch
Description: Binary data


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.