32 Commits

Author SHA1 Message Date
jaggernaut%netscape.com
51e0dc7a6c Bug 100476: Convert uses of member functions ToNewUnicode, ToNewCString and ToNewUTF8String to their global versions and remove support from nsCString and nsString. r=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@104212 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 08:28:41 +00:00
gerv%gerv.net
3821428085 License changes, take 2. Bug 98089. mozilla/editor/.
git-svn-id: svn://10.0.0.236/trunk@103757 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 22:53:13 +00:00
gerv%gerv.net
ae1d5501a1 Oops.
git-svn-id: svn://10.0.0.236/trunk@103236 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 00:02:59 +00:00
scc%mozilla.org
52c8d09e03 bug #98089: ripped new license
git-svn-id: svn://10.0.0.236/trunk@103219 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 20:09:47 +00:00
kin%netscape.com
7365b2cbe5 Fixes for bug #66308 ([embed] XPIDL'ize transaction manager)
sr=sfraser@netscape.com,mscott@netscape.com r=jfrancis@netscape.com

* nsITransaction, nsITransactionListenter, nsITransactionManager have
  been XPIDL'ized and moved into mozilla/editor/txmgr/idl. The versions
  of these interfaces in mozilla/editor/txmgr/public are being CVS removed.

* Renamed Do(), Undo(), and Redo() to DoTransaction(), UndoTransaction(),
  and RedoTransaction() to avoid reserved word problems in languages like
  JS. I did a sweep through editor and mailnews to remove these methods.

* PeekUndoStack() and PeekRedoStack() now return an AddRef'd pointer.

* Removed GetUndoString(), GetRedoString() and Write() from the
  nsITransaction interface. Neither editor or mailnews really made
  use of these methods.

* Removed Write() from the nsITransactionManager.cpp interface.

* The Transaction Manager now supports weak references.

* Added support for nsITransactionList to the TransactionManager
  to allow access to all transactions on the Undo and Redo stacks, as
  well as auto-aggregated transactions.

* Removed all references to nsITransactionDescription from txmgr and editor.

* Added nsPIEditorTransaction and made all Editor internal transactions
  inherit from it so we can distinguish between our transactions and
  ones from 3rd parties.

New files checked in:

  editor/txmgr/idl/nsITransaction.idl
  editor/txmgr/idl/nsITransactionList.idl
  editor/txmgr/idl/nsITransactionListener.idl
  editor/txmgr/idl/nsITransactionManager.idl
  editor/txmgr/src/nsITransactionList.cpp
  editor/txmgr/src/nsITransactionList.h
  editor/idl/nsPIEditorTransaction.idl

Files that were CVS removed:

  editor/txmgr/public/nsITransaction.h
  editor/txmgr/public/nsITransactionListener.h
  editor/txmgr/public/nsITransactionManager.h
  editor/txmgr/idl/nsITransactionDescription.h
  editor/base/IMECommitTxn.cpp
  editor/base/IMECommitTxn.h

Files modified:

  editor/Makefile.in
  editor/makefile.win
  editor/base/ChangeAttributeTxn.cpp
  editor/base/ChangeAttributeTxn.h
  editor/base/CreateElementTxn.cpp
  editor/base/CreateElementTxn.h
  editor/base/DeleteElementTxn.cpp
  editor/base/DeleteElementTxn.h
  editor/base/DeleteRangeTxn.cpp
  editor/base/DeleteRangeTxn.h
  editor/base/DeleteTextTxn.cpp
  editor/base/DeleteTextTxn.h
  editor/base/EditAggregateTxn.cpp
  editor/base/EditAggregateTxn.h
  editor/base/EditTxn.cpp
  editor/base/EditTxn.h
  editor/base/IMECommitTxn.cpp
  editor/base/IMECommitTxn.h
  editor/base/IMETextTxn.cpp
  editor/base/IMETextTxn.h
  editor/base/InsertElementTxn.cpp
  editor/base/InsertElementTxn.h
  editor/base/InsertTextTxn.cpp
  editor/base/InsertTextTxn.h
  editor/base/JoinElementTxn.cpp
  editor/base/JoinElementTxn.h
  editor/base/nsEditor.cpp
  editor/base/nsEditorShell.cpp
  editor/base/nsEditorShell.h
  editor/base/nsEditorTxnLog.cpp
  editor/base/nsStyleSheetTxns.cpp
  editor/base/nsStyleSheetTxns.h
  editor/base/PlaceholderTxn.cpp
  editor/base/PlaceholderTxn.h
  editor/base/SetDocTitleTxn.cpp
  editor/base/SetDocTitleTxn.h
  editor/base/SplitElementTxn.cpp
  editor/base/SplitElementTxn.h
  editor/idl/Makefile.in
  editor/idl/makefile.win
  editor/idl/MANIFEST
  editor/idl/nsIEditorShell.idl
  editor/macbuild/editor.mcp
  editor/macbuild/EditorIDL.mcp
  editor/txmgr/idl/Makefile.in
  editor/txmgr/idl/makefile.win
  editor/txmgr/idl/MANIFEST
  editor/txmgr/idl/nsITransactionManager.idl
  editor/txmgr/macbuild/txmgr.mcp
  editor/txmgr/macbuild/txmgrIDL.mcp
  editor/txmgr/public/Makefile.in
  editor/txmgr/public/makefile.win
  editor/txmgr/public/MANIFEST
  editor/txmgr/src/Makefile.in
  editor/txmgr/src/makefile.win
  editor/txmgr/src/nsTransactionItem.cpp
  editor/txmgr/src/nsTransactionItem.h
  editor/txmgr/src/nsTransactionList.cpp
  editor/txmgr/src/nsTransactionList.h
  editor/txmgr/src/nsTransactionManager.cpp
  editor/txmgr/src/nsTransactionManager.h
  editor/txmgr/src/nsTransactionManagerFactory.cpp
  editor/txmgr/src/nsTransactionStack.cpp
  editor/txmgr/src/nsTransactionStack.h
  editor/txmgr/tests/TestTXMgr.cpp
  editor/ui/composer/content/EditorCommandsDebug.js
  editor/ui/composer/content/editorOverlay.xul
  editor/ui/composer/locale/en-US/editorOverlay.dtd
  mailnews/base/src/nsMessenger.cpp
  mailnews/base/util/nsMsgTxn.cpp
  mailnews/base/util/nsMsgTxn.h
  mailnews/imap/src/nsImapMailFolder.cpp
  mailnews/imap/src/nsImapUndoTxn.cpp
  mailnews/imap/src/nsImapUndoTxn.h
  mailnews/local/src/nsLocalMailFolder.cpp
  mailnews/local/src/nsLocalUndoTxn.cpp
  mailnews/local/src/nsLocalUndoTxn.h


git-svn-id: svn://10.0.0.236/trunk@89126 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-09 14:23:59 +00:00
kin%netscape.com
02a2a9a6b6 Misc fixes for pedantic build warnings.
r=jfrancis@netscape.com a=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@83078 18797224-902f-48f8-a5cc-f745e15eee43
2000-11-29 22:06:02 +00:00
warren%netscape.com
a8b9664a8c Bug 47207. Backing out logging/PRINTF changes until we can fix stopwatch.h, introduce double parens, etc.
git-svn-id: svn://10.0.0.236/trunk@81967 18797224-902f-48f8-a5cc-f745e15eee43
2000-10-28 22:17:53 +00:00
warren%netscape.com
c6b67eceeb Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@81885 18797224-902f-48f8-a5cc-f745e15eee43
2000-10-27 22:43:51 +00:00
mjudge%netscape.com
2fc6190bef small but pervasive change to make nsIDOMSelection an xpidl interface. also broke it into 2 interfaces, nsISelection and nsISelectionPrivate. moved nsIDOMSelectionListener also to xpidl. these new idl files live in layout/base/public. r=sfraser, r=anthonyd bug 48575
git-svn-id: svn://10.0.0.236/trunk@79118 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-14 11:45:01 +00:00
warren%netscape.com
cc5d426fbe Renaming nsIAllocator to nsIMemory (and nsAllocator to nsMemory). API cleanup/freeze. Bug #18433
git-svn-id: svn://10.0.0.236/trunk@71450 18797224-902f-48f8-a5cc-f745e15eee43
2000-06-03 09:46:12 +00:00
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
jfrancis%netscape.com
13c14e71dc improved paste performance in editor (WIP) (bug 28783)
set/remove inline stlye rewrite (lots of bug #s)


git-svn-id: svn://10.0.0.236/trunk@63943 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-24 00:13:30 +00:00
jfrancis%netscape.com
d8853e9b1b make selection sticky across undo/redo (24573);
get bold/italic/underline toolbar feedback working (24574);
fix for 24856: unable to unbold text;
fix for 24572: cant get selection between split lists


git-svn-id: svn://10.0.0.236/trunk@59246 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-31 10:30:12 +00:00
akkana%netscape.com
831fa6d5c7 22662, 16720: greatly improve formatting of html source for inserted html tags. r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@58667 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-26 00:57:37 +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
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
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
akkana%netscape.com
84288de56c Better debug prints: tell which tag we're creating
git-svn-id: svn://10.0.0.236/trunk@46852 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-10 22:34:18 +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
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
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
buster%netscape.com
61945a51b0 caret is placed after inserted element, matches Nav 4 behavior.
git-svn-id: svn://10.0.0.236/trunk@37236 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-28 21:35:57 +00:00
akkana%netscape.com
91f72d1f82 Implement InsertHTML.
Also, some minor fixes, like warning removal and addition of error checking
in files which needed it.


git-svn-id: svn://10.0.0.236/trunk@34645 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-10 21:31:42 +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
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
23cdcfcbf2 added some debugging output
git-svn-id: svn://10.0.0.236/trunk@27114 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-11 22:53:17 +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
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
8579381793 minor bug fixes
git-svn-id: svn://10.0.0.236/trunk@21898 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:09:18 +00:00
buster%netscape.com
7218a4a579 added InsertElementTxn
added nsEditProperty
beginning of implementation for SetTextProperties.  Currently, it only works if the selection is entirely within a single text node.  Currently only
supports bold and italic (mapped to ctrl-b and ctrl-i for testing purposes.)
changed a bunch of interfaces to make things easier, like CreateElement now returns (as an out-param) the element created.


git-svn-id: svn://10.0.0.236/trunk@21760 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:24:37 +00:00