diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-08-26 12:40:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-08-26 12:40:43 +0200 |
commit | 28cb2c1764f2365d69ce09cb69f0f5a676458a33 (patch) | |
tree | 614b44a9dc1b4928af5db1880e9869cd3e997eb1 /i18npool/source/calendar | |
parent | Remove wrong check through template args from containsXInterfaceSubclass (diff) | |
download | core-28cb2c1764f2365d69ce09cb69f0f5a676458a33.tar.gz core-28cb2c1764f2365d69ce09cb69f0f5a676458a33.zip |
loplugin:refcounting: also cover temporaries being directly stack managed
Change-Id: Ib0f7c60df1d2fba0d4d9d3fa6faf3bb97867ebc0
Diffstat (limited to 'i18npool/source/calendar')
-rw-r--r-- | i18npool/source/calendar/calendarImpl.cxx | 6 | ||||
-rw-r--r-- | i18npool/source/calendar/calendar_gregorian.cxx | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx index 48c4ad2d02a3..89432a433cfa 100644 --- a/i18npool/source/calendar/calendarImpl.cxx +++ b/i18npool/source/calendar/calendarImpl.cxx @@ -44,7 +44,7 @@ CalendarImpl::~CalendarImpl() void SAL_CALL CalendarImpl::loadDefaultCalendar( const Locale& rLocale ) throw(RuntimeException, std::exception) { - Sequence< Calendar2 > xC = LocaleDataImpl().getAllCalendars2(rLocale); + Sequence< Calendar2 > xC = LocaleDataImpl::get()->getAllCalendars2(rLocale); for (sal_Int32 i = 0; i < xC.getLength(); i++) { if (xC[i].Default) { loadCalendar(xC[i].Name, rLocale); @@ -74,7 +74,7 @@ CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale ) thr if ( ! xI.is() ) { // check if the calendar is defined in localedata, load gregorian calendar service. - Sequence< Calendar2 > xC = LocaleDataImpl().getAllCalendars2(rLocale); + Sequence< Calendar2 > xC = LocaleDataImpl::get()->getAllCalendars2(rLocale); for (i = 0; i < xC.getLength(); i++) { if (uniqueID == xC[i].Name) { xI = m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.i18n.Calendar_gregorian", m_xContext); @@ -129,7 +129,7 @@ CalendarImpl::getLoadedCalendar() throw(RuntimeException, std::exception) Sequence< OUString > SAL_CALL CalendarImpl::getAllCalendars( const Locale& rLocale ) throw(RuntimeException, std::exception) { - Sequence< Calendar2 > xC = LocaleDataImpl().getAllCalendars2(rLocale); + Sequence< Calendar2 > xC = LocaleDataImpl::get()->getAllCalendars2(rLocale); sal_Int32 nLen = xC.getLength(); Sequence< OUString > xSeq( nLen ); for (sal_Int32 i = 0; i < nLen; i++) diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index f3fa8ea6dac8..c7ff413d297a 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -189,8 +189,8 @@ Calendar_hanja::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 if ( displayIndex == CalendarDisplayIndex::AM_PM ) { // Am/Pm string for Korean Hanja calendar will refer to Japanese locale css::lang::Locale jaLocale(OUString("ja"), OUString(), OUString()); - if (idx == 0) return LocaleDataImpl().getLocaleItem(jaLocale).timeAM; - else if (idx == 1) return LocaleDataImpl().getLocaleItem(jaLocale).timePM; + if (idx == 0) return LocaleDataImpl::get()->getLocaleItem(jaLocale).timeAM; + else if (idx == 1) return LocaleDataImpl::get()->getLocaleItem(jaLocale).timePM; else throw ERROR; } else @@ -242,7 +242,7 @@ Calendar_gregorian::loadCalendar( const OUString& uniqueID, const css::lang::Loc getValue(); aLocale = rLocale; - Sequence< Calendar2 > xC = LocaleDataImpl().getAllCalendars2(rLocale); + Sequence< Calendar2 > xC = LocaleDataImpl::get()->getAllCalendars2(rLocale); for (sal_Int32 i = 0; i < xC.getLength(); i++) { if (uniqueID == xC[i].Name) @@ -776,8 +776,8 @@ Calendar_gregorian::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_I switch( displayIndex ) { case CalendarDisplayIndex::AM_PM:/* ==0 */ - if (idx == 0) aStr = LocaleDataImpl().getLocaleItem(aLocale).timeAM; - else if (idx == 1) aStr = LocaleDataImpl().getLocaleItem(aLocale).timePM; + if (idx == 0) aStr = LocaleDataImpl::get()->getLocaleItem(aLocale).timeAM; + else if (idx == 1) aStr = LocaleDataImpl::get()->getLocaleItem(aLocale).timePM; else throw ERROR; break; case CalendarDisplayIndex::DAY: @@ -839,7 +839,7 @@ Calendar_gregorian::getDisplayStringImpl( sal_Int32 nCalendarDisplayCode, sal_In if (nCalendarDisplayCode == CalendarDisplayCode::SHORT_QUARTER || nCalendarDisplayCode == CalendarDisplayCode::LONG_QUARTER) { - Sequence< OUString> xR = LocaleDataImpl().getReservedWord(aLocale); + Sequence< OUString> xR = LocaleDataImpl::get()->getReservedWord(aLocale); sal_Int16 quarter = value / 3; // Since this base class method may be called by derived calendar // classes where a year consists of more than 12 months we need a check |