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/transliteration | |
parent | 6a1bebcc890c04acdc79236ff54cdd49b27be71a (diff) |
loplugin:refcounting: also cover temporaries being directly stack managed
Change-Id: Ib0f7c60df1d2fba0d4d9d3fa6faf3bb97867ebc0
Diffstat (limited to 'i18npool/source/transliteration')
-rw-r--r-- | i18npool/source/transliteration/transliteration_Numeric.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx b/i18npool/source/transliteration/transliteration_Numeric.cxx index 86de70f765f0..3ec34f92ed04 100644 --- a/i18npool/source/transliteration/transliteration_Numeric.cxx +++ b/i18npool/source/transliteration/transliteration_Numeric.cxx @@ -22,6 +22,7 @@ #include <nativenumbersupplier.hxx> #include <defaultnumberingprovider.hxx> #include <comphelper/string.hxx> +#include <rtl/ref.hxx> using namespace com::sun::star::uno; @@ -119,7 +120,7 @@ transliteration_Numeric::transliterate( const OUString& inStr, sal_Int32 startPo if (tableSize) return transliterateBullet( inStr, startPos, nCount, offset); else - return NativeNumberSupplierService(useOffset).getNativeNumberString( inStr.copy(startPos, nCount), aLocale, nNativeNumberMode, offset ); + return rtl::Reference<NativeNumberSupplierService>(new NativeNumberSupplierService(useOffset))->getNativeNumberString( inStr.copy(startPos, nCount), aLocale, nNativeNumberMode, offset ); } sal_Unicode SAL_CALL @@ -134,7 +135,7 @@ transliteration_Numeric::transliterateChar2Char( sal_Unicode inChar ) throw(Runt return inChar; } else - return NativeNumberSupplierService().getNativeNumberChar( inChar, aLocale, nNativeNumberMode ); + return rtl::Reference<NativeNumberSupplierService>(new NativeNumberSupplierService)->getNativeNumberChar( inChar, aLocale, nNativeNumberMode ); } } } } } |