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