1 /*************************************************************************
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: globlac.hrc,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _GLOBALACC_SRC
32 #define _GLOBALACC_SRC
34 #define ACC_CODE( Id, c, bSh, bM1, bM2 ) \
35 AcceleratorItem { Identifier = Id; \
36 Key = KeyCode { Code = c ; \
37 Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; }; };
39 #define ACC_FUNC( Id, f ) \
40 AcceleratorItem { Identifier = Id; \
41 Key = KeyCode { Function = f ; }; };
43 #define ACC_KEY( language, c, bSh, bM1, bM2 ) \
44 Key[ language ] = KeyCode { Code = c ; \
45 Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; };
47 #define ACC_DEF_KEY( c, bSh, bM1, bM2 ) \
48 Key = KeyCode { Code = c ; \
49 Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; };
52 #define AI_HELPINDEX ACC_CODE( SID_HELPINDEX, KEY_F1, FALSE, TRUE, FALSE )
54 #define AI_ATTR_CHAR ACC_CODE( SID_ATTR_CHAR, KEY_F2, FALSE, FALSE, FALSE )
55 // new shortcut F9 for starting slide-show (see #73417#)
56 #define AI_PRESENTATION ACC_CODE( SID_PRESENTATION, KEY_F9, FALSE, FALSE, FALSE )
57 // formerly used shortcut Ctrl-F2. Still used (in sd) for compatibility
58 #define AI_PRESENTATION_COMPAT ACC_CODE( SID_PRESENTATION, KEY_F2, FALSE, TRUE, FALSE )
59 #define AI_ENTER_GROUP ACC_CODE( SID_ENTER_GROUP, KEY_F3, FALSE, FALSE, FALSE )
60 #define AI_COPYOBJECTS ACC_CODE( SID_COPYOBJECTS, KEY_F3, TRUE, FALSE, FALSE )
61 #define AI_LEAVE_GROUP ACC_CODE( SID_LEAVE_GROUP, KEY_F3, FALSE, TRUE, FALSE )
62 #define AI_ATTR_TRANSFORM ACC_CODE( SID_ATTR_TRANSFORM, KEY_F4, FALSE, FALSE, FALSE )
63 #define AI_NAVIGATOR ACC_CODE( SID_NAVIGATOR, KEY_F5, FALSE, FALSE, FALSE )
64 #define AI_SPELLING ACC_CODE( SID_SPELL_DIALOG, KEY_F7, FALSE, FALSE, FALSE )
65 #define AI_THESAURUS ACC_CODE( SID_THESAURUS, KEY_F7, FALSE, TRUE, FALSE )
66 #define AI_BEZIER_EDIT ACC_CODE( SID_BEZIER_EDIT, KEY_F8, FALSE, FALSE, FALSE )
67 #define AI_ATTR_TEXT_FITTOSIZE ACC_CODE( SID_ATTR_TEXT_FITTOSIZE, KEY_F8, TRUE, TRUE, FALSE )
68 #define AI_STYLE_DESIGNER ACC_CODE( SID_STYLE_DESIGNER, KEY_F11, FALSE, FALSE, FALSE )
69 #define AI_OUTLINEMODE ACC_CODE( SID_OUTLINEMODE, KEY_F12, FALSE, FALSE, FALSE )
70 #define AI_DRAWINGMODE ACC_CODE( SID_DRAWINGMODE, KEY_F12, FALSE, TRUE, FALSE )
72 #define AI_ATTR_PARA_LINESPACE_10 ACC_CODE( SID_ATTR_PARA_LINESPACE_10, KEY_1, FALSE, TRUE, FALSE )
73 #define AI_ATTR_PARA_LINESPACE_20 ACC_CODE( SID_ATTR_PARA_LINESPACE_20, KEY_2, FALSE, TRUE, FALSE )
74 #define AI_ATTR_PARA_LINESPACE_15 ACC_CODE( SID_ATTR_PARA_LINESPACE_15, KEY_5, FALSE, TRUE, FALSE )
75 #define AI_SHOW_ITEMBROWSER ACC_CODE( SID_SHOW_ITEMBROWSER, KEY_9, TRUE, TRUE, TRUE )
77 #define AI_ATTR_PARA_ADJUST_BLOCK AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_BLOCK;\
78 ACC_DEF_KEY( KEY_J, FALSE, TRUE, FALSE ) \
79 ACC_KEY( de , KEY_B, FALSE, TRUE, FALSE ) \
80 ACC_KEY( en-US , KEY_J, FALSE, TRUE, FALSE ) \
81 ACC_KEY( it , KEY_F, FALSE, TRUE, FALSE ) \
82 ACC_KEY( es , KEY_J, FALSE, TRUE, FALSE ) \
83 ACC_KEY( fr , KEY_J, FALSE, TRUE, FALSE ) \
84 ACC_KEY( nl , KEY_J, FALSE, TRUE, FALSE ) \
85 ACC_KEY( pl , KEY_J, FALSE, TRUE, FALSE ) \
86 ACC_KEY( ru , KEY_J, FALSE, TRUE, FALSE ) };
88 #define AI_ATTR_PARA_ADJUST_CENTER AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_CENTER;\
89 ACC_DEF_KEY( KEY_E, FALSE, TRUE, FALSE ) \
90 ACC_KEY( de , KEY_E, FALSE, TRUE, FALSE ) \
91 ACC_KEY( en-US , KEY_E, FALSE, TRUE, FALSE ) \
92 ACC_KEY( it , KEY_E, FALSE, TRUE, FALSE ) \
93 ACC_KEY( es , KEY_E, FALSE, TRUE, FALSE ) \
94 ACC_KEY( fr , KEY_C, TRUE, TRUE, FALSE ) \
95 ACC_KEY( nl , KEY_J, FALSE, TRUE, FALSE ) };
97 #define AI_ATTR_CHAR_WEIGHT AcceleratorItem { Identifier = SID_ATTR_CHAR_WEIGHT;\
98 ACC_DEF_KEY( KEY_B, FALSE, TRUE, FALSE ) \
99 ACC_KEY( de , KEY_F, FALSE, TRUE, FALSE ) \
100 ACC_KEY( en-US , KEY_B, FALSE, TRUE, FALSE ) \
101 ACC_KEY( it , KEY_G, FALSE, TRUE, FALSE ) \
102 ACC_KEY( es , KEY_N, FALSE, TRUE, FALSE ) \
103 ACC_KEY( fr , KEY_G, FALSE, TRUE, FALSE ) \
104 ACC_KEY( nl , KEY_B, FALSE, TRUE, FALSE ) \
105 ACC_KEY( da , KEY_F, FALSE, TRUE, FALSE ) \
106 ACC_KEY( pl , KEY_B, FALSE, TRUE, FALSE ) \
107 ACC_KEY( ru, KEY_B, FALSE, TRUE, FALSE ) };
109 #define AI_SEARCH_DLG AcceleratorItem { Identifier = SID_SEARCH_DLG;\
110 ACC_DEF_KEY( KEY_F, FALSE, TRUE, FALSE ) \
111 ACC_KEY( de , KEY_G, FALSE, TRUE, FALSE ) \
112 ACC_KEY( en-US , KEY_F, FALSE, TRUE, FALSE ) \
113 ACC_KEY( it , KEY_B, FALSE, TRUE, FALSE ) \
114 ACC_KEY( es , KEY_G, FALSE, TRUE, FALSE ) \
115 ACC_KEY( fr , KEY_F, FALSE, TRUE, FALSE ) \
116 ACC_KEY( nl , KEY_F, FALSE, TRUE, FALSE ) };
118 #define AI_GROUP ACC_CODE( SID_GROUP, KEY_G, TRUE, TRUE, FALSE )
119 #define AI_UNGROUP ACC_CODE( SID_UNGROUP, KEY_G, TRUE, TRUE, TRUE )
122 #define AI_SET_SUPER_SCRIPT AcceleratorItem { Identifier = SID_SET_SUPER_SCRIPT;\
123 ACC_DEF_KEY( KEY_P, TRUE, TRUE, FALSE ) \
124 ACC_KEY( de , KEY_H, FALSE, TRUE, FALSE ) \
125 ACC_KEY( en-US , KEY_P, TRUE, TRUE, FALSE ) \
126 ACC_KEY( it , KEY_H, FALSE, TRUE, FALSE ) \
127 ACC_KEY( es , KEY_H, FALSE, TRUE, FALSE ) \
128 ACC_KEY( fr , KEY_H, FALSE, TRUE, FALSE ) \
129 ACC_KEY( nl , KEY_H, FALSE, TRUE, FALSE ) };
131 #define AI_ATTR_CHAR_POSTURE AcceleratorItem { Identifier = SID_ATTR_CHAR_POSTURE;\
132 ACC_DEF_KEY( KEY_I, FALSE, TRUE, FALSE ) \
133 ACC_KEY( de , KEY_K, FALSE, TRUE, FALSE ) \
134 ACC_KEY( en-US , KEY_I, FALSE, TRUE, FALSE ) \
135 ACC_KEY( it , KEY_I, FALSE, TRUE, FALSE ) \
136 ACC_KEY( es , KEY_K, FALSE, TRUE, FALSE ) \
137 ACC_KEY( fr , KEY_I, FALSE, TRUE, FALSE ) \
138 ACC_KEY( nl , KEY_I, FALSE, TRUE, FALSE ) \
139 ACC_KEY( da , KEY_K, FALSE, TRUE, FALSE ) \
140 ACC_KEY( pl , KEY_I, FALSE, TRUE, FALSE ) \
141 ACC_KEY( ru , KEY_I, FALSE, TRUE, FALSE ) };
143 #define AI_COMBINE ACC_CODE( SID_COMBINE, KEY_K, TRUE, TRUE, FALSE )
144 #define AI_DISMANTLE ACC_CODE( SID_DISMANTLE, KEY_K, TRUE, TRUE, TRUE )
145 #define AI_ATTR_PARA_ADJUST_LEFT AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_LEFT;\
146 ACC_DEF_KEY( KEY_L, FALSE, TRUE, FALSE ) \
147 ACC_KEY( de , KEY_L, FALSE, TRUE, FALSE ) \
148 ACC_KEY( en-US , KEY_L, FALSE, TRUE, FALSE ) \
149 ACC_KEY( it , KEY_T, FALSE, TRUE, FALSE ) \
150 ACC_KEY( es , KEY_I, FALSE, TRUE, FALSE ) \
151 ACC_KEY( fr , KEY_G, TRUE, TRUE, FALSE ) \
152 ACC_KEY( nl , KEY_L, FALSE, TRUE, FALSE ) };
154 #define AI_ATTR_PARA_ADJUST_RIGHT AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_RIGHT;\
155 ACC_DEF_KEY( KEY_R, FALSE, TRUE, FALSE ) \
156 ACC_KEY( de , KEY_R, FALSE, TRUE, FALSE ) \
157 ACC_KEY( en-US , KEY_R, FALSE, TRUE, FALSE ) \
158 ACC_KEY( it , KEY_R, FALSE, TRUE, FALSE ) \
159 ACC_KEY( es , KEY_D, FALSE, TRUE, FALSE ) \
160 ACC_KEY( fr , KEY_D, TRUE, TRUE, FALSE ) \
161 ACC_KEY( nl , KEY_R, FALSE, TRUE, FALSE ) };
163 #define AI_SET_SUB_SCRIPT AcceleratorItem { Identifier = SID_SET_SUB_SCRIPT;\
164 ACC_DEF_KEY( KEY_B, TRUE, TRUE, FALSE ) \
165 ACC_KEY( de , KEY_T, FALSE, TRUE, FALSE ) \
166 ACC_KEY( en-US , KEY_B, TRUE, TRUE, FALSE ) \
167 ACC_KEY( it , KEY_B, TRUE, TRUE, FALSE ) \
168 ACC_KEY( es , KEY_T, FALSE, TRUE, FALSE ) \
169 ACC_KEY( fr , KEY_T, FALSE, TRUE, FALSE ) \
170 ACC_KEY( nl , KEY_P, TRUE, TRUE, FALSE ) };
172 #define AI_ATTR_CHAR_UNDERLINE AcceleratorItem { Identifier = SID_ATTR_CHAR_UNDERLINE;\
173 ACC_DEF_KEY( KEY_U, FALSE, TRUE, FALSE ) \
174 ACC_KEY( de , KEY_U, FALSE, TRUE, FALSE ) \
175 ACC_KEY( en-US , KEY_U, FALSE, TRUE, FALSE ) \
176 ACC_KEY( it , KEY_U, FALSE, TRUE, FALSE ) \
177 ACC_KEY( es , KEY_U, FALSE, TRUE, FALSE ) \
178 ACC_KEY( fr , KEY_U, FALSE, TRUE, FALSE ) \
179 ACC_KEY( nl , KEY_U, FALSE, TRUE, FALSE ) \
180 ACC_KEY( da, KEY_U, FALSE, TRUE, FALSE ) \
181 ACC_KEY( pl, KEY_U, FALSE, TRUE, FALSE ) \
182 ACC_KEY( ru , KEY_U, FALSE, TRUE, FALSE ) };
184 #define AI_STYLE_CATALOG ACC_CODE( SID_STYLE_CATALOG, KEY_F11, FALSE, TRUE, FALSE )
185 #define AI_WIN_FULLSCREEN ACC_CODE( SID_WIN_FULLSCREEN, KEY_J, TRUE, TRUE, FALSE )
187 #define AI_FOCUSURLBOX ACC_CODE( SID_FOCUSURLBOX, KEY_O, TRUE, TRUE, FALSE )
188 #define AI_SELECTALL ACC_CODE( SID_SELECTALL, KEY_A, FALSE, TRUE, FALSE )
191 #define AI_FRAME_TO_TOP ACC_CODE( SID_FRAME_TO_TOP, KEY_ADD, TRUE, TRUE, FALSE )
192 #define AI_MOREFRONT ACC_CODE( SID_MOREFRONT, KEY_ADD, FALSE, TRUE, FALSE )
193 #define AI_FRAME_TO_BOTTOM ACC_CODE( SID_FRAME_TO_BOTTOM, KEY_SUBTRACT, TRUE, TRUE, FALSE )
194 #define AI_MOREBACK ACC_CODE( SID_MOREBACK, KEY_SUBTRACT, FALSE, TRUE, FALSE )
196 // sonstige Acceleratoren
197 #define AI_NEWDOC ACC_CODE( SID_NEWDOC, KEY_N, TRUE, TRUE, FALSE )
198 #define AI_NEWDOCDIRECT ACC_CODE( SID_NEWDOCDIRECT, KEY_N, FALSE, TRUE, FALSE )
199 #define AI_OPENDOC ACC_CODE( SID_OPENDOC, KEY_O, FALSE, TRUE, FALSE ) \
200 ACC_CODE( SID_OPENDOC, KEY_OPEN, FALSE, FALSE, FALSE )
201 #define AI_CLOSEWIN ACC_CODE( SID_CLOSEWIN, KEY_W, FALSE, TRUE, FALSE ) \
202 ACC_CODE( SID_CLOSEWIN, KEY_F4, FALSE, TRUE, FALSE )
203 #define AI_SAVEDOC ACC_CODE( SID_SAVEDOC, KEY_S, FALSE, TRUE, FALSE )
204 #define AI_PRINTDOC ACC_CODE( SID_PRINTDOC, KEY_P, FALSE, TRUE, FALSE )
205 #define AI_QUITAPP ACC_CODE( SID_QUITAPP, KEY_Q, FALSE, TRUE, FALSE )
206 #define AI_CUT ACC_CODE( SID_CUT, KEY_X, FALSE, TRUE, FALSE ) \
207 ACC_CODE( SID_CUT, KEY_DELETE, TRUE, FALSE, FALSE ) \
208 ACC_CODE( SID_CUT, KEY_CUT, FALSE, FALSE, FALSE )
209 #define AI_COPY ACC_CODE( SID_COPY, KEY_C, FALSE, TRUE, FALSE ) \
210 ACC_CODE( SID_COPY, KEY_INSERT, FALSE, TRUE, FALSE ) \
211 ACC_CODE( SID_COPY, KEY_COPY, FALSE, FALSE, FALSE )
212 #define AI_PASTE ACC_CODE( SID_PASTE, KEY_V, FALSE, TRUE, FALSE ) \
213 ACC_CODE( SID_PASTE, KEY_INSERT, TRUE, FALSE, FALSE ) \
214 ACC_CODE( SID_PASTE, KEY_PASTE, FALSE, FALSE, FALSE )
215 #define AI_UNDO ACC_CODE( SID_UNDO, KEY_Z, FALSE, TRUE, FALSE ) \
216 ACC_CODE( SID_UNDO, KEY_BACKSPACE, FALSE, FALSE, TRUE ) \
217 ACC_CODE( SID_UNDO, KEY_UNDO, FALSE, FALSE, FALSE )
218 #define AI_REDO ACC_CODE( SID_REDO, KEY_Y, FALSE, TRUE, FALSE )
219 #define AI_REPEAT ACC_CODE( SID_REPEAT, KEY_REPEAT, FALSE, FALSE, FALSE )
220 #define AI_DELETE ACC_CODE( SID_DELETE, KEY_DELETE, FALSE, FALSE, FALSE )
222 #endif // _GLOBLACC_SRC