| Type | required |
| Title | More replacement of class International |
| Posted by | [EMAIL PROTECTED] |
| Affected | ,unotools,vcl |
| Effective from | CWS internatiodel |
Summary
vcl/settings.hxx:
- const International& AllSettings::GetInternational() const;
vcl/svapp.hxx:
- static const International& Application::GetAppInternational();
+ static const LocaleDataWrapper& Application::GetAppLocaleDataWrapper();
unotools/localedatawrapper.hxx:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & getServiceFactory() > const;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::Calendar > getDefaultCalendar() const;
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem > getDefaultCalendarDays() const;
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem > getDefaultCalendarMonths() const;
Description
A word about
static const LocaleDataWrapper& Application::GetAppLocaleDataWrapper();
and
static const LocaleDataWrapper& AllSettings::GetLocaleDataWrapper();
Never hold that reference in a member or static variable, the instance
may change if the configuration changes. If possible (i.e. if above
module svtools) use only class SvtSysLocale from svtools/syslocale.hxx,
which also follows the configuration but instantiation is safe
(singleton).
class LocaleDataWrapper
{
/** Get the service factory, meant to be able to create a
CalendarWrapper from a LocaleDataWrapper. Note that the service
factory may be non-existent if this LocaleDataWrapper was
created without one and lives "on the grassland". The
CalendarWrapper ctor can handle that though. */
const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory > &
getServiceFactory() const;
/// Convenience method to obtain the default calendar.
const ::com::sun::star::uno::Reference<
::com::sun::star::i18n::Calendar > getDefaultCalendar() const;
/// Convenience method to obtain the day names of the default
calendar.
const ::com::sun::star::uno::Sequence<
::com::sun::star::i18n::CalendarItem >
getDefaultCalendarDays() const;
/// Convenience method to obtain the month names of the default
calendar.
const ::com::sun::star::uno::Sequence<
::com::sun::star::i18n::CalendarItem >
getDefaultCalendarMonths() const;
};
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
