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: AutoControls_tmpl.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 ************************************************************************/
32 #ifndef _DBAUI_AUTOCONTROLS_HRC_
33 #define _DBAUI_AUTOCONTROLS_HRC_
36 #ifndef _DBA_DBACCESS_HELPID_HRC_
37 #include "dbaccess_helpid.hrc"
41 #include "dbu_dlg.hrc"
44 #ifndef _DBA_DBACCESS_HELPID_HRC_
45 #include "dbaccess_helpid.hrc"
49 #define CHECKBOX_HEIGHT 8
50 #define FIXEDTEXT_HEIGHT 8
51 #define RELATED_CONTROLS 4
52 #define UNRELATED_CONTROLS 7
53 #define EDIT_HEIGHT 12
56 #define FT_AUTOJDBCDRIVERCLASS 80
57 #define FT_AUTOFIELDSEPARATOR 81
58 #define FT_AUTOTEXTSEPARATOR 82
59 #define FT_AUTODECIMALSEPARATOR 83
60 #define FT_AUTOTHOUSANDSSEPARATOR 84
61 #define FT_AUTOPORTNUMBER 85
62 #define FT_AUTOPORTNUMBERDEFAULT 86
63 #define FT_AUTOBASEDN 87
64 #define FT_AUTOHOSTNAME 88
65 #define FT_AUTOBROWSEURL 89
66 #define FT_AUTODATABASENAME 90
67 #define FT_AUTOWIZARDHELPTEXT 91
68 #define FT_AUTOWIZARDHEADER 92
69 #define FT_AUTOEXTENSIONHEADER 93
70 #define FT_AUTOOWNEXTENSIONAPPENDIX 94
74 #define FL_AUTOSEPARATOR2 80
75 #define FL_DATACONVERT 81
76 #define FL_SEPARATOR1 82
78 #define CB_AUTOHEADER 80
80 #define PB_AUTOTESTDRIVERCLASS 80
81 #define PB_AUTOBROWSEURL 81
83 #define CM_AUTOFIELDSEPARATOR 80
84 #define CM_AUTOTEXTSEPARATOR 81
85 #define CM_AUTODECIMALSEPARATOR 82
86 #define CM_AUTOTHOUSANDSSEPARATOR 83
88 #define NF_AUTOPORTNUMBER 80
90 #define ET_AUTOBASEDN 80
91 #define ET_AUTOHOSTNAME 81
92 #define ET_AUTODATABASENAME 82
93 #define ET_AUTOBROWSEURL 83
94 #define ET_AUTOJDBCDRIVERCLASS 84
95 #define ET_AUTOOWNEXTENSION 85
98 #define RB_AUTOACCESSCTEXTFILES 80
99 #define RB_AUTOACCESSCCSVFILES 81
100 #define RB_AUTOACCESSOTHERS 82
102 #define LB_CHARSET 80
104 #define STR_AUTOFIELDSEPARATORLIST 100
105 #define STR_AUTOTEXTSEPARATORLIST 101
106 #define STR_AUTOTEXT_FIELD_SEP_NONE 102
107 #define STR_AUTODELIMITER_MISSING 103
108 #define STR_AUTODELIMITER_MUST_DIFFER 104
109 #define STR_AUTONO_WILDCARDS 105
112 #define AUTO_WIZARDHELPTEXT( AUTO_LINECOUNT ) \
113 FixedText FT_AUTOWIZARDHEADER \
115 Pos = MAP_APPFONT ( START_X , 8 ) ; \
116 Size = MAP_APPFONT ( (WIZARD_PAGE_X - START_X) - 12 , 2 * FIXEDTEXT_HEIGHT ) ; \
117 Text[ en-US ] = ""; \
121 FixedText FT_AUTOWIZARDHELPTEXT \
123 Pos = MAP_APPFONT ( START_X , INIT_Y ) ; \
124 Size = MAP_APPFONT ( WIZARD_PAGE_X - START_X - 6 , AUTO_LINECOUNT * FIXEDTEXT_HEIGHT ) ; \
125 Text[ en-US ] = ""; \
129 // -------------------------------------------------------------------------------------------------
132 #define AUTO_BROWSECONTROLGROUP( AUTO_X, AUTO_Y, AUTOPAGE_X, AUTO_HID) \
133 FixedText FT_AUTOBROWSEURL { \
134 Pos = MAP_APPFONT ( AUTO_X , AUTO_Y ) ; \
135 Size = MAP_APPFONT ( AUTOPAGE_X - AUTO_X - 6 , FIXEDTEXT_HEIGHT ) ; \
136 Text[ en-US ] = ""; \
140 Edit ET_AUTOBROWSEURL \
142 Pos = MAP_APPFONT ( AUTO_X , AUTO_Y + FIXEDTEXT_HEIGHT + 3) ; \
143 Size = MAP_APPFONT ( AUTOPAGE_X - AUTO_X - 6 - 3 - BUTTON_WIDTH , EDIT_HEIGHT ) ; \
149 PushButton PB_AUTOBROWSEURL \
151 Pos = MAP_APPFONT ( AUTOPAGE_X - BUTTON_WIDTH - 6 , AUTO_Y + FIXEDTEXT_HEIGHT + 2 ) ; \
152 Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; \
153 HelpId = (AUTO_HID + 1); \
155 Text[ en-US ] = "Browse"; \
158 // --------------------------------------------------------------------------------------------------
161 #define AUTO_NAMECONTROLGROUP(AUTO_Y, AUTO_HID) \
162 FixedText FT_AUTODATABASENAME \
164 Pos = MAP_APPFONT ( START_X , AUTO_Y + 2) ; \
165 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
166 Text[ en-US ] = "Name of the database"; \
169 Edit ET_AUTODATABASENAME \
171 Pos = MAP_APPFONT ( EDIT_X, AUTO_Y) ; \
172 Size = MAP_APPFONT ( 97, EDIT_HEIGHT ) ; \
178 // --------------------------------------------------------------------------------------------------
181 #define AUTO_HOSTCONTROLGROUP(AUTO_Y, AUTO_HID) \
182 FixedText FT_AUTOHOSTNAME \
184 Pos = MAP_APPFONT (START_X , AUTO_Y + 2 ) ; \
185 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ); \
186 Text [ en-US ] = "Server ~URL" ; \
189 Edit ET_AUTOHOSTNAME \
191 Pos = MAP_APPFONT (EDIT_X, AUTO_Y ) ; \
192 Size = MAP_APPFONT ( 60, EDIT_HEIGHT ) ; \
198 // --------------------------------------------------------------------------------------------------
201 #define AUTO_BASEDNCONTROLGROUP(AUTO_Y, AUTO_HID) \
202 FixedText FT_AUTOBASEDN \
204 Pos = MAP_APPFONT (START_X , AUTO_Y + 2 ) ; \
205 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
206 Text [ en-US ] = "Base ~DN" ; \
211 HelpId = AUTO_HID ; \
212 Pos = MAP_APPFONT (EDIT_X, AUTO_Y ) ; \
213 Size = MAP_APPFONT ( 60, EDIT_HEIGHT ) ; \
218 // --------------------------------------------------------------------------------------------------
221 #define AUTO_PORTCONTROLGROUP(AUTO_Y, AUTO_HID) \
222 FixedText FT_AUTOPORTNUMBER \
224 Pos = MAP_APPFONT (START_X , AUTO_Y +2) ; \
225 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
226 Text [ en-US ] = "~Port number" ; \
229 NumericField NF_AUTOPORTNUMBER \
231 HelpId = AUTO_HID ; \
232 Pos = MAP_APPFONT (EDIT_X, AUTO_Y ) ; \
233 Size = MAP_APPFONT ( 22 , EDIT_HEIGHT ) ; \
238 FixedText FT_AUTOPORTNUMBERDEFAULT \
240 HelpId = AUTO_HID + 1 ; \
241 Pos = MAP_APPFONT (EDIT_X + 22 + UNRELATED_CONTROLS, AUTO_Y +2) ; \
242 Size = MAP_APPFONT ( WIZARD_PAGE_X - EDIT_X - 22 - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
243 Text[ en-US ] = "" ; \
246 //-------------------------------------------------------------------------
248 #define AUTO_CHARSET( AUTO_Y, AUTOPAGE_X ) \
249 FixedLine FL_DATACONVERT \
251 Pos = MAP_APPFONT ( 4 , AUTO_Y ) ; \
252 Size = MAP_APPFONT ( AUTOPAGE_X - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
253 Text [ en-US ] = "Data conversion"; \
255 FixedText FT_CHARSET \
257 Pos = MAP_APPFONT ( 6 , AUTO_Y + RELATED_CONTROLS + FIXEDTEXT_HEIGHT ) ; \
258 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
259 Text [ en-US ] = "~Character set" ; \
264 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + RELATED_CONTROLS + FIXEDTEXT_HEIGHT -1 ) ; \
265 Size = MAP_APPFONT ( AUTOPAGE_X - EDIT_X - 6 , 60 ) ; \
267 HelpId = HID_DSADMIN_CHARSET; \
272 // --------------------------------------------------------------------------------------------------
273 #define AUTO_SEPARATORCONTROLGROUP(AUTO_Y,AUTOPAGE_X) \
275 FixedText FT_AUTOEXTENSIONHEADER \
277 Pos = MAP_APPFONT ( START_X , AUTO_Y) ; \
278 Size = MAP_APPFONT ( AUTOPAGE_X - 2*START_X , FIXEDTEXT_HEIGHT ) ; \
279 Text[ en-US ] = "Specify the type of files you want to access" ; \
282 RadioButton RB_AUTOACCESSCTEXTFILES \
284 HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSTXTFILES; \
285 Pos = MAP_APPFONT (START_X + 6 , AUTO_Y + FIXEDTEXT_HEIGHT + RELATED_CONTROLS); \
286 Size = MAP_APPFONT ( AUTOPAGE_X - 12 , FIXEDTEXT_HEIGHT ) ; \
287 Text[ en-US ] = "Plain text files (*.txt)" ; \
290 RadioButton RB_AUTOACCESSCCSVFILES \
292 HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSCSVFILES; \
293 Pos = MAP_APPFONT (START_X + 6 , AUTO_Y + 2*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS); \
294 Size = MAP_APPFONT ( AUTOPAGE_X - 12 , FIXEDTEXT_HEIGHT ) ; \
295 Text[ en-US ] = "'Comma separated value' files (*.csv)" ; \
298 RadioButton RB_AUTOACCESSOTHERS \
300 HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSOTHERFILES; \
301 Pos = MAP_APPFONT (START_X + 6 , AUTO_Y + 3*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS); \
302 Size = MAP_APPFONT ( 50 , FIXEDTEXT_HEIGHT ) ; \
303 Text[ en-US ] = "Custom:" ; \
306 Edit ET_AUTOOWNEXTENSION \
308 HelpId = HID_PAGE_DBWIZARD_TEXT_ET_OWNEXTENSION; \
309 Pos = MAP_APPFONT (START_X + 66, AUTO_Y + 3*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS - 2 ) ; \
310 Size = MAP_APPFONT ( 60, EDIT_HEIGHT ) ; \
315 FIXEDTEXT FT_AUTOOWNEXTENSIONAPPENDIX \
317 Pos = MAP_APPFONT (START_X + 130 , AUTO_Y + 3 * ( FIXEDTEXT_HEIGHT + RELATED_CONTROLS ) ); \
318 Size = MAP_APPFONT ( AUTOPAGE_X - 6 -(START_X + 130), FIXEDTEXT_HEIGHT ) ; \
319 Text[ en-US ] = "Custom: *.abc" ; \
322 FixedLine FL_AUTOSEPARATOR2 \
324 Pos = MAP_APPFONT ( START_X , AUTO_Y + 50) ; \
325 Size = MAP_APPFONT ( AUTOPAGE_X - 2 * START_X , FIXEDTEXT_HEIGHT ) ; \
326 Text[ en-US ] = "Row Format"; \
329 FixedText FT_AUTOFIELDSEPARATOR \
331 Pos = MAP_APPFONT ( START_X + INDENTED_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT ) ; \
332 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
333 Text[ en-US ] = "Field separator" ; \
335 ComboBox CM_AUTOFIELDSEPARATOR \
337 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT - 2 ) ; \
338 Size = MAP_APPFONT ( 32 , 60 ) ; \
342 HelpId = HID_DSADMIN_FIELD_SEPARATOR; \
345 FixedText FT_AUTOTEXTSEPARATOR \
347 Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS + EDIT_HEIGHT ) ; \
348 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
349 Text[ en-US ] = "Text separator" ; \
351 ComboBox CM_AUTOTEXTSEPARATOR \
353 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS + EDIT_HEIGHT - 2 ) ; \
354 Size = MAP_APPFONT ( 32 , 60 ) ; \
358 HelpId = HID_DSADMIN_TEXT_SEPARATOR; \
360 FixedText FT_AUTODECIMALSEPARATOR \
362 Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS + 2*EDIT_HEIGHT ) ; \
363 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
364 Text[ en-US ] = "Decimal separator" ; \
366 ComboBox CM_AUTODECIMALSEPARATOR \
368 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS + 2*EDIT_HEIGHT - 2 ) ; \
369 Size = MAP_APPFONT ( 32 , 60 ) ; \
371 MaxTextLength = 1 ; \
380 HelpId = HID_DSADMIN_DECIMAL_SEPARATOR; \
382 FixedText FT_AUTOTHOUSANDSSEPARATOR \
384 Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + 3*EDIT_HEIGHT ) ; \
385 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
386 Text[ en-US ] = "Thousands separator" ; \
388 ComboBox CM_AUTOTHOUSANDSSEPARATOR \
390 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + 3*EDIT_HEIGHT - 2 ) ; \
391 Size = MAP_APPFONT ( 32 , 44 ) ; \
394 MaxTextLength = 1 ; \
401 HelpId = HID_DSADMIN_THOUSANDS_SEPARATOR; \
404 CheckBox CB_AUTOHEADER \
407 Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 4*RELATED_CONTROLS + 4*EDIT_HEIGHT ) ; \
408 Size = MAP_APPFONT ( 150 , CHECKBOX_HEIGHT ) ; \
409 HelpId = HID_DSADMIN_TEXT_HEADER; \
410 Text [ en-US ] = "~Text contains headers" ; \
413 AUTO_CHARSET( AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 4*RELATED_CONTROLS + 4*EDIT_HEIGHT + CHECKBOX_HEIGHT + UNRELATED_CONTROLS, AUTOPAGE_X ) \
415 String STR_AUTOTEXT_FIELD_SEP_NONE \
417 Text[ en-US ] = "{None}"; \
420 String STR_AUTOTEXTSEPARATORLIST \
422 Text = "\"\t34\t'\t39" ; \
425 String STR_AUTOFIELDSEPARATORLIST \
427 Text [ x-comment ] = "EM Dec 2002: \'Space\' refers to what you get when you hit the space bar on your keyboard."; \
428 Text [ en-US ] = ";\t59\t,\t44\t:\t58\t{Tab}\t9\t{Space}\t32" ; \
431 String STR_AUTODELIMITER_MISSING \
433 Text[ en-US ] = "#1 must be set." ; \
435 String STR_AUTODELIMITER_MUST_DIFFER \
437 Text[ en-US ] = "#1 and #2 must be different." ; \
439 String STR_AUTONO_WILDCARDS \
441 Text[ en-US ] = "Wildcards such as ?,* are not allowed in #1." ; \
445 #define NAMECONTROLGROUP_HEIGHT (FIXEDTEXT_HEIGHT + 2 + EDIT_HEIGHT)
446 #define BROWSECONTROLGROUP_HEIGHT ( FIXEDTEXT_HEIGHT + 2 + BUTTON_HEIGHT)
448 // --------------------------------------------------------------------------------------------------
450 #define AUTO_HELP_BROWSECONTROLGROUP(AUTO_LINECOUNT, AUTO_HID) \
451 AUTO_WIZARDHELPTEXT(AUTO_LINECOUNT) \
452 AUTO_BROWSECONTROLGROUP(START_X, INIT_Y + AUTO_LINECOUNT * FIXEDTEXT_HEIGHT + 2, WIZARD_PAGE_X, AUTO_HID)
455 // --------------------------------------------------------------------------------------------------
458 #define AUTO_HELP_NAMECONTROLGROUP(AUTO_LINECOUNT, AUTO_HID ) \
459 AUTO_WIZARDHELPTEXT(AUTO_LINECOUNT ) \
460 AUTO_NAMECONTROLGROUP(INIT_Y + AUTO_LINECOUNT * FIXEDTEXT_HEIGHT + 2, AUTO_HID) \
463 // --------------------------------------------------------------------------------------------------
465 #define AUTO_JDBCDRIVERCLASSGROUP(AUTO_Y, AUTO_HID) \
467 FixedText FT_AUTOJDBCDRIVERCLASS \
469 Pos = MAP_APPFONT ( 6 , AUTO_Y) ; \
470 Size = MAP_APPFONT ( PAGE_X - 12 , FIXEDTEXT_HEIGHT ) ; \
471 Text [ en-US ] = "JDBC d~river class"; \
474 Edit ET_AUTOJDBCDRIVERCLASS \
476 Pos = MAP_APPFONT ( START_X, AUTO_Y + FIXEDTEXT_HEIGHT + RELATED_CONTROLS ) ; \
477 Size = MAP_APPFONT ( WIZARD_PAGE_X - START_X - BUTTON_WIDTH - RELATED_CONTROLS - UNRELATED_CONTROLS , EDIT_HEIGHT ) ; \
483 PushButton PB_AUTOTESTDRIVERCLASS \
486 Pos = MAP_APPFONT ( WIZARD_PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS , AUTO_Y + FIXEDTEXT_HEIGHT + 2) ; \
487 Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; \
488 Size = MAP_APPFONT (50, 14); \
489 HelpId = AUTO_HID + 1; \
490 Text[ en-US ] = "Test class" ; \
493 // --------------------------------------------------------------------------------------------------
495 #define AUTO_SOCKETCONTROLGROUP(AUTO_Y) \
496 FixedText FT_SOCKET \
498 Pos = MAP_APPFONT (START_X , AUTO_Y +2) ; \
499 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
505 Pos = MAP_APPFONT (EDIT_X, AUTO_Y ) ; \
506 Size = MAP_APPFONT ( 97, EDIT_HEIGHT ) ; \
512 #define AUTOHELP_JDBCCONTROLGROUP(AUTO_HID) \
513 AUTO_HELP_NAMECONTROLGROUP(6, AUTO_HID ) \
514 AUTO_HOSTCONTROLGROUP(96, AUTO_HID + 1) \
515 AUTO_PORTCONTROLGROUP(113, AUTO_HID + 2 ) \
516 AUTO_SOCKETCONTROLGROUP(129) \
517 AUTO_JDBCDRIVERCLASSGROUP(146, AUTO_HID + 3)
521 // --------------------------------------------------------------------------------------------------