diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-27 14:07:12 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-30 06:34:32 +0000 |
commit | 3e9e667af2d8d307844b29d608b377a04b6bb139 (patch) | |
tree | f08ebf65eff11bdaae295b17af86fb8558ca0552 /sd | |
parent | 12868914a39b0e8fb32f63d1307c1bb1c535fb9c (diff) |
loplugin:unusedmethods SfxLinkUndoAction
Change-Id: I1ad7c2452dd9bc80e7404f41484b9667adbcfa7b
Reviewed-on: https://gerrit.libreoffice.org/25542
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 94fac3d302a3..7b184a29b38c 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -1568,47 +1568,6 @@ void OutlineView::TryToMergeUndoActions() pListAction->aUndoActions.Remove(nEditPos); delete pEditUndo; - // now check if we also can merge the draw undo actions - ::svl::IUndoManager* pDocUndoManager = mpDocSh->GetUndoManager(); - if( pDocUndoManager && ( pListAction->aUndoActions.size() == 1 )) - { - SfxLinkUndoAction* pLinkAction = dynamic_cast< SfxLinkUndoAction* >( pListAction->aUndoActions.GetUndoAction(0) ); - SfxLinkUndoAction* pPrevLinkAction = nullptr; - - if( pLinkAction ) - { - nAction = pPrevListAction->aUndoActions.size(); - while( !pPrevLinkAction && nAction ) - pPrevLinkAction = dynamic_cast< SfxLinkUndoAction* >(pPrevListAction->aUndoActions.GetUndoAction(--nAction)); - } - - if( pLinkAction && pPrevLinkAction && - ( pLinkAction->GetAction() == pDocUndoManager->GetUndoAction() ) && - ( pPrevLinkAction->GetAction() == pDocUndoManager->GetUndoAction(1) ) ) - { - SfxListUndoAction* pSourceList = dynamic_cast< SfxListUndoAction* >(pLinkAction->GetAction()); - SfxListUndoAction* pDestinationList = dynamic_cast< SfxListUndoAction* >(pPrevLinkAction->GetAction()); - - if( pSourceList && pDestinationList ) - { - sal_uInt16 nCount = pSourceList->aUndoActions.size(); - sal_uInt16 nDestAction = pDestinationList->aUndoActions.size(); - while( nCount-- ) - { - SfxUndoAction* pTemp = pSourceList->aUndoActions.GetUndoAction(0); - pSourceList->aUndoActions.Remove(0); - pDestinationList->aUndoActions.Insert( pTemp, nDestAction++ ); - } - pDestinationList->nCurUndoAction = pDestinationList->aUndoActions.size(); - - pListAction->aUndoActions.Remove(0); - delete pLinkAction; - - pDocUndoManager->RemoveLastUndoAction(); - } - } - } - if ( !pListAction->aUndoActions.empty() ) { // now we have to move all remaining doc undo actions from the top undo |