Like http://cgit.freedesktop.org/libreoffice/core/commit/?id=d5dd1216804afae35d7fe7dbb1d37b0ca1fcce88 we should use OUStringHash at many more points (grep for "return .*\.hashCode()" or something similar): http://opengrok.libreoffice.org/xref/core/comphelper/source/container/embeddedobjectcontainer.cxx#57 http://opengrok.libreoffice.org/xref/core/desktop/source/deployment/registry/dp_registry.cxx#67 http://opengrok.libreoffice.org/xref/core/extensions/source/ole/ole2uno.hxx#85 http://opengrok.libreoffice.org/xref/core/filter/source/svg/svgwriter.hxx#177 http://opengrok.libreoffice.org/xref/core/idlc/inc/idlc/idlctypes.hxx#45 http://opengrok.libreoffice.org/xref/core/include/toolkit/controls/eventcontainer.hxx#43 http://opengrok.libreoffice.org/xref/core/scripting/source/stringresource/stringresource.hxx#60 http://opengrok.libreoffice.org/xref/core/sfx2/source/appl/newhelp.cxx#570 http://opengrok.libreoffice.org/xref/core/stoc/source/inspect/introspection.cxx#143 http://opengrok.libreoffice.org/xref/core/stoc/source/namingservice/namingservice.cxx#73 http://opengrok.libreoffice.org/xref/core/stoc/source/servicemanager/servicemanager.cxx#302 http://opengrok.libreoffice.org/xref/core/ucb/source/ucp/file/shell.hxx#129 http://opengrok.libreoffice.org/xref/core/ucb/source/ucp/hierarchy/hierarchyprovider.hxx#79 http://opengrok.libreoffice.org/xref/core/ucb/source/ucp/package/pkgprovider.cxx#107 http://opengrok.libreoffice.org/xref/core/ucb/source/ucp/webdav-neon/ContentProperties.hxx#63 http://opengrok.libreoffice.org/xref/core/ucb/source/ucp/webdav/ContentProperties.hxx#56 http://opengrok.libreoffice.org/xref/core/ucbhelper/source/provider/providerhelper.cxx#54 http://opengrok.libreoffice.org/xref/core/xmlhelp/source/cxxhelp/provider/databases.hxx#160 http://opengrok.libreoffice.org/xref/core/xmlhelp/source/cxxhelp/provider/databases.hxx#341 http://opengrok.libreoffice.org/xref/core/xmlhelp/source/cxxhelp/provider/db.hxx#78 http://opengrok.libreoffice.org/xref/core/cppu/source/uno/lbmap.cxx#126 http://opengrok.libreoffice.org/xref/core/stoc/source/corereflection/lrucache.hxx#229
Most of the files are using OUStringHash or OStringHash now. except for: desktop/source/deployment/registry/dp_registry.cxx converts the string to lower ASCII case before computing hash. struct ci_string_hash { ::std::size_t operator () ( OUString const & str ) const { return str.toAsciiLowerCase().hashCode(); } }; ucb/source/ucp/file/shell.hxx doesn't work directly on strings. struct hMyProperty { size_t operator()( const MyProperty& rName ) const { return rName.getPropertyName().hashCode(); } };
That's not true. All files listed still call hashCode(). Please see commit d5dd1216804afae35d7fe7dbb1d37b0ca1fcce88 to get an idea how it would look like when using OUStringHash.
Ouh yeah, I'm sorry. I pushed a patch to gerrit, which hasn't been merged now.
Sorry, I didn't look at gerrit. Great that you did this! :)
Daniel Sikeler committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=32d6415617b5815bb5d18719f6d2df74becc0997 fdo#83512 Make use of OUStringHash and OStringHash The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp TopicCleanup) [NinjaEdit]