Commit Graph
81 Commits
Author SHA1 Message Date
akkana@netscape.com 198077254b Add test for IsDataFlavorSupported for xpfe folks to fix bug 6289 1999-05-11 23:34:40 +00:00
rods@netscape.com 53f3dc2cd5 Removed static IID defs and am now using GetIID from the interface 1999-05-07 19:39:58 +00:00
dp@netscape.com 30b177cc9e Converting stray UnregisterFactory calls to UnregisterComponent 1999-05-06 01:37:04 +00:00
akkana@netscape.com 1ad2f16e84 - Rename iDirection enum to ECollapsedSelectionAction
- Initial implementation of Insert HTML
1999-05-05 23:27:17 +00:00
waterson@netscape.com 20d83e288f Fix nsCOMPtr bustage. 1999-05-05 05:56:58 +00:00
buster@netscape.com b5d5079194 added a param to GetPriorNode and GetNextNode to tell these methods whether to use or skip
non-editable content.
added some comments, turned off some debugging flags.
1999-05-05 04:51:54 +00:00
buster@netscape.com 58428a0eb6 1. block transformation infrastructure is now in place. We can go ahead and implement interesting
features like set paragraph style, set list type, indent, etc.  I'm sure there's holes in my
implementation that these high level features will make obvious.

2. I've factored a lot of utility methods from several modules into nsEditor as public static methods.
This makes them easily accessable to all, and will help Joe and I remove redundant methods.

3. I changed the HTML tags to lower case, and made all string compares case-insensitive.  No, this
isn't quite the right thing to do, but we don't have atoms from layout yet.  The Right Thing is for us
to reuse those atoms.
1999-05-05 04:05:19 +00:00
tague@netscape.com 490e090ce7 Fixed bug #5527 (Editor is not able to accumulate successive Japanese input) 1999-05-03 22:57:48 +00:00
sfraser@netscape.com 9642ee1075 Memory leak fixes for bug 5870. r mjudge, a chofmann. 1999-05-03 22:26:07 +00:00
mjudge@netscape.com 519ab21300 ok done Simon reviewed 5870. choffman approved for M5 1999-05-03 21:52:19 +00:00
kostello@netscape.com 7331f85443 Changed:
nsI*Editor::OutputText(nsString& aOutputString);
nsI*Editor::OutputHTML(nsString& aOutputString);

These methods always returns back a Unicode version of whatever is in the content model. It is the
responsibility of the caller then to call whatever converter is required to convert to the appropriate
charset.

Added:

nsI*Editor::OutputText(nsIOutputStream* aOutputStream, nsString* aCharsetOverride = nsnull)
nsI*Editor::OutputHTML(nsIOutputStream* aOutputStream, nsString* aCharsetOverride = nsnull)

