diff options
Diffstat (limited to 'include/unotools')
-rw-r--r-- | include/unotools/intlwrapper.hxx | 13 | ||||
-rw-r--r-- | include/unotools/tempfile.hxx | 4 |
2 files changed, 10 insertions, 7 deletions
diff --git a/include/unotools/intlwrapper.hxx b/include/unotools/intlwrapper.hxx index 8877a05dbd61..ffcb3313b349 100644 --- a/include/unotools/intlwrapper.hxx +++ b/include/unotools/intlwrapper.hxx @@ -27,6 +27,7 @@ #include <unotools/collatorwrapper.hxx> #include <i18nlangtag/lang.h> #include <i18nlangtag/languagetag.hxx> +#include <memory> /** A wrapper of I18N wrappers. Using this is more expensive than using some @@ -50,9 +51,9 @@ private: LanguageTag maLanguageTag; css::uno::Reference< css::uno::XComponentContext > m_xContext; - LocaleDataWrapper* pLocaleData; - CollatorWrapper* pCollator; - CollatorWrapper* pCaseCollator; + std::unique_ptr<LocaleDataWrapper> pLocaleData; + std::unique_ptr<CollatorWrapper> pCollator; + std::unique_ptr<CollatorWrapper> pCaseCollator; void ImplNewLocaleData() const; void ImplNewCollator( bool bCaseSensitive ) const; @@ -65,21 +66,21 @@ public: { if ( !pLocaleData ) ImplNewLocaleData(); - return pLocaleData; + return pLocaleData.get(); } /// case insensitive collator, simple IGNORE_CASE const CollatorWrapper* getCollator() const { if ( !pCollator ) ImplNewCollator( false ); - return pCollator; + return pCollator.get(); } /// case sensitive collator const CollatorWrapper* getCaseCollator() const { if ( !pCaseCollator ) ImplNewCollator( true ); - return pCaseCollator; + return pCaseCollator.get(); } }; diff --git a/include/unotools/tempfile.hxx b/include/unotools/tempfile.hxx index 791b51573f29..a70f7d277fbf 100644 --- a/include/unotools/tempfile.hxx +++ b/include/unotools/tempfile.hxx @@ -22,6 +22,7 @@ #include <unotools/unotoolsdllapi.h> #include <tools/stream.hxx> +#include <memory> namespace utl { @@ -45,7 +46,8 @@ namespace utl class UNOTOOLS_DLLPUBLIC TempFile { OUString aName; - SvStream* pStream; + std::unique_ptr<SvStream> + pStream; bool bIsDirectory; bool bKillingFileEnabled; |