diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-11 13:31:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-16 06:10:10 +0000 |
commit | 570d8dab6d6754ab8020cbe6624020dff7b8b624 (patch) | |
tree | 44272338a72fc70ca2228917f93a53be95b118a3 /chart2/source/controller/accessibility | |
parent | 0611017c1df3c98684fbb904c1ab5ec7f68074d8 (diff) |
new loplugin: useuniqueptr: chart2
Change-Id: Ic029ed28fd6de8cf4ee204585c1c6e0c8a4b67ff
Reviewed-on: https://gerrit.libreoffice.org/32960
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/accessibility')
-rw-r--r-- | chart2/source/controller/accessibility/AccessibleChartView.cxx | 9 | ||||
-rw-r--r-- | chart2/source/controller/accessibility/AccessibleTextHelper.cxx | 5 |
2 files changed, 4 insertions, 10 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx index 0cce8bd4b88b..fac65a65c301 100644 --- a/chart2/source/controller/accessibility/AccessibleChartView.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx @@ -63,7 +63,6 @@ AccessibleChartView::AccessibleChartView(SdrView* pView ) : AccessibleChartView::~AccessibleChartView() { - delete m_pViewForwarder; } awt::Rectangle AccessibleChartView::GetWindowPosSize() const @@ -324,12 +323,8 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments aAccInfo.m_spObjectHierarchy = m_spObjectHierarchy; aAccInfo.m_pSdrView = m_pSdrView; VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( m_xWindow ); - if ( m_pViewForwarder ) - { - delete m_pViewForwarder; - } - m_pViewForwarder = new AccessibleViewForwarder( this, pWindow ); - aAccInfo.m_pViewForwarder = m_pViewForwarder; + m_pViewForwarder.reset( new AccessibleViewForwarder( this, pWindow ) ); + aAccInfo.m_pViewForwarder = m_pViewForwarder.get(); // broadcasts an INVALIDATE_ALL_CHILDREN event globally SetInfo( aAccInfo ); } diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx index d7d4fdd5ae9b..367c098c73b9 100644 --- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx +++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx @@ -53,7 +53,6 @@ AccessibleTextHelper::AccessibleTextHelper( AccessibleTextHelper::~AccessibleTextHelper() { - delete m_pTextHelper; } // ____ XInitialization ____ @@ -79,7 +78,7 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg SolarMutexGuard aSolarGuard; - delete m_pTextHelper; + m_pTextHelper.reset(); VclPtr<vcl::Window> pWindow( VCLUnoHelper::GetWindow( xWindow )); if( pWindow ) @@ -90,7 +89,7 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg SdrObject * pTextObj = m_pDrawViewWrapper->getNamedSdrObject( aCID ); if( pTextObj ) { - m_pTextHelper = new ::accessibility::AccessibleTextHelper(o3tl::make_unique<SvxTextEditSource>(*pTextObj, nullptr, *pView, *pWindow)); + m_pTextHelper.reset( new ::accessibility::AccessibleTextHelper(o3tl::make_unique<SvxTextEditSource>(*pTextObj, nullptr, *pView, *pWindow)) ); m_pTextHelper->SetEventSource( xEventSource ); } } |