cui/source/customize/SvxToolbarConfigPage.cxx | 11 +++++------ cui/source/dialogs/hangulhanjadlg.cxx | 7 +++---- cui/source/inc/SvxToolbarConfigPage.hxx | 2 +- cui/source/inc/hangulhanjadlg.hxx | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-)
New commits: commit a49440b1c4a7cd831212e2e3c19f89ce12a4e889 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Sat Jun 9 20:36:08 2018 +0200 loplugin:useuniqueptr in SvxToolbarEntriesListBox Change-Id: Ied01f97a09d34c43f786c030fbdd256bcf849f04 Reviewed-on: https://gerrit.libreoffice.org/55535 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index 9cbad5b1d65d..f61203cab3f2 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -889,9 +889,9 @@ SvxToolbarEntriesListBox::SvxToolbarEntriesListBox(vcl::Window* pParent, SvxTool : SvxMenuEntriesListBox(pParent, pPg) , pPage(pPg) { - m_pButtonData = new SvLBoxButtonData( this ); - BuildCheckBoxButtonImages( m_pButtonData ); - EnableCheckButton( m_pButtonData ); + m_pButtonData.reset(new SvLBoxButtonData( this )); + BuildCheckBoxButtonImages( m_pButtonData.get() ); + EnableCheckButton( m_pButtonData.get() ); } SvxToolbarEntriesListBox::~SvxToolbarEntriesListBox() @@ -901,8 +901,7 @@ SvxToolbarEntriesListBox::~SvxToolbarEntriesListBox() void SvxToolbarEntriesListBox::dispose() { - delete m_pButtonData; - m_pButtonData = nullptr; + m_pButtonData.reset(); pPage.clear(); SvxMenuEntriesListBox::dispose(); @@ -971,7 +970,7 @@ void SvxToolbarEntriesListBox::DataChanged( const DataChangedEvent& rDCEvt ) if (( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & AllSettingsFlags::STYLE )) { - BuildCheckBoxButtonImages( m_pButtonData ); + BuildCheckBoxButtonImages( m_pButtonData.get() ); Invalidate(); } } diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx b/cui/source/inc/SvxToolbarConfigPage.hxx index f79f3ef0fd4e..b2b71a021964 100644 --- a/cui/source/inc/SvxToolbarConfigPage.hxx +++ b/cui/source/inc/SvxToolbarConfigPage.hxx @@ -92,7 +92,7 @@ public: class SvxToolbarEntriesListBox final : public SvxMenuEntriesListBox { Size m_aCheckBoxImageSizePixel; - SvLBoxButtonData* m_pButtonData; + std::unique_ptr<SvLBoxButtonData> m_pButtonData; VclPtr<SvxConfigPage> pPage; void ChangeVisibility( SvTreeListEntry* pEntry ); commit d630a53e9f48f6226f3ff7a97d400405c4df6be5 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Jun 4 17:02:01 2018 +0200 loplugin:useuniqueptr in HangulHanjaEditDictDialog Change-Id: Ic1e98a7efdd75a6c940c5ce81bfb414711c4ab37 Reviewed-on: https://gerrit.libreoffice.org/55534 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index cba5add90558..f674c71488a0 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1663,7 +1663,7 @@ namespace svx if( nCnt ) { if( !m_pSuggestions ) - m_pSuggestions = new SuggestionList; + m_pSuggestions.reset(new SuggestionList); const OUString* pSugg = aEntries.getConstArray(); sal_uInt32 n = 0; @@ -1710,7 +1710,7 @@ namespace svx { //set suggestion if( !m_pSuggestions ) - m_pSuggestions = new SuggestionList; + m_pSuggestions.reset(new SuggestionList); m_pSuggestions->Set( aTxt, nEntryNum ); } @@ -1787,8 +1787,7 @@ namespace svx void HangulHanjaEditDictDialog::dispose() { - delete m_pSuggestions; - m_pSuggestions = nullptr; + m_pSuggestions.reset(); m_aBookLB.clear(); m_aOriginalLB.clear(); m_aEdit1.clear(); diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index de160d434acf..92fceadfc5ad 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -271,7 +271,7 @@ namespace svx sal_uInt32 m_nCurrentDict; OUString m_aOriginal; - SuggestionList* m_pSuggestions; + std::unique_ptr<SuggestionList> m_pSuggestions; VclPtr<ListBox> m_aBookLB; VclPtr<ComboBox> m_aOriginalLB; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits