[Mono-bugs] [Bug 507739] New: PaperSize.RawKind not implemented (Sys.Drawing.Printing)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu May 28 05:52:20 EDT 2009


           Summary: PaperSize.RawKind not implemented
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648;
NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

PaperSize.RawKind is not implemented (System.Drawing.Printing)

The ReportViewer.exe sample from the bug 504604 hits a MonoTODO NIEx (on 2.4):
D:\\Temp\2009-05>mono -O=-inline --debug ReportViewer.exe
System.NotImplementedException: The requested feature is not implemented.
  at System.Drawing.Printing.PaperSize.get_RawKind () [0x00000] in
  at CShControls.ReportViewer.Print () [0x00000]
  at (wrapper remoting-invoke-with-check) CShControls.ReportViewer:Print ()
  at ReportEditor.frmReportViewer.printToolStripMenuItem_Click (System.Object
sender, System.EventArgs e) [0x00000]
  at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) [0x0001c]
(The -O=-inline is necessary as otherwise the NIEx appears to be in the
ReportViewer.Print method).

I'm not an expert in the printing API, but should the current code (which
throws NotImplEx) simply be replaced by the following?  There appears not to be
any argument checking in the set_ according to MSDN--and unit-tests.
        public int RawKind {
            get { return (int)kind; }
            set { kind = (PaperKind)value; }

ReportViewer.exe then works for me on Mono (Windows).

Unit-tests are attached which tests that pair of properties, and since the Kind
property behaviour has changed some tests of its internal usage which shows the
need for a wee related change.  See the patch in the same file.  Code is
contributed under the MIT/X11 license.

Note the files in those folders don't have SVN eol property set, beware!  (The
patch was created on Windows!)

Reproducible: Always

Configure bugmail: http://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