[Libreoffice-commits] core.git: cui/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Dec 20 07:43:00 UTC 2018


 cui/source/options/optupdt.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2215c5020d5b308a32c58f0b6144845881fe3fcd
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Dec 19 11:01:10 2018 +0200
Commit:     Noel Grandin <noel.grandin at 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.grandin at 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%" );


More information about the Libreoffice-commits mailing list