Change some comments re body wrap width

git-svn-id: svn://10.0.0.236/trunk@31639 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
1999-05-14 19:25:43 +00:00
parent 622007a1d7
commit 02dd28094a

View File

@@ -1133,12 +1133,14 @@ NS_IMETHODIMP nsTextEditor::GetBodyWrapWidth(PRInt32 *aWrapColumn)
}
//
// Change the wrap width on any top-level <PRE> tags in this document.
// (Search for more than one in case there are interspersed
// quoted text blocks.)
// Change the wrap width on the first <PRE> tag in this document.
// (Eventually want to search for more than one in case there are
// interspersed quoted text blocks.)
//
NS_IMETHODIMP nsTextEditor::SetBodyWrapWidth(PRInt32 aWrapColumn)
{
nsresult res;
if (! aWrapColumn)
return NS_ERROR_NULL_POINTER;
@@ -1157,8 +1159,6 @@ NS_IMETHODIMP nsTextEditor::SetBodyWrapWidth(PRInt32 aWrapColumn)
// If wrap col is nonpositive, then we need to remove any existing "cols":
if (aWrapColumn <= 0)
{
nsresult res;
(void)RemoveAttribute(preElement, colsStr);
if (aWrapColumn == 0) // Wrap to window width
@@ -1174,7 +1174,12 @@ NS_IMETHODIMP nsTextEditor::SetBodyWrapWidth(PRInt32 aWrapColumn)
(void)RemoveAttribute(preElement, wrapStr);
nsString numCols;
numCols.Append(aWrapColumn, 10);
return SetAttribute(preElement, colsStr, numCols);
res = SetAttribute(preElement, colsStr, numCols);
// Layout doesn't detect that this attribute change requires redraw. Sigh.
//HACKForceRedraw(); // This doesn't do it either!
return res;
}
NS_IMETHODIMP nsTextEditor::OutputText(nsString& aOutputString)