From 10629489d39044c79967c0e7a38e1fdd5025f069 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 Nov 2015 14:05:05 +0200 Subject: sfx2: boost::ptr_vector->std::vector Change-Id: Ida6aa572b182f966180debc9bf8665975fe51ea2 --- sfx2/source/dialog/splitwin.cxx | 24 ++++++++++++------------ sfx2/source/inc/splitwin.hxx | 5 +++-- 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 567fdee700c8..16e5a5b48300 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -285,7 +285,7 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl, pDock->bNewLine = true; } - pDockArr->insert(pDockArr->begin() + n, pDock); + pDockArr->insert(pDockArr->begin() + n, std::unique_ptr(pDock)); } } } @@ -339,7 +339,7 @@ void SfxSplitWindow::SaveConfig_Impl() sal_uInt16 n; for ( n=0; nsize(); n++ ) { - const SfxDock_Impl& rDock = (*pDockArr)[n]; + const SfxDock_Impl& rDock = *(*pDockArr)[n].get(); if ( rDock.bHide || rDock.pWin ) nCount++; } @@ -348,7 +348,7 @@ void SfxSplitWindow::SaveConfig_Impl() for ( n=0; nsize(); n++ ) { - const SfxDock_Impl& rDock = (*pDockArr)[n]; + const SfxDock_Impl& rDock = *(*pDockArr)[n].get(); if ( !rDock.bHide && !rDock.pWin ) continue; if ( rDock.bNewLine ) @@ -419,7 +419,7 @@ void SfxSplitWindow::Split() sal_uInt16 nCount = pDockArr->size(); for ( sal_uInt16 n=0; nsize(); for ( sal_uInt16 n=0; nbHide = true; - pDockArr->push_back( pFoundDock ); + pDockArr->push_back( std::unique_ptr(pFoundDock) ); pFoundDock->nType = pDockWin->GetType(); nLine++; nPos = 0; @@ -557,11 +557,11 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, bool bSave) sal_uInt16 nCount = pDockArr->size(); for ( sal_uInt16 n=0; nGetType() ) { if ( rDock.bNewLine && nbNewLine = true; // Window has a position, this we forget pDockArr->erase(pDockArr->begin() + n); @@ -628,7 +628,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize sal_uInt16 nInsertPos = 0; for ( sal_uInt16 n=0; ninsert(pDockArr->begin() + nInsertPos, pDock); + pDockArr->insert(pDockArr->begin() + nInsertPos, std::unique_ptr(pDock)); InsertWindow_Impl( pDock, rSize, nLine, nPos, bNewLine ); SaveConfig_Impl(); } @@ -782,7 +782,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, sal_uInt16 nCount = pDockArr->size(); for ( sal_uInt16 n=0; nsize(); for ( sal_uInt16 n=0; nGetType() ) { rDock.pWin = nullptr; diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx index 86d9d7f92ed3..2f3b8d65c984 100644 --- a/sfx2/source/inc/splitwin.hxx +++ b/sfx2/source/inc/splitwin.hxx @@ -22,7 +22,8 @@ #include #include -#include +#include +#include class SfxWorkWindow; class SfxDockingWindow; @@ -37,7 +38,7 @@ struct SfxDock_Impl long nSize; }; -typedef boost::ptr_vector SfxDockArr_Impl; +typedef std::vector > SfxDockArr_Impl; class SfxSplitWindow : public SplitWindow { -- cgit