cui/source/options/optupdt.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 2215c5020d5b308a32c58f0b6144845881fe3fcd Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Dec 19 11:01:10 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Dec 20 08:42:38 2018 +0100 use unique_ptr in SvxOnlineUpdateTabPage Change-Id: I7f93f686438c1922797a10f2510db71dc4a06ff1 Reviewed-on: https://gerrit.libreoffice.org/65442 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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%" ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits