summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/FormattedField.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index c3b2914f7ba7..2279b49dfcff 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -77,7 +77,7 @@ namespace frm
class StandardFormatsSupplier : protected SvNumberFormatsSupplierObj, public ::utl::ITerminationListener
{
protected:
- SvNumberFormatter* m_pMyPrivateFormatter;
+ std::unique_ptr<SvNumberFormatter> m_pMyPrivateFormatter;
static WeakReference< XNumberFormatsSupplier > s_xDefaultFormatsSupplier;
public:
static Reference< XNumberFormatsSupplier > get( const Reference< XComponentContext >& _rxORB );
@@ -93,14 +93,13 @@ StandardFormatsSupplier::StandardFormatsSupplier(const Reference< XComponentCont
:SvNumberFormatsSupplierObj()
,m_pMyPrivateFormatter(new SvNumberFormatter(_rxContext, _eSysLanguage))
{
- SetNumberFormatter(m_pMyPrivateFormatter);
+ SetNumberFormatter(m_pMyPrivateFormatter.get());
// #i29147#
::utl::DesktopTerminationObserver::registerTerminationListener( this );
}
StandardFormatsSupplier::~StandardFormatsSupplier()
{
::utl::DesktopTerminationObserver::revokeTerminationListener( this );
- DELETEZ( m_pMyPrivateFormatter );
}
Reference< XNumberFormatsSupplier > StandardFormatsSupplier::get( const Reference< XComponentContext >& _rxORB )
{
@@ -138,7 +137,7 @@ void StandardFormatsSupplier::notifyTermination()
// #i29147#
s_xDefaultFormatsSupplier = WeakReference< XNumberFormatsSupplier >( );
SetNumberFormatter( nullptr );
- DELETEZ( m_pMyPrivateFormatter );
+ m_pMyPrivateFormatter.reset();
}
Sequence<Type> OFormattedControl::_getTypes()
{