1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: options_ooo_print.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : thorsten.bosbach@sun.com
36 '* short description : Tools->Options: OpenOffice.org Print
38 '\******************************************************************************
43 Dim lbSave ( 3 ) as Boolean
44 Dim lsSavePrinter ( 3 ) as String
45 Dim lbSavePrinter ( 13 ) as Boolean
46 Dim lsSaveFile ( 3 ) as String
47 Dim lbSaveFile ( 13 ) as Boolean
49 '///check if all settings are saved in configuration ( StarOffice / Print )
50 '///open options 'StarOffice' / 'Print'
52 hToolsOptions ( "StarOffice", "Print" )
55 '///- save the settings for printer-section
56 printlog " - save old settings"
57 printlog " - save settings for 'printer'"
60 lbSavePrinter (1) = ReduceTransparency.IsChecked
61 ReduceTransparency.Uncheck
62 lbSave(3) = Transparency.IsChecked
63 ReduceTransparency.Check
64 lbSavePrinter (2) = Automatically.IsChecked
65 lbSavePrinter (3) = NoTransparency.IsChecked
67 lbSavePrinter (4) = ReduceGradients.IsChecked
69 lbSavePrinter (5) = GradientStripes.IsChecked
70 lbSavePrinter (6) = IntermediateColor.IsChecked
72 lsSavePrinter (1) = Stripes.GetText
74 lbSavePrinter (7) = ReduceBitmaps.IsChecked
76 lbSavePrinter (8) = GoodPrintQuality.IsChecked
77 lbSavePrinter (9) = NormalPrintQuality.IsChecked
78 lbSavePrinter (10) = Resolution.IsChecked
79 lbSavePrinter (11) = IncludeTransparentObjects.IsChecked
81 lsSavePrinter (2) = DPI.GetSelText
83 lbSavePrinter (12) = ConvertColorsToGrayscale.IsChecked
85 '///- save settings for 'print to file'
86 printlog " - save settings for 'print to file'"
89 lbSaveFile (1) = ReduceTransparency.IsChecked
90 ReduceTransparency.Check
91 lbSaveFile (2) = Automatically.IsChecked
92 lbSaveFile (3) = NoTransparency.IsChecked
94 lbSaveFile (4) = ReduceGradients.IsChecked
96 lbSaveFile (5) = GradientStripes.IsChecked
97 lbSaveFile (6) = IntermediateColor.IsChecked
99 lsSaveFile (1) = Stripes.GetText
101 lbSaveFile (7) = ReduceBitmaps.IsChecked
103 lbSaveFile (8) = GoodPrintQuality.IsChecked
104 lbSaveFile (9) = NormalPrintQuality.IsChecked
105 lbSaveFile (10) = Resolution.IsChecked
106 lbSaveFile (11) = IncludeTransparentObjects.IsChecked
108 lsSaveFile (2) = DPI.GetSelText
110 lbSaveFile (12) = ConvertColorsToGrayscale.IsChecked
112 '///- save general settings
113 printlog " - save general settings "
114 lbSave(1) = PaperOrientation.IsChecked
115 lbSave(2) = PaperSize.IsChecked
117 '///invert/change settings
118 '///- changes for 'printer'
119 printlog " - invert/change settings"
120 printlog " - changes for 'printer'"
123 if lbSavePrinter (1) = FALSE then ReduceTransparency.Check else ReduceTransparency.UnCheck
124 if ReduceTransparency.IsChecked then
127 if lbSave(3) = FALSE then Transparency.Check else Transparency.UnCheck
130 if lbSavePrinter (4) = FALSE then ReduceGradients.Check else ReduceGradients.UnCheck
131 if ReduceGradients.IsChecked then
132 IntermediateColor.Check
135 if lbSavePrinter (7) = FALSE then ReduceBitmaps.Check else ReduceBitmaps.UnCheck
136 if ReduceBitmaps.IsChecked then
139 if lbSavePrinter (11) = FALSE then IncludeTransparentObjects.Check else IncludeTransparentObjects.UnCheck
142 if lbSavePrinter (12) = FALSE then ConvertColorsToGrayscale.Check else ConvertColorsToGrayscale.UnCheck
144 '///- changes for 'print to file'
145 printlog " - changes for 'print to file'"
148 if lbSaveFile (1) = FALSE then ReduceTransparency.Check else ReduceTransparency.UnCheck
149 if ReduceTransparency.IsChecked then
153 if lbSaveFile (4) = FALSE then ReduceGradients.Check else ReduceGradients.UnCheck
154 if ReduceGradients.IsChecked then
155 GradientStripes.Check
159 if lbSaveFile (7) = FALSE then ReduceBitmaps.Check else ReduceBitmaps.UnCheck
160 if ReduceBitmaps.IsChecked then
161 GoodPrintQuality.Check
162 if lbSaveFile (11) = FALSE then IncludeTransparentObjects.Check else IncludeTransparentObjects.UnCheck
165 if lbSaveFile (12) = FALSE then ConvertColorsToGrayscale.Check else ConvertColorsToGrayscale.UnCheck
167 '///- changes for general settings
168 printlog " - changes for general settings"
169 if lbSave(1) = FALSE then PaperOrientation.Check else PaperOrientation.UnCheck
170 if lbSave(2) = FALSE then PaperSize.Check else PaperSize.UnCheck
172 '///close options-dialog with OK
173 Kontext "ExtrasOptionenDlg"
177 '///exit/restart StarOffice
178 printlog " - exit/restart StarOffice"
181 '///open options 'StarOffice' / 'Print'
182 printlog " - check invertation/changes"
184 hToolsOptions ( "StarOffice", "Print" )
186 '///check invertation/changes
187 '///- check for 'printer'
188 printlog " - check for 'printer'"
191 if ReduceTransparency.IsChecked = lbSavePrinter (1) then Warnlog "Reduce transparency => changes not saved! => BugID 87446"
192 if ReduceTransparency.IsChecked then
193 if NoTransparency.IsChecked <> TRUE then Warnlog "No transparency => changes not saved!"
195 if Transparency.IsChecked = lbSave(2) then Warnlog "Transparency => changes not saved!"
199 if ReduceGradients.IsChecked = lbSavePrinter (4) then Warnlog "ReduceGradients => changes not saved!"
200 if ReduceGradients.IsChecked then
201 if IntermediateColor.IsChecked <> TRUE then Warnlog "Intermediate color => changes not saved!"
204 if ReduceBitmaps.IsChecked = lbSavePrinter (7) then Warnlog "Reduce bitmaps => changes not saved!"
205 if ReduceBitmaps.IsChecked then
206 if Resolution.IsChecked <> TRUE then
207 Warnlog "Resolution => changes not saved!"
209 if DPI.GetSelIndex <> 1 then Warnlog "DPI => changes not saved!"
211 if IncludeTransparentObjects.IsChecked = lbSavePrinter (11) then Warnlog "Include Transparent Objects => changes not saved!"
214 if ConvertColorsToGrayscale.IsChecked = lbSavePrinter (12) then Warnlog "Convert Colors To Grayscale => changes not saved!"
216 '///- check for 'print to file'
217 printlog " - check for 'print to file'"
220 if ReduceTransparency.IsChecked = lbSaveFile (1) then Warnlog "Reduce transparency => changes not saved!"
221 if ReduceTransparency.IsChecked then
222 if Automatically.IsChecked <> TRUE then Warnlog "Automatically => changes not saved!"
225 if ReduceGradients.IsChecked = lbSaveFile (4) then Warnlog "Reduce gradients => changes not saved!"
226 if ReduceGradients.IsChecked then
227 if GradientStripes.IsChecked <> TRUE then Warnlog "GradientStripes => changes not saved!"
228 if GradientStripes.IsChecked then
229 if Stripes.GetText <> "30" then Warnlog "Stripes => changes not saved!"
233 if ReduceBitmaps.IsChecked = lbSaveFile (7) then Warnlog "Reduce bitmaps => changes not saved!"
235 if ReduceBitmaps.IsChecked then
236 if GoodPrintQuality.IsChecked <> TRUE then Warnlog "Good print quality => changes not saved!"
237 if IncludeTransparentObjects.IsChecked = lbSaveFile (11) then Warnlog "Include transparent objects = changes not saved!"
240 if ConvertColorsToGrayscale.IsChecked = lbSaveFile (12) then warnlog "Convert colors to grayscale => changes not saved!"
242 '///check for general settings
243 printlog " - check for general settings"
244 if PaperOrientation.IsChecked = lbSave(1) then warnlog "Paper orientation => changes not saved! #i29960"
245 if PaperSize.IsChecked = lbSave(2) then Warnlog "Paper size => changes not saved! #i29960"
248 '///- changes for 'printer'
249 printlog " - 2. changes"
250 printlog " - 'printer'"
253 ReduceTransparency.UnCheck
254 ReduceGradients.Check
255 GradientStripes.Check
256 Stripes.SetText "120"
258 GoodPrintQuality.Check
259 IncludeTransparentObjects.Check
260 ConvertColorsToGrayscale.UnCheck
262 '///- changes for 'print to file'
263 printlog " - 'print to file'"
265 ReduceTransparency.Check
267 ReduceGradients.Uncheck
268 ReduceBitmaps.UnCheck
269 ConvertColorsToGrayscale.Check
271 '///- changes for general settings
272 printlog " - general settings"
273 PaperOrientation.UnCheck
276 '///close the options-dialog with OK
277 Kontext "ExtrasOptionenDlg"
281 '///open options 'StarOffice' / 'Print'
283 printlog " - check 2. changes"
285 hToolsOptions ( "StarOffice", "Print" )
287 '///- check for 'printer'
288 printlog " - check for 'printer'"
291 if ReduceTransparency.IsChecked <> FALSE then Warnlog "Reduce transparency => changes not saved!"
292 if ReduceGradients.IsChecked <> TRUE then
293 Warnlog "ReduceGradients => changes not saved!"
295 if GradientStripes.IsChecked <> TRUE then
296 Warnlog "GradientStripes => changes not saved!"
298 if Stripes.GetText <> "120" then Warnlog "Stripes => changes not saved!"
301 if ReduceBitmaps.IsChecked <> TRUE then
302 Warnlog "Reduce bitmaps => changes not saved!"
304 if GoodPrintQuality.IsChecked <> TRUE then Warnlog "Good print quality => changes not saved!"
305 if IncludeTransparentObjects.IsChecked <> TRUE then Warnlog "Include Transparent Objects => changes not saved!"
307 if ConvertColorsToGrayscale.IsChecked <> FALSE then Warnlog "Convert Colors To Grayscale => changes not saved!"
309 '///- check 'print to file'
310 printlog " - check 'print to file'"
313 if ReduceTransparency.IsChecked <> TRUE then
314 Warnlog "Reduce transparency => changes not saved!"
316 if NoTransparency.IsChecked <> TRUE then Warnlog "No transpanency => changes not saved!"
318 if ReduceGradients.IsChecked <> FALSE then Warnlog "Reduce gradients => changes not saved!"
319 if ReduceBitmaps.IsChecked <> FALSE then Warnlog "Reduce bitmaps => changes not saved!"
320 if ConvertColorsToGrayscale.IsChecked <> TRUE then Warnlog "Convert colors to grayscale => changes not saved!"
322 '///- check for general settings
323 printlog " - check general settings"
324 if PaperOrientation.IsChecked <> FALSE then warnlog "Paper orientation => changes not saved!"
325 if PaperSize.IsChecked <> TRUE then Warnlog "Paper size => changes not saved! #i29960"
327 '///reset to saved settings
328 printlog " - reset to saved settings"
329 printlog " - 'printer'"
332 ReduceTransparency.Check
333 if lbSavePrinter (2) = TRUE then Automatically.Check
334 if lbSavePrinter (3) = TRUE then NoTransparency.Check
335 ReduceTransparency.UnCheck
336 if lbSave(3) = TRUE then Transparency.Check else Transparency.Uncheck
337 if lbSavePrinter (1) = TRUE then ReduceTransparency.check else ReduceTransparency.Uncheck
339 ReduceGradients.Check
340 GradientStripes.Check
341 Stripes.SetText lsSavePrinter (1)
342 if lbSavePrinter (5) = TRUE then GradientStripes.Check
343 if lbSavePrinter (6) = TRUE then IntermediateColor.Check
344 if lbSavePrinter (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
345 if lbSavePrinter (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
349 DPI.Select lsSavePrinter (2)
350 if lbSavePrinter (8) = TRUE then GoodPrintQuality.Check
351 if lbSavePrinter (9) = TRUE then NormalPrintQuality.Check
352 if lbSavePrinter (10) = TRUE then Resolution.Check
353 if lbSavePrinter (11) = TRUE then IncludeTransparentObjects.Check else IncludeTransparentObjects.UnCheck
354 if lbSavePrinter (7) = TRUE then ReduceBitmaps.Check else ReduceBitmaps.UnCheck
356 if lbSavePrinter (12) = TRUE then ConvertColorsToGrayscale.Check else ConvertColorsToGrayscale.UnCheck
358 printlog " - 'print to file'"
361 ReduceTransparency.Check
362 if lbSaveFile (2) = TRUE then Automatically.Check
363 if lbSaveFile (3) = TRUE then NoTransparency.Check
364 if lbSaveFile (1) = TRUE then ReduceTransparency.Check else ReduceTransparency.UnCheck
366 ReduceGradients.Check
367 GradientStripes.Check
368 Stripes.SetText lsSaveFile (1)
369 if lbSaveFile (5) = TRUE then GradientStripes.Check
370 if lbSaveFile (6) = TRUE then IntermediateColor.Check
371 if lbSaveFile (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
375 DPI.Select lsSaveFile (2)
376 if lbSaveFile (8) = TRUE then GoodPrintQuality.Check
377 if lbSaveFile (9) = TRUE then NormalPrintQuality.Check
378 if lbSaveFile (10) = TRUE then Resolution.Check
379 if lbSaveFile (11) = TRUE then IncludeTransparentObjects.Check else IncludeTransparentObjects.UnCheck
380 if lbSaveFile (7) = TRUE then ReduceBitmaps.Check else ReduceBitmaps.Uncheck
382 if lbSaveFile (12) = TRUE then ConvertColorsToGrayscale.Check else ConvertColorsToGrayscale.UnCheck
384 printlog " - general settings"
385 if lbSave(1) = TRUE then PaperOrientation.check else PaperOrientation.Uncheck
386 if lbSave(2) = TRUE then PaperSize.Check else PaperSize.UnCheck
388 '///close options-dialog with OK
389 Kontext "ExtrasOptionenDlg"
393 '///open options 'StarOffice' / 'Print'
395 printlog " - check changes"
397 hToolsOptions ( "StarOffice", "Print" )
399 '///- check for 'printer'
400 printlog " - check for 'printer'"
403 if ReduceTransparency.IsChecked <> lbSavePrinter (1) then Warnlog "Reduce transparency => changes not saved!"
404 ReduceTransparency.Check
405 if Automatically.IsChecked <> lbSavePrinter (2) then Warnlog "Automatically => changes not saved!"
406 if NoTransparency.IsChecked <> lbSavePrinter (3) then Warnlog "No transparency => changes not saved!"
407 ReduceTransparency.UnCheck
408 if Transparency.IsChecked <> lbSave(3) then Warnlog "Transparency => changes not saved!"
409 if lbSavePrinter (1) = TRUE then ReduceTransparency.Check else ReduceTransparency.UnCheck
411 if ReduceGradients.IsChecked <> lbSavePrinter (4) then Warnlog "Reduce Gradients => changes not saved!"
412 ReduceGradients.Check
413 if GradientStripes.IsChecked <> lbSavePrinter (5) then Warnlog "GradientStripes => changes not saved!"
414 if IntermediateColor.IsChecked <> lbSavePrinter (6) then Warnlog "Intermediate color => changes not saved!"
415 GradientStripes.Check
416 if Stripes.GetText <> lsSavePrinter (1) then Warnlog "Stripes => changes not saved!"
417 if lbSavePrinter (5) = TRUE then GradientStripes.Check else IntermediateColor.Check
418 if lbSavePrinter (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
420 if ReduceBitmaps.IsChecked <> lbSavePrinter (7) then Warnlog "Reduce Bitmaps => changes not saved!"
422 if GoodPrintQuality.IsChecked <> lbSavePrinter (8) then Warnlog "Good print quality => changes not saved!"
423 if NormalPrintQuality.IsChecked <> lbSavePrinter (9) then Warnlog "Normal print quality => changes not saved!"
424 if Resolution.IsChecked <> lbSavePrinter (10) then Warnlog "Resolution => changes not saved!"
425 if IncludeTransparentObjects.IsChecked <> lbSavePrinter (11) then Warnlog "Include transparent objects => changes not saved!"
427 if DPI.GetSelText <> lsSavePrinter (2) then Warnlog "DPI => changes not saved!"
428 if lbSavePrinter (8) = TRUE then GoodPrintQuality.Check
429 if lbSavePrinter (9) = TRUE then NormalPrintQuality.Check
430 if lbSavePrinter (10) = TRUE then Resolution.Check
431 if lbSavePrinter (7) = TRUE then ReduceBitmaps.Check else ReduceBitmaps.Uncheck
433 if ConvertColorsToGrayscale.IsChecked <> lbSavePrinter (12) then Warnlog "Convert colors to grayscale => changes not saved!"
435 '///- check for 'print to file'
436 printlog " - 'print to file'"
439 if ReduceTransparency.IsChecked <> lbSaveFile (1) then Warnlog "Reduce transparency => changes not saved!"
440 ReduceTransparency.Check
441 if Automatically.IsChecked <> lbSaveFile (2) then Warnlog "Automatically => changes not saved!"
442 if NoTransparency.IsChecked <> lbSaveFile (3) then Warnlog "No transparency => changes not saved!"
443 if lbSaveFile (1) = TRUE then ReduceTransparency.Check else ReduceTransparency.UnCheck
445 if ReduceGradients.IsChecked <> lbSaveFile (4) then Warnlog "Reduce Gradients => changes not saved!"
446 ReduceGradients.Check
447 if GradientStripes.IsChecked <> lbSaveFile (5) then Warnlog "GradientStripes => changes not saved!"
448 if IntermediateColor.IsChecked <> lbSaveFile (6) then Warnlog "Intermediate color => changes not saved!"
449 GradientStripes.Check
450 if Stripes.GetText <> lsSaveFile (1) then Warnlog "Stripes => changes not saved!"
451 if lbSaveFile (5) = TRUE then GradientStripes.Check else IntermediateColor.Check
452 if lbSaveFile (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
454 if ReduceBitmaps.IsChecked <> lbSaveFile (7) then Warnlog "Reduce Bitmaps => changes not saved!"
456 if GoodPrintQuality.IsChecked <> lbSaveFile (8) then Warnlog "Good print quality => changes not saved!"
457 if NormalPrintQuality.IsChecked <> lbSaveFile (9) then Warnlog "Normal print quality => changes not saved!"
458 if Resolution.IsChecked <> lbSaveFile (10) then Warnlog "Resolution => changes not saved!"
459 if IncludeTransparentObjects.IsChecked <> lbSaveFile (11) then Warnlog "Include transparent objects => changes not saved!"
461 if DPI.GetSelText <> lsSavePrinter (2) then Warnlog "DPI => changes not saved!"
462 if lbSaveFile (8) = TRUE then GoodPrintQuality.Check
463 if lbSaveFile (9) = TRUE then NormalPrintQuality.Check
464 if lbSaveFile (10) = TRUE then Resolution.Check
465 if lbSaveFile (7) = TRUE then ReduceBitmaps.Check else ReduceBitmaps.Uncheck
467 if ConvertColorsToGrayscale.IsChecked <> lbSaveFile (12) then Warnlog "Convert colors to grayscale => changes not saved!"
469 '///- check for general settings
470 printlog " - general settings"
471 if PaperOrientation.Ischecked <> lbSave(1) then Warnlog "Paper orientation => changes not saved!"
472 if PaperSize.IsChecked <> lbSave(2) then Warnlog "Paper size. => changes not saved!"
474 '///close options-dialog with OK
475 Kontext "ExtrasOptionenDlg"