diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2006-01-10 13:47:53 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2006-01-10 13:47:53 +0000 |
commit | 664b1e258685150a748722d5693eb5191df4e1dd (patch) | |
tree | 36808364aad99e2283f924b7ecc7aae458b449b9 /svx/source/editeng/impedit5.cxx | |
parent | 4b3930dac74958d903635fb520ee49ad317a94bd (diff) |
INTEGRATION: CWS impresspresobjs (1.26.140); FILE MERGED
2005/12/09 15:09:26 cl 1.26.140.1: #i58649# export some implementation details to fix undo handling in impress outline view
Diffstat (limited to 'svx/source/editeng/impedit5.cxx')
-rw-r--r-- | svx/source/editeng/impedit5.cxx | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/svx/source/editeng/impedit5.cxx b/svx/source/editeng/impedit5.cxx index 97c282ebc1..24ca3292a1 100644 --- a/svx/source/editeng/impedit5.cxx +++ b/svx/source/editeng/impedit5.cxx @@ -4,9 +4,9 @@ * * $RCSfile: impedit5.cxx,v $ * - * $Revision: 1.26 $ + * $Revision: 1.27 $ * - * last change: $Author: rt $ $Date: 2005-09-08 22:34:31 $ + * last change: $Author: rt $ $Date: 2006-01-10 14:47:53 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -91,7 +91,6 @@ void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ) SfxStyleSheet* pCurStyle = pNode->GetStyleSheet(); if ( pStyle != pCurStyle ) { -#ifndef SVX_LIGHT if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() ) { XubString aPrevStyleName; @@ -108,7 +107,6 @@ void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ) aNewStyleName, pStyle ? pStyle->GetFamily() : SFX_STYLE_FAMILY_PARA, pNode->GetContentAttribs().GetItems() ) ); } -#endif if ( pCurStyle ) EndListening( *pCurStyle, FALSE ); pNode->SetStyleSheet( pStyle, aStatus.UseCharAttribs() ); @@ -213,7 +211,6 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const SfxItemSet& rSet ) { -#ifndef SVX_LIGHT DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "CreateAttribUndo: Fehlerhafte Selektion" ); aSel.Adjust( aEditDoc ); @@ -256,49 +253,39 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S } } return pUndo; -#else - return 0; -#endif } void ImpEditEngine::UndoActionStart( USHORT nId, const ESelection& aSel ) { -#ifndef SVX_LIGHT if ( IsUndoEnabled() && !IsInUndo() ) { GetUndoManager().EnterListAction( GetEditEnginePtr()->GetUndoComment( nId ), XubString(), nId ); DBG_ASSERT( !pUndoMarkSelection, "UndoAction SelectionMarker?" ); pUndoMarkSelection = new ESelection( aSel ); } -#endif } void ImpEditEngine::UndoActionStart( USHORT nId ) { -#ifndef SVX_LIGHT if ( IsUndoEnabled() && !IsInUndo() ) { GetUndoManager().EnterListAction( GetEditEnginePtr()->GetUndoComment( nId ), XubString(), nId ); DBG_ASSERT( !pUndoMarkSelection, "UndoAction SelectionMarker?" ); } -#endif } void ImpEditEngine::UndoActionEnd( USHORT nId ) { -#ifndef SVX_LIGHT if ( IsUndoEnabled() && !IsInUndo() ) { GetUndoManager().LeaveListAction(); delete pUndoMarkSelection; pUndoMarkSelection = NULL; } -#endif } void ImpEditEngine::InsertUndo( EditUndo* pUndo, BOOL bTryMerge ) { -#ifndef SVX_LIGHT DBG_ASSERT( !IsInUndo(), "InsertUndo im Undomodus!" ); if ( pUndoMarkSelection ) { @@ -308,63 +295,54 @@ void ImpEditEngine::InsertUndo( EditUndo* pUndo, BOOL bTryMerge ) pUndoMarkSelection = NULL; } GetUndoManager().AddUndoAction( pUndo, bTryMerge ); -#endif + + mbLastTryMerge = bTryMerge; } void ImpEditEngine::ResetUndoManager() { -#ifndef SVX_LIGHT if ( HasUndoManager() ) GetUndoManager().Clear(); -#endif } void ImpEditEngine::EnableUndo( BOOL bEnable ) { -#ifndef SVX_LIGHT // Beim Umschalten des Modus Liste loeschen: if ( bEnable != IsUndoEnabled() ) ResetUndoManager(); bUndoEnabled = bEnable; -#endif } BOOL ImpEditEngine::Undo( EditView* pView ) { -#ifndef SVX_LIGHT if ( HasUndoManager() && GetUndoManager().GetUndoActionCount() ) { SetActiveView( pView ); GetUndoManager().Undo( 1 ); return TRUE; } -#endif return FALSE; } BOOL ImpEditEngine::Redo( EditView* pView ) { -#ifndef SVX_LIGHT if ( HasUndoManager() && GetUndoManager().GetRedoActionCount() ) { SetActiveView( pView ); GetUndoManager().Redo( 0 ); return TRUE; } -#endif return FALSE; } BOOL ImpEditEngine::Repeat( EditView* /* pView */ ) { -#ifndef SVX_LIGHT if ( HasUndoManager() && GetUndoManager().GetRepeatActionCount() ) { DBG_WARNING( "Repeat nicht implementiert!" ); return TRUE; } -#endif return FALSE; } @@ -591,14 +569,12 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); -#ifndef SVX_LIGHT if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() ) { EditUndoSetAttribs* pUndo = CreateAttribUndo( aSel, rSet ); pUndo->SetSpecial( nSpecial ); InsertUndo( pUndo ); } -#endif BOOL bCheckLanguage = FALSE; if ( GetStatus().DoOnlineSpelling() ) @@ -699,7 +675,6 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri const SfxItemSet* pEmptyItemSet = bRemoveParaAttribs ? &GetEmptyItemSet() : 0; -#ifndef SVX_LIGHT if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() ) { // Eventuel spezielles Undo, oder ItemSet* @@ -709,7 +684,6 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri pUndo->SetRemoveWhich( nWhich ); InsertUndo( pUndo ); } -#endif // ueber die Absaetze iterieren... for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) @@ -808,7 +782,6 @@ void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) if ( !( pNode->GetContentAttribs().GetItems() == rSet ) ) { -#ifndef SVX_LIGHT if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() ) { if ( rSet.GetPool() != &aEditDoc.GetItemPool() ) @@ -822,7 +795,6 @@ void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) InsertUndo( new EditUndoSetParaAttribs( this, nPara, pNode->GetContentAttribs().GetItems(), rSet ) ); } } -#endif pNode->GetContentAttribs().GetItems().Set( rSet ); if ( aStatus.UseCharAttribs() ) pNode->CreateDefFont(); |