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: t_toolbar_writer.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-13 10:27:09 $
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 : helge.delfs@sun.com
36 '* short description : Toolbar tools - Writer
38 '***************************************************************************************
43 '\*************************************************************************************
45 '*******************************************************
46 '* This function will get the location for image button
47 '* in Commands in Tools/Customize/Toolbars from Writer
48 '*******************************************************
49 function fGetObjectWriter(sToolbar as String , sObject as String) as Integer
54 case "Extrusion On/Off" : fGetObjectWriter = 1
56 case "Tilt Down" : fGetObjectWriter = 3
57 case "Tilt Up" : fGetObjectWriter = 4
58 case "Tilt Left" : fGetObjectWriter = 5
59 case "Tilt Right" : fGetObjectWriter = 6
61 case "Depth" : fGetObjectWriter = 8
62 case "Direction" : fGetObjectWriter = 9
63 case "Lighting" : fGetObjectWriter = 10
64 case "Surfact" : fGetObjectWriter = 11
65 case "3D Color" : fGetObjectWriter = 12
66 case else : QAErrorLog "The test does not support Object : " + sObject
72 case "Left" : fGetObjectWriter = 1
73 case "Centered" : fGetObjectWriter = 2
74 case "Right" : fGetObjectWriter = 3
75 case "Top" : fGetObjectWriter = 4
76 case "Center" : fGetObjectWriter = 5
77 case "Bottom" : fGetObjectWriter = 6
78 case else : QAErrorLog "The test does not support Object : " + sObject
84 case "Rectangle" : fGetObjectWriter = 1
85 case "Rectangle,Rounded" : fGetObjectWriter = 2
86 case "Square" : fGetObjectWriter = 3
87 case "Square,Rounded" : fGetObjectWriter = 4
88 case "Circle" : fGetObjectWriter = 5
89 case "Ellipse" : fGetObjectWriter = 6
91 case "Circle Pie" : fGetObjectWriter = 8
92 case "Isosceles Triangle" : fGetObjectWriter = 9
93 case "Right Triangle" : fGetObjectWriter = 10
94 case "Trapezoid" : fGetObjectWriter = 11
95 case "Diamond" : fGetObjectWriter = 12
96 case "Parallelogram" : fGetObjectWriter = 13
98 case "Regular Pentagon" : fGetObjectWriter = 15
99 case "Hexagon" : fGetObjectWriter = 16
100 case "Octagon" : fGetObjectWriter = 17
101 case "Cross" : fGetObjectWriter = 18
102 case "Ring" : fGetObjectWriter = 19
103 case "Block Arc" : fGetObjectWriter = 20
104 '----------------- 21
105 case "Cylinder" : fGetObjectWriter = 22
106 case "Cube" : fGetObjectWriter = 23
107 case "Rolded Corner" : fGetObjectWriter = 24
108 case "Rrame" : fGetObjectWriter = 25
109 case else : QAErrorLog "The test does not support Object : " + sObject
117 case "Bullets and Numbering"
123 case "Rectanguar Callout" : fGetObjectWriter = 1
124 case "Rounded Rectanguar Callout" : fGetObjectWriter = 2
125 case "Round Callout" : fGetObjectWriter = 3
126 case "Cloud" : fGetObjectWriter = 4
127 case "Line Callout 1" : fGetObjectWriter = 5
128 case "Line Callout 2" : fGetObjectWriter = 6
129 case "Line Callout 3" : fGetObjectWriter = 7
130 case else : QAErrorLog "The test does not support Object : " + sObject
136 case "Red" : fGetObjectWriter = 1
138 case "Green" : fGetObjectWriter = 3
140 case "Blue" : fGetObjectWriter = 5
142 case "Brightness" : fGetObjectWriter = 7
144 case "Contrast" : fGetObjectWriter = 9
145 '----------------- 10
146 case "Gamma" : fGetObjectWriter = 11
147 case else : QAErrorLog "The test does not support Object : " + sObject
155 case "Database Controls"
159 case "Database Form Design"
161 case "Change Anchor" : fGetObjectWriter = 12
162 case "Bring To Front" : fGetObjectWriter = 13
163 case "Send To Back" : fGetObjectWriter = 14
164 case "Group" : fGetObjectWriter = 15
165 case "UnGroup" : fGetObjectWriter = 18
166 case "Enter Group" : fGetObjectWriter = 19
167 case "Exit Group" : fGetObjectWriter = 20
168 case else : QAErrorLog "The test does not support Object : " + sObject
174 case "Select" : fGetObjectWriter = 1
176 case "Line" : fGetObjectWriter = 3
177 case "Rectangle" : fGetObjectWriter = 4
178 case "Ellipse" : fGetObjectWriter = 5
179 case "Polygon" : fGetObjectWriter = 6
180 case "Curve" : fGetObjectWriter = 7
181 case "Freeform Line" : fGetObjectWriter = 8
182 case "Arc" : fGetObjectWriter = 9
183 case "Ellipse Pie" : fGetObjectWriter = 10
184 case "Circle Segment" : fGetObjectWriter = 11
185 case "Text" : fGetObjectWriter = 12
186 case "Vertical Text" : fGetObjectWriter = 13
187 case "Text Animation" : fGetObjectWriter = 14
188 case "Callouts" : fGetObjectWriter = 13
189 case "Vertical Callouts" : fGetObjectWriter = 14
190 '----------------- 15
191 case "Basic Shapes" : fGetObjectWriter = 16
192 case "Symbol Shapes" : fGetObjectWriter = 17
193 case "Block Arrows" : fGetObjectWriter = 18
194 case "Flowcharts" : fGetObjectWriter = 19
195 case "Callouts2" : fGetObjectWriter = 20
196 case "Stars" : fGetObjectWriter = 21
197 '----------------- 22
198 case "Points" : fGetObjectWriter = 23
199 '----------------- 24
200 case "Fontwork Gallery" : fGetObjectWriter = 25
201 case "Insert Graphics" : fGetObjectWriter = 26
202 '----------------- 27
203 case "Extrusion On/Off" : fGetObjectWriter = 28
204 case else : QAErrorLog "The test does not support Object : " + sObject
208 case "Drawing Object Properties"
210 case "Line" : fGetObjectWriter = 1
211 case "Arrow Style" : fGetObjectWriter = 2
213 case "Line Style" : fGetObjectWriter = 4
215 case "Line Width" : fGetObjectWriter = 6
217 case "Line Color" : fGetObjectWriter = 8
219 case "Area" : fGetObjectWriter = 10
220 '----------------- 11
221 case "Area Style/Filling" : fGetObjectWriter = 12
222 '----------------- 13
223 case "Object rotation mode" : fGetObjectWriter = 14
224 case "Display Grid" : fGetObjectWriter = 15
225 case "Snap to Grid" : fGetObjectWriter = 16
226 case "Guides When Moving" : fGetObjectWriter = 17
227 '----------------- 18
228 case "Wrap Off" : fGetObjectWriter = 19
229 case "Page Wrap" : fGetObjectWriter = 20
230 case "Optimal Page Wrap" : fGetObjectWriter = 21
231 case "Wrap Left" : fGetObjectWriter = 22
232 case "Wrap Right" : fGetObjectWriter = 23
233 case "Wrap Through" : fGetObjectWriter = 24
234 case "Contour" : fGetObjectWriter = 25
235 '----------------- 26
236 case "To Foreground" : fGetObjectWriter = 27
237 case "To Background" : fGetObjectWriter = 28
238 case "Bring to Front" : fGetObjectWriter = 29
239 case "Send to Back" : fGetObjectWriter = 30
240 case "Alignment" : fGetObjectWriter = 31
241 '----------------- 32
242 case "Change Anchor" : fGetObjectWriter = 33
243 '----------------- 34
244 case "Ungroup" : fGetObjectWriter = 35
245 case "Group" : fGetObjectWriter = 36
246 case else : QAErrorLog "The test does not support Object : " + sObject
260 case "Fontwork Gallery" : fGetObjectWriter = 1
262 case "Fontwork Shape" : fGetObjectWriter = 3
263 case "Fontwork Same Letter Heights" : fGetObjectWriter = 4
265 case "Fontwork Alignment" : fGetObjectWriter = 6
266 case "Fontwork Character Spacing" : fGetObjectWriter = 7
267 case else : QAErrorLog "The test does not support Object : " + sObject
271 case "Fontwork Shape"
277 case "Bring to Front" : fGetObjectWriter = 14
278 case "Send to Back" : fGetObjectWriter = 15
279 case "Group" : fGetObjectWriter = 17
280 case "UnGroup" : fGetObjectWriter = 18
281 case "Enter Group" : fGetObjectWriter = 19
282 case "Exit Group" : fGetObjectWriter = 20
283 case else : QAErrorLog "The test does not support Object : " + sObject
289 case "Apply Form-Based Filter" : fGetObjectWriter = 1
290 case "Filter Navigation" : fGetObjectWriter = 2
292 case "Close" : fGetObjectWriter = 4
293 case else : QAErrorLog "The test does not support Object : " + sObject
297 case "Form Navigation"
307 case "Sytles and Formatting" : fGetObjectWriter = 1
309 case "Apply Style" : fGetObjectWriter = 3
311 case "Font Name" : fGetObjectWriter = 5
313 case "Font Size" : fGetObjectWriter = 7
315 case "Bold" : fGetObjectWriter = 9
316 case "Italic" : fGetObjectWriter = 10
317 case "Underline" : fGetObjectWriter = 11
318 case "Superscript" : fGetObjectWriter = 12
319 case "Subscript" : fGetObjectWriter = 13
320 '----------------- 14
321 case "Align Left" : fGetObjectWriter = 15
322 case "Centered" : fGetObjectWriter = 16
323 case "Align Right" : fGetObjectWriter = 17
324 case "Justfied" : fGetObjectWriter = 18
325 '----------------- 19
326 case "Left-To-Right" : fGetObjectWriter = 20
327 case "Right-To-Left" : fGetObjectWriter = 21
328 '----------------- 22
329 case "Line Spacing 1" : fGetObjectWriter = 23
330 case "Line Spacing 1.5" : fGetObjectWriter = 24
331 case "Line Spacing 2" : fGetObjectWriter = 25
332 '----------------- 26
333 case "Numbering Of/Off" : fGetObjectWriter = 27
334 case "Bullets Of/Off" : fGetObjectWriter = 28
335 case "Decrease Indent" : fGetObjectWriter = 29
336 case "Increase Indent" : fGetObjectWriter = 30
337 case "Increase Font" : fGetObjectWriter = 31
338 case "Reduce Font" : fGetObjectWriter = 32
339 '----------------- 33
340 case "Font Color" : fGetObjectWriter = 34
341 case "Highlighting" : fGetObjectWriter = 35
342 case "Background Color" : fGetObjectWriter = 36
343 '----------------- 37
344 case "Select All" : fGetObjectWriter = 38
345 case "Character" : fGetObjectWriter = 39
346 case "Paragraph" : fGetObjectWriter = 40
347 case else : QAErrorLog "The test does not support Object : " + sObject
353 case "Optimal Page Wrap" : fGetObjectWriter = 5
354 case "Wrap Left" : fGetObjectWriter = 6
355 case "Wrap Right" : fGetObjectWriter = 7
356 case "Wrap Through" : fGetObjectWriter = 8
357 case else : QAErrorLog "The test does not support Object : " + sObject
365 case "Graphic Filter"
371 case "Chart" : fGetObjectWriter = 18
372 case "Insert Object" : fGetObjectWriter = 19
373 case "Controls" : fGetObjectWriter = 20
374 case else : QAErrorLog "The test does not support Object : " + sObject
382 case "Media Playback"
390 case "More Database Controls"
394 case "More XML Form Controls"
400 case "Wrap Left" : fGetObjectWriter = 11
401 case "Wrap Right" : fGetObjectWriter = 12
402 case "Optimal Page Wrap" : fGetObjectWriter = 16
403 case else : QAErrorLog "The test does not support Object : " + sObject
421 case "Load URL" : fGetObjectWriter = 1
422 case "New" : fGetObjectWriter = 2
423 case "New Document From Template" : fGetObjectWriter = 3
424 case "Open" : fGetObjectWriter = 4
425 case "Save" : fGetObjectWriter = 5
426 case "Save As" : fGetObjectWriter = 6
427 case "Document as E-mail" : fGetObjectWriter = 7
429 case "Edit File" : fGetObjectWriter = 9
430 '----------------- 10
431 case "Export Directly as PDF" : fGetObjectWriter = 11
432 case "Print File Directly" : fGetObjectWriter = 12
433 case "Page Rreview" : fGetObjectWriter = 13
434 '----------------- 14
435 case "Spellcheck" : fGetObjectWriter = 15
436 case "AutoSpellcheck" : fGetObjectWriter = 16
437 '----------------- 17
438 case "Cut" : fGetObjectWriter = 18
439 case "Copy" : fGetObjectWriter = 19
440 case "Paste" : fGetObjectWriter = 20
441 case "Format Paintbrush" : fGetObjectWriter = 21
442 '----------------- 22
443 case "Can't Undo" : fGetObjectWriter = 23
444 case "Can't Restore" : fGetObjectWriter = 24
445 '----------------- 25
446 case "Hyperlink" : fGetObjectWriter = 26
447 case "Table" : fGetObjectWriter = 27
448 case "Show Draw Functions" : fGetObjectWriter = 28
449 '----------------- 29
450 case "Find & Replace" : fGetObjectWriter = 30
451 case "Navigator" : fGetObjectWriter = 31
452 case "Gallery" : fGetObjectWriter = 32
453 case "Data Sources" : fGetObjectWriter = 33
454 case "Nonprinting Characters" : fGetObjectWriter = 34
455 case "Zoom" : fGetObjectWriter = 35
456 '----------------- 36
457 case "StarOffice Help" : fGetObjectWriter = 37
458 case "What's This?" : fGetObjectWriter = 38
459 case else : QAErrorLog "The test does not support Object : " + sObject
463 case "Standard(Viewing MOde)"
467 case "Stars and Banners"
477 case "Table" : fGetObjectWriter = 22
478 case "Columns" : fGetObjectWriter = 23
479 case "Rows" : fGetObjectWriter = 24
484 case "Line Spacing 1" : fGetObjectWriter = 16
485 case "Line Spacing 1.5" : fGetObjectWriter = 17
486 case "Line Spacing 2" : fGetObjectWriter = 18
487 case "Font Color" : fGetObjectWriter = 20
488 case "Left-To-Right" : fGetObjectWriter = 22
489 case "Right-To-Left" : fGetObjectWriter = 23
492 case "XML Form Design"
494 case "Bring to Front" : fGetObjectWriter = 14
495 case "Send to Back" : fGetObjectWriter = 15
496 case "Group" : fGetObjectWriter = 17
497 case "UnGroup" : fGetObjectWriter = 18
498 case "Enter Group" : fGetObjectWriter = 19
499 case "Exit Group" : fGetObjectWriter = 20
507 '*******************************************************
508 '* This function will get the location for image button
509 '* in Commands in Tools/Customize/Toolbars from Calc
510 '*******************************************************
511 function fGetObjectCalc(sToolbar as String , sObject as String) as Integer
516 case "Extrusion On/Off" : fGetObjectCalc = 1
518 case "Tilt Down" : fGetObjectCalc = 3
519 case "Tilt Up" : fGetObjectCalc = 4
520 case "Tilt Left" : fGetObjectCalc = 5
521 case "Tilt Right" : fGetObjectCalc = 6
523 case "Depth" : fGetObjectCalc = 8
524 case "Direction" : fGetObjectCalc = 9
525 case "Lighting" : fGetObjectCalc = 10
526 case "Surfact" : fGetObjectCalc = 11
527 case "3D Color" : fGetObjectCalc = 12
528 case else : QAErrorLog "The test does not support Object : " + sObject
534 case "Left" : fGetObjectCalc = 1
535 case "Centered" : fGetObjectCalc = 2
536 case "Right" : fGetObjectCalc = 3
537 case "Top" : fGetObjectCalc = 4
538 case "Center" : fGetObjectCalc = 5
539 case "Bottom" : fGetObjectCalc = 6
540 case else : QAErrorLog "The test does not support Object : " + sObject
566 case "Select" : fGetObjectCalc = 1
568 case "Line" : fGetObjectCalc = 3
569 case "Rectangle" : fGetObjectCalc = 4
570 case "Ellipse" : fGetObjectCalc = 5
571 case "Polygon" : fGetObjectCalc = 6
572 case "Curve" : fGetObjectCalc = 7
573 case "Freeform Line" : fGetObjectCalc = 8
574 case "Arc" : fGetObjectCalc = 9
575 case "Ellipse Pie" : fGetObjectCalc = 10
576 case "Circle Segment" : fGetObjectCalc = 11
577 case "Text" : fGetObjectCalc = 12
578 case "Vertical Text" : fGetObjectCalc = 13
579 case "Text Animation" : fGetObjectCalc = 14
580 case "Callouts" : fGetObjectCalc = 15
581 case "Vertical Callouts" : fGetObjectCalc = 16
582 '----------------- 17
583 case else : QAErrorLog "The test does not support Object : " + sObject
587 case "Drawing Object Properties"
589 case "Display Grid" : fGetObjectCalc = 21
590 case "Snap to Grid" : fGetObjectCalc = 22
591 case "Guides When Moving" : fGetObjectCalc = 23
592 case else : QAErrorLog "The test does not support Object : " + sObject
604 case "Fontwork Shape"
610 case "Bring to Front" : fGetObjectCalc = 14
611 case "Send to Back" : fGetObjectCalc = 15
612 case "Group" : fGetObjectCalc = 17
613 case "UnGroup" : fGetObjectCalc = 18
614 case "Enter Group" : fGetObjectCalc = 19
615 case "Exit Group" : fGetObjectCalc = 20
616 case else : QAErrorLog "The test does not support Object : " + sObject
624 case "Form Navigation"
634 case "Styles and Formatting" : fGetObjectCalc = 1
635 case "Apply Style" : fGetObjectCalc = 2
636 '---------------------- 3
637 case "Font Name" : fGetObjectCalc = 4
638 '---------------------- 5
639 case "Font Size" : fGetObjectCalc = 6
640 '---------------------- 7
641 case "Bold" : fGetObjectCalc = 8
642 case "Italic" : fGetObjectCalc = 9
643 case "Underline" : fGetObjectCalc = 10
644 case "Underline:Double" : fGetObjectCalc = 11
645 '---------------------- 12
646 case "Align Left" : fGetObjectCalc = 13
647 case "Align Center Horizontally" : fGetObjectCalc = 14
648 case "Align Right" : fGetObjectCalc = 15
649 case "Justified" : fGetObjectCalc = 16
650 case "Merge Cells" : fGetObjectCalc = 17
651 '---------------------- 18
652 case "Left-To-Right" : fGetObjectCalc = 19
653 case "Right-To-Left" : fGetObjectCalc = 20
654 '---------------------- 21
655 case else : QAErrorLog "The test does not support Object : " + sObject
661 case "Full Screen" : fGetObjectCalc = 1
664 case "Graphic Filter"
670 case "Chart" : fGetObjectCalc = 18
671 case "Insert Object" : fGetObjectCalc = 19
672 case "Controls" : fGetObjectCalc = 20
673 case else : QAErrorLog "The test does not support Object : " + sObject
685 case "Media Playback"
699 case "Load URL" : fGetObjectCalc = 1
700 case "New" : fGetObjectCalc = 2
701 case "New Document From Template" : fGetObjectCalc = 3
702 case "Open" : fGetObjectCalc = 4
703 case "Save" : fGetObjectCalc = 5
704 case "Save As" : fGetObjectCalc = 6
705 case "Document as E-mail" : fGetObjectCalc = 7
707 case "Edit File" : fGetObjectCalc = 9
708 '----------------- 10
709 case "Export Directly as PDF" : fGetObjectCalc = 11
710 case "Print File Directly" : fGetObjectCalc = 12
711 case "Page Rreview" : fGetObjectCalc = 13
712 '----------------- 14
713 case "Spellcheck" : fGetObjectCalc = 15
714 case "AutoSpellcheck" : fGetObjectCalc = 16
715 '----------------- 17
716 case "Cut" : fGetObjectCalc = 18
717 case "Copy" : fGetObjectCalc = 19
718 case "Paste" : fGetObjectCalc = 20
719 case "Format Paintbrush" : fGetObjectCalc = 21
720 '----------------- 22
721 case "Can't Undo" : fGetObjectCalc = 23
722 case "Can't Restore" : fGetObjectCalc = 24
723 '----------------- 25
724 case "Hyperlink" : fGetObjectCalc = 26
725 case "Sort Ascending" : fGetObjectCalc = 27
726 case "Sort Descending" : fGetObjectCalc = 28
727 '----------------- 29
728 case "Insert Chart" : fGetObjectCalc = 30
729 case "Show Draw Functions" : fGetObjectCalc = 31
730 '----------------- 32
731 case "Find & Replace" : fGetObjectCalc = 33
732 case "Navigator" : fGetObjectCalc = 34
733 case "Gallery" : fGetObjectCalc = 35
734 case "Data Sources" : fGetObjectCalc = 36
735 case "Zoom" : fGetObjectCalc = 37
736 '----------------- 38
737 case "StarOffice Help" : fGetObjectCalc = 39
738 case "What's This?" : fGetObjectCalc = 40
739 case else : QAErrorLog "The test does not support Object : " + sObject
743 case "Standard(Viewing Mode)"
747 case "Stars and Banners"
755 case "Text Formatting"