1 /*************************************************************************
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 ************************************************************************/
29 #ifndef _DBAUI_AUTOCONTROLS_HRC_
30 #define _DBAUI_AUTOCONTROLS_HRC_
33 #ifndef _DBA_DBACCESS_HELPID_HRC_
34 #include "dbaccess_helpid.hrc"
38 #include "dbu_dlg.hrc"
41 #ifndef _DBA_DBACCESS_HELPID_HRC_
42 #include "dbaccess_helpid.hrc"
46 #define CHECKBOX_HEIGHT 8
47 #define FIXEDTEXT_HEIGHT 8
48 #define RELATED_CONTROLS 4
49 #define UNRELATED_CONTROLS 7
50 #define EDIT_HEIGHT 12
53 #define FT_AUTOJDBCDRIVERCLASS 80
54 #define FT_AUTOFIELDSEPARATOR 81
55 #define FT_AUTOTEXTSEPARATOR 82
56 #define FT_AUTODECIMALSEPARATOR 83
57 #define FT_AUTOTHOUSANDSSEPARATOR 84
58 #define FT_AUTOPORTNUMBER 85
59 #define FT_AUTOPORTNUMBERDEFAULT 86
60 #define FT_AUTOBASEDN 87
61 #define FT_AUTOHOSTNAME 88
62 #define FT_AUTOBROWSEURL 89
63 #define FT_AUTODATABASENAME 90
64 #define FT_AUTOWIZARDHELPTEXT 91
65 #define FT_AUTOWIZARDHEADER 92
66 #define FT_AUTOEXTENSIONHEADER 93
67 #define FT_AUTOOWNEXTENSIONAPPENDIX 94
71 #define FL_AUTOSEPARATOR2 80
72 #define FL_DATACONVERT 81
73 #define FL_SEPARATOR1 82
75 #define CB_AUTOHEADER 80
77 #define PB_AUTOTESTDRIVERCLASS 80
78 #define PB_AUTOBROWSEURL 81
80 #define CM_AUTOFIELDSEPARATOR 80
81 #define CM_AUTOTEXTSEPARATOR 81
82 #define CM_AUTODECIMALSEPARATOR 82
83 #define CM_AUTOTHOUSANDSSEPARATOR 83
85 #define NF_AUTOPORTNUMBER 80
87 #define ET_AUTOBASEDN 80
88 #define ET_AUTOHOSTNAME 81
89 #define ET_AUTODATABASENAME 82
90 #define ET_AUTOBROWSEURL 83
91 #define ET_AUTOJDBCDRIVERCLASS 84
92 #define ET_AUTOOWNEXTENSION 85
95 #define RB_AUTOACCESSCTEXTFILES 80
96 #define RB_AUTOACCESSCCSVFILES 81
97 #define RB_AUTOACCESSOTHERS 82
101 #define STR_AUTOFIELDSEPARATORLIST 100
102 #define STR_AUTOTEXTSEPARATORLIST 101
103 #define STR_AUTOTEXT_FIELD_SEP_NONE 102
104 #define STR_AUTODELIMITER_MISSING 103
105 #define STR_AUTODELIMITER_MUST_DIFFER 104
106 #define STR_AUTONO_WILDCARDS 105
109 #define AUTO_WIZARDHELPTEXT( AUTO_LINECOUNT ) \
110 FixedText FT_AUTOWIZARDHEADER \
112 Pos = MAP_APPFONT ( START_X , 8 ) ; \
113 Size = MAP_APPFONT ( (WIZARD_PAGE_X - START_X) - 12 , 2 * FIXEDTEXT_HEIGHT ) ; \
114 Text[ en-US ] = ""; \
118 FixedText FT_AUTOWIZARDHELPTEXT \
120 Pos = MAP_APPFONT ( START_X , INIT_Y ) ; \
121 Size = MAP_APPFONT ( WIZARD_PAGE_X - START_X - 6 , AUTO_LINECOUNT * FIXEDTEXT_HEIGHT ) ; \
122 Text[ en-US ] = ""; \
126 // -------------------------------------------------------------------------------------------------
129 #define AUTO_BROWSECONTROLGROUP( AUTO_X, AUTO_Y, AUTOPAGE_X, AUTO_HID, AUTO_HID2) \
130 FixedText FT_AUTOBROWSEURL { \
131 Pos = MAP_APPFONT ( AUTO_X , AUTO_Y ) ; \
132 Size = MAP_APPFONT ( AUTOPAGE_X - AUTO_X - 6 , FIXEDTEXT_HEIGHT ) ; \
133 Text[ en-US ] = ""; \
137 Edit ET_AUTOBROWSEURL \
139 Pos = MAP_APPFONT ( AUTO_X , AUTO_Y + FIXEDTEXT_HEIGHT + 3) ; \
140 Size = MAP_APPFONT ( AUTOPAGE_X - AUTO_X - 6 - 3 - BUTTON_WIDTH , EDIT_HEIGHT ) ; \
146 PushButton PB_AUTOBROWSEURL \
148 Pos = MAP_APPFONT ( AUTOPAGE_X - BUTTON_WIDTH - 6 , AUTO_Y + FIXEDTEXT_HEIGHT + 2 ) ; \
149 Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; \
150 HelpId = AUTO_HID2; \
152 Text[ en-US ] = "Browse"; \
155 // --------------------------------------------------------------------------------------------------
158 #define AUTO_NAMECONTROLGROUP(AUTO_Y, AUTO_HID) \
159 FixedText FT_AUTODATABASENAME \
161 Pos = MAP_APPFONT ( START_X , AUTO_Y + 2) ; \
162 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
163 Text[ en-US ] = "Database name"; \
166 Edit ET_AUTODATABASENAME \
168 Pos = MAP_APPFONT ( EDIT_X, AUTO_Y) ; \
169 Size = MAP_APPFONT ( 97, EDIT_HEIGHT ) ; \
175 // --------------------------------------------------------------------------------------------------
178 #define AUTO_HOSTCONTROLGROUP(AUTO_Y, AUTO_HID) \
179 FixedText FT_AUTOHOSTNAME \
181 Pos = MAP_APPFONT (START_X , AUTO_Y + 2 ) ; \
182 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ); \
183 Text [ en-US ] = "Server" ; \
186 Edit ET_AUTOHOSTNAME \
188 Pos = MAP_APPFONT (EDIT_X, AUTO_Y ) ; \
189 Size = MAP_APPFONT ( 60, EDIT_HEIGHT ) ; \
195 // --------------------------------------------------------------------------------------------------
198 #define AUTO_BASEDNCONTROLGROUP(AUTO_Y, AUTO_HID) \
199 FixedText FT_AUTOBASEDN \
201 Pos = MAP_APPFONT (START_X , AUTO_Y + 2 ) ; \
202 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
203 Text [ en-US ] = "Base ~DN" ; \
208 HelpId = AUTO_HID ; \
209 Pos = MAP_APPFONT (EDIT_X, AUTO_Y ) ; \
210 Size = MAP_APPFONT ( 60, EDIT_HEIGHT ) ; \
215 // --------------------------------------------------------------------------------------------------
217 // MBA: the HID set in the FixText can't make any sense; in case this macro was called from within the
218 // AUTOHELP_JDBCCONTROLGROUP, the FixText would have got the same HID as an EditField from the
219 // also called AUTO_JDBCDRIVERCLASSGROUP macro; thus I conclude that we can remove the HID from the FixedText
220 #define AUTO_PORTCONTROLGROUP(AUTO_Y, AUTO_HID) \
221 FixedText FT_AUTOPORTNUMBER \
223 Pos = MAP_APPFONT (START_X , AUTO_Y +2) ; \
224 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
225 Text [ en-US ] = "~Port number" ; \
228 NumericField NF_AUTOPORTNUMBER \
230 HelpId = AUTO_HID ; \
231 Pos = MAP_APPFONT (EDIT_X, AUTO_Y ) ; \
232 Size = MAP_APPFONT ( 22 , EDIT_HEIGHT ) ; \
235 NoThousandSep = TRUE; \
238 FixedText FT_AUTOPORTNUMBERDEFAULT \
240 Pos = MAP_APPFONT (EDIT_X + 22 + UNRELATED_CONTROLS, AUTO_Y +2) ; \
241 Size = MAP_APPFONT ( WIZARD_PAGE_X - EDIT_X - 22 - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
242 Text[ en-US ] = "" ; \
245 //-------------------------------------------------------------------------
247 #define AUTO_CHARSET( AUTO_Y, AUTOPAGE_X ) \
248 FixedLine FL_DATACONVERT \
250 Pos = MAP_APPFONT ( 4 , AUTO_Y ) ; \
251 Size = MAP_APPFONT ( AUTOPAGE_X - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
252 Text [ en-US ] = "Data conversion"; \
254 FixedText FT_CHARSET \
256 Pos = MAP_APPFONT ( 6 , AUTO_Y + RELATED_CONTROLS + FIXEDTEXT_HEIGHT ) ; \
257 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
258 Text [ en-US ] = "~Character set" ; \
263 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + RELATED_CONTROLS + FIXEDTEXT_HEIGHT -1 ) ; \
264 Size = MAP_APPFONT ( AUTOPAGE_X - EDIT_X - 6 , 60 ) ; \
266 HelpId = HID_DSADMIN_CHARSET; \
271 // --------------------------------------------------------------------------------------------------
272 #define AUTO_SEPARATORCONTROLGROUP(AUTO_Y,AUTOPAGE_X) \
274 FixedText FT_AUTOEXTENSIONHEADER \
276 Pos = MAP_APPFONT ( START_X , AUTO_Y) ; \
277 Size = MAP_APPFONT ( AUTOPAGE_X - 2*START_X , FIXEDTEXT_HEIGHT ) ; \
278 Text[ en-US ] = "Specify the type of files you want to access" ; \
281 RadioButton RB_AUTOACCESSCTEXTFILES \
283 HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSTXTFILES; \
284 Pos = MAP_APPFONT (START_X + 6 , AUTO_Y + FIXEDTEXT_HEIGHT + RELATED_CONTROLS); \
285 Size = MAP_APPFONT ( AUTOPAGE_X - 12 , FIXEDTEXT_HEIGHT ) ; \
286 Text[ en-US ] = "Plain text files (*.txt)" ; \
289 RadioButton RB_AUTOACCESSCCSVFILES \
291 HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSCSVFILES; \
292 Pos = MAP_APPFONT (START_X + 6 , AUTO_Y + 2*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS); \
293 Size = MAP_APPFONT ( AUTOPAGE_X - 12 , FIXEDTEXT_HEIGHT ) ; \
294 Text[ en-US ] = "'Comma separated value' files (*.csv)" ; \
297 RadioButton RB_AUTOACCESSOTHERS \
299 HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSOTHERFILES; \
300 Pos = MAP_APPFONT (START_X + 6 , AUTO_Y + 3*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS); \
301 Size = MAP_APPFONT ( 50 , FIXEDTEXT_HEIGHT ) ; \
302 Text[ en-US ] = "Custom:" ; \
305 Edit ET_AUTOOWNEXTENSION \
307 HelpId = HID_PAGE_DBWIZARD_TEXT_ET_OWNEXTENSION; \
308 Pos = MAP_APPFONT (START_X + 66, AUTO_Y + 3*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS - 2 ) ; \
309 Size = MAP_APPFONT ( 60, EDIT_HEIGHT ) ; \
314 FIXEDTEXT FT_AUTOOWNEXTENSIONAPPENDIX \
316 Pos = MAP_APPFONT (START_X + 130 , AUTO_Y + 3 * ( FIXEDTEXT_HEIGHT + RELATED_CONTROLS ) ); \
317 Size = MAP_APPFONT ( AUTOPAGE_X - 6 -(START_X + 130), FIXEDTEXT_HEIGHT ) ; \
318 Text[ en-US ] = "Custom: *.abc" ; \
321 FixedLine FL_AUTOSEPARATOR2 \
323 Pos = MAP_APPFONT ( START_X , AUTO_Y + 50) ; \
324 Size = MAP_APPFONT ( AUTOPAGE_X - 2 * START_X , FIXEDTEXT_HEIGHT ) ; \
325 Text[ en-US ] = "Row Format"; \
328 FixedText FT_AUTOFIELDSEPARATOR \
330 Pos = MAP_APPFONT ( START_X + INDENTED_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT ) ; \
331 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
332 Text[ en-US ] = "Field separator" ; \
334 ComboBox CM_AUTOFIELDSEPARATOR \
336 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT - 2 ) ; \
337 Size = MAP_APPFONT ( 32 , 60 ) ; \
341 HelpId = HID_DSADMIN_FIELD_SEPARATOR; \
344 FixedText FT_AUTOTEXTSEPARATOR \
346 Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS + EDIT_HEIGHT ) ; \
347 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
348 Text[ en-US ] = "Text separator" ; \
350 ComboBox CM_AUTOTEXTSEPARATOR \
352 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS + EDIT_HEIGHT - 2 ) ; \
353 Size = MAP_APPFONT ( 32 , 60 ) ; \
357 HelpId = HID_DSADMIN_TEXT_SEPARATOR; \
359 FixedText FT_AUTODECIMALSEPARATOR \
361 Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS + 2*EDIT_HEIGHT ) ; \
362 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
363 Text[ en-US ] = "Decimal separator" ; \
365 ComboBox CM_AUTODECIMALSEPARATOR \
367 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS + 2*EDIT_HEIGHT - 2 ) ; \
368 Size = MAP_APPFONT ( 32 , 60 ) ; \
370 MaxTextLength = 1 ; \
379 HelpId = HID_DSADMIN_DECIMAL_SEPARATOR; \
381 FixedText FT_AUTOTHOUSANDSSEPARATOR \
383 Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + 3*EDIT_HEIGHT ) ; \
384 Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
385 Text[ en-US ] = "Thousands separator" ; \
387 ComboBox CM_AUTOTHOUSANDSSEPARATOR \
389 Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + 3*EDIT_HEIGHT - 2 ) ; \
390 Size = MAP_APPFONT ( 32 , 44 ) ; \
393 MaxTextLength = 1 ; \
400 HelpId = HID_DSADMIN_THOUSANDS_SEPARATOR; \
403 CheckBox CB_AUTOHEADER \
406 Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 4*RELATED_CONTROLS + 4*EDIT_HEIGHT ) ; \
407 Size = MAP_APPFONT ( 150 , CHECKBOX_HEIGHT ) ; \
408 HelpId = HID_DSADMIN_TEXT_HEADER; \
409 Text [ en-US ] = "~Text contains headers" ; \
412 AUTO_CHARSET( AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 4*RELATED_CONTROLS + 4*EDIT_HEIGHT + CHECKBOX_HEIGHT + UNRELATED_CONTROLS, AUTOPAGE_X ) \
414 String STR_AUTOTEXT_FIELD_SEP_NONE \
416 Text[ en-US ] = "{None}"; \
419 String STR_AUTOTEXTSEPARATORLIST \
421 Text = "\"\t34\t'\t39" ; \
424 String STR_AUTOFIELDSEPARATORLIST \
426 Text [ x-comment ] = "EM Dec 2002: \'Space\' refers to what you get when you hit the space bar on your keyboard."; \
427 Text [ en-US ] = ";\t59\t,\t44\t:\t58\t{Tab}\t9\t{Space}\t32" ; \
430 String STR_AUTODELIMITER_MISSING \
432 Text[ en-US ] = "#1 must be set." ; \
434 String STR_AUTODELIMITER_MUST_DIFFER \
436 Text[ en-US ] = "#1 and #2 must be different." ; \
438 String STR_AUTONO_WILDCARDS \
440 Text[ en-US ] = "Wildcards such as ?,* are not allowed in #1." ; \
444 #define NAMECONTROLGROUP_HEIGHT (FIXEDTEXT_HEIGHT + 2 + EDIT_HEIGHT)
445 #define BROWSECONTROLGROUP_HEIGHT ( FIXEDTEXT_HEIGHT + 2 + BUTTON_HEIGHT)
447 // --------------------------------------------------------------------------------------------------
449 #define AUTO_HELP_BROWSECONTROLGROUP(AUTO_LINECOUNT, AUTO_HID, AUTO_HID2) \
450 AUTO_WIZARDHELPTEXT(AUTO_LINECOUNT) \
451 AUTO_BROWSECONTROLGROUP(START_X, INIT_Y + AUTO_LINECOUNT * FIXEDTEXT_HEIGHT + 2, WIZARD_PAGE_X, AUTO_HID, AUTO_HID2)
454 // --------------------------------------------------------------------------------------------------
457 // --------------------------------------------------------------------------------------------------
459 #define AUTO_JDBCDRIVERCLASSGROUP(AUTO_Y, AUTO_HID, AUTO_HID2) \
461 FixedText FT_AUTOJDBCDRIVERCLASS \
463 Pos = MAP_APPFONT ( 6 , AUTO_Y) ; \
464 Size = MAP_APPFONT ( PAGE_X - 12 , FIXEDTEXT_HEIGHT ) ; \
465 Text [ en-US ] = "JDBC d~river class"; \
468 Edit ET_AUTOJDBCDRIVERCLASS \
470 Pos = MAP_APPFONT ( START_X, AUTO_Y + FIXEDTEXT_HEIGHT + RELATED_CONTROLS ) ; \
471 Size = MAP_APPFONT ( WIZARD_PAGE_X - START_X - BUTTON_WIDTH - RELATED_CONTROLS - UNRELATED_CONTROLS , EDIT_HEIGHT ) ; \
477 PushButton PB_AUTOTESTDRIVERCLASS \
480 Pos = MAP_APPFONT ( WIZARD_PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS , AUTO_Y + FIXEDTEXT_HEIGHT + 2) ; \
481 Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; \
482 Size = MAP_APPFONT (50, 14); \
483 HelpId = AUTO_HID2; \
484 Text[ en-US ] = "Test class" ; \
487 // --------------------------------------------------------------------------------------------------
489 #define AUTO_SOCKETCONTROLGROUP(AUTO_Y) \
490 FixedText FT_SOCKET \
492 Pos = MAP_APPFONT (START_X , AUTO_Y +2) ; \
493 Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
494 Text [ en-US ] = "Socket" ; \
499 Pos = MAP_APPFONT (EDIT_X, AUTO_Y ) ; \
500 Size = MAP_APPFONT ( 97, EDIT_HEIGHT ) ; \
506 #define AUTOHELP_JDBCCONTROLGROUP( AUTO_HID, AUTO_HID2, AUTO_HID3, AUTO_HID4, AUTO_HID5 ) \
507 AUTO_WIZARDHELPTEXT( 6 ) \
508 AUTO_NAMECONTROLGROUP( INIT_Y + 6 * FIXEDTEXT_HEIGHT + 2, AUTO_HID ) \
509 AUTO_HOSTCONTROLGROUP(96, AUTO_HID2) \
510 AUTO_PORTCONTROLGROUP(113, AUTO_HID3 ) \
511 AUTO_SOCKETCONTROLGROUP(129) \
512 AUTO_JDBCDRIVERCLASSGROUP(146, AUTO_HID4, AUTO_HID5)
515 // --------------------------------------------------------------------------------------------------