704 Commits

Author SHA1 Message Date
jfrancis%netscape.com
b4767a9319 fix for bug 5832; bad constant for nbsp value. rvd - floppy moose; appv - chofmann
git-svn-id: svn://10.0.0.236/trunk@30000 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-03 22:16:02 +00:00
kostello%netscape.com
0b56937bd5 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.


git-svn-id: svn://10.0.0.236/trunk@29967 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-03 18:48:39 +00:00
jfrancis%netscape.com
e1f400aecd fix for bug 5782 - check for null return when getting prev/next node is deletion rules; rvd floppy moose, appr chofmann
git-svn-id: svn://10.0.0.236/trunk@29950 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-01 19:37:50 +00:00
buster%netscape.com
68a1ee7d46 with permission from chofmann:
1. fix for bug 5796, crash on exit.  This was a bad, bad memory smudge on my part, easily fixed by doing the right ref counting in the
right places.

2. some preliminary code for M6 block transformations has leaked into this checkin.  It's safer than trying to re-code the fix above into
a fresh tree.  Unless you're making calls to do block transformations, you won't see any difference.


git-svn-id: svn://10.0.0.236/trunk@29897 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-30 22:40:18 +00:00
akkana%netscape.com
98097b95da 5734: put back working copy from version 1.17, which got accidentally stomped in a cvs merge. a=cyeh,kostello
git-svn-id: svn://10.0.0.236/trunk@29843 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-30 18:03:39 +00:00
pinkerton%netscape.com
44fe02fdd9 fix build bustage comparing raw pointer to nsCOMPtr.
git-svn-id: svn://10.0.0.236/trunk@29782 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-29 01:01:04 +00:00
buster%netscape.com
fa9252b0f9 approved bug fix for infinite loop when typing a space in a document with only a single text node
git-svn-id: svn://10.0.0.236/trunk@29777 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-29 00:14:05 +00:00
sfraser%netscape.com
e304ad83e7 Advance the iterator so we don't freeze bringing up the link dialog.
git-svn-id: svn://10.0.0.236/trunk@29323 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-27 01:10:10 +00:00
buster%netscape.com
74a2e2a5ec just removing a printf
git-svn-id: svn://10.0.0.236/trunk@29298 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-26 23:41:13 +00:00
jfrancis%netscape.com
8591f5670e more html typing rules implementation
git-svn-id: svn://10.0.0.236/trunk@29166 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-26 14:08:52 +00:00
bruce%cybersight.com
1ef8e5b65a Must define inline methods _before_ calling them on AIX 4.2 with xlC.
git-svn-id: svn://10.0.0.236/trunk@28857 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-23 16:47:30 +00:00
buster%netscape.com
1664ba068f vastly improved type-in state handling. smaller and faster
git-svn-id: svn://10.0.0.236/trunk@28704 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-22 14:46:53 +00:00
buster%netscape.com
bd55504f8d remove block
git-svn-id: svn://10.0.0.236/trunk@28703 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-22 14:45:48 +00:00
rickg%netscape.com
8884beb31a update to sync with nsString2
git-svn-id: svn://10.0.0.236/trunk@28675 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-22 06:19:44 +00:00
buster%netscape.com
a0c5370c5e added the notion of contain vs. replace for block transformations.
git-svn-id: svn://10.0.0.236/trunk@28519 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-21 21:01:59 +00:00
cmanske%netscape.com
371fdba5b7 Added simple dialogs for insert link and restructured ui source directories
git-svn-id: svn://10.0.0.236/trunk@28472 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-21 18:53:55 +00:00
jfrancis%netscape.com
6c71acb72d more typing rules work - space and tab occassionally do the right thing now
git-svn-id: svn://10.0.0.236/trunk@28460 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-21 14:49:58 +00:00
buster%netscape.com
0411bb407a more block transformation WIP: nested blocks work much better now
git-svn-id: svn://10.0.0.236/trunk@28427 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-21 04:08:43 +00:00
buster%netscape.com
cbaf88c3e7 more factoring
git-svn-id: svn://10.0.0.236/trunk@28331 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 22:02:02 +00:00
buster%netscape.com
3528936793 preliminary work for applying block transformations to content. works for simple selections.
remove block parent not yet implemented.


git-svn-id: svn://10.0.0.236/trunk@28251 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 17:47:12 +00:00
buster%netscape.com
c230df0710 added atoms for H1 and H2
git-svn-id: svn://10.0.0.236/trunk@28246 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 17:42:07 +00:00
bruce%cybersight.com
76b73c5a60 Add new line for native unix compilers.
git-svn-id: svn://10.0.0.236/trunk@27971 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-17 02:32:32 +00:00
bruce%cybersight.com
452caf2517 Added blank line for native compilers.
git-svn-id: svn://10.0.0.236/trunk@27935 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-16 22:34:54 +00:00
buster%netscape.com
a907540332 factored out re-parenting of content into MoveContentIntoNewParent
WIP on font handling.


git-svn-id: svn://10.0.0.236/trunk@27862 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-16 18:29:12 +00:00
buster%netscape.com
149ccd1c08 initial check in for nsITextEditor unit test
git-svn-id: svn://10.0.0.236/trunk@27560 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-15 07:01:24 +00:00
buster%netscape.com
d7cdf20fb8 * 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


git-svn-id: svn://10.0.0.236/trunk@27556 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-15 06:06:33 +00:00
jfrancis%netscape.com
427a56fc02 merging in rules work with Simon's selection changes
git-svn-id: svn://10.0.0.236/trunk@27324 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-13 13:35:08 +00:00
bruce%cybersight.com
0b3e46b83a Fix for compile error on AIX. Need to define inline functions before calling them. Reviewed by akkana.
git-svn-id: svn://10.0.0.236/trunk@27294 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-13 02:28:11 +00:00
sfraser%netscape.com
bbda90e2b0 Updated to conform to new IDL-ized selection interfaces.
git-svn-id: svn://10.0.0.236/trunk@27289 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-13 01:33:32 +00:00
jfrancis%netscape.com
2b679b5ef6 attempting to fix unix build
git-svn-id: svn://10.0.0.236/trunk@27157 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-12 14:10:24 +00:00
jfrancis%netscape.com
c6d12c638f checkpointing html typing rules
git-svn-id: svn://10.0.0.236/trunk@27152 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-12 12:01:32 +00:00
akkana%netscape.com
202959b6e8 Cleaner addendum to the fix for 4661
git-svn-id: svn://10.0.0.236/trunk@26767 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-08 00:54:32 +00:00
akkana%netscape.com
c16be50ebc 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.


git-svn-id: svn://10.0.0.236/trunk@26766 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-08 00:46:10 +00:00
akkana%netscape.com
fb31344db8 Fix some ordering problems in image insertion; make sure we end the transaction
git-svn-id: svn://10.0.0.236/trunk@26508 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-06 19:49:33 +00:00
jfrancis%netscape.com
f104246088 redoing rules architecture
git-svn-id: svn://10.0.0.236/trunk@26297 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-05 17:21:59 +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
mcafee%netscape.com
3b4b21b2a6 Newline at end of file.
git-svn-id: svn://10.0.0.236/trunk@26139 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-03 09:28:08 +00:00
buster%netscape.com
5b08ebbd5d needed to include "nsCoord.h" in mixed case, not "nscoord"
git-svn-id: svn://10.0.0.236/trunk@25890 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-01 19:26:27 +00:00
buster%netscape.com
726862e213 initial checkin.
git-svn-id: svn://10.0.0.236/trunk@25880 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-01 18:40: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
akkana%netscape.com
dd6ab917f7 Editor: Add Insert Link and Image
git-svn-id: svn://10.0.0.236/trunk@25455 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-29 22:01:26 +00:00
jfrancis%netscape.com
46bf828d41 seperating out html edit rules from text edit rules
git-svn-id: svn://10.0.0.236/trunk@25439 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-29 08:02:05 +00:00
jfrancis%netscape.com
bdd8af18e1 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@25437 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-29 06:21:01 +00:00
sfraser%netscape.com
2af73d37f9 Add SelectAll()
git-svn-id: svn://10.0.0.236/trunk@23711 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:33:37 +00:00
akkana%netscape.com
109aad3dea Fix Solaris build problems -- thanks to braddr & bruce @ puremagic.com
git-svn-id: svn://10.0.0.236/trunk@23591 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:41:18 +00:00
sfraser%netscape.com
0a1636794b Add Cut, Copy and Paste to editor interfaces and classes, with a stub implemenatioon in nsEditor.
git-svn-id: svn://10.0.0.236/trunk@23571 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:29:41 +00:00
buster%netscape.com
4a106cee02 small interface change to InsertBreak
git-svn-id: svn://10.0.0.236/trunk@23542 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:49:18 +00:00
warren%netscape.com
0b33372d99 nsRepository -> nsIComponentManager changes.
git-svn-id: svn://10.0.0.236/trunk@23300 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 09:44:27 +00:00
sfraser%netscape.com
c5cf61dbdb Modified OutputText and OutputHTML methods to pass out nsStrings instead of nsIOutputStreams. Also fixed return values, and commented out line termination conversion in Mac outoutput.
git-svn-id: svn://10.0.0.236/trunk@23075 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:32: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