Lines Matching refs:m_pData
387 :m_pData( new SfxUndoManager_Data( nMaxUndoActionCount ) ) in SfxUndoManager()
397 UndoManagerGuard aGuard( *m_pData ); in ~SfxUndoManager()
398 aListenersCopy = m_pData->aListeners; in ~SfxUndoManager()
409 UndoManagerGuard aGuard( *m_pData ); in EnableUndo()
418 if ( m_pData->mbUndoEnabled == i_enable ) in ImplEnableUndo_Lock()
420 m_pData->mbUndoEnabled = i_enable; in ImplEnableUndo_Lock()
427 UndoManagerGuard aGuard( *m_pData ); in IsUndoEnabled()
435 return m_pData->mbUndoEnabled; in ImplIsUndoEnabled_Lock()
442 UndoManagerGuard aGuard( *m_pData ); in SetMaxUndoActionCount()
449 long nNumToDelete = m_pData->pActUndoArray->aUndoActions.size() - nMaxUndoActionCount; in SetMaxUndoActionCount()
452 size_t nPos = m_pData->pActUndoArray->aUndoActions.size(); in SetMaxUndoActionCount()
453 if ( nPos > m_pData->pActUndoArray->nCurUndoAction ) in SetMaxUndoActionCount()
455 SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[nPos-1].pAction; in SetMaxUndoActionCount()
457 m_pData->pActUndoArray->aUndoActions.Remove( nPos-1 ); in SetMaxUndoActionCount()
461 if ( nNumToDelete > 0 && m_pData->pActUndoArray->nCurUndoAction > 0 ) in SetMaxUndoActionCount()
463 SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[0].pAction; in SetMaxUndoActionCount()
465 m_pData->pActUndoArray->aUndoActions.Remove(0); in SetMaxUndoActionCount()
466 --m_pData->pActUndoArray->nCurUndoAction; in SetMaxUndoActionCount()
470 if ( nPos == m_pData->pActUndoArray->aUndoActions.size() ) in SetMaxUndoActionCount()
474 m_pData->pActUndoArray->nMaxUndoActions = nMaxUndoActionCount; in SetMaxUndoActionCount()
481 UndoManagerGuard aGuard( *m_pData ); in GetMaxUndoActionCount()
482 return m_pData->pActUndoArray->nMaxUndoActions; in GetMaxUndoActionCount()
490 while ( !m_pData->pActUndoArray->aUndoActions.empty() ) in ImplClearCurrentLevel_NoNotify()
492 size_t deletePos = m_pData->pActUndoArray->aUndoActions.size() - 1; in ImplClearCurrentLevel_NoNotify()
493 SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ deletePos ].pAction; in ImplClearCurrentLevel_NoNotify()
495 m_pData->pActUndoArray->aUndoActions.Remove( deletePos ); in ImplClearCurrentLevel_NoNotify()
498 m_pData->pActUndoArray->nCurUndoAction = 0; in ImplClearCurrentLevel_NoNotify()
500 m_pData->mnMarks = 0; in ImplClearCurrentLevel_NoNotify()
501 m_pData->mnEmptyMark = MARK_INVALID; in ImplClearCurrentLevel_NoNotify()
508 UndoManagerGuard aGuard( *m_pData ); in Clear()
521 UndoManagerGuard aGuard( *m_pData ); in ClearAllLevels()
526 m_pData->mbClearUntilTopLevel = true; in ClearAllLevels()
538 UndoManagerGuard aGuard( *m_pData ); in ImplClearRedo_NoLock()
554 UndoManagerGuard aGuard( *m_pData ); in Reset()
579 while ( m_pData->pActUndoArray->nCurUndoAction > 0 ) in ImplClearUndo()
581 SfxUndoAction* pUndoAction = m_pData->pActUndoArray->aUndoActions[0].pAction; in ImplClearUndo()
582 m_pData->pActUndoArray->aUndoActions.Remove( 0 ); in ImplClearUndo()
584 --m_pData->pActUndoArray->nCurUndoAction; in ImplClearUndo()
593 …oArray = ( i_currentLevel == IUndoManager::CurrentLevel ) ? m_pData->pActUndoArray : m_pData->pUnd… in ImplClearRedo()
613 if ( !ImplIsUndoEnabled_Lock() || ( m_pData->pActUndoArray->nMaxUndoActions == 0 ) ) in ImplAddUndoAction_NoNotify()
620 SfxUndoAction* pMergeWithAction = m_pData->pActUndoArray->nCurUndoAction ? in ImplAddUndoAction_NoNotify()
621 m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction : NULL; in ImplAddUndoAction_NoNotify()
633 if( m_pData->pActUndoArray == m_pData->pUndoArray ) in ImplAddUndoAction_NoNotify()
635 while(m_pData->pActUndoArray->aUndoActions.size() >= m_pData->pActUndoArray->nMaxUndoActions) in ImplAddUndoAction_NoNotify()
637 i_guard.markForDeletion( m_pData->pActUndoArray->aUndoActions[0].pAction ); in ImplAddUndoAction_NoNotify()
638 m_pData->pActUndoArray->aUndoActions.Remove(0); in ImplAddUndoAction_NoNotify()
640 if(m_pData->pActUndoArray->nCurUndoAction) in ImplAddUndoAction_NoNotify()
642 --m_pData->pActUndoArray->nCurUndoAction; in ImplAddUndoAction_NoNotify()
652 m_pData->pActUndoArray->aUndoActions.Insert( pAction, m_pData->pActUndoArray->nCurUndoAction++ ); in ImplAddUndoAction_NoNotify()
660 UndoManagerGuard aGuard( *m_pData ); in AddUndoAction()
674 UndoManagerGuard aGuard( *m_pData ); in GetUndoActionCount()
675 const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; in GetUndoActionCount()
683 UndoManagerGuard aGuard( *m_pData ); in GetUndoActionComment()
686 const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; in GetUndoActionComment()
699 UndoManagerGuard aGuard( *m_pData ); in GetUndoActionId()
701 …DBG_ASSERT( m_pData->pActUndoArray->nCurUndoAction > 0, "svl::SfxUndoManager::GetUndoActionId(), i… in GetUndoActionId()
702 if ( m_pData->pActUndoArray->nCurUndoAction == 0 ) in GetUndoActionId()
704 …return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction->Get… in GetUndoActionId()
711 UndoManagerGuard aGuard( *m_pData ); in GetUndoAction()
713 …DBG_ASSERT( nNo < m_pData->pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoAction(), i… in GetUndoAction()
714 if( nNo >= m_pData->pActUndoArray->nCurUndoAction ) in GetUndoAction()
716 return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1-nNo].pAction; in GetUndoAction()
724 UndoManagerGuard aGuard( *m_pData ); in RemoveLastUndoAction()
726 …ENSURE_OR_RETURN_VOID( m_pData->pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::RemoveLastUnd… in RemoveLastUndoAction()
728 m_pData->pActUndoArray->nCurUndoAction--; in RemoveLastUndoAction()
731 …for ( size_t nPos = m_pData->pActUndoArray->aUndoActions.size(); nPos > m_pData->pActUndoArray->nC… in RemoveLastUndoAction()
733 aGuard.markForDeletion( m_pData->pActUndoArray->aUndoActions[nPos-1].pAction ); in RemoveLastUndoAction()
736 m_pData->pActUndoArray->aUndoActions.Remove( in RemoveLastUndoAction()
737 m_pData->pActUndoArray->nCurUndoAction, in RemoveLastUndoAction()
738 m_pData->pActUndoArray->aUndoActions.size() - m_pData->pActUndoArray->nCurUndoAction ); in RemoveLastUndoAction()
745 UndoManagerGuard aGuard( *m_pData ); in IsDoing()
746 return m_pData->mbDoing; in IsDoing()
767 UndoManagerGuard aGuard( *m_pData ); in ImplUndo()
770 ::comphelper::FlagGuard aDoingGuard( m_pData->mbDoing ); in ImplUndo()
779 if ( m_pData->pActUndoArray->nCurUndoAction == 0 ) in ImplUndo()
785 …SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ --m_pData->pActUndoArray->nCurUndoA… in ImplUndo()
805 while ( nCurAction < m_pData->pActUndoArray->aUndoActions.size() ) in ImplUndo()
807 if ( m_pData->pActUndoArray->aUndoActions[ nCurAction++ ].pAction == pAction ) in ImplUndo()
828 UndoManagerGuard aGuard( *m_pData ); in GetRedoActionCount()
836 const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; in ImplGetRedoActionCount_Lock()
844 UndoManagerGuard aGuard( *m_pData ); in GetRedoAction()
846 const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; in GetRedoAction()
859 UndoManagerGuard aGuard( *m_pData ); in GetRedoActionComment()
860 const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; in GetRedoActionComment()
886 UndoManagerGuard aGuard( *m_pData ); in ImplRedo()
889 ::comphelper::FlagGuard aDoingGuard( m_pData->mbDoing ); in ImplRedo()
898 if ( m_pData->pActUndoArray->nCurUndoAction >= m_pData->pActUndoArray->aUndoActions.size() ) in ImplRedo()
904 …SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAct… in ImplRedo()
924 while ( nCurAction < m_pData->pActUndoArray->aUndoActions.size() ) in ImplRedo()
926 if ( m_pData->pActUndoArray->aUndoActions[ nCurAction ].pAction == pAction ) in ImplRedo()
948 UndoManagerGuard aGuard( *m_pData ); in GetRepeatActionCount()
949 return m_pData->pActUndoArray->aUndoActions.size(); in GetRepeatActionCount()
956 UndoManagerGuard aGuard( *m_pData ); in GetRepeatActionComment()
957 …return m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->aUndoActions.size() - 1 ].pAc… in GetRepeatActionComment()
965 UndoManagerGuard aGuard( *m_pData ); in Repeat()
966 if ( !m_pData->pActUndoArray->aUndoActions.empty() ) in Repeat()
968 …SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->aUndoAction… in Repeat()
982 UndoManagerGuard aGuard( *m_pData ); in CanRepeat()
983 if ( !m_pData->pActUndoArray->aUndoActions.empty() ) in CanRepeat()
985 size_t nActionNo = m_pData->pActUndoArray->aUndoActions.size() - 1; in CanRepeat()
986 return m_pData->pActUndoArray->aUndoActions[nActionNo].pAction->CanRepeat(rTarget); in CanRepeat()
995 UndoManagerGuard aGuard( *m_pData ); in AddUndoListener()
996 m_pData->aListeners.push_back( &i_listener ); in AddUndoListener()
1003 UndoManagerGuard aGuard( *m_pData ); in RemoveUndoListener()
1004 for ( UndoListeners::iterator lookup = m_pData->aListeners.begin(); in RemoveUndoListener()
1005 lookup != m_pData->aListeners.end(); in RemoveUndoListener()
1011 m_pData->aListeners.erase( lookup ); in RemoveUndoListener()
1028 UndoManagerGuard aGuard( *m_pData ); in EnterListAction()
1033 if ( !m_pData->pUndoArray->nMaxUndoActions ) in EnterListAction()
1036 m_pData->pFatherUndoArray = m_pData->pActUndoArray; in EnterListAction()
1037 …SfxListUndoAction* pAction = new SfxListUndoAction( rComment, rRepeatComment, nId, m_pData->pActUn… in EnterListAction()
1040 m_pData->pActUndoArray = pAction; in EnterListAction()
1050 UndoManagerGuard aGuard( *m_pData ); in IsInListAction()
1058 return ( m_pData->pActUndoArray != m_pData->pUndoArray ); in ImplIsInListAction_Lock()
1065 UndoManagerGuard aGuard( *m_pData ); in GetListActionDepth()
1068 SfxUndoArray* pLookup( m_pData->pActUndoArray ); in GetListActionDepth()
1069 while ( pLookup != m_pData->pUndoArray ) in GetListActionDepth()
1082 UndoManagerGuard aGuard( *m_pData ); in LeaveListAction()
1085 if ( m_pData->mbClearUntilTopLevel ) in LeaveListAction()
1090 m_pData->mbClearUntilTopLevel = false; in LeaveListAction()
1103 UndoManagerGuard aGuard( *m_pData ); in LeaveAndMergeListAction()
1114 if ( !m_pData->pUndoArray->nMaxUndoActions ) in ImplLeaveListAction()
1123 …DBG_ASSERT( m_pData->pActUndoArray->pFatherUndoArray, "SfxUndoManager::ImplLeaveListAction, no fat… in ImplLeaveListAction()
1126 SfxUndoArray* pArrayToLeave = m_pData->pActUndoArray; in ImplLeaveListAction()
1128 m_pData->pActUndoArray = m_pData->pActUndoArray->pFatherUndoArray; in ImplLeaveListAction()
1134 …SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurU… in ImplLeaveListAction()
1135 m_pData->pActUndoArray->aUndoActions.Remove( --m_pData->pActUndoArray->nCurUndoAction ); in ImplLeaveListAction()
1146 …SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurU… in ImplLeaveListAction()
1153 OSL_ENSURE( m_pData->pActUndoArray->nCurUndoAction > 1, in ImplLeaveListAction()
1155 if ( m_pData->pActUndoArray->nCurUndoAction > 1 ) in ImplLeaveListAction()
1157 …SfxUndoAction* pPreviousAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCu… in ImplLeaveListAction()
1158 … m_pData->pActUndoArray->aUndoActions.Remove( m_pData->pActUndoArray->nCurUndoAction - 2 ); in ImplLeaveListAction()
1159 --m_pData->pActUndoArray->nCurUndoAction; in ImplLeaveListAction()
1190 UndoManagerGuard aGuard( *m_pData ); in MarkTopUndoAction()
1194 OSL_ENSURE((m_pData->mnMarks + 1) < (m_pData->mnEmptyMark - 1), in MarkTopUndoAction()
1197 size_t const nActionPos = m_pData->pUndoArray->nCurUndoAction; in MarkTopUndoAction()
1200 --m_pData->mnEmptyMark; in MarkTopUndoAction()
1201 return m_pData->mnEmptyMark; in MarkTopUndoAction()
1204 m_pData->pUndoArray->aUndoActions[ nActionPos-1 ].aMarks.push_back( in MarkTopUndoAction()
1205 ++m_pData->mnMarks ); in MarkTopUndoAction()
1206 return m_pData->mnMarks; in MarkTopUndoAction()
1212 UndoManagerGuard aGuard( *m_pData ); in RemoveMark()
1214 if ((m_pData->mnEmptyMark < i_mark) || (MARK_INVALID == i_mark)) in RemoveMark()
1218 else if (i_mark == m_pData->mnEmptyMark) in RemoveMark()
1220 --m_pData->mnEmptyMark; // never returned from MarkTop => invalid in RemoveMark()
1224 for ( size_t i=0; i<m_pData->pUndoArray->aUndoActions.size(); ++i ) in RemoveMark()
1226 MarkedUndoAction& rAction = m_pData->pUndoArray->aUndoActions[i]; in RemoveMark()
1248 UndoManagerGuard aGuard( *m_pData ); in HasTopUndoActionMark()
1250 size_t nActionPos = m_pData->pUndoArray->nCurUndoAction; in HasTopUndoActionMark()
1253 return (i_mark == m_pData->mnEmptyMark); in HasTopUndoActionMark()
1257 m_pData->pUndoArray->aUndoActions[ nActionPos-1 ]; in HasTopUndoActionMark()
1274 UndoManagerGuard aGuard( *m_pData ); in RemoveOldestUndoActions()
1279 SfxUndoAction* pActionToRemove = m_pData->pUndoArray->aUndoActions[0].pAction; in RemoveOldestUndoActions()
1281 if ( IsInListAction() && ( m_pData->pUndoArray->nCurUndoAction == 1 ) ) in RemoveOldestUndoActions()
1288 m_pData->pUndoArray->aUndoActions.Remove( 0 ); in RemoveOldestUndoActions()
1289 --m_pData->pUndoArray->nCurUndoAction; in RemoveOldestUndoActions()
1419 pAction = pUndoManagerImplementation->m_pData->pActUndoArray->aUndoActions[nPos].pAction; in SfxLinkUndoAction()