[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


http://bugzilla.novell.com/show_bug.cgi?id=507739


           Summary: PaperSize.RawKind not implemented
                    (Sys.Drawing.Printing)
    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
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.4\mcs\class\System.Drawing\System.Drawing.Printing\PaperSize.cs:112
  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]
in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.4\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ToolStripItem.cs:997]]
  ...
  ...
]]
(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.
[[
        [MonoTODO]
        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