diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-19 11:01:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-20 08:42:38 +0100 |
commit | 2215c5020d5b308a32c58f0b6144845881fe3fcd (patch) | |
tree | fbd9f0c9f88e0f3a79347e0234ca9665660958af /cui | |
parent | b38e690296e48657ec8c66427a6511f42f4b0115 (diff) |
use unique_ptr in SvxOnlineUpdateTabPage
Change-Id: I7f93f686438c1922797a10f2510db71dc4a06ff1
Reviewed-on: https://gerrit.libreoffice.org/65442
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optupdt.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index 281250a8bf6b..396cf5aaa5b7 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -142,7 +142,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText() } LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType(); - SvNumberFormatter *pNumberFormatter = new SvNumberFormatter( ::comphelper::getProcessComponentContext(), eUILang ); + std::unique_ptr<SvNumberFormatter> pNumberFormatter(new SvNumberFormatter( ::comphelper::getProcessComponentContext(), eUILang )); Color* pColor = nullptr; const Date& rNullDate = pNumberFormatter->GetNullDate(); sal_uInt32 nFormat = pNumberFormatter->GetStandardFormat( SvNumFormatType::DATE, eUILang ); @@ -152,7 +152,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText() nFormat = pNumberFormatter->GetStandardFormat( SvNumFormatType::TIME, eUILang ); pNumberFormatter->GetOutputString( aTime.GetTimeInDays(), nFormat, aTimeStr, &pColor ); - delete pNumberFormatter; + pNumberFormatter.reset(); aText = m_aLastCheckedTemplate; sal_Int32 nIndex = aText.indexOf( "%DATE%" ); |