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 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : thorsten.bosbach@oracle.com
30 '* short description : Tools->Options: OpenOffice.org Print
32 '\******************************************************************************
37 Dim lbSave ( 3 ) as Boolean
38 Dim lsSavePrinter ( 3 ) as String
39 Dim lbSavePrinter ( 13 ) as Boolean
40 Dim lsSaveFile ( 3 ) as String
41 Dim lbSaveFile ( 13 ) as Boolean
44 hToolsOptions ( "StarOffice", "Print" )
46 printlog " - save old settings"
47 printlog " - save settings for 'printer'"
50 lbSavePrinter (1) = ReduceTransparency.IsChecked
51 ReduceTransparency.Uncheck
52 lbSave(3) = Transparency.IsChecked
53 ReduceTransparency.Check
54 lbSavePrinter (2) = Automatically.IsChecked
55 lbSavePrinter (3) = NoTransparency.IsChecked
57 lbSavePrinter (4) = ReduceGradients.IsChecked
59 lbSavePrinter (5) = GradientStripes.IsChecked
60 lbSavePrinter (6) = IntermediateColor.IsChecked
62 lsSavePrinter (1) = Stripes.GetText
64 lbSavePrinter (7) = ReduceBitmaps.IsChecked
66 lbSavePrinter (8) = GoodPrintQuality.IsChecked
67 lbSavePrinter (9) = NormalPrintQuality.IsChecked
68 lbSavePrinter (10) = Resolution.IsChecked
69 lbSavePrinter (11) = IncludeTransparentObjects.IsChecked
71 lsSavePrinter (2) = DPI.GetSelText
73 lbSavePrinter (12) = ConvertColorsToGrayscale.IsChecked
75 printlog " - save settings for 'print to file'"
78 lbSaveFile (1) = ReduceTransparency.IsChecked
79 ReduceTransparency.Check
80 lbSaveFile (2) = Automatically.IsChecked
81 lbSaveFile (3) = NoTransparency.IsChecked
83 lbSaveFile (4) = ReduceGradients.IsChecked
85 lbSaveFile (5) = GradientStripes.IsChecked
86 lbSaveFile (6) = IntermediateColor.IsChecked
88 lsSaveFile (1) = Stripes.GetText
90 lbSaveFile (7) = ReduceBitmaps.IsChecked
92 lbSaveFile (8) = GoodPrintQuality.IsChecked
93 lbSaveFile (9) = NormalPrintQuality.IsChecked
94 lbSaveFile (10) = Resolution.IsChecked
95 lbSaveFile (11) = IncludeTransparentObjects.IsChecked
97 lsSaveFile (2) = DPI.GetSelText
99 lbSaveFile (12) = ConvertColorsToGrayscale.IsChecked
101 printlog " - save general settings "
102 lbSave(1) = PaperOrientation.IsChecked
103 lbSave(2) = PaperSize.IsChecked
105 printlog " - invert/change settings"
106 printlog " - changes for 'printer'"
109 if lbSavePrinter (1) = FALSE then ReduceTransparency.Check else ReduceTransparency.UnCheck
110 if ReduceTransparency.IsChecked then
113 if lbSave(3) = FALSE then Transparency.Check else Transparency.UnCheck
116 if lbSavePrinter (4) = FALSE then ReduceGradients.Check else ReduceGradients.UnCheck
117 if ReduceGradients.IsChecked then
118 IntermediateColor.Check
121 if lbSavePrinter (7) = FALSE then ReduceBitmaps.Check else ReduceBitmaps.UnCheck
122 if ReduceBitmaps.IsChecked then
125 if lbSavePrinter (11) = FALSE then IncludeTransparentObjects.Check else IncludeTransparentObjects.UnCheck
128 if lbSavePrinter (12) = FALSE then ConvertColorsToGrayscale.Check else ConvertColorsToGrayscale.UnCheck
130 printlog " - changes for 'print to file'"
133 if lbSaveFile (1) = FALSE then ReduceTransparency.Check else ReduceTransparency.UnCheck
134 if ReduceTransparency.IsChecked then
138 if lbSaveFile (4) = FALSE then ReduceGradients.Check else ReduceGradients.UnCheck
139 if ReduceGradients.IsChecked then
140 GradientStripes.Check
144 if lbSaveFile (7) = FALSE then ReduceBitmaps.Check else ReduceBitmaps.UnCheck
145 if ReduceBitmaps.IsChecked then
146 GoodPrintQuality.Check
147 if lbSaveFile (11) = FALSE then IncludeTransparentObjects.Check else IncludeTransparentObjects.UnCheck
150 if lbSaveFile (12) = FALSE then ConvertColorsToGrayscale.Check else ConvertColorsToGrayscale.UnCheck
152 printlog " - changes for general settings"
153 if lbSave(1) = FALSE then PaperOrientation.Check else PaperOrientation.UnCheck
154 if lbSave(2) = FALSE then PaperSize.Check else PaperSize.UnCheck
156 Kontext "ExtrasOptionenDlg"
160 printlog " - exit/restart StarOffice"
163 printlog " - check invertation/changes"
165 hToolsOptions ( "StarOffice", "Print" )
167 printlog " - check for 'printer'"
170 if ReduceTransparency.IsChecked = lbSavePrinter (1) then Warnlog "Reduce transparency => changes not saved! => BugID 87446"
171 if ReduceTransparency.IsChecked then
172 if NoTransparency.IsChecked <> TRUE then Warnlog "No transparency => changes not saved!"
174 if Transparency.IsChecked = lbSave(2) then Warnlog "Transparency => changes not saved!"
178 if ReduceGradients.IsChecked = lbSavePrinter (4) then Warnlog "ReduceGradients => changes not saved!"
179 if ReduceGradients.IsChecked then
180 if IntermediateColor.IsChecked <> TRUE then Warnlog "Intermediate color => changes not saved!"
183 if ReduceBitmaps.IsChecked = lbSavePrinter (7) then Warnlog "Reduce bitmaps => changes not saved!"
184 if ReduceBitmaps.IsChecked then
185 if Resolution.IsChecked <> TRUE then
186 Warnlog "Resolution => changes not saved!"
188 if DPI.GetSelIndex <> 1 then Warnlog "DPI => changes not saved!"
190 if IncludeTransparentObjects.IsChecked = lbSavePrinter (11) then Warnlog "Include Transparent Objects => changes not saved!"
193 if ConvertColorsToGrayscale.IsChecked = lbSavePrinter (12) then Warnlog "Convert Colors To Grayscale => changes not saved!"
195 printlog " - check for 'print to file'"
198 if ReduceTransparency.IsChecked = lbSaveFile (1) then Warnlog "Reduce transparency => changes not saved!"
199 if ReduceTransparency.IsChecked then
200 if Automatically.IsChecked <> TRUE then Warnlog "Automatically => changes not saved!"
203 if ReduceGradients.IsChecked = lbSaveFile (4) then Warnlog "Reduce gradients => changes not saved!"
204 if ReduceGradients.IsChecked then
205 if GradientStripes.IsChecked <> TRUE then Warnlog "GradientStripes => changes not saved!"
206 if GradientStripes.IsChecked then
207 if Stripes.GetText <> "30" then Warnlog "Stripes => changes not saved!"
211 if ReduceBitmaps.IsChecked = lbSaveFile (7) then Warnlog "Reduce bitmaps => changes not saved!"
213 if ReduceBitmaps.IsChecked then
214 if GoodPrintQuality.IsChecked <> TRUE then Warnlog "Good print quality => changes not saved!"
215 if IncludeTransparentObjects.IsChecked = lbSaveFile (11) then Warnlog "Include transparent objects = changes not saved!"
218 if ConvertColorsToGrayscale.IsChecked = lbSaveFile (12) then warnlog "Convert colors to grayscale => changes not saved!"
220 printlog " - check for general settings"
221 if PaperOrientation.IsChecked = lbSave(1) then warnlog "Paper orientation => changes not saved! #i29960"
222 if PaperSize.IsChecked = lbSave(2) then Warnlog "Paper size => changes not saved! #i29960"
224 printlog " - 2. changes"
225 printlog " - 'printer'"
228 ReduceTransparency.UnCheck
229 ReduceGradients.Check
230 GradientStripes.Check
231 Stripes.SetText "120"
233 GoodPrintQuality.Check
234 IncludeTransparentObjects.Check
235 ConvertColorsToGrayscale.UnCheck
237 printlog " - 'print to file'"
239 ReduceTransparency.Check
241 ReduceGradients.Uncheck
242 ReduceBitmaps.UnCheck
243 ConvertColorsToGrayscale.Check
245 printlog " - general settings"
246 PaperOrientation.UnCheck
249 Kontext "ExtrasOptionenDlg"
253 printlog " - check 2. changes"
255 hToolsOptions ( "StarOffice", "Print" )
257 printlog " - check for 'printer'"
260 if ReduceTransparency.IsChecked <> FALSE then Warnlog "Reduce transparency => changes not saved!"
261 if ReduceGradients.IsChecked <> TRUE then
262 Warnlog "ReduceGradients => changes not saved!"
264 if GradientStripes.IsChecked <> TRUE then
265 Warnlog "GradientStripes => changes not saved!"
267 if Stripes.GetText <> "120" then Warnlog "Stripes => changes not saved!"
270 if ReduceBitmaps.IsChecked <> TRUE then
271 Warnlog "Reduce bitmaps => changes not saved!"
273 if GoodPrintQuality.IsChecked <> TRUE then Warnlog "Good print quality => changes not saved!"
274 if IncludeTransparentObjects.IsChecked <> TRUE then Warnlog "Include Transparent Objects => changes not saved!"
276 if ConvertColorsToGrayscale.IsChecked <> FALSE then Warnlog "Convert Colors To Grayscale => changes not saved!"
278 printlog " - check 'print to file'"
281 if ReduceTransparency.IsChecked <> TRUE then
282 Warnlog "Reduce transparency => changes not saved!"
284 if NoTransparency.IsChecked <> TRUE then Warnlog "No transpanency => changes not saved!"
286 if ReduceGradients.IsChecked <> FALSE then Warnlog "Reduce gradients => changes not saved!"
287 if ReduceBitmaps.IsChecked <> FALSE then Warnlog "Reduce bitmaps => changes not saved!"
288 if ConvertColorsToGrayscale.IsChecked <> TRUE then Warnlog "Convert colors to grayscale => changes not saved!"
290 printlog " - check general settings"
291 if PaperOrientation.IsChecked <> FALSE then warnlog "Paper orientation => changes not saved!"
292 if PaperSize.IsChecked <> TRUE then Warnlog "Paper size => changes not saved! #i29960"
294 printlog " - reset to saved settings"
295 printlog " - 'printer'"
298 ReduceTransparency.Check
299 if lbSavePrinter (2) = TRUE then Automatically.Check
300 if lbSavePrinter (3) = TRUE then NoTransparency.Check
301 ReduceTransparency.UnCheck
302 if lbSave(3) = TRUE then Transparency.Check else Transparency.Uncheck
303 if lbSavePrinter (1) = TRUE then ReduceTransparency.check else ReduceTransparency.Uncheck
305 ReduceGradients.Check
306 GradientStripes.Check
307 Stripes.SetText lsSavePrinter (1)
308 if lbSavePrinter (5) = TRUE then GradientStripes.Check
309 if lbSavePrinter (6) = TRUE then IntermediateColor.Check
310 if lbSavePrinter (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
311 if lbSavePrinter (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
315 DPI.Select lsSavePrinter (2)
316 if lbSavePrinter (8) = TRUE then GoodPrintQuality.Check
317 if lbSavePrinter (9) = TRUE then NormalPrintQuality.Check
318 if lbSavePrinter (10) = TRUE then Resolution.Check
319 if lbSavePrinter (11) = TRUE then IncludeTransparentObjects.Check else IncludeTransparentObjects.UnCheck
320 if lbSavePrinter (7) = TRUE then ReduceBitmaps.Check else ReduceBitmaps.UnCheck
322 if lbSavePrinter (12) = TRUE then ConvertColorsToGrayscale.Check else ConvertColorsToGrayscale.UnCheck
324 printlog " - 'print to file'"
327 ReduceTransparency.Check
328 if lbSaveFile (2) = TRUE then Automatically.Check
329 if lbSaveFile (3) = TRUE then NoTransparency.Check
330 if lbSaveFile (1) = TRUE then ReduceTransparency.Check else ReduceTransparency.UnCheck
332 ReduceGradients.Check
333 GradientStripes.Check
334 Stripes.SetText lsSaveFile (1)
335 if lbSaveFile (5) = TRUE then GradientStripes.Check
336 if lbSaveFile (6) = TRUE then IntermediateColor.Check
337 if lbSaveFile (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
341 DPI.Select lsSaveFile (2)
342 if lbSaveFile (8) = TRUE then GoodPrintQuality.Check
343 if lbSaveFile (9) = TRUE then NormalPrintQuality.Check
344 if lbSaveFile (10) = TRUE then Resolution.Check
345 if lbSaveFile (11) = TRUE then IncludeTransparentObjects.Check else IncludeTransparentObjects.UnCheck
346 if lbSaveFile (7) = TRUE then ReduceBitmaps.Check else ReduceBitmaps.Uncheck
348 if lbSaveFile (12) = TRUE then ConvertColorsToGrayscale.Check else ConvertColorsToGrayscale.UnCheck
350 printlog " - general settings"
351 if lbSave(1) = TRUE then PaperOrientation.check else PaperOrientation.Uncheck
352 if lbSave(2) = TRUE then PaperSize.Check else PaperSize.UnCheck
354 Kontext "ExtrasOptionenDlg"
358 printlog " - check changes"
360 hToolsOptions ( "StarOffice", "Print" )
362 printlog " - check for 'printer'"
365 if ReduceTransparency.IsChecked <> lbSavePrinter (1) then Warnlog "Reduce transparency => changes not saved!"
366 ReduceTransparency.Check
367 if Automatically.IsChecked <> lbSavePrinter (2) then Warnlog "Automatically => changes not saved!"
368 if NoTransparency.IsChecked <> lbSavePrinter (3) then Warnlog "No transparency => changes not saved!"
369 ReduceTransparency.UnCheck
370 if Transparency.IsChecked <> lbSave(3) then Warnlog "Transparency => changes not saved!"
371 if lbSavePrinter (1) = TRUE then ReduceTransparency.Check else ReduceTransparency.UnCheck
373 if ReduceGradients.IsChecked <> lbSavePrinter (4) then Warnlog "Reduce Gradients => changes not saved!"
374 ReduceGradients.Check
375 if GradientStripes.IsChecked <> lbSavePrinter (5) then Warnlog "GradientStripes => changes not saved!"
376 if IntermediateColor.IsChecked <> lbSavePrinter (6) then Warnlog "Intermediate color => changes not saved!"
377 GradientStripes.Check
378 if Stripes.GetText <> lsSavePrinter (1) then Warnlog "Stripes => changes not saved!"
379 if lbSavePrinter (5) = TRUE then GradientStripes.Check else IntermediateColor.Check
380 if lbSavePrinter (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
382 if ReduceBitmaps.IsChecked <> lbSavePrinter (7) then Warnlog "Reduce Bitmaps => changes not saved!"
384 if GoodPrintQuality.IsChecked <> lbSavePrinter (8) then Warnlog "Good print quality => changes not saved!"
385 if NormalPrintQuality.IsChecked <> lbSavePrinter (9) then Warnlog "Normal print quality => changes not saved!"
386 if Resolution.IsChecked <> lbSavePrinter (10) then Warnlog "Resolution => changes not saved!"
387 if IncludeTransparentObjects.IsChecked <> lbSavePrinter (11) then Warnlog "Include transparent objects => changes not saved!"
389 if DPI.GetSelText <> lsSavePrinter (2) then Warnlog "DPI => changes not saved!"
390 if lbSavePrinter (8) = TRUE then GoodPrintQuality.Check
391 if lbSavePrinter (9) = TRUE then NormalPrintQuality.Check
392 if lbSavePrinter (10) = TRUE then Resolution.Check
393 if lbSavePrinter (7) = TRUE then ReduceBitmaps.Check else ReduceBitmaps.Uncheck
395 if ConvertColorsToGrayscale.IsChecked <> lbSavePrinter (12) then Warnlog "Convert colors to grayscale => changes not saved!"
397 printlog " - 'print to file'"
400 if ReduceTransparency.IsChecked <> lbSaveFile (1) then Warnlog "Reduce transparency => changes not saved!"
401 ReduceTransparency.Check
402 if Automatically.IsChecked <> lbSaveFile (2) then Warnlog "Automatically => changes not saved!"
403 if NoTransparency.IsChecked <> lbSaveFile (3) then Warnlog "No transparency => changes not saved!"
404 if lbSaveFile (1) = TRUE then ReduceTransparency.Check else ReduceTransparency.UnCheck
406 if ReduceGradients.IsChecked <> lbSaveFile (4) then Warnlog "Reduce Gradients => changes not saved!"
407 ReduceGradients.Check
408 if GradientStripes.IsChecked <> lbSaveFile (5) then Warnlog "GradientStripes => changes not saved!"
409 if IntermediateColor.IsChecked <> lbSaveFile (6) then Warnlog "Intermediate color => changes not saved!"
410 GradientStripes.Check
411 if Stripes.GetText <> lsSaveFile (1) then Warnlog "Stripes => changes not saved!"
412 if lbSaveFile (5) = TRUE then GradientStripes.Check else IntermediateColor.Check
413 if lbSaveFile (4) = TRUE then ReduceGradients.Check else ReduceGradients.UnCheck
415 if ReduceBitmaps.IsChecked <> lbSaveFile (7) then Warnlog "Reduce Bitmaps => changes not saved!"
417 if GoodPrintQuality.IsChecked <> lbSaveFile (8) then Warnlog "Good print quality => changes not saved!"
418 if NormalPrintQuality.IsChecked <> lbSaveFile (9) then Warnlog "Normal print quality => changes not saved!"
419 if Resolution.IsChecked <> lbSaveFile (10) then Warnlog "Resolution => changes not saved!"
420 if IncludeTransparentObjects.IsChecked <> lbSaveFile (11) then Warnlog "Include transparent objects => changes not saved!"
422 if DPI.GetSelText <> lsSavePrinter (2) then Warnlog "DPI => changes not saved!"
423 if lbSaveFile (8) = TRUE then GoodPrintQuality.Check
424 if lbSaveFile (9) = TRUE then NormalPrintQuality.Check
425 if lbSaveFile (10) = TRUE then Resolution.Check
426 if lbSaveFile (7) = TRUE then ReduceBitmaps.Check else ReduceBitmaps.Uncheck
428 if ConvertColorsToGrayscale.IsChecked <> lbSaveFile (12) then Warnlog "Convert colors to grayscale => changes not saved!"
430 printlog " - general settings"
431 if PaperOrientation.Ischecked <> lbSave(1) then Warnlog "Paper orientation => changes not saved!"
432 if PaperSize.IsChecked <> lbSave(2) then Warnlog "Paper size. => changes not saved!"
434 Kontext "ExtrasOptionenDlg"