Merge pull request #5010 from Unity-Technologies/boehm-gc-alloc-fixed-sre
[mono.git] / mcs / class / System.Drawing / System.Drawing.Printing / PageSettings.cs
index abe3c1ff815dcda5b2d6907d3c9ff0d56c40160a..330ba62a2d8e2053cf1b03aaa959f9e4236b595a 100644 (file)
@@ -48,11 +48,12 @@ namespace System.Drawing.Printing
 
                // create a new default Margins object (is 1 inch for all margins)
                Margins margins = new Margins();
-
+#pragma warning disable 649
                float hardMarginX;
                float hardMarginY;
                RectangleF printableArea;               
                PrinterSettings printerSettings;
+#pragma warning restore 649
                
                public PageSettings() : this(new PrinterSettings())
                {
@@ -198,10 +199,10 @@ namespace System.Drawing.Printing
                public object Clone ()
                {
                        // We do a deep copy
-                       PrinterResolution pres = new PrinterResolution (this.printerResolution.X, this.printerResolution.Y, this.printerResolution.Kind);
-                       PaperSource psource = new PaperSource (this.paperSource.SourceName, this.paperSource.Kind);
+                       PrinterResolution pres = new PrinterResolution (this.printerResolution.Kind, this.printerResolution.X, this.printerResolution.Y);
+                       PaperSource psource = new PaperSource (this.paperSource.Kind, this.paperSource.SourceName);
                        PaperSize psize = new PaperSize (this.paperSize.PaperName, this.paperSize.Width, this.paperSize.Height);
-                       psize.SetKind (this.paperSize.Kind);
+                       psize.RawKind = (int)this.paperSize.Kind;
 
                        PageSettings ps = new PageSettings (this.printerSettings, this.color, this.landscape,
                                        psize, psource, pres);