diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-09-15 23:53:29 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-09-16 13:04:07 +0200 |
commit | 01648a391107c1501ed1948ef1b18539d551176e (patch) | |
tree | e581f6b6e4fdc8696b624e45599ea8bcf0a8ad4b /sw/source/ui | |
parent | 54045cc813c79e53abe608cc1a8d35ee7177465e (diff) |
sw: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: I880526fdcce3be0f9e9149695812e048d95004e6
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 4d9c25b3c572..c52ecc24cffa 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -328,8 +328,8 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, AddHdl, Button*, void) if( n >= pTableTable->size() ) { // Format with the name does not already exist, so take up. - SwTableAutoFormat* pNewData = new - SwTableAutoFormat( aFormatName ); + std::unique_ptr<SwTableAutoFormat> pNewData( + new SwTableAutoFormat(aFormatName)); pShell->GetTableAutoFormat( *pNewData ); // Insert sorted!! @@ -337,7 +337,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, AddHdl, Button*, void) if( (*pTableTable)[ n ].GetName() > aFormatName ) break; - pTableTable->InsertAutoFormat(n, pNewData); + pTableTable->InsertAutoFormat(n, std::move(pNewData)); m_pLbFormat->InsertEntry( aFormatName, nDfltStylePos + n ); m_pLbFormat->SelectEntryPos( nDfltStylePos + n ); bFormatInserted = true; @@ -423,7 +423,8 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RenameHdl, Button*, void) { // no format with this name exists, so rename it m_pLbFormat->RemoveEntry( nDfltStylePos + nIndex ); - SwTableAutoFormat* p = pTableTable->ReleaseAutoFormat( nIndex ); + std::unique_ptr<SwTableAutoFormat> p( + pTableTable->ReleaseAutoFormat(nIndex)); p->SetName( aFormatName ); @@ -434,7 +435,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RenameHdl, Button*, void) break; } - pTableTable->InsertAutoFormat( n, p ); + pTableTable->InsertAutoFormat( n, std::move(p) ); m_pLbFormat->InsertEntry( aFormatName, nDfltStylePos + n ); m_pLbFormat->SelectEntryPos( nDfltStylePos + n ); |