These methods output the the current content model to aOutputStream. The document is encoded using the
document defined charset or if the user passes in a non-null value for aCharsetOverride then this
encoding overrides the encoding used by the document.
1999-05-03 18:48:39 +00:00
mjudge@netscape.com 7d5bd76479 FIXING M5 BUGS: making weak links to stop extra addreff to presshell. fixing xul to set editor doc type to "content" 1999-04-29 20:21:04 +00:00
kin@netscape.com 25447209ef Modified nsIEditActionListener to have Will*() and Do*() methods. Added
nsIEditActionListener support to nsEditor.cpp and nsEditor.h.
1999-04-27 17:14:28 +00:00
rods@netscape.com ba6cd425c1 Switch Paste support over to nsCOMPtr 1999-04-23 14:41:32 +00:00
mcafee@netscape.com f10be82d1f Removing NEW_CLIPBOARD_SUPPORT ifdef. 1999-04-22 05:41:51 +00:00
cmanske@netscape.com d14d7c1994 Added simple dialogs for insert link and restructured ui source directories 1999-04-21 18:53:55 +00:00
rods@netscape.com 3e3e0f80b5 Added additional comments for Paste 1999-04-19 19:35:55 +00:00
rods@netscape.com a7c72e35e1 Switched over to new nsIGenericTransferable 1999-04-17 13:51:42 +00:00
sfraser@netscape.com 8a91f37035 Adapt to fixed selection interface 1999-04-15 20:20:12 +00:00
buster@netscape.com 64dc84677f * beginnings of font handling. WIP, I did a big merge today and I'm checking in to synch up, not to announce new functionality here.
* added TextEditorTest.cpp, a unit test module for nsTextEditor.  It's use is actually commented out since my checkin is happening so late due
to all-day build bustage, and I don't have a Mac handy to verify.  With someone's Mac help tomorrow, I can turn it on.
* some minor bug fixes to property handling
1999-04-15 06:06:33 +00:00
sfraser@netscape.com 81a16a8bf5 Updated to conform to new IDL-ized selection interfaces. 1999-04-13 01:33:32 +00:00
akkana@netscape.com 794350905c turn off annoying debug print 1999-04-12 22:37:20 +00:00
buster@netscape.com 30fa5d2f94 vastly improved RemoveTextProperty
turned off debug output
1999-04-11 22:55:40 +00:00
mjudge@netscape.com 59224246cc adding batch changes around editor BeginTransaction. bug 4593 1999-04-08 01:28:33 +00:00
akkana@netscape.com 86d0faac01 4661: Fix win32 crasher inserting an image. Approved by chofmann.
Split nsEditor::DeleteSelectionAndCreateNode into two parts,
so that routines like InsertImage which need to set attributes
on the new node before inserting into the tree can do so.
This is somewhat temporary, since the current method isn't undo-able;
undo will be implemented after M4.
1999-04-08 00:46:10 +00:00
mcafee@netscape.com 5031525226 Finishing clipboard ifdef so we can remove the old clipboard. 1999-04-07 03:56:07 +00:00
rods@netscape.com d958296c42 Commented out the NEW_CLIPBOARD_SUPPORT 1999-04-07 01:35:49 +00:00
rods@netscape.com 661ff4320f Turning on new clipboard support 1999-04-06 23:05:59 +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
mcafee@netscape.com 6cea50b235 Initializing some variables, protecting a null reference. 1999-04-02 01:34:05 +00:00
sfraser@netscape.com 70051b6707 Call the new presshell->SetCaretEnabled() call to show the caret when editing. 1999-04-02 00:01:31 +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
rods@netscape.com e615ca4cdc Fixed up new ifdef'ed clipboard support 1999-04-01 14:28:13 +00:00
rods@netscape.com c1e67c918e Minor changes to call to new clipboard 1999-03-26 15:49:28 +00:00
mcafee@netscape.com f274cb13d6 Renamed GetTransferable() to GetData() 1999-03-25 23:39:03 +00:00
mcafee@netscape.com 70239ac7bd initializing a variable to zero. 1999-03-24 09:08:24 +00:00
mcafee@netscape.com 19d015edb0 Checking for null references on clipboard, trans (gtk/unix). 1999-03-24 01:43:46 +00:00
rods@netscape.com 04df792b16 Added code for switching over Clipboard support to new classes
At the moment the are ifdef'ed out
1999-03-23 15:45:58 +00:00
buster@netscape.com b943f567aa I fixed the content twiddling part of bug 3778. Mike has a fix for the display part of it in his tree, but determined the risk didn't
justify the benefit.  This is partly true because he and I would have had to integrate tonight before checking in, which we thought
presented some additional risk.  In any event, this bug is fixed for all cases except when the user hits enter at the end of the
document.  That is the only case in text editing when the selection will not render correctly.

Some related problems got fixed as a side benefit of my code changes.  I filed bug 3896.
1999-03-17 06:13:46 +00:00
buster@netscape.com 14f1c2a65b fixed join.
made a special case for typing with BR as the selection (as after an InsertBreak.)
made DEL and BACKSPACE at the beginning and end of a text node
fixes bugs 3742 and 3756 (with permission from choff and gkostello)
1999-03-16 16:38:09 +00:00
buster@netscape.com 5237fefb1a added WillUndo, DidUndo, WillRedo, DidRedo and some supporting code so
the text edit rule object can maintain it's own state more efficiently and correctly.
1999-03-15 05:08:30 +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
kostello@netscape.com a66da877bf Add HACKForceRedraw() to force a redraw until the drawing
problems are solved in Gecko
1999-03-14 00:31:35 +00:00
buster@netscape.com 2db3d69055 InsertBreak now works at the beginning of a line. Plus a trivial bug fix. 1999-03-13 05:31:22 +00:00
buster@netscape.com 84c5e45ab7 deleting the last editable object in a document now causes a bogus placeholder <P>&nbsp;</P> to be added to the document. This node has the
attribute MOZ_EDITOR_BOGUS_NODE set to TRUE.  this solves the problem of when you do a SelectAll then a DEL, you don't have a cursor
or any way to set selection in the document. You do still have the problem that the nbsp is pretty narrow and the frame containing it is hard to hit
with the mouse.  We really need the "set selection to frame nearest the mouse down point" operation.

the intent is for all inserts to look for this node, and if found delete it before the insert.  likewise, all deletes will be no-ops if this node is found.
1999-03-12 02:28:24 +00:00
akkana@netscape.com 988f2317e3 Change the reference to the global selection mgr to fix windows build 1999-03-11 00:08:10 +00:00
akkana@netscape.com 77c7789019 Comment out debug prints 1999-03-10 22:50:51 +00:00
akkana@netscape.com cca679515e Implement editor cut/copy/paste 1999-03-10 22:46:15 +00:00
sfraser@netscape.com d501eb13e2 Add Cut, Copy and Paste to editor interfaces and classes, with a stub implemenatioon in nsEditor. 1999-03-10 21:29:41 +00:00
kin@netscape.com 946ebb3900 Changed all occurences of NS_TRANSACTION_MANAGER_FACTORY_CID
and kCTransactionManagerFactoryCID to NS_TRANSACTIONMANAGER_CID
and kCTransactionManagerCID.
1999-03-10 21:27:02 +00:00