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