diff options
-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%" ); |