Commit Graph

20 Commits

Author SHA1 Message Date
Frank Schoenheit [fs]
d48a9f55f8 undoapi: don't let sw's UndoManager call into SfxUndoManager::Clear when in a list action - introdce a dedicated method (ClearAllLelves) for the pattern needed by sw 2011-01-06 10:34:42 +01:00
Frank Schoenheit [fs]
06a337f319 undoapi: (I|Sfx)UndoManager now working with size_t instead of USHORT 2010-12-17 12:33:22 +01:00
Michael Stahl
65a3c2385c undoapi: #i115383#: SwDoc calls SfxObjectShell::SetUndoManager() 2010-12-15 09:14:12 +01:00
Michael Stahl
1ba0c18781 undoapi: #i115383#: derive sw::UndoManager from SfxUndoManager:
derive SwUndo from SfxUndoAction.
 throw away most of docundo.cxx.
 throw away SwUndoStart and SwUndoEnd.
 replace SwUndoIter with sw::UndoRedoContext and sw::RepeatContext.
 SwUndo::GetId() no longer public to prevent abuse.
 add SwEditShell::HandleUndoRedoContext().
2010-12-15 09:14:11 +01:00
Michael Stahl
bf0cd6ad3f undoapi: #i115383#: remove IDocumentUndoRedo::HasTooManyUndos():
it would be much better to handle this problem by using a STL container...
2010-12-15 09:14:08 +01:00
Michael Stahl
60d7850e64 undoapi: #i115383#: remove RemoveLastUndo() from IDocumentUndoRedo 2010-12-15 09:14:08 +01:00
Michael Stahl
8e7d7f0e14 undoapi: #i115383#: change return type of GetLastUndoInfo() to bool:
unfortunately several places need the ID, so add the ID as an out parameter.
 a bool return is necessary in case the Undo action is not a writer action,
  but created via the undo API.
2010-12-15 09:14:08 +01:00
Michael Stahl
58a64dfc06 undoapi: #i115383#: change return type of GetFirstRedoInfo() to bool:
nobody needs the ID, and SfxUndoManager currently does not provide it.
2010-12-15 09:14:07 +01:00
Michael Stahl
44b1216c8f undoapi: #i115383#: split up IDocumentUndoRedo::Get{Undo,Redo}Ids():
remove class SwUndoIdAndName and associated pointer abuse.
 split up IDocumentUndoRedo::Get{Undo,Redo}Ids():
  Get{LastUndo,FirstRedo,Repeat}Info() return string and ID for current action.
  Get{Undo,Redo}Comments() return all Undo/Redo comments.
 adapt SwEditShell interface as well.
2010-12-15 09:14:02 +01:00
Michael Stahl
7fb4665149 unodapi: #i115383#: cleanup implementation of sw::UndoManager a bit 2010-11-25 14:31:11 +01:00
Michael Stahl
98947e4787 unodapi: #i115383#: remove SwDoc dependence from sw::UndoManager:
replace all uses of SwDoc with interfaces.
2010-11-25 14:31:11 +01:00
Michael Stahl
6279f8cb40 unodapi: #i115383#: move RemoveInvisibleContent() from UndoManager to SwDoc. 2010-11-25 14:31:11 +01:00
Michael Stahl
d2ab337e8f unodapi: #i115383#: clean up UndoActionCount:
remove static {Get,Set}UndoActionCount() from SwDoc, UndoManager, SwEditShell.
 use the already existing UndoOptions in SwModule instead.
 refactor the ugly hack with undo in SwInputWindow a little.
2010-11-25 14:31:11 +01:00
Michael Stahl
0cf92721c0 unodapi: #i115383#: IDocumentUndoRedo: Draw undo flag:
replace SwDoc methods IsNoDrawUndoObj()/SetNoDrawUndoObj() with
 IDocumentUndoRedo methods DoDrawUndo()/DoesDrawUndo().
 add sw::DrawUndoGuard.
2010-11-25 14:31:11 +01:00
Michael Stahl
63b1df4f4c unodapi: #i115383#: IDocumentUndoRedo: undo nodes array:
move the undo nodes array from SwDoc to sw::UndoManager.
 replace GetUndoNds() with IsUndoNodes(), covering 90% of callers.
 add sw::UndoManager::GetUndoNodes() for use by the Undo implementation itself.
 remove unused horrible parameter from Writer::NewSwPaM().
2010-11-25 14:31:10 +01:00
Michael Stahl
d074d7b7a9 unodapi: #i115383#: IDocumentUndoRedo: clean up unmodified position:
replace {get,set}UndoNoModifiedPosition with {,Un}LockUndoNoModifiedPosition()
 for preserving it across SaveAs, and SetUndoNoModifiedPosition() for use
 by SwDoc::SetModified().
2010-11-25 14:31:10 +01:00
Michael Stahl
06f159dfb8 unodapi: #i115383#: remove HasUndoId() from IDocumentUndoRedo 2010-11-25 14:31:10 +01:00
Michael Stahl
e4bb13bc4e unodapi: #i115383#: remove clutter from IDocumentUndoRedo:
remove methods GetUndoIdsStr(), GetRedoIdsStr(), GetRepeatIdsStr().
 remove unused parameter from GetRepeatIds().
2010-11-25 14:31:10 +01:00
Michael Stahl
5a890bc44e unodapi: #i115383#: add documentation for IDocumentUndoRedo 2010-11-25 14:31:10 +01:00
Michael Stahl
89071dd67b unodapi: #i115383#: new sw::UndoManager:
new header UndoManager.hxx, new class sw::UndoManager.
 UndoManager implements the IDocumentUndoRedo interface.
 SwDoc has UndoManager member, and forwards IDocumentUndoRedo calls.
2010-11-25 14:31:07 +01:00