diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-10-04 13:11:50 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-10-04 13:16:33 +0200 |
commit | fadb5d1dcd78f5ceb79863381d52964c3f054434 (patch) | |
tree | ade072eb33478a5da290a0d7f59e6364c4024f6c /sw | |
parent | libcmis: disable unit tests and static lib as they aren't used (diff) | |
download | core-fadb5d1dcd78f5ceb79863381d52964c3f054434.tar.gz core-fadb5d1dcd78f5ceb79863381d52964c3f054434.zip |
Page Break: fixed crasher due to bad removal of frame controls
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/docvw/FrameControlsManager.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/inc/FrameControlsManager.hxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/ui/docvw/FrameControlsManager.cxx b/sw/source/ui/docvw/FrameControlsManager.cxx index 4a0763681c95..6fe07e294f57 100644 --- a/sw/source/ui/docvw/FrameControlsManager.cxx +++ b/sw/source/ui/docvw/FrameControlsManager.cxx @@ -68,7 +68,7 @@ SwFrameControlsManager::~SwFrameControlsManager() m_aControls.clear(); } -std::vector< SwFrameControlPtr > SwFrameControlsManager::GetControls( FrameControlType eType ) +std::vector< SwFrameControlPtr >& SwFrameControlsManager::GetControls( FrameControlType eType ) { return m_aControls[eType]; } @@ -84,7 +84,7 @@ void SwFrameControlsManager::RemoveControls( const SwFrm* pFrm ) while ( pIt != m_aControls.end() ) { - vector< SwFrameControlPtr > aVect = pIt->second; + vector< SwFrameControlPtr >& aVect = pIt->second; aVect.erase( remove_if( aVect.begin(), aVect.end(), FramePredicate( pFrm ) ), aVect.end() ); @@ -124,7 +124,7 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm, // Check if we already have the control SwFrameControlPtr pControl; - vector< SwFrameControlPtr > aControls = m_aControls[HeaderFooter]; + vector< SwFrameControlPtr >& aControls = m_aControls[HeaderFooter]; vector< SwFrameControlPtr >::iterator pIt = aControls.begin(); while ( pIt != aControls.end() && !pControl.get() ) @@ -159,7 +159,7 @@ void SwFrameControlsManager::SetPageBreakControl( const SwPageFrm* pPageFrm ) // Check if we already have the control SwFrameControlPtr pControl; - vector< SwFrameControlPtr > aControls = m_aControls[PageBreak]; + vector< SwFrameControlPtr >& aControls = m_aControls[PageBreak]; vector< SwFrameControlPtr >::iterator pIt = aControls.begin(); while ( pIt != aControls.end() && !pControl.get() ) diff --git a/sw/source/ui/inc/FrameControlsManager.hxx b/sw/source/ui/inc/FrameControlsManager.hxx index c3e91ee4d920..b79843f610a3 100644 --- a/sw/source/ui/inc/FrameControlsManager.hxx +++ b/sw/source/ui/inc/FrameControlsManager.hxx @@ -57,7 +57,7 @@ class SwFrameControlsManager SwFrameControlsManager( SwEditWin* pEditWin ); ~SwFrameControlsManager( ); - std::vector< SwFrameControlPtr > GetControls( FrameControlType eType ); + std::vector< SwFrameControlPtr >& GetControls( FrameControlType eType ); void AddControl( FrameControlType eType, SwFrameControlPtr pControl ); void RemoveControls( const SwFrm* pFrm ); void HideControls( FrameControlType eType ); |