diff options
Diffstat (limited to 'editeng/source/outliner/outlundo.cxx')
-rw-r--r-- | editeng/source/outliner/outlundo.cxx | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/editeng/source/outliner/outlundo.cxx b/editeng/source/outliner/outlundo.cxx index ab55e3a7a5db..6b70e0da7655 100644 --- a/editeng/source/outliner/outlundo.cxx +++ b/editeng/source/outliner/outlundo.cxx @@ -143,13 +143,11 @@ OLUndoExpand::OLUndoExpand(Outliner* pOut, sal_uInt16 _nId ) DBG_ASSERT(pOut,"Undo:No Outliner"); pOutliner = pOut; nCount = 0; - pParas = nullptr; } OLUndoExpand::~OLUndoExpand() { - delete pParas; } @@ -163,25 +161,12 @@ void OLUndoExpand::Restore( bool bUndo ) sal_uInt16 _nId = GetId(); if((_nId == OLUNDO_EXPAND && !bUndo) || (_nId == OLUNDO_COLLAPSE && bUndo)) bExpand = true; - if( !pParas ) - { - pPara = pOutliner->GetParagraph( nCount ); - if( bExpand ) - pOutliner->Expand( pPara ); - else - pOutliner->Collapse( pPara ); - } + + pPara = pOutliner->GetParagraph( nCount ); + if( bExpand ) + pOutliner->Expand( pPara ); else - { - for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ ) - { - pPara = pOutliner->GetParagraph( pParas[nIdx] ); - if( bExpand ) - pOutliner->Expand( pPara ); - else - pOutliner->Collapse( pPara ); - } - } + pOutliner->Collapse( pPara ); } void OLUndoExpand::Undo() |