49 Commits

Author SHA1 Message Date
scc%netscape.com
4f0c5e3591 making string conversions explicit
git-svn-id: svn://10.0.0.236/trunk@66273 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-18 07:44:58 +00:00
dbaron%fas.harvard.edu
f5d497db18 Fix miscellaneous editor leaks. r=jfrancis@netscape.com
git-svn-id: svn://10.0.0.236/trunk@63807 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-23 01:14:49 +00:00
buster%netscape.com
40bbaf6296 fixed bug 25767
r=beard


git-svn-id: svn://10.0.0.236/trunk@59362 18797224-902f-48f8-a5cc-f745e15eee43
2000-02-01 05:12:25 +00:00
pp%ludusdesign.com
b5787cf895 Converting usage of ::GetIID() to NS_GET_IID().
Bug #20232, r=scc@netscape.com


git-svn-id: svn://10.0.0.236/trunk@57423 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-11 20:49:15 +00:00
jfrancis%netscape.com
11faed23b2 Fix for bug 21346.
This is actually a major reworking of how the low level editor txns perturb selection.  There is a mode now for telling the txns not to disturb the selection.  There is also a fix for unlisting lists (sometimes list items got merged unintentionally when unlisting).


git-svn-id: svn://10.0.0.236/trunk@56714 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-04 03:09:41 +00:00
jfrancis%netscape.com
edba5add24 fix for 20457: deletion in editor pretty darn screwy. Lots of changes to improve this. Document modifying entry points in editor now go thru a standard sandwich, which allows tracking of what changed in the doc, which allows proper post-processing of what changed. Also, all deletions now go thru the rules code, if applicable. Also some bugs in tracking the changed document portion have been fixed. Finally selection setting after a delete is improved.
git-svn-id: svn://10.0.0.236/trunk@55568 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-07 08:30:19 +00:00
dmose%mozilla.org
0efb7c174c updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@52910 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 03:43:54 +00:00
braddr%puremagic.com
d8fb5871d7 Move all nsIEnumerator usage over to NS_ENUMERATOR_FALSE from NS_COMFALSE in anticipation of nixing NS_COMFALSE in the near future.
r=scc


git-svn-id: svn://10.0.0.236/trunk@52044 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 03:16:48 +00:00
braddr%puremagic.com
1dde1a4f56 Ooops.. tree closed, better back these out for now. Sorry.
git-svn-id: svn://10.0.0.236/trunk@51979 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 21:01:37 +00:00
braddr%puremagic.com
7767d9393b Move all nsIEnumerator usage over to NS_ENUMERATOR_FALSE from NS_COMFALSE
in anticipation of nixing NS_COMFALSE in the near future.
r=scc (please contact him should there be any build issues)


git-svn-id: svn://10.0.0.236/trunk@51977 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 20:24:21 +00:00
brade%netscape.com
7e0421e57c allow for txn to have id/string for get/set
git-svn-id: svn://10.0.0.236/trunk@48658 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-21 22:31:27 +00:00
buster%netscape.com
d1193affa0 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.


git-svn-id: svn://10.0.0.236/trunk@43590 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-19 13:30:48 +00:00
jfrancis%netscape.com
56ea64f92b fix for 10584
git-svn-id: svn://10.0.0.236/trunk@42815 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 21:42:51 +00:00
sfraser%netscape.com
4dd92661ce Landing editor API changes. Removed nsITextEditor and nsTextEditor, split interfaces into more, non-overlapping interfaces, and other general cleanup.
git-svn-id: svn://10.0.0.236/trunk@42725 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 01:37:50 +00:00
mjudge%netscape.com
329d39ba11 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.
git-svn-id: svn://10.0.0.236/trunk@39971 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-18 02:27:19 +00:00
buster%netscape.com
6382cd2eea 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.


git-svn-id: svn://10.0.0.236/trunk@39546 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-15 19:13:46 +00:00
mjudge%netscape.com
757f22388f checkin for carpool for multiple seleciton/ime selection and api changes
git-svn-id: svn://10.0.0.236/trunk@39542 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-15 18:19:20 +00:00
sfraser%netscape.com
a6a9b7ff1b Changed transactions not to have owning pointers to the Editor.
git-svn-id: svn://10.0.0.236/trunk@33042 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-28 00:13:02 +00:00
kin%netscape.com
ee983116d2 Changed all occurrences of GetUndoString() and GetRedoString() to accept nsString *.
git-svn-id: svn://10.0.0.236/trunk@32955 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-27 20:50:52 +00:00
akkana%netscape.com
392f2f0298 - Rename iDirection enum to ECollapsedSelectionAction
- Initial implementation of Insert HTML


git-svn-id: svn://10.0.0.236/trunk@30432 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-05 23:27:17 +00:00
buster%netscape.com
64e11a9d2f vastly improved RemoveTextProperty
turned off debug output


git-svn-id: svn://10.0.0.236/trunk@27115 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-11 22:55:40 +00:00
buster%netscape.com
baaca59f79 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.


git-svn-id: svn://10.0.0.236/trunk@26218 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-04 18:01:35 +00:00
buster%netscape.com
0fe8e1324d 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.


git-svn-id: svn://10.0.0.236/trunk@25869 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-01 17:58:07 +00:00
buster%netscape.com
ef5f3265cc 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.


git-svn-id: svn://10.0.0.236/trunk@24151 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 00:57:32 +00:00
buster%netscape.com
cc359d1068 small fix of an off-by-one error in an assertion
git-svn-id: svn://10.0.0.236/trunk@23544 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:50:17 +00:00
jfrancis%netscape.com
8e01fb29f9 catching up with nsComponentManager and getting rid of cout usage
git-svn-id: svn://10.0.0.236/trunk@23357 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:11:27 +00:00
jfrancis%netscape.com
772f3287c8 integrated with content iterator
git-svn-id: svn://10.0.0.236/trunk@23343 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:22:48 +00:00
cmanske%netscape.com
6987407539 Changed editor classes to inherited model. Fixed lots of destructor warnings.
git-svn-id: svn://10.0.0.236/trunk@22944 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:05:35 +00:00
scc%netscape.com
817f56596f rename |IID()| --> |GetIID()|
git-svn-id: svn://10.0.0.236/trunk@22744 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 19:48:57 +00:00
scc%netscape.com
84d4e393bc fixed for nsCOMPtr: no construction or assignment from raw COM interface pointers
git-svn-id: svn://10.0.0.236/trunk@22609 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:27:46 +00:00
buster%netscape.com
19e607046b implemented GetTextProperty -- only works for bold and italic now,
trivial to add more properties
finished first cut at SetTextProperty.  This triggers lots of crashes in
range/selection code where we're holding onto a stale frame pointer (at
least, that's my best guess.)
synched with Charlie's change-o-rama
added an assert in DeleteTextTxn::Init() checking aNumCharsToDelete vs.
0
  NS_ASSERTION(0!=aNumCharsToDelete, "bad arg, numCharsToDelete");
if the number of chars to delete is 0, we shouldn't be creating a
transaction at all.  I had never seen this condition arise before
Charlie's checkin, I don't know if he introduced it or if it was a
latent bug I just never tripped over before.


git-svn-id: svn://10.0.0.236/trunk@22543 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 07:52:41 +00:00
cmanske%netscape.com
202c5b89dc Implemented nsHTMLEditor. Changed prototypes to be use NS_IMETHOD and NS_IMETHODIMP. Started table editing transactions
git-svn-id: svn://10.0.0.236/trunk@22534 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:30:53 +00:00
buster%netscape.com
fb7ad5c58c 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.


git-svn-id: svn://10.0.0.236/trunk@21466 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 15:53:31 +00:00
mcafee%netscape.com
92753a46b3 Solaris: adding do_QueryInterface() wrappers to finish scc's nsCOMPtr carpool. a=scc
git-svn-id: svn://10.0.0.236/trunk@21297 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 11:30:31 +00:00
buster%netscape.com
f62022c72f Highlights:
updated to new nsCOMPtr usage
nsTextEditor::InsertBreak() implemented
  splits the text node at the caret (deletes any extended selection to force a collapsed selection.)
  inserts a <BR> which I assume we'll convert to a CR when we write to a text stream.
  undo and redo work, except for the bug noted below

More stuff:
interface cleanup
strategic debugging code added
delete selection txn sets the collapses the selection...this is just a placeholder, but I needed it for undo/redo of InsertBreak.
join and split now work for text nodes as well as interior nodes


git-svn-id: svn://10.0.0.236/trunk@21009 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:42:29 +00:00
danm%netscape.com
9d9fe04c5a fixing compilation problems with new nsCOMPtr. part of the carpool.
git-svn-id: svn://10.0.0.236/trunk@20899 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 06:18:11 +00:00
mjudge%netscape.com
935f3ddcd6 new modifications to nsCOMPtr to explicitly change to QueryInterface
git-svn-id: svn://10.0.0.236/trunk@20849 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 01:59:56 +00:00
buster%netscape.com
0bda0d910f minor fixes and lots of comments
git-svn-id: svn://10.0.0.236/trunk@20730 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-15 18:25:30 +00:00
buster%netscape.com
ea9a76f945 changed nsIEditor to enable undo separately from Init
work in progress API changes to nsIEditor and nsEditor


git-svn-id: svn://10.0.0.236/trunk@18914 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-28 06:02:53 +00:00
buster%netscape.com
652e32c887 better delete now that selection offsets are real.
git-svn-id: svn://10.0.0.236/trunk@18329 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 19:44:46 +00:00
buster%netscape.com
2c02dfaabf fixed debug asserts to allow for offset=count, since offsets represent
the slots between content.


git-svn-id: svn://10.0.0.236/trunk@18326 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 19:06:27 +00:00
buster%netscape.com
f1bacd2e07 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)


git-svn-id: svn://10.0.0.236/trunk@18304 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:40:31 +00:00
mjudge%netscape.com
bbddba9557 fixing build bustages
git-svn-id: svn://10.0.0.236/trunk@18259 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 03:50:22 +00:00
akkana%netscape.com
826d1b136d Try a different form of casting to keep both Linux and the Mac happy
git-svn-id: svn://10.0.0.236/trunk@18197 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 21:10:12 +00:00
buster%netscape.com
902ec60ee1 factored editor so a request (public) is separate from building the txn for that request (private)
added some debug code to transactions


git-svn-id: svn://10.0.0.236/trunk@18190 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 19:44:26 +00:00
akkana%netscape.com
9f4dfbc49b Fix nsCOMPtr casting build bustage
git-svn-id: svn://10.0.0.236/trunk@18188 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 19:31:57 +00:00
buster%netscape.com
4490a6149a bug fixes to delete range, plus some debugging printf's
git-svn-id: svn://10.0.0.236/trunk@18126 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 02:29:52 +00:00
buster%netscape.com
b48e2caf7c * 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.


git-svn-id: svn://10.0.0.236/trunk@18122 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:51:09 +00:00
buster%netscape.com
dceac9452d added DeleteElementTxn and DeleteRangeTxn, and added merging of text insertions.
added some better error checking on all transactions.


git-svn-id: svn://10.0.0.236/trunk@17740 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 18:02:45 +00:00