diff options
author | Eike Rathke <erack@redhat.com> | 2017-11-24 14:24:03 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-11-24 21:30:02 +0100 |
commit | 4b98e352e543d0462f2727c5762552e32ef4d76a (patch) | |
tree | 1e3053920c8418cefad7ffddf8f4bdd2b4f562b1 /basic/source/runtime/methods1.cxx | |
parent | 4e3530b4f870e0470c23ae89cdb8b9a09af54d59 (diff) |
Make the SbiInstance SvNumberFormatter shared_ptr
In preparation to get rid of the per call locally created
SvNumberFormatter instances..
Change-Id: Ic7db3bbb655aa18e939f5722964655a20f2eadf2
Reviewed-on: https://gerrit.libreoffice.org/45227
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'basic/source/runtime/methods1.cxx')
-rw-r--r-- | basic/source/runtime/methods1.cxx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index ad9424a56976..f6d404dd548d 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -2332,7 +2332,7 @@ void SbRtl_FormatDateTime(StarBASIC *, SbxArray & rPar, bool) // Dienstag, 21. December 2004 case 1: { - SvNumberFormatter* pFormatter = nullptr; + std::shared_ptr<SvNumberFormatter> pFormatter; if( GetSbData()->pInst ) { pFormatter = GetSbData()->pInst->GetNumberFormatter(); @@ -2347,11 +2347,6 @@ void SbRtl_FormatDateTime(StarBASIC *, SbxArray & rPar, bool) const sal_uInt32 nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType ); Color* pCol; pFormatter->GetOutputString( dDate, nIndex, aRetStr, &pCol ); - - if( !GetSbData()->pInst ) - { - delete pFormatter; - } break; } |