b15a05ff671e1e5b87b7df9f1229bf36c8114832
[mono.git] / mcs / class / System.Drawing / System.Drawing.Printing / ChangeLog
1 2009-07-08  Carlos Alberto Cortez <calberto.cortez@gmail.com> 
2
3         * PaperSource.cs: Implement RawKind.
4         Fixes the remaining bits of #507739.
5
6 2009-07-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7
8         * PaperSize.cs: Implement support for RawKind.
9         Patch by Andy Hume (andyhume32@yahoo.co.uk).
10         Fixes part of #507739.
11
12 2009-07-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
13
14         * PaperSize.cs: Actually implement RawKind by retrieving and setting
15         the kind field.
16
17 2008-11-01  Sebastien Pouliot  <sebastien@ximian.com>
18
19         * PrintingServicesUnix.cs: Fix potential crash on 64bit OS. Gendarme
20         rule for checking IntPtr has been updated to cover this case as well
21
22 2008-10-12  Sebastien Pouliot  <sebastien@ximian.com>
23
24         * PaperSize.cs, PreviewPrintController.cs, PrinterSettings.cs,
25         PrintingPermissionAttribute.cs, PrintingPermission.cs: Remove unneeded
26         field initialization to their default values.
27         [Found using Gendarme AvoidUnneededFieldInitializationRule]
28
29 2008-02-10  Sebastien Pouliot  <sebastien@ximian.com>
30
31         * PrintingServicesUnix.cs: Fix AvoidToStringOnStringsRule found
32         using Gendarme.
33
34 2007-12-10  Andreia Gaita <avidigal@novell.com>
35
36         * PrintingServicesWin32.cs: Add enumeration flag to get remote 
37         printers as well as locally connected ones. Fixes #325258
38
39 2007-06-30  Gert Driesen  <drieseng@users.sourceforge.net>
40
41         * Margins.cs: Overloaded operators are 2.0 only.
42
43 2007-05-29  Sebastien Pouliot  <sebastien@ximian.com>
44
45         * Margins.cs: Implement missing == and != operators (MoMA reports them
46         but they were not included in the class status pages). Fix property 
47         setters (to check value), reduced code duplication and changed 
48         GetHashCode to be less CPU intensive.
49
50 2007-05-24  Gert Driesen  <drieseng@users.sourceforge.net>
51
52         * PrintingServicesWin32.cs: Pass 0 as mode to DocumentProperties to
53         obtain the size of the buffer required to hold the DEVMODE structure.
54         Fixes bug #81723.
55
56 2007-05-23  Sebastien Pouliot  <sebastien@ximian.com>
57
58         * PreviewPrintController.cs: Reduce bitmap size and avoid scaling the
59         print preview (fix bug #80765). Patch from Vladimir Dimitrov.
60         * PrintingServicesUnix.cs: Reorder calculation to avoid loss of 
61         precision in integer division. Use printer resolution for Cairo
62         fallback. Patch from Vladimir Dimitrov.
63
64 2007-03-13  Andreia Gaita  <avidigal@novell.com>
65
66         * PrintingServices.cs: Add missing static method SysPrn.GetPrintDialogInfo
67         for SWF to call up printing dialogues.
68
69 2007-02-21  Andreia Gaita  <avidigal@novell.com>
70         
71         * PrintingServicesUnix.cs: Report an error in the console if there is
72         a problem opening the printer.
73
74 2007-02-21  Andreia Gaita  <avidigal@novell.com>
75
76         * PrintingServicesUnix.cs: don't free up pointers unnecessarily (doh)
77
78 2007-02-21  Andreia Gaita  <avidigal@novell.com>
79
80         * PrintingServicesUnix.cs: add checks and try blocks to make sure
81         things don't blow up if we try to double free anything (not that
82         we're trying to do anything like that :p )
83
84 2007-02-21  Andreia Gaita  <avidigal@novell.com>
85
86         * PrintingServicesUnix.cs: fix a double-free bug
87
88 2007-02-20  Andreia Gaita  <avidigal@novell.com>
89
90         * PrintingServicesUnix.cs: Fix leak caused by not calling cupsFreeDests
91         on certain codepaths. Fix return value of cupsFreeDests to void.
92         
93 2007-02-20  Andreia Gaita  <avidigal@novell.com>
94         
95         * PrintingServicesUnix.cs: Correct missing static initialization
96         of loaded printers hashtable, unit tests were failing (oops :p)
97
98 2007-02-17  Marek (please complete)
99
100         * PrintPreviewController, InvalidPrinterException: 
101         Remove warnings
102
103 2007-02-16  Andreia Gaita  <avidigal@novell.com>
104
105         Redesign how and when cups gets called to minimize
106         p/invokes, implements caching of printers and printer
107         settings as per calberto's patch - #79822, plotter detection, 
108         duplex, fixes for image disposing, code modularization, 
109         misc. fixes.
110         
111         * PageSettings.cs: Check and ignore null setter values on
112         paper sizes, sources and resolutions.
113         
114         * PaperSize.cs: Add default paper size flag
115         
116         * PaperSource.cs: Add default paper source flag, minor code
117         beautification
118         
119         * PrinterSettings.cs: Add duplex and plotter implementation, 
120         modify calls to PrintingServices to support caching, add
121         a printer capabilities list to store specific printer options - 
122         only loaded with cups, for now. Move the internal list classes
123         to the end of the code so as not to clutter.
124         
125         * PrintingServices.cs: Separate the PrintingServices class in 2 - 
126         PrintingServices and GlobalPrintingServices (see calberto's patch
127         in #79822). The PrintingServices class is where all the methods
128         caching information reside, the GlobalPrintingServices methods do 
129         no caching.
130         The cached information resides on the Printer class, added to the 
131         SysPrn class.
132         
133         * PrintingServicesUnix.cs: Big rewrite. 
134         - Essentially, redesigned and modularized the code to minimize cups 
135         calls. Then, applied the caching so all the cups calls are reduced 
136         to a minimum, by loading a list of printers onto a hashtable, then 
137         loading the settings of the chosen printer and saving that in the 
138         hashtable all in one go.
139         - Also, fixes for loading       the proper default values of the printer, 
140         which are stored in it's global options;
141         - Modularization of cups/ppd loading methods (LoadPrinterOptions, 
142         LoadOptionList, OpenPrinter, ClosePrinter) so we don't repeat 
143         cups/ppd loading loops everywhere. 
144         - Proper disposing of pointers and structures, calling the proper
145         cups free calls.
146         - Add duplex support
147         
148         * PrintingServicesWin32.cs: IsPrinterValid is no longer caching the value,
149         since it should be supporting global caching as well, though that is not
150         yet complete on win32. Implements plotter detection support, and changes for
151         the new PrinterSettings/GlobalPrinterSettings structure. Some minor changes
152         the code to minimize p/invoke calls (load the printer sources and sizes 
153         before accessing the collections)
154         
155         * StandardPrintController.cs: PrinterSettings/GlobalPrinterSettings structure
156         changes
157
158 2007-02-09  Sebastien Pouliot  <sebastien@ximian.com>
159
160         * PrintingServicesUnix.cs: Ensure we free the original pointer in
161         GetAlternativeDefaultPrinter (not the one used for iteration).
162
163 2007-01-19  Andreia Gaita  <avidigal@novell.com>
164
165         * PrintingServicesUnix.cs: Add is_default flag check for 
166         detecting default printer when cupsGetDefault doesn't return
167         valid values (mainly ubuntu). Fixes #80198, #80519
168
169 2007-01-09  Sebastien Pouliot  <sebastien@ximian.com>
170
171         * PrintingServices.cs: Unify platform detection code.
172
173 2006-12-04  Carlos Alberto Cortez <calberto.cortez@gmail.com>
174
175         * PrintingServicesUnix.cs: Add "landscape" option
176         when using PaperSettings.Landscape set to true. Also
177         swap the width and height for the postscript file.
178
179 2006-12-01  Andreia Gaita  <avidigal@novell.com>
180
181         * PrintingServicesUnix: Proper size structure use for 64 bit
182         support.
183
184 2006-12-01  Andreia Gaita  <avidigal@novell.com>
185
186         * PrintingServicesUnix: *properly* check return value from 
187         cupsGetDefault. If there are no default printers set, 
188         check if there are installed printers, and use that.
189         Hopefully fixes #79835
190
191 2006-12-01  Andreia Gaita  <avidigal@novell.com>
192
193         * PrintingServicesUnix: check return value from cupsGetDefault.
194         Hopefully fixes #79835
195
196 2006-12-01 Jordi Mas i Hernandez <jordimash@gmail.com>
197
198         * PrintingServicesWin32.cs: Fixes paper sizes reading. The POINT 
199         structure is 8 bytes long not 4. This fixes margins calculations 
200         (based on the paper size) that were badly broken. 
201
202 2006-11-28  Andreia Gaita  <avidigal@novell.com>
203
204         * PageSettings.cs: 
205         - internal member name changes to help
206         out with intelisense. 
207         - Use internal members directly instead of using
208         corresponding properties so that exceptions are not thrown
209         * PrintingServicesWin32:
210         - Only return DefaultPrinter if it is actually valid. This
211         is because Win32GetDefaultPrinter returns a printer name
212         even if PrintSpooler is stopped (which should  behave the
213         same way as if there are no printers installed)
214         - Do not try to allocate if EnumPrinters returns 0
215         
216 2006-11-25 Jordi Mas i Hernandez <jordimash@gmail.com>
217
218         * PrintingServicesUnix.cs: Implements GetPrintDialogInfo
219
220 2006-11-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
221         
222         Initial support for PageSettings (color, copies, collate,
223         and media size).
224
225         * StandardPrintController.cs: Pass PrintDocument.PageSettings to
226         create the Graphics object (althought PageSettings
227         contains a PrinterSettings and vice versa, PrintDocument
228         can contain non-related PrinterSettings and PageSettings objects).
229
230         * PrintingServices.cs: Likewise.
231         * PrintingServicesWin32.cs: Likewise.
232         * PrintingServicesUnix.cs: Likewise. Also use cupsParseOptions
233         to pass printing options when calling cupsPrintFile. Use "Custom"
234         as name for custom pages without associated name (Laxmark printers
235         have this problem, causing a nullref exc). Add GetPaperKind () method
236         to retrieve and set the right PaperKind value for PaperSize, instead
237         of using PaperKind.Custom for all page sizes. Finally save
238         PageSettings in DOCINFO to use it later.
239
240         * PrintDocument.cs: Clone PrinterSettings.PageSettings
241         instead of creating a new one (this avoid creating an additional
242         PrinterSettings instance).
243
244 2006-11-17  Andreia Gaita <avidigal@novell.com>
245
246         * PrintingServicesWin32.cs: fix another dumb typo - 
247         check proper return value from printer validity call
248
249 2006-11-16  Chris Toshok  <toshok@ximian.com>
250
251         * PreviewPrintController.cs: fix typo - don't throw
252         InvalidPrinterException when it wasn't supposed to be.
253
254 2006-11-16  Carlos Alberto Cortez <calberto.cortez@gmail.com>
255
256         * PrintDocument.cs: Use QueryPageSettingsEventArgs.PageSettings
257         in PrintPageEventArgs, instead of using the default one (mimic
258         .Net behaviour).
259
260         * PageSettings.cs: Implement Clone the right way (intead of using
261         the default page settings).
262
263 2006-11-14 Andreia Gaita <avidigal@novell.com>
264         Fixes #79835, implements PrinterSettings.IsValid, throws proper
265         InvalidPrinterException with differentiated messages.
266         
267         * PrintingServices.cs: Declares IsPrinterValid to enable easy checking
268         if printer name is a valid printer
269         
270         * PrintingServicesWin32.cs: Implements IsPrinterValid, caches 
271         last assigned printer name and if it is valid to speed up next calls.
272         
273         * PrintingServicesUnix.cs: Implements IsPrinterValid, caches 
274         last assigned printer name and if it is valid to speed up next calls.
275         
276         * PageSettings.cs: 
277                 - throw InvalidPrinterException in the properties,
278                 according to the docs: Color, Landscape, PaperSize, PaperSource, 
279                 PrinterResolution
280                 - change the private fields above to internal, so that in the
281                 constructor we can access them without triggering the exceptions
282                 if there are no printers installed
283                 
284         * PrinterSettings.cs: Implement IsValid to call IsPrinterValid
285         implemented above
286         
287         * PreviewPrintController.cs: throw InvalidPrinterException on 
288         StartPrint() if there's no valid printer configured
289         
290         * InvalidPrinterException.cs: New private GetMessage() to customize
291         printer error message, used by constructor
292
293 2006-09-27 Jordi Mas i Hernandez <jordimash@gmail.com>
294
295         * PrintingServicesUnix.cs: Implements LoadPrinterPaperSources member,
296         simplifies GetPaperSizeName and loads paper source and size defaults
297
298 2006-09-27 Jordi Mas i Hernandez <jordimash@gmail.com>
299
300         * PrintingServices.cs: Add LoadPrinterPaperSources member
301         
302         * PrintingServicesWin32.cs: Implements LoadPrinterPaperSources and
303         reads the default paper source and size.
304         
305         * PrintingServicesUnix.cs: Add stub LoadPrinterPaperSources member
306         
307         * PrinterSettings.cs: Implements PaperSourceCollection property and
308         makes default paper source and size from the system.
309
310 2006-08-02  Chris Toshok  <toshok@ximian.com>
311
312         * PreviewPrintController.cs: scale the Graphics context we pass
313         back from OnStartPage such that the preview looks the way the
314         printed output will.
315
316 2006-07-28  Carlos Alberto Cortez <calberto.cortez@gmail.com>
317
318         * PrintDocument.cs: When null is passed to PrinterSettings,
319         it should be set to a new PrinterSettings instance, and should never
320         be null.
321
322         * PrinterSettings.cs: Default value for Copies should be 1. Also
323         add a space in the ToString method, to correctly show the printer
324         info.
325
326 2006-07-26  Chris Toshok  <toshok@ximian.com>
327
328         * PrinterSettings.cs: expose PrintFileName in the 1.1 case as an
329         internal property, so we can get at it from MWF.
330
331         * PrintingServicesUnix.cs: handle print to file, and also remove
332         the temp file after sending the data to the printer.  fix some
333         dllimports to match the rest of system.drawing.
334
335         * PreviewPrintController.cs: implement this (warning, it'll eat
336         all your memory until we get a real Metafile implementation, as
337         we're storing bitmaps).
338
339         * PrintDocument.cs: shift the graphics context stuff around a bit
340         in Print(), so that the events after OnStartPrint are passed the
341         graphics context the controller created there, and we use the
342         return value of OnStartPage to do all drawing.
343
344 2006-05-20 Jordi Mas i Hernandez <jordimash@gmail.com>
345
346         * PrintingServices.cs: GetPrintDialogInfo definition
347         * PrintingServicesWin32.cs GetPrintDialogInfo implementation
348         * PrintingServicesUnix.cs: GetPrintDialogInfo stub
349
350 2006-04-14 Jordi Mas i Hernandez <jordimash@gmail.com>
351
352         * PrintingServicesUnix.cs: Replace cupsGetPrinters deprecated API call
353
354 2006-04-13 Jordi Mas i Hernandez <jordimash@gmail.com>
355
356         * PrintingServicesUnix.cs: Checks if cups is installed
357         * PrinterSettings.cs: PrintToFile property and ToString method
358
359 2006-04-28  Sebastien Pouliot  <sebastien@ximian.com>
360
361         * PrintController.cs: corcompare fix. No public ctor in 2.0.
362         * PrinterSettings.cs: corcompare fix. Clone method isn't virtual.
363
364 2006-03-21  Sebastien Pouliot  <sebastien@ximian.com>
365
366         * PrintingServicesUnix.cs: cupsGetPrinters(char***) requires to free 
367         each individual string and (finally) the list. Note that this call is
368         deprecated.
369
370 2006-03-13  Peter Dennis Bartok  <pbartok@novell.com>
371
372         * PrintingServicesUnix.cs: Handle not having a printer
373
374 2006-02-09  Peter Dennis Bartok  <pbartok@novell.com>
375
376         * PrintingServicesWin32.cs: Simplyfied the code, removing the need
377           for pointer calculations (part of 64bit cleanup)
378
379 2006-01-27  Sebastien Pouliot  <sebastien@ximian.com>
380
381         * PrintingServicesWin32.cs: Ensure Marshal.FreeHGlobal is called for 
382         all unmanaged memory allocated with AllocHGlobal.
383
384 2006-01-15 Jordi Mas i Hernandez <jordimash@gmail.com>
385
386         * PrintingServicesUnix.cs: Allow setting the dpy's for the surface
387
388 2005-12-22 Jordi Mas i Hernandez <jordimash@gmail.com>
389
390         * PrintingServices.cs: Printing services abstration class
391         * PrintingServicesWin32.cs: Win32 printer driver
392         * PrintingServicesUnix.cs: Unix printer driver
393         * Margins.cs: Fixes exceptions error messages
394         * PrinterResolution.cs: Fixes
395         * PrintEventArgs.cs: New internal method
396         * PrintPageEventArgs.cs: New internal method
397         * StandardPrintController.cs: Fixes
398         * PrinterUnitConvert.cs: Fixes conversion errors
399         * PrintDocument.cs: Fixes to make it print
400         * PageSettings.cs: Take margains into account
401         * PrintController.cs: Fixes
402         * PaperSize.cs: Method to set paper Kind
403         * PrinterSettings.cs: Implements settings and fixes
404         *       
405
406 2005-12-07 Jordi Mas i Hernandez <jordimash@gmail.com>
407         
408         * PrinterResolutionKind.cs: Fixes signature for .Net 2.0
409         * PaperKind.cs: Fixes signature for .Net 2.0
410         * PaperSource.cs: Fixes signature for .Net 2.0
411         * Margins.cs: Fixes signature for .Net 2.0
412         * PrinterResolution.cs: Fixes signature for .Net 2.0
413         * PrintEventArgs.cs: Fixes signature for .Net 2.0
414         * PrintAction.cs: New enum in .Net 2.0
415         * PageSettings.cs:  Fixes signature for .Net 2.0
416         * PaperSourceKind.cs:  Fixes signature for .Net 2.0
417         * PrintController.cs: Fixes signature for .Net 2.0
418         * Duplex.cs: Fixes signature for .Net 2.0
419         * PaperSize.cs: Fixes signature for .Net 2.0
420         * PreviewPrintController.cs: Fixes signature for .Net 2.0
421         * PrinterSettings.cs: Fixes signature for .Net 2.0
422         * PrintRange.cs: Fixes signature for .Net 2.0
423           
424 2005-09-16  Sebastien Pouliot  <sebastien@ximian.com>
425
426         * InvalidPrinterException.cs: Removed NotImplementedException (not
427         required) and added a demand for SerializationFormatter on the 
428         GetObjectData method.
429         * PrintingPermission.cs: Throw ArgumentException if the class or 
430         version attributes are missing in the supplied XML (only in 1.x).
431
432 2005-03-23 Jordi Mas i Hernandez <jordi@ximian.com>
433         * PaperKind.cs: fixes wrong enum values
434
435 2005-01-27  Lluis Sanchez Gual  <lluis@novell.com>
436
437         * MarginsConverter.cs: Implemented support for InstanceDescriptor.