Author: jackson
Date: 2007-02-23 11:41:06 -0500 (Fri, 23 Feb 2007)
New Revision: 73373

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.RTF/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.RTF/RTF.cs
Log:

        * RTF.cs: Pull pict groups out of opt dests. Don't handle the
        * pict
        group unless there was data found.



Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.RTF/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.RTF/ChangeLog    
2007-02-23 16:00:00 UTC (rev 73372)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.RTF/ChangeLog    
2007-02-23 16:41:06 UTC (rev 73373)
@@ -1,3 +1,8 @@
+2007-02-23  Jackson Harper  <[EMAIL PROTECTED]>
+
+       * RTF.cs: Pull pict groups out of opt dests. Don't handle the pict
+       group unless there was data found.
+
 2007-02-15  Jackson Harper  <[EMAIL PROTECTED]>
 
        * KeysInit.cs:

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.RTF/RTF.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.RTF/RTF.cs       
2007-02-23 16:00:00 UTC (rev 73372)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.RTF/RTF.cs       
2007-02-23 16:41:06 UTC (rev 73373)
@@ -587,7 +587,20 @@
 
                private void HandleOptDest (RTF rtf)
                {
-                       rtf.SkipGroup ();
+                       while (true) {
+                               GetToken ();
+
+                               if (rtf.CheckCM (TokenClass.Group, 
Major.EndGroup))
+                                       break;
+
+                               //
+                               // We don't want to skip all optional dests
+                               //
+                               if (rtf.CheckCMM (TokenClass.Control, 
Major.Destination, Minor.Pict)) {
+                                       ReadPictGroup (rtf);
+                                       return;
+                               }
+                       }
                }
 
                private void ReadFontTbl(RTF rtf) {
@@ -957,7 +970,7 @@
                                }
                        }
 
-                       if (image_type != Minor.Undefined)
+                       if (image_type != Minor.Undefined && !read_image_data)
                                SetToken (TokenClass.Control, Major.PictAttr, 
image_type, 0, String.Empty);
                }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to