[Mono-bugs] [Bug 445618] New: Save File in RichTextBox adds extra Line Feeds
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Nov 17 06:30:08 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=445618
Summary: Save File in RichTextBox adds extra Line Feeds
Product: Mono: Class Libraries
Version: 2.0
Platform: i586
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: alisdair_little at yahoo.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
When saving files using a RichTextBox extra line feeds are added.
Under Windows XP the structure is unchanged after saving. Under Ubuntu extra
line feeds are present.
Steps to recreate;
1. Add; RichTextBox - richTextBox1, Button - cmdLoad, Button - cmdSave
2. Open a file using the plain text option
3. Save the file with the plain text option
4. View the file with Vi/Vim and extra lines have been added.
private string fileName;
private void cmdLoad_Click(object sender, EventArgs e)
{
using (OpenFileDialog ofd = new OpenFileDialog())
{
if (ofd.ShowDialog() == DialogResult.OK)
{
fileName = ofd.FileName;
richTextBox1.LoadFile(ofd.FileName,
RichTextBoxStreamType.PlainText);
}
else
{
fileName = null;
}
}
}
private void cmdSave_Click(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(fileName))
{
richTextBox1.SaveFile(fileName, RichTextBoxStreamType.PlainText);
}
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list