1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#include "dbaccess_helpid.hrc"
25#include "dbu_dlg.hrc"
26#include "advancedsettings.hrc"
27
28//-------------------------------------------------------------------------
29
30#define AUTO_DATAHANDLING(AUTO_Y)                                                   \
31    FixedLine FL_DATAHANDLING                                                       \
32    {                                                                               \
33        Pos = MAP_APPFONT ( RELATED_CONTROLS , AUTO_Y ) ;                           \
34        Size = MAP_APPFONT ( ADVANCED_PAGE_X - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ;        \
35        Text [ en-US ] = "Options";                                                 \
36    };
37
38//-------------------------------------------------------------------------
39
40#define AUTO_SQL92CHECK(AUTO_Y)                                                     \
41    CheckBox CB_SQL92CHECK                                                          \
42    {                                                                               \
43        Pos     = MAP_APPFONT ( 6 , AUTO_Y) ;                                       \
44        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
45        TabStop = TRUE ;                                                            \
46        HelpId = HID_DSADMIN_SQL92CHECK;                                            \
47        Text[ en-US ] = "Use SQL92 naming constraints";                             \
48    };
49
50//-------------------------------------------------------------------------
51
52#define AUTO_APPENDTABLEALIAS(AUTO_Y)                                               \
53    CheckBox CB_APPENDTABLEALIAS                                                    \
54    {                                                                               \
55        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
56        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12  , CHECKBOX_HEIGHT ) ;          \
57        TabStop = TRUE ;                                                            \
58        HelpId = HID_DSADMIN_APPENDTABLEALIAS;                                      \
59        Text[ en-US ] = "Append the table alias name on SELECT statements";         \
60    };
61
62//-------------------------------------------------------------------------
63
64#define AUTO_AS_BEFORE_CORR_NAME(AUTO_Y)                                            \
65    CheckBox CB_AS_BEFORE_CORR_NAME                                                 \
66    {                                                                               \
67        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
68        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12  , CHECKBOX_HEIGHT ) ;          \
69        TabStop = TRUE ;                                                            \
70        HelpId = HID_DSADMIN_AS_BEFORE_CORRELATION_NAME;                            \
71        Text[ en-US ] = "Use keyword AS before table alias names";                  \
72    };
73
74//-------------------------------------------------------------------------
75
76#define AUTO_ENABLEOUTERJOIN(AUTO_Y)                                                \
77    CheckBox CB_ENABLEOUTERJOIN                                                     \
78    {                                                                               \
79        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
80        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
81        TabStop = TRUE ;                                                            \
82        HelpId = HID_DSADMIN_ENABLEOUTERJOIN;                                       \
83        Text [ en-US ] = "Use Outer Join syntax '{OJ }'";                           \
84    };
85
86
87//-------------------------------------------------------------------------
88
89#define AUTO_IGNOREDRIVER_PRIV(AUTO_Y)                                              \
90    CheckBox CB_IGNOREDRIVER_PRIV                                                   \
91    {                                                                               \
92        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
93        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
94        TabStop = TRUE ;                                                            \
95        HelpId = HID_DSADMIN_IGNOREDRIVER_PRIV;                                     \
96        Text[ en-US ] = "Ignore the privileges from the database driver";           \
97    };
98
99//-------------------------------------------------------------------------
100
101#define AUTO_PARAMETERNAMESUBST(AUTO_Y)                                             \
102    CheckBox CB_PARAMETERNAMESUBST                                                  \
103    {                                                                               \
104        Pos     = MAP_APPFONT ( 6 , AUTO_Y) ;                                       \
105        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
106        TabStop = TRUE ;                                                            \
107        HelpId = HID_DSADMIN_PARAMETERNAMESUBST;                                    \
108        Text[ en-US ] = "Replace named parameters with '?'";                        \
109    };
110
111//-------------------------------------------------------------------------
112
113#define AUTO_SUPPRESVERSIONCOLUMN(AUTO_Y)                                           \
114    CheckBox CB_SUPPRESVERSIONCL                                                    \
115    {                                                                               \
116        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
117        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
118        TabStop = TRUE ;                                                            \
119        HelpId = HID_DSADMIN_SUPPRESS_VERSIONCL;                                    \
120        Text [ en-US ] = "Display version columns (when available)";                \
121    };
122
123//-------------------------------------------------------------------------
124
125#define AUTO_CATALOG(AUTO_Y)                                                        \
126    CheckBox CB_CATALOG                                                             \
127    {                                                                               \
128        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
129        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
130        TabStop = TRUE ;                                                            \
131        HelpId = HID_DSADMIN_CATALOG;                                               \
132        Text [ en-US ] = "Use catalog name in SELECT statements";                   \
133    };
134
135
136//-------------------------------------------------------------------------
137
138#define AUTO_SCHEMA(AUTO_Y)                                                         \
139    CheckBox CB_SCHEMA                                                              \
140    {                                                                               \
141        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
142        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
143        TabStop = TRUE ;                                                            \
144        HelpId = HID_DSADMIN_SCHEMA;                                                \
145        Text [ en-US ] = "Use schema name in SELECT statements";                    \
146    };
147
148//-------------------------------------------------------------------------
149
150#define AUTO_IGNOREINDEXAPPENDIX(AUTO_Y)                                            \
151    CheckBox CB_IGNOREINDEXAPPENDIX                                                 \
152    {                                                                               \
153        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
154        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12  , CHECKBOX_HEIGHT ) ;          \
155        TabStop = TRUE ;                                                            \
156        HelpId = HID_DSADMIN_IGNOREINDEXAPPENDIX;                                   \
157        Text[ en-US ] = "Create index with ASC or DESC statement";                  \
158    };
159
160//-------------------------------------------------------------------------
161
162#define AUTO_DOSLINEENDS(AUTO_Y)                                                    \
163    CheckBox CB_DOSLINEENDS                                                         \
164    {                                                                               \
165        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
166        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
167        TabStop = TRUE ;                                                            \
168        HelpId = HID_DSADMIN_DOSLINEENDS;                                           \
169        Text [ en-US ] = "End text lines with CR+LF";                               \
170    };
171
172//-------------------------------------------------------------------------
173#define AUTO_IGNORECURRENCY(AUTO_Y)											        \
174	CheckBox CB_IGNORECURRENCY														\
175	{																				\
176		Pos		= MAP_APPFONT ( 6 , AUTO_Y ) ;										\
177		Size	= MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;			\
178		TabStop = TRUE ;															\
179		HelpId = HID_DSADMIN_IGNORECURRENCY;										\
180		Text [ en-US ] = "Ignore currency field information";						\
181	};
182
183//-------------------------------------------------------------------------
184
185#define AUTO_CHECKREQUIRED(AUTO_Y)                                                  \
186    CheckBox CB_CHECK_REQUIRED                                                      \
187    {                                                                               \
188        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
189        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
190        TabStop = TRUE ;                                                            \
191        HelpId = HID_DSADMIN_CHECK_REQUIRED_FIELDS;                                 \
192        Text [ en-US ] = "Form data input checks for required fields";            \
193    };
194
195#define AUTO_ESCAPE_DATETIME(AUTO_Y)                                                \
196    CheckBox CB_ESCAPE_DATETIME                                                     \
197    {                                                                               \
198        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
199        Size    = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ;           \
200        TabStop = TRUE ;                                                            \
201        HelpId = HID_DSADMIN_ESCAPE_DATETIME;                                       \
202        Text [ en-US ] = "Use ODBC conformant date/time literals";                  \
203    };
204
205
206#define AUTO_PRIMARY_KEY_SUPPORT(AUTO_Y)                                            \
207    CheckBox CB_PRIMARY_KEY_SUPPORT                                                 \
208    {                                                                               \
209        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
210        Size    = MAP_APPFONT ( ADVANCED_PAGE_X - 12 , CHECKBOX_HEIGHT ) ;          \
211        TabStop = TRUE ;                                                            \
212        HelpId = HID_DSADMIN_PRIMARY_KEY_SUPPORT;                                   \
213        Text [ en-US ] = "Supports primary keys";                                   \
214    };
215
216#define AUTO_RESPECTRESULTSETTYPE(AUTO_Y)                                            \
217    CheckBox CB_RESPECTRESULTSETTYPE                                                 \
218    {                                                                               \
219        Pos     = MAP_APPFONT ( 6 , AUTO_Y ) ;                                      \
220        Size    = MAP_APPFONT ( ADVANCED_PAGE_X - 12 , CHECKBOX_HEIGHT ) ;          \
221        TabStop = TRUE ;                                                            \
222        HelpId = HID_DSADMIN_RESPECTRESULTSETTYPE;                                   \
223        Text [ en-US ] = "Respect the result set type from the database driver";                                   \
224    };
225
226
227//-------------------------------------------------------------------------
228
229#define WORKAROUND                                                                  \
230        StringList [ en-US ] =                                                      \
231		{                                                                           \
232			< "Default" ; Default ; > ;                                             \
233			< "SQL" ; Default ; > ;                                                 \
234			< "Mixed" ; Default ; > ;                                               \
235			< "MS Access" ; Default ; > ;                                           \
236		};
237
238
239#define AUTO_BOOLEANCOMPARISON(AUTO_Y)                                              \
240    FixedText FT_BOOLEANCOMPARISON                                                  \
241    {                                                                               \
242        Pos     = MAP_APPFONT ( START_X , AUTO_Y + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) ;   \
243        Size    = MAP_APPFONT ( 100 , CHECKBOX_HEIGHT );                            \
244        Text [ en-US ] = "Comparison of Boolean values";                            \
245    };                                                                              \
246    ListBox LB_BOOLEANCOMPARISON                                                    \
247    {                                                                               \
248        Pos     = MAP_APPFONT ( START_X + 100, AUTO_Y ) ;                           \
249        Size    = MAP_APPFONT ( 60 , LISTBOX_HEIGHT ) ;                             \
250        TabStop = TRUE ;                                                            \
251        SvLook = TRUE;                                                              \
252        DropDown = TRUE;                                                            \
253        Border = TRUE;                                                              \
254        HelpId = HID_DSADMIN_BOOLEANCOMPARISON;                                     \
255        WORKAROUND                                                                  \
256    };                                                                              \
257
258#define AUTO_MAXROWSCAN(AUTO_Y)                                              \
259    FixedText FT_MAXROWSCAN                                                  \
260    {                                                                               \
261        Pos     = MAP_APPFONT ( START_X , AUTO_Y + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) ;   \
262        Size    = MAP_APPFONT ( 100 , CHECKBOX_HEIGHT );                            \
263        Text [ en-US ] = "Rows to scan column types";                               \
264    };                                                                              \
265    NumericField NF_MAXROWSCAN                                                      \
266    {                                                                               \
267        Pos     = MAP_APPFONT ( START_X + 100, AUTO_Y ) ;                           \
268        Size    = MAP_APPFONT ( 60 , EDIT_HEIGHT ) ;                                \
269        TabStop = TRUE ;                                                            \
270        NoThousandSep = TRUE;                                                       \
271        Border = TRUE;                                                              \
272        HelpId = HID_DSADMIN_MAXROWSCAN;                                            \
273    };                                                                              \
274
275
276//-------------------------------------------------------------------------
277
278TabPage PAGE_GENERATED_VALUES
279{
280    HelpID = "dbaccess:TabPage:PAGE_GENERATED_VALUES";
281    SVLook = TRUE ;
282    Pos = MAP_APPFONT ( 0 , 0 ) ;
283    Size = MAP_APPFONT ( ADVANCED_PAGE_X , ADVANCED_PAGE_Y ) ;
284    Hide = TRUE;
285
286    FixedLine FL_SEPARATORAUTO
287    {
288        Pos = MAP_APPFONT ( 4, UNRELATED_CONTROLS ) ;
289        Size = MAP_APPFONT ( ADVANCED_PAGE_X - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ;
290        Text [ en-US ] = "Settings";
291    };
292
293    CheckBox CB_RETRIEVE_AUTO
294    {
295        Pos     = MAP_APPFONT ( 6 , UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS) ;
296        Size    = MAP_APPFONT ( ADVANCED_PAGE_X - 2*UNRELATED_CONTROLS , CHECKBOX_HEIGHT ) ;
297        TabStop = TRUE ;
298        HelpId = HID_DSADMIN_AUTORETRIEVEENABLED;
299        Text [ en-US ] = "Re~trieve generated values";
300    };
301
302    FixedText FT_AUTOINCREMENTVALUE
303    {
304        Pos     = MAP_APPFONT ( 15 , UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS + CHECKBOX_HEIGHT ) ;
305        Size = MAP_APPFONT ( ADVANCED_PAGE_X - 15 - 6 , FIXEDTEXT_HEIGHT ) ;
306        Text[ en-US ] = "~Auto-increment statement";
307    };
308
309    Edit ET_AUTOINCREMENTVALUE
310    {
311        Border = TRUE ;
312        Pos     = MAP_APPFONT ( 15 , UNRELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT + CHECKBOX_HEIGHT + 3*RELATED_CONTROLS ) ;
313        Size = MAP_APPFONT ( ADVANCED_PAGE_X - 15 - 2*UNRELATED_CONTROLS , EDIT_HEIGHT ) ;
314        TabStop = TRUE ;
315        HelpId = HID_DSADMIN_AUTOINCREMENTVALUE;
316    };
317
318    FixedText FT_RETRIEVE_AUTO
319    {
320        Pos     = MAP_APPFONT ( 15 , UNRELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT + CHECKBOX_HEIGHT + 4*RELATED_CONTROLS + EDIT_HEIGHT) ;
321        Size = MAP_APPFONT ( ADVANCED_PAGE_X - 15 - 6 , 10 ) ;
322        Text [ en-US ] = "~Query of generated values";
323    };
324
325    Edit ET_RETRIEVE_AUTO
326    {
327        Border = TRUE ;
328        Pos     = MAP_APPFONT ( 15 , UNRELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + CHECKBOX_HEIGHT + 5*RELATED_CONTROLS + EDIT_HEIGHT ) ;
329        Size = MAP_APPFONT ( ADVANCED_PAGE_X - 15 - 2*UNRELATED_CONTROLS, EDIT_HEIGHT ) ;
330        TabStop = TRUE ;
331        HelpId = HID_DSADMIN_RETRIEVE_AUTO;
332    };
333};
334
335//-------------------------------------------------------------------------
336
337TabPage PAGE_ADVANCED_SETTINGS_SPECIAL
338{
339    HelpID = "dbaccess:TabPage:PAGE_ADVANCED_SETTINGS_SPECIAL";
340    SVLook = TRUE ;
341    Pos = MAP_APPFONT ( 0 , 0 ) ;
342    Size = MAP_APPFONT ( ADVANCED_PAGE_X , ADVANCED_PAGE_Y ) ;
343    Hide = TRUE;
344    AUTO_DATAHANDLING(            RELATED_CONTROLS )
345    AUTO_SQL92CHECK(            1*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +                      RELATED_CONTROLS )
346    AUTO_APPENDTABLEALIAS(      2*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +  1*CHECKBOX_HEIGHT + RELATED_CONTROLS )
347    AUTO_AS_BEFORE_CORR_NAME(   3*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +  2*CHECKBOX_HEIGHT + RELATED_CONTROLS )
348    AUTO_ENABLEOUTERJOIN(       4*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +  3*CHECKBOX_HEIGHT + RELATED_CONTROLS )
349    AUTO_IGNOREDRIVER_PRIV(     5*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +  4*CHECKBOX_HEIGHT + RELATED_CONTROLS )
350    AUTO_PARAMETERNAMESUBST(    6*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +  5*CHECKBOX_HEIGHT + RELATED_CONTROLS )
351    AUTO_SUPPRESVERSIONCOLUMN(  7*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +  6*CHECKBOX_HEIGHT + RELATED_CONTROLS )
352    AUTO_CATALOG(               8*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +  7*CHECKBOX_HEIGHT + RELATED_CONTROLS )
353    AUTO_SCHEMA(                9*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +  8*CHECKBOX_HEIGHT + RELATED_CONTROLS )
354    AUTO_IGNOREINDEXAPPENDIX(  10*RELATED_CONTROLS + FIXEDTEXT_HEIGHT +  9*CHECKBOX_HEIGHT + RELATED_CONTROLS )
355    AUTO_DOSLINEENDS(          11*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 10*CHECKBOX_HEIGHT + RELATED_CONTROLS )
356    AUTO_CHECKREQUIRED(        12*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 11*CHECKBOX_HEIGHT + RELATED_CONTROLS )
357    AUTO_IGNORECURRENCY(       13*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 12*CHECKBOX_HEIGHT + RELATED_CONTROLS )
358    AUTO_ESCAPE_DATETIME(      14*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS )
359    AUTO_PRIMARY_KEY_SUPPORT(  15*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS )
360    AUTO_RESPECTRESULTSETTYPE( 16*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 16*CHECKBOX_HEIGHT + RELATED_CONTROLS )
361    AUTO_BOOLEANCOMPARISON(    17*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
362    AUTO_MAXROWSCAN(           18*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
363};
364
365//-------------------------------------------------------------------------
366
367TabDialog DLG_DATABASE_ADVANCED
368{
369    OutputSize = TRUE ;
370    SVLook = TRUE ;
371    Moveable = TRUE ;
372    Closeable = TRUE ;
373    Hide = TRUE;
374    HelpId = HID_DSADMIN_ADVANCED;
375
376    TabControl 1
377    {
378        OutputSize = TRUE ;
379        HelpId = HID_DSADMIN_TABCONTROL;
380    };
381
382    String STR_GENERATED_VALUE
383    {
384        Text [ en-US ] = "Generated Values";
385    };
386
387    String STR_DS_BEHAVIOUR
388    {
389        Text [ en-US ] = "Special Settings";
390    };
391
392    Text [ en-US ] = "Advanced Settings" ;
393};
394