diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-20 12:50:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-20 19:21:52 +0100 |
commit | d49277fc7c017c5a62a0c28af782cfc04a6460ab (patch) | |
tree | 62029090284267702379cd7b82422597a86561dd /sfx2/source/view | |
parent | 7c992bd895574eb1faf473875f8e655e9b73cb79 (diff) |
loplugin:refcounting in sfx2
Change-Id: I22ca5dab32fb4bf9a1ab7d478105db2d12e14b14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111262
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/view')
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index f07f9b4a1fd0..a74674a82917 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1426,8 +1426,8 @@ Reference< frame::XTitle > SfxBaseController::impl_getTitleHelper () Reference< frame::XUntitledNumbers > xUntitledProvider(xModel , uno::UNO_QUERY ); Reference< frame::XController > xThis (static_cast< frame::XController* >(this), uno::UNO_QUERY_THROW); - ::framework::TitleHelper* pHelper = new ::framework::TitleHelper(::comphelper::getProcessComponentContext()); - m_pData->m_xTitleHelper.set(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW); + rtl::Reference<::framework::TitleHelper> pHelper = new ::framework::TitleHelper(::comphelper::getProcessComponentContext()); + m_pData->m_xTitleHelper = pHelper; pHelper->setOwner (xThis ); pHelper->connectWithUntitledNumbers (xUntitledProvider); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index a01be90a0395..0007daf4a2f8 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -203,7 +203,7 @@ Sequence< beans::PropertyValue > SfxPrinterController::getMergedOptions() const if( xPrinter.get() != mpLastPrinter ) { mpLastPrinter = xPrinter.get(); - VCLXDevice* pXDevice = new VCLXDevice(); + rtl::Reference<VCLXDevice> pXDevice = new VCLXDevice(); pXDevice->SetOutputDevice( mpLastPrinter ); mxDevice.set( pXDevice ); } |