The SimpleResMgr has two constructors, one taking an rtl::OUString and the other a simple char * - since we now have implicit construction of OUStrings, this was seen to cause problems. We should audit the usage of these two constructors, and remove one of them - perhaps keeping the 'const char *' version. Similarly we should remove usage of: CREATEVERSIONRESMGR_NAME - which seems to be an un-necessary stringifying macro. We prolly want to junk the: CREATEVERSIONRESMGR macro, in-lining it at each site as well - it appears to add no value at all if the _NAME macro is gone. Thanks ! :-)
The CREATEVERSIONRESMGR[_NAME] part got already fixed with <http://cgit.freedesktop.org/libreoffice/core/commit/?id=86ffa606478d18968babe809931be65463399fbb> "Get rid of CREATEVERSIONRESMGR[_NAME]" and <http://cgit.freedesktop.org/libreoffice/binfilter/commit/?id=0593ef5c57daa85f5982e57d11618b631aa5692d> "Get rid of CREATEVERSIONRESMGR_NAME."
(In reply to comment #0) > The SimpleResMgr has two constructors, one taking an rtl::OUString and the > other a simple char * - since we now have implicit construction of OUStrings, > this was seen to cause problems. Hello! I removed the constructor with the OUString parameter. There was one error after i tried to compile. In extensions/source/resource/oooresourceloader.cxx (line 205): 204: ::rtl::OUString sBaseName( _rBaseName ); 205: m_pResourceManager = new SimpleResMgr( sBaseName, m_aLocale ); sBaseName is of type OUString and there's no constructor with this parameter. What did you mean by implicit construction? (not implicit conversion I presume, because with implicit conversion this should work (I think)) Szabolcs
great - for that last one, I guess a simple conversion to rtl::OString with a UTF8 encoding (it'll be ascii anyway but ...) would do, pass the result of 'getStr()' to the method. Thanks !
Created attachment 57914 [details] Removed SimpleResMgr's constructor (with OUString parameter)
Szabolcs Dezsi committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bcd21acf727da88388c2dcbc795c24525f178dde fdo#46501: Cleanup SimpleResMgr
so - closing; thanks ! :-)
I added Fix submitter as assignee because this will ease queries and bug tracking.
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyBeginner,SkillCpp,TopicCleanup ) [NinjaEdit]