To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=90820 Issue #|90820 Summary|resource manager does not have set default locale Component|utilities Version|OOo 2.4.1 RC2 Platform|All URL| OS/Version|All Status|NEW Status whiteboard| Keywords| Resolution| Issue type|PATCH Priority|P3 Subcomponent|code Assigned to|cd Reported by|pmladek
------- Additional comments from [EMAIL PROTECTED] Tue Jun 17 18:35:10 +0000 2008 ------- It comes from https://bugzilla.novell.com/show_bug.cgi?id=399101. The unopkg tool displayed messages in random locales. unopkg initializes the resource manages the following way: --- cut desktop/source/pkgchk/unopkg/unopkg_shared.h --- struct DeploymentResMgr : public rtl::StaticWithInit< ResMgr *, DeploymentResMgr > { ResMgr * operator () () { return ResMgr::CreateResMgr( "deployment" LIBRARY_SOLARUPD() ); } }; --- cut desktop/source/pkgchk/unopkg/unopkg_shared.h --- => it does not define any locale. ResMgr::CreateResMgr does the following when the locale is not defined: --- cut tools/source/rc/resmgr.cxx --- if( ! aLocale.Language.getLength() ) aLocale = ResMgrContainer::get().getDefLocale(); --- cut tools/source/rc/resmgr.cxx --- Unfortunately, the default locale is defined only by ResMgrContainer::setDefLocale. It is called on various locations, for example: --- cut desktop/source/app/app.cxx --- // LanguageSelection langselect; OUString aUILocaleString = LanguageSelection::getLanguageString(); sal_Int32 nIndex = 0; OUString aLanguage = aUILocaleString.getToken( 0, '-', nIndex); OUString aCountry = aUILocaleString.getToken( 0, '-', nIndex); OUString aVariant = aUILocaleString.getToken( 0, '-', nIndex); ::com::sun::star::lang::Locale aLocale( aLanguage, aCountry, aVariant ); Desktop::pResMgr = ResMgr::SearchCreateResMgr( U2S( aMgrName ), aLocale); AllSettings as = GetSettings(); as.SetUILocale(aLocale); SetSettings(as); --- cut desktop/source/app/app.cxx --- but not in unopkg. I attach a simple patch that sets the default locale in ResMgrContainer::init(); It might help to remove hacks from the other locations where the resource manager is initialized. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]