Commit Graph

59 Commits

Author SHA1 Message Date
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
5ba8f48555 undoapi: move most of inc/undobj.hxx to source/core/inc/UndoCore.hxx 2010-12-15 09:14:14 +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
4b5b389708 undoapi: #i115383#: ensure that AppendUndo is only called when Undo is enabled:
SfxUndoManager differs from current AppendUndo() implementation here.
2010-12-15 09:14:06 +01:00
Michael Stahl
3352d4459f undoapi: #i115383#: remove unnecessary UndoGuards:
implementations of Undo() and Redo() on SwUndo subclasses are always
  called with Undo disabled from UndoManager::Undo()/Redo().
2010-12-15 09:14:06 +01:00
Michael Stahl
6fb613830f undoapi: #i115383#: remove SwUndoIter::pLastUndoObj:
this seems to be used only as an optimization, to not apply several
  idempotent actions on Repeat.
 but it does not work properly anyway, because it only checks the _previous_
  undo action, and not all actions since the UNDO_START.
 for the only non-idempotent action (SwUndoDelete) introduce a boolean flag
  SwUndoIter::m_bDeleteRepeated, and remove all other uses.
2010-12-15 09:14:04 +01:00
Michael Stahl
99a6c72c74 undoapi: #i115383#: clean up SwUndoReplace:
remove internal history, and ugly special case hacks in UndoManager::Undo().
 refactor comment of SwUndoReplace: new MakeUndoReplaceRewriter().
 SwDoc::ReplaceRangeImpl(): always create new SwUndoReplace.
2010-12-15 09:14:03 +01:00
Michael Stahl
e1325951e9 undoapi: #i115383#: remove SwRewriter from SwUndoStart/SwUndoEnd:
the replacement, SfxListUndoAction, only has a String comment...
2010-12-15 09:14:02 +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
Frank Schoenheit [fs]
a47865c7a7 undoapi: MSVC WaE 2010-11-26 11:48:32 +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
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
0fcdedd364 unodapi: #i114888#: sw: introduce sw::UndoGuard, sw::GroupUndoGuard, clean up 2010-11-25 14:31:09 +01:00
Michael Stahl
c8c50a05e2 unodapi: #i115383#: clean up ClearRedo() usage:
ClearRedo() is already called by AppendUndo():
     remove superfluous calls of ClearRedo.
 implementation of ClearRedo() should not check DoesUndo();
     that seems kinda pointless, and creates difficulties for refactoring.
2010-11-25 14:31:09 +01:00
Michael Stahl
3145216b7e unodapi: #i115383#: SwDoc:
remove the forwarding implementation of IDocumentUndoRedo from SwDoc.
 instead call the UndoManager directly, via SwDoc::GetIDocumentUndoRedo().
2010-11-25 14:31:08 +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
Jens-Heiner Rechtien
1a359bd2a8 changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) 2010-02-12 15:01:35 +01:00
Mathias Bauer
da28dfe9e7 merge commit for m62 2009-10-26 17:41:29 +01:00
Kurt Zenker
1673174030 CWS-TOOLING: integrate CWS sw32bf05
2009-10-08 12:41:26 +0200 tl  r276785 : #ii102766# updated de_* hyphenation patterns
2009-10-08 11:09:24 +0200 tl  r276775 : #i105715# update for hu_HU dictionary
2009-10-06 09:25:53 +0200 tl  r276694 : #i105565# fix for dictionary.xcu in dict-de.oxt
2009-10-05 12:29:46 +0200 mst  r276675 : #i105453#: hintids.hxx: change order of RES_TXTATR_WITHEND hints
2009-10-05 12:28:49 +0200 mst  r276674 : unochart.cxx: fix warning on unxlngi6 debug=t
2009-10-05 11:46:18 +0200 tl  r276672 : #i105490# Hebrew dictionary added
2009-10-05 11:39:41 +0200 tl  r276670 : #i105490# Hebrew dictionary added
2009-10-05 11:33:56 +0200 tl  r276669 : #i105490# Hebrew dictionary added
2009-10-05 11:21:02 +0200 tl  r276667 : #i105490# Hebrew dictionary added
2009-10-05 11:17:37 +0200 tl  r276666 : #i105565# de_* dictionay updates
2009-10-03 09:54:58 +0200 tl  r276654 : #i105565# de_* dictionay updates
2009-10-03 08:52:38 +0200 tl  r276653 : #i105564# pt_BR dictionaries updated
2009-10-03 08:46:42 +0200 tl  r276652 : #i105510#, #i105278# outdated dictionary.lst removed
2009-10-02 14:17:03 +0200 tl  r276644 : #i105510#, #i105278# fr_FR and da_DK dictionary updates
2009-10-01 10:05:28 +0200 od  r276577 : #i105447# method <lcl_GetUndoIdAndName(..)>
          - assure correct access to undo stack objects
2009-10-14 17:33:11 +00:00
Mathias Bauer
b2bebad784 #i103452#: replace PRODUCT by !DBG_UTIL; replace assert by OSL_ASSERT where possible 2009-07-10 14:03:42 +02:00
Kurt Zenker
b58f2aaf94 CWS-TOOLING: integrate CWS clnoundo
2009-05-18 09:40:22 +0200 wg  r271998 : i102011
2009-04-28 12:20:24 +0200 cl  r271318 : CWS-TOOLING: rebase CWS clnoundo to trunk@270723 (milestone: DEV300:m46)
2009-04-02 11:37:14 +0200 cl  r270388 : #i100371# check valid positions all the time to avoid crashes during model lock
2009-03-30 13:02:27 +0200 cl  r270219 : #i100371# do not create undo actions in drawing layer during load
2009-03-30 12:59:41 +0200 cl  r270218 : #i100371# do not create undo actions in drawing layer during load
2009-03-30 12:55:06 +0200 cl  r270217 : #i100371# do not create undo actions in drawing layer during load
2009-03-30 12:53:27 +0200 cl  r270216 : #i100371# do not create undo actions in drawing layer during load
2009-03-30 12:49:28 +0200 cl  r270215 : #i100371# added EnableUndo() and IsUndoEnabled()
2009-06-04 16:21:29 +00:00
Oliver Bolte
19203faa44 CWS-TOOLING: integrate CWS sw31bf02
2009-01-26 08:39:59 +0100 fme  r266900 : #i93190# placeholder field should be checked in IsEqualsFlags as well
2009-01-21 17:32:32 +0100 ama  r266695 : CWS-TOOLING: rebase CWS sw31bf02 to trunk@266428 (milestone: DEV300:m39)
2009-01-19 09:26:02 +0100 ama  r266475 : Fix #i96109#: Bracket mismatch
2009-01-19 09:08:47 +0100 ama  r266473 : Fix #i96391#: Wrong default parameter
2009-01-19 09:07:13 +0100 ama  r266472 : Fix #i96112#: Bracket mismatch
2009-01-19 08:51:42 +0100 ama  r266471 : Fix #i96113#: Bracket mismatch
2009-01-16 15:07:01 +0100 ama  r266421 : Fix #i93105#: export 0x14
2009-01-16 09:07:02 +0100 ama  r266400 : Fix #i96111#: Wrong condition
2009-01-16 08:49:47 +0100 ama  r266399 : Fix #i99110#: Wrong condition
2009-01-12 15:54:46 +0100 ama  r266164 : Fix #i17949#: Ctrl+A if document starts with a section
2009-01-09 15:39:44 +0100 ama  r266091 : Fix #i93144#: Crash during update of TOC
2009-01-09 14:40:20 +0100 ama  r266086 : Fix #i90072#: Shorten undo strings
2008-12-10 16:34:57 +0100 fme  r265203 : #i73332# Crash with section endnotes
2008-12-10 15:04:29 +0100 fme  r265194 : #i93190# Omit painting of placeholder fields during pdf export
2008-12-09 16:46:54 +0100 fme  r265115 : #i96167# haggi - reset view options before disposing view
2008-12-09 16:17:13 +0100 fme  r265114 : #i96167# Added missing word coun invalidation on splitting node in second half
2008-12-09 15:49:19 +0100 fme  r265108 : #i91740# Write actual text only for hyphen portions
2008-12-09 14:52:13 +0100 fme  r265090 : #91483# Disable some Insert menu entries in case cursor is located in hidden text
2009-02-13 11:19:56 +00:00
Vladimir Glazounov
8a2cd5e6df INTEGRATION: CWS sw30bf04 (1.24.2); FILE MERGED
2008/05/16 07:49:07 ama 1.24.2.2: RESYNC: (1.24-1.25); FILE MERGED
2008/04/28 14:02:32 ama 1.24.2.1: Fix #i85833#: Undo string length
2008-06-04 08:52:27 +00:00
Jens-Heiner Rechtien
2c760346fe INTEGRATION: CWS hr50 (1.23.258); FILE MERGED
2008/04/11 15:54:02 hr 1.23.258.1: #i86574#: fix warning (gcc-4.2.3)
2008-04-22 14:01:51 +00:00
Rüdiger Timm
5e478f27fe INTEGRATION: CWS changefileheader (1.23.242); FILE MERGED
2008/04/01 15:57:32 thb 1.23.242.3: #i85898# Stripping all external header guards
2008/04/01 12:54:30 thb 1.23.242.2: #i85898# Stripping all external header guards
2008/03/31 16:55:00 rt 1.23.242.1: #i87441# Change license header to LPGL v3.
2008-04-10 15:03:27 +00:00
Jens-Heiner Rechtien
a328ce8bf0 INTEGRATION: CWS swwarnings (1.21.212); FILE MERGED
2007/06/28 11:52:18 os 1.21.212.5: RESYNC: (1.21-1.22); FILE MERGED
2007/05/07 07:42:35 os 1.21.212.4: warning in nonpro removed
2007/04/18 12:19:44 tl 1.21.212.3: #i69287# warning-free code
2007/04/03 13:00:23 tl 1.21.212.2: #i69287# warning-free code
2007/03/07 15:38:35 ama 1.21.212.1: #i69287#: Warning free
2007-09-27 08:29:16 +00:00
Vladimir Glazounov
942f34ab4f INTEGRATION: CWS swqbf93 (1.21.150); FILE MERGED
2007/04/04 11:14:56 ama 1.21.150.1: #Fix #i76052#: Auto save must not change the undo no-modify-position
2007-05-25 12:01:29 +00:00
Vladimir Glazounov
c8e7121ef9 INTEGRATION: CWS osxpatchpool (1.19.14); FILE MERGED
2006/08/28 12:33:41 obr 1.19.14.1: #i68810# applied 2nd patch from issue (tra)
2006-09-25 08:28:05 +00:00
Oliver Bolte
1c101d28d9 INTEGRATION: CWS pchfix02 (1.19.2); FILE MERGED
2006/09/01 17:52:14 kaib 1.19.2.1: #i68856# Added header markers and pch files
2006-09-16 20:49:45 +00:00
Jens-Heiner Rechtien
7621a4fdaa INTEGRATION: CWS writercorehandoff (1.17.172); FILE MERGED
2006/01/19 08:50:10 fme 1.17.172.5: #i50348# General cleanup - removed unused header files, functions, members, declarations
2005/09/28 14:01:12 tra 1.17.172.4: #i50348#
2005/09/13 14:49:18 tra 1.17.172.3: RESYNC: (1.17-1.18); FILE MERGED
2005/08/31 12:50:56 tra 1.17.172.2: #i50348# Introducing IDocumentRedlineAccess interface
2005/07/14 12:35:25 tra 1.17.172.1: #i50348#removed get/set methods for compatibility flags in exchange for IDocumentSettingAccess, removed useless dummy members
2006-08-14 15:48:33 +00:00
Rüdiger Timm
6051b29792 INTEGRATION: CWS ooo19126 (1.17.306); FILE MERGED
2005/09/05 13:41:22 rt 1.17.306.1: #i54170# Change license header: remove SISSL
2005-09-09 04:17:05 +00:00
Vladimir Glazounov
6d47d86734 INTEGRATION: CWS swqcore06 (1.14.60); FILE MERGED
2005/01/31 15:39:17 hbrinkm 1.14.60.1: #i41175# no special treatment for UNDO_END needed anymore
2005-02-22 09:03:09 +00:00
Vladimir Glazounov
8e58749d7d INTEGRATION: CWS swqcore05 (1.14.14); FILE MERGED
2005/01/28 17:03:00 hbrinkm 1.14.14.3: #i35776# remove debug code
2005/01/28 16:58:26 hbrinkm 1.14.14.2: #i35776# nSize already points to corresponding SwUndoStart
2005/01/17 14:25:16 hbrinkm 1.14.14.1: #i40039# if action to repeat is enclosed in UNDO_START/UNDO_END reuse the undo id from the undo start node
2005-02-21 15:06:16 +00:00
Oliver Bolte
3c9d049fd5 INTEGRATION: CWS swqcore04 (1.13.136); FILE MERGED
2005/01/12 14:53:58 hbrinkm 1.13.136.2: RESYNC: (1.13-1.14); FILE MERGED
2004/12/20 10:48:27 hbrinkm 1.13.136.1: #i35776# no special treatment of UNDO_START and UNDO_END necessary anymore
2005-01-25 12:59:49 +00:00
Rüdiger Timm
44fbdee5c0 INTEGRATION: CWS os44 (1.13.88); FILE MERGED
2004/11/25 12:10:44 os 1.13.88.1: #i30432# restore removed invisible content
2005-01-05 15:09:05 +00:00
Rüdiger Timm
9b9145677a INTEGRATION: CWS swqbugfixes07 (1.10.162); FILE MERGED
2004/10/11 10:45:18 fme 1.10.162.2: RESYNC: (1.11-1.12); FILE MERGED
2004/09/03 12:47:29 hbrinkm 1.10.162.1: #117740# rewrite: Get{Un|Re}doIds
2004-10-22 07:14:25 +00:00
Rüdiger Timm
d3d06a3d61 INTEGRATION: CWS swqbugfixes05 (1.10.102); FILE MERGED
2004/08/11 09:12:06 fme 1.10.102.1: #i30716# Initialize nId in GetUndoIdsStr()
2004-09-20 14:15:15 +00:00
Jens-Heiner Rechtien
ee035e6287 INTEGRATION: CWS swundo03 (1.10.10); FILE MERGED
2004/07/20 08:00:02 hbrinkm 1.10.10.4: #115582#
2004/07/19 17:42:36 hbrinkm 1.10.10.3: #115582#
2004/07/14 15:48:34 hbrinkm 1.10.10.2: #115575#
2004/07/13 08:45:06 hbrinkm 1.10.10.1: #115575#
2004-09-08 13:58:12 +00:00
Kurt Zenker
5b38b587bc INTEGRATION: CWS swundo01 (1.8.126); FILE MERGED
2004/01/06 23:48:37 hbrinkm 1.8.126.4: RESYNC: (1.8-1.9); FILE MERGED
2004/01/06 15:39:51 hbrinkm 1.8.126.3: #111827#
2003/09/23 12:38:03 hbrinkm 1.8.126.2: #111827#
2003/08/15 14:08:54 hbrinkm 1.8.126.1: #111827#,#111835#
2004-05-18 13:06:14 +00:00