Commit Graph
39 Commits
Author SHA1 Message Date
brade@netscape.com f42963c230 allow for txn to have id/string for get/set 1999-09-21 22:31:27 +00:00
sfraser@netscape.com ea8d1291be Use nsAutoStrings where appropriate 1999-09-14 23:40:16 +00:00
jfrancis@netscape.com 4036bf65f9 making nsPresShell and nsDocument support weak references; using weak references to docs and pres shells within the editor 1999-08-25 10:51:55 +00:00
buster@netscape.com 725f13ce9d Fixed a ton of errors where we were not handling error results correctly.
Added some comments of the form "// XXX: ERROR_HANDLING <explanation>"
wherever I saw a potential error but wasn't 100% sure of the intention of the code.
Fixed a few bugs along the way.
1999-08-19 13:30:48 +00:00
mjudge@netscape.com 8e4c13fcd1 massive checkin for selection. adjusting nsIDOMSelection api and nsIFrameSelection. many "small" changes. this is not as bad as it looks. layout will not be affected other than "getter" calls for selection. and all consumers of selection should be in good shape. 1999-07-18 02:27:19 +00:00
buster@netscape.com 0926cbc8f9 replaced IID's with CID's where they were appropriate, and removed lots of
NS_DEFINE_IID macros in favor of GetCID() wherever I could.
plus some minor bug fixes.
1999-07-15 19:13:46 +00:00
mjudge@netscape.com a8748298ee checkin for carpool for multiple seleciton/ime selection and api changes 1999-07-15 18:19:20 +00:00
cmanske@netscape.com 88e132f05e Generic message dialog, fix insert element-related bugs, initial personal dictionary dialog, other editor bugs 1999-07-14 15:24:33 +00:00
tague@netscape.com 8269007861 Added clause and selection support for Input Methods. Fixes bug #8639, #8459, #6989, #7824 1999-06-29 20:31:22 +00:00
buster@netscape.com 84b5f256c8 fixed warnings 1999-06-28 13:44:40 +00:00
buster@netscape.com 0687902ac7 fixed illegal use of nsCOMPtr 1999-06-24 23:33:18 +00:00
kin@netscape.com 8191eaeb18 Changed all occurrences of GetUndoString() and GetRedoString() to accept nsString *. 1999-05-27 20:50:52 +00:00
buster@netscape.com 30fa5d2f94 vastly improved RemoveTextProperty
turned off debug output
1999-04-11 22:55:40 +00:00
buster@netscape.com 5f20d9910b implemented simple cases of RemoveTextProperty. other cases are no-op'd now.
added aFirst out param to GetTextProperty, so the caller can know if the first character has the property in the case of aAny=true and aAll=false.
fixed a bunch of places where result was being used incorrectly as a return val from do_QueryInterface
some minor undo/redo fixes to split and join of interior nodes.
1999-04-04 18:01:35 +00:00
buster@netscape.com 1461deeafe As a reminder, we decided to do this based strictly content. Some support for style-based text properties is written, but not used
anywhere any more.

* Cleaned up split and join undo/redo.
* Added TypeInState, a data struct that remembers things about text properties for collapsed selections, so you can type
* Ctrl-B with an insertion point and the next character will be bold.
* Added all the logic to handle inline vs. block elements when setting text properties.
* Added some support for italic and underline as well.  Adding these things is pretty easy now.  Ctrl-B, Ctrl-I, Ctrl-U for testing bold, italic, underline.
* Added all the logic to make sure we only add style tags where they're needed, so you should never get the same style tag nested within itself, except as needed for block elements.
* Added methods for testing a node to see if a particular style is set.  This isn't 100% done yet, but with very little work we could have toolbar buttons that respond to selection changed notification that show the state of bold, italic, underline, etc. in real time.  Supports tri-state:  whole selection is bold, some of selection is bold, none of selection is bold, ...
* Fully undoable and redoable.
* Added some debug printfs to transactions and editors.  all controlled by a gNoisy static in each module.  helps me track down undo/redo problems.  if the output bugs people enough, I'll shut it off and re-enable it in my local tree.

Noticably missing:  make un-bold, make un-italic, etc.  This is coming soon.
1999-04-01 17:58:07 +00:00
buster@netscape.com 27219045e2 added PlaceholderTxn. This is an aggregate transaction that sits on the undo stack
and merges in subsequent transactions indiscriminately until it's told to stop.
It also gives the last transaction in its child list a chance to merge the
next transaction.
All this is in support of complex transactions that result in text insertion
being able to collapse into a single undoable event.
Also improved tracking of bogus content node used when document is empty.
1999-03-15 00:57:32 +00:00
cmanske@netscape.com 1f37937813 Changed editor classes to inherited model. Fixed lots of destructor warnings. 1999-03-05 21:05:35 +00:00
mjudge@netscape.com 0113858a0a fixes for selection code, batching at correct point 1999-03-03 01:51:59 +00:00
scc@netscape.com 7ed0f71600 fixed for nsCOMPtr: no construction or assignment from raw COM interface pointers 1999-03-02 22:27:46 +00:00
cmanske@netscape.com 786d067af5 Implemented nsHTMLEditor. Changed prototypes to be use NS_IMETHOD and NS_IMETHODIMP. Started table editing transactions 1999-03-02 05:30:53 +00:00
buster@netscape.com bf9f7fb961 caught up to new ScrollIntoView changes.
most transactions now properly set selection after modifying content, for Do, Undo, Redo.
lots of cleanup and minor bug fixes.
1999-02-22 15:53:31 +00:00
mjudge@netscape.com 4643467f86 adding batching for selection. 1999-02-19 23:41:49 +00:00
mcafee@netscape.com 357e75196c Solaris: adding do_QueryInterface() wrappers to finish scc's nsCOMPtr carpool. a=scc 1999-02-19 11:30:31 +00:00
danm@netscape.com 6d14faf748 fixing compilation problems with new nsCOMPtr. part of the carpool. 1999-02-17 06:18:11 +00:00
mjudge@netscape.com 9b21ccf92d new modifications to nsCOMPtr to explicitly change to QueryInterface 1999-02-17 01:59:56 +00:00
buster@netscape.com 5ef93962b1 merges text insertions again, based on new aggregate insert txn 1999-02-15 18:24:58 +00:00
buster@netscape.com 29eddc6299 * the viewer test app now instantiates an nsITextEditor via nsRepository for "Editor mode"
* the TxnMgr is invoked by the editor via nsRepository
* editor.h|cpp have been renamed nsEditor.h|cpp for consistency
* editorInterfaces.h|cpp have been renamed nsEditorEventListeners.c|hpp
* added nsITextEditor.h, nsTextEditor.h|cpp.  The text editor is a placeholder for the rules unique to text
editing.  It invokes the nsIEditor to do core editing operations.
* reworked nsIEditor and related interfaces as per emerging design.
* nsEditor::BeginTransaction and EndTransaction call nsTransactionManager::BeginBatch and EndBatch.
1999-02-12 17:18:58 +00:00
akkana@netscape.com 0e46889822 Rename nsISelection to nsIFrameSelection 1999-02-11 23:12:28 +00:00
akkana@netscape.com 934c5ca07d Implement a new interface, nsIDOMSelection, intended to become the
external interface for selection (to be IDL-ified later).

Fix some editor bugs:
- Advance the cursor on text insert (so text is inserted in the right order)
- Make DeleteSelection in the editor call the actual selection
- Make DeleteSelection update the frames' notion of the selection
1999-01-29 18:57:56 +00:00
buster@netscape.com 5577e1b289 put in crude support for aggregating type-ins across selection changes.
this needs to get beefed up to handle offsets within elements, which we'll
do as soon as selection is set properly following an insertion.
1999-01-28 19:00:14 +00:00
buster@netscape.com 642332de7c fixed a minor problem with merging type-in transactions. 1999-01-28 17:19:24 +00:00
buster@netscape.com c42754da8a made GetIsTransient return false by default, so most transactions don't need to implement GetIsTransient
made delete and backspace do the right thing (testing hacks removed)
1999-01-22 15:40:31 +00:00
mjudge@netscape.com 3bf511de5e fixing build bustage 1999-01-22 03:18:51 +00:00
buster@netscape.com 2c6e14181c * added TransactionFactory. Editor no longer allocates its own transactions. This gives us an oppurtunity for a recycler.
* added DeleteSelection to editor.  Doesn't work very well yet because selection is giving me random offsets into text content.
* lots of work in the various transactions.
1999-01-21 01:51:09 +00:00
sfraser@netscape.com c06e044d34 Reinstate buster's changes, with a fix for the nsCOMPtr problem. 1999-01-15 00:03:41 +00:00
buster@netscape.com 338d7f66cb backed out Merge functionality because it doesn't compile on Mac. 1999-01-14 21:52:08 +00:00
buster@netscape.com 2f8a38357c added DeleteElementTxn and DeleteRangeTxn, and added merging of text insertions.
added some better error checking on all transactions.
1999-01-14 18:02:45 +00:00
buster@netscape.com 388d6cc29c use base class Redo 1999-01-07 17:57:57 +00:00
buster@netscape.com cf3bfd9bb8 support for inserting text 1999-01-07 01:02:32 +00:00