Turn on whitespace insertion

This commit is contained in:
akkana%netscape.com 1999-09-15 17:55:41 +00:00
parent c08a9c1e8c
commit 934fd4c573
4 changed files with 4 additions and 8 deletions

View File

@ -74,10 +74,8 @@ NS_IMETHODIMP SplitElementTxn::Do(void)
result = nsEditor::SplitNodeImpl(mExistingRightNode, mOffset, mNewLeftNode, mParent);
if (NS_SUCCEEDED(result) && mNewLeftNode)
{
#ifdef DEBUG_akkana
// Insert formatting whitespace for the new node:
mEditor->InsertFormattingForNode(mExistingRightNode);
#endif
nsCOMPtr<nsIDOMSelection>selection;
mEditor->GetSelection(getter_AddRefs(selection));

View File

@ -922,13 +922,13 @@ nsEditor::InsertFormattingForNode(nsIDOMNode* aNode)
PRInt32 offset = GetIndexOf(parent, aNode);
#ifdef DEBUG_akkana
DumpContentTree();
//DumpContentTree();
nsString namestr;
aNode->GetNodeName(namestr);
char* nodename = namestr.ToNewCString();
printf("Inserting formatting for node <%s> at offset %d\n",
nodename, offset);
delete[] nodename;
nsCRT::free(nodename);
#endif /* DEBUG_akkana */
//

View File

@ -74,10 +74,8 @@ NS_IMETHODIMP SplitElementTxn::Do(void)
result = nsEditor::SplitNodeImpl(mExistingRightNode, mOffset, mNewLeftNode, mParent);
if (NS_SUCCEEDED(result) && mNewLeftNode)
{
#ifdef DEBUG_akkana
// Insert formatting whitespace for the new node:
mEditor->InsertFormattingForNode(mExistingRightNode);
#endif
nsCOMPtr<nsIDOMSelection>selection;
mEditor->GetSelection(getter_AddRefs(selection));

View File

@ -922,13 +922,13 @@ nsEditor::InsertFormattingForNode(nsIDOMNode* aNode)
PRInt32 offset = GetIndexOf(parent, aNode);
#ifdef DEBUG_akkana
DumpContentTree();
//DumpContentTree();
nsString namestr;
aNode->GetNodeName(namestr);
char* nodename = namestr.ToNewCString();
printf("Inserting formatting for node <%s> at offset %d\n",
nodename, offset);
delete[] nodename;
nsCRT::free(nodename);
#endif /* DEBUG_akkana */
//