[Mono-bugs] [Bug 81684][Nor] New - (Rich)TextBox line ending issue

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat May 19 12:46:46 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by marek.safar at seznam.cz.

http://bugzilla.ximian.com/show_bug.cgi?id=81684

--- shadow/81684	2007-05-19 12:46:46.000000000 -0400
+++ shadow/81684.tmp.20004	2007-05-19 12:46:46.000000000 -0400
@@ -0,0 +1,71 @@
+Bug#: 81684
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: marek.safar at seznam.cz               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: (Rich)TextBox line ending issue
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Create rich text box
+2. Insert following rtf text
+
+{\rtf1\ansi\ansicpg1252\deff0\deflang1033{
+\colortbl
+\red0\green0\blue0;\red0\green0\blue128;\red128\green128\blue128;\red0\green128\blue0;\red128\green0\blue0;}
+\par\li150\cf0 \cf1 public\cf0  \b \cf0 Test\cf0 \b0
+()\par\li150\{\par\li150\}\par\li150\par}
+
+Actual Results:
+
+No line endings (1 row)
+
+public Test(){}
+
+Expected Results:
+
+public Test()
+{
+}
+
+How often does this happen? 
+
+100%
+
+Additional Information:
+
+I have made local change, which fixed the issue.
+However, I am not sure whether it is correct fix.
+
+
+Index: System.Windows.Forms/RichTextBox.cs
+===================================================================
+--- System.Windows.Forms/RichTextBox.cs (revision 77627)
++++ System.Windows.Forms/RichTextBox.cs (working copy)
+@@ -1543,7 +1543,7 @@
+                        rtf_chars += rtf_line.Length;
+ 
+                        if (rtf_cursor_x == 0) {
+-                               document.Add(rtf_cursor_y,
+rtf_line.ToString(), rtf_rtfalign, font, rtf_color, LineEnding.Wrap);
++                               document.Add(rtf_cursor_y,
+rtf_line.ToString(), rtf_rtfalign, font, rtf_color, LineEnding.Hard);
+                                if (rtf_par_line_left_indent != 0) {
+                                        Line line = document.GetLine
+(rtf_cursor_y);
+                                        line.indent = rtf_par_line_left_indent;


More information about the mono-bugs mailing list