Fixed bug 8281. Reviewed by sfraser, approved by chofmann

git-svn-id: svn://10.0.0.236/trunk@35736 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cmanske%netscape.com 1999-06-16 21:45:38 +00:00
parent a84649ba07
commit 8fd6a9796d
2 changed files with 12 additions and 12 deletions

View File

@ -2274,14 +2274,14 @@ nsHTMLEditor::SaveHLineSettings(nsIDOMElement* aElement)
iAlign = 2;
mPrefs->SetIntPref("editor.hrule.align", iAlign);
char heightChar[32] = {""};
PRInt32 iHeight = atoi(height.ToCString(heightChar, 32));
if (iHeight > 0)
PRInt32 errorCode;
PRInt32 iHeight = height.ToInteger(&errorCode);
if (errorCode == NS_OK && iHeight > 0)
mPrefs->SetIntPref("editor.hrule.height", iHeight);
char widthChar[32] = {""};
PRInt32 iWidth = atoi(width.ToCString(widthChar, 32));
if (iWidth > 0) {
PRInt32 iWidth = width.ToInteger(&errorCode);
if (errorCode == NS_OK && iWidth > 0) {
mPrefs->SetIntPref("editor.hrule.width", iWidth);
mPrefs->SetBoolPref("editor.hrule.width_percent", (width.Find("%") > 0));
}

View File

@ -2274,14 +2274,14 @@ nsHTMLEditor::SaveHLineSettings(nsIDOMElement* aElement)
iAlign = 2;
mPrefs->SetIntPref("editor.hrule.align", iAlign);
char heightChar[32] = {""};
PRInt32 iHeight = atoi(height.ToCString(heightChar, 32));
if (iHeight > 0)
PRInt32 errorCode;
PRInt32 iHeight = height.ToInteger(&errorCode);
if (errorCode == NS_OK && iHeight > 0)
mPrefs->SetIntPref("editor.hrule.height", iHeight);
char widthChar[32] = {""};
PRInt32 iWidth = atoi(width.ToCString(widthChar, 32));
if (iWidth > 0) {
PRInt32 iWidth = width.ToInteger(&errorCode);
if (errorCode == NS_OK && iWidth > 0) {
mPrefs->SetIntPref("editor.hrule.width", iWidth);
mPrefs->SetBoolPref("editor.hrule.width_percent", (width.Find("%") > 0));
}