diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-23 09:51:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-23 10:56:06 +0200 |
commit | 5794beabf0a2d92b0ddd2e19291531a296438364 (patch) | |
tree | 935df83dd980fd1856a6b6ccfe9197b8fda78fb4 | |
parent | 7832911d8dc113f80d272efb6db55b3b3d312428 (diff) |
use rtl::Reference in QuitGuard
instead of storing both a raw pointer and an uno::Reference
Change-Id: Ib70bf9508210b2a58dd65437c6cbe8f4f5b343fc
-rw-r--r-- | svx/source/form/fmscriptingenv.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index e6a8417b5fb7..9f12a2ad9c53 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -859,19 +859,17 @@ namespace svxform } }; - TerminateListener* mpListener; - css::uno::Reference<css::frame::XTerminateListener> mxLifeCycle; + rtl::Reference<TerminateListener> mxListener; public: QuitGuard() - : mpListener(new TerminateListener) - , mxLifeCycle(mpListener) + : mxListener(new TerminateListener) { - mpListener->start(); + mxListener->start(); } ~QuitGuard() { - mpListener->stop(); + mxListener->stop(); } }; |