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#ifndef _DIALOGS_HRC
25#define _DIALOGS_HRC
26
27#include <svtools/controldims.hrc>
28#include <xmlsecurity/global.hrc>
29
30#define STD_MASKCOLOR					Color{Red=0xffff;Green=0x0000;Blue=0xffff;}
31
32#define FL_BOTTOM_SEP					50
33#define BTN_OK							51
34#define BTN_CANCEL						52
35#define BTN_HELP						53
36#define LB_SIGNATURES					54
37#define BTN_VIEWCERT					55
38#define STR_HEADERBAR					56
39#define BTN_RESET						57
40#define STR_VALID_SIGNATURE             58
41#define STR_NO_INFO_TO_VERIFY           59
42#define STR_INVALID_SIGNATURE           60
43
44// --------- general metrics ---------
45#define DLGS_WIDTH						287
46#define DLGS_HEIGHT						195
47// --------- ... for tab dialogs -----
48#define TP_WIDTH						260
49#define TP_HEIGHT						185
50#define RIDDER_HEIGHT					(RSC_CD_PUSHBUTTON_HEIGHT)
51#define TD_SP_INNERBORDER_LEFT			3
52#define TD_SP_INNERBORDER_RIGHT			3
53#define TD_SP_INNERBORDER_TOP			3
54#define TD_SP_INNERBORDER_BOTTOM		3
55#define TD_WIDTH                        (TP_WIDTH+RSC_SP_DLG_INNERBORDER_LEFT+RSC_SP_DLG_INNERBORDER_RIGHT)
56#define TD_HEIGHT						(TP_HEIGHT+TD_SP_INNERBORDER_TOP+2*TD_SP_INNERBORDER_BOTTOM+RSC_CD_PUSHBUTTON_HEIGHT+RIDDER_HEIGHT)
57
58#define SEP_FL_SPACE_Y					6
59#define SEP_FL_ADJ_Y(val)				(val-3)
60#define DLGS_BOTTOM_BTN_L(dlgh)			(dlgh-RSC_SP_DLG_INNERBORDER_BOTTOM)
61#define DLGS_BOTTOM_BTN_Y(dlgh)			(DLGS_BOTTOM_BTN_L(dlgh)-RSC_CD_PUSHBUTTON_HEIGHT)
62#define DLGS_BOTTOM_FL_Y(dlgh)			(DLGS_BOTTOM_BTN_Y(dlgh)-SEP_FL_SPACE_Y-5)
63#define DLGS_BOTTOM_LAST_CTRL_L(dlgh)	(DLGS_BOTTOM_BTN_Y(dlgh)-2*SEP_FL_SPACE_Y-3)
64#define DLGS_BOTTOM_HELP_X(dlgw)		(dlgw-RSC_SP_DLG_INNERBORDER_RIGHT-RSC_CD_PUSHBUTTON_WIDTH)
65#define DLGS_BOTTOM_CANCEL_X(dlgw)		(DLGS_BOTTOM_HELP_X(dlgw)-RSC_SP_CTRL_X-RSC_CD_PUSHBUTTON_WIDTH)
66#define DLGS_BOTTOM_OK_X(dlgw)          (DLGS_BOTTOM_CANCEL_X(dlgw)-RSC_SP_CTRL_DESC_X-RSC_CD_PUSHBUTTON_WIDTH)
67
68
69// --------- dialog Digital Signatures ---------
70#define BTN_ADDCERT						2
71#define BTN_REMOVECERT					3
72#define FT_HINT_DOC						4
73#define FT_HINT_BASIC					5
74#define FT_HINT_PACK					6
75#define IMG_STATE_VALID					7
76#define FI_STATE_VALID					8
77#define IMG_STATE_BROKEN                9
78#define FI_STATE_BROKEN                 10
79#define IMG_STATE_NOTVALIDATED          11
80#define FI_STATE_NOTVALIDATED           12
81#define IMG_STATE_VALID_HC              13
82#define IMG_STATE_BROKEN_HC             14
83#define IMG_STATE_NOTVALIDATED_HC       15
84#define FI_STATE_OLDSIGNATURE           16
85
86//#define DS_WIDTH						DLGS_WIDTH
87//#define DS_HEIGHT						DLGS_HEIGHT
88#define DS_BTNWIDTH_1					70
89#define DS_BTNSPACE_X					RSC_SP_CTRL_X
90#define DS_WIDTH						(RSC_SP_DLG_INNERBORDER_LEFT+RSC_SP_DLG_INNERBORDER_RIGHT+2*DS_BTNSPACE_X+3*DS_BTNWIDTH_1)
91#define DS_HEIGHT						(DLGS_WIDTH*2/3)
92
93#define DS_COL_0						RSC_SP_DLG_INNERBORDER_LEFT
94//#define DS_COL_MID						(DS_WIDTH/2)
95//#define DS_COL_3						(DS_COL_MID-(DS_BTNWIDTH_1/2))
96//#define DS_COL_4						(DS_COL_2+DS_BTNWIDTH_1)
97//#define DS_COL_2						(DS_COL_3-DS_BTNSPACE_X)
98//#define DS_COL_1						(DS_COL_2-DS_BTNWIDTH_1)
99#define DS_COL_1						DS_COL_0
100#define DS_COL_2						(DS_COL_1+DS_BTNWIDTH_1)
101#define DS_COL_3						(DS_COL_2+DS_BTNSPACE_X)
102#define DS_COL_4						(DS_COL_3+DS_BTNWIDTH_1)
103#define DS_COL_5						(DS_COL_4+DS_BTNSPACE_X)
104//#define	DS_COL_6						(DS_COL_5+DS_BTNWIDTH_1)
105#define DS_COL_7						(DS_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
106#define	DS_COL_6						DS_COL_7
107
108#define DS_ROW_0						RSC_SP_DLG_INNERBORDER_TOP
109#define DS_ROW_1						(DS_ROW_0+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_X)
110#define DS_ROW_7						DLGS_BOTTOM_BTN_L(DS_HEIGHT)
111#define DS_ROW_6						DLGS_BOTTOM_BTN_Y(DS_HEIGHT)
112#define DS_ROW_5						DLGS_BOTTOM_FL_Y(DS_HEIGHT)
113#define DS_ROW_4						DLGS_BOTTOM_LAST_CTRL_L(DS_HEIGHT)
114#define	DS_ROW_3						(DS_ROW_4-RSC_CD_PUSHBUTTON_HEIGHT)
115#define DS_ROW_2A						(DS_ROW_3-RSC_CD_FIXEDTEXT_HEIGHT-RSC_SP_CTRL_Y)
116#define DS_ROW_2						(DS_ROW_2A-RSC_SP_CTRL_GROUP_Y)
117
118#define DS_LB_WIDTH						(DS_COL_7-DS_COL_0)
119
120// --------- dialog Ceritficate chooser ---------
121#define FT_HINT_SELECT					1
122
123#define CS_WIDTH						DLGS_WIDTH
124#define CS_HEIGHT						DLGS_HEIGHT
125#define CS_BTNWIDTH_1					DS_BTNWIDTH_1
126
127#define CS_COL_0						RSC_SP_DLG_INNERBORDER_LEFT
128#define CS_COL_2						(CS_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
129#define	CS_COL_1						(CS_COL_2-CS_BTNWIDTH_1)
130
131#define CS_ROW_0						RSC_SP_DLG_INNERBORDER_TOP
132#define CS_ROW_1						(CS_ROW_0+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_X)
133#define CS_ROW_4						DLGS_BOTTOM_LAST_CTRL_L(CS_HEIGHT)
134#define	CS_ROW_3						(CS_ROW_4-RSC_CD_PUSHBUTTON_HEIGHT)
135#define CS_ROW_2						(CS_ROW_3-RSC_SP_CTRL_Y)
136
137#define CS_LB_WIDTH						(CS_COL_2-CS_COL_0)
138
139// --------- tab dialog Certificate viewer ---------
140
141#define CV_COL_0						TD_SP_INNERBORDER_LEFT
142#define CV_COL_1						(TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT)
143#define CV_ROW_0						RSC_SP_TBPG_INNERBORDER_TOP
144#define CV_ROW_3						(TP_HEIGHT-RSC_SP_TBPG_INNERBORDER_BOTTOM)
145#define CV_CONT_WIDTH					(CV_COL_1-CV_COL_0)
146#define CV_CONT_HEIGHT					(CV_ROW_3-CV_ROW_0)
147#define CV_ROW_1						(CV_ROW_0+2*CV_CONT_HEIGHT/3)
148#define CV_ROW_2						(CV_ROW_1+RSC_SP_CTRL_GROUP_Y)
149
150#define CV_COL_D						(TD_WIDTH-TD_SP_INNERBORDER_RIGHT)
151#define CV_COL_C						(CV_COL_D-RSC_CD_PUSHBUTTON_WIDTH)
152#define CV_COL_B						(CV_COL_C-RSC_SP_CTRL_X)
153#define CV_COL_A						(CV_COL_B-RSC_CD_PUSHBUTTON_WIDTH)
154
155#define CV_ROW_B						(TD_HEIGHT-TD_SP_INNERBORDER_BOTTOM)
156#define CV_ROW_A						(CV_ROW_B-RSC_CD_PUSHBUTTON_HEIGHT)
157
158// --------- tab page Certificate viewer - General ---------
159#define WIN_FRAME						2
160#define IMG_CERT						3
161#define FI_CERTINFO						4
162#define FL_SEP1							5
163#define FI_HINTNOTTRUST					6
164#define FL_SEP2							7
165#define FI_ISSTOLABEL					8
166#define FI_ISSTO						9
167#define FI_ISSBYLABEL					10
168#define FI_ISSBY						11
169#define FI_VALIDDATE                    12
170#define IMG_KEY                         13
171#define FI_CORRPRIVKEY                  14
172#define STR_CERTIFICATE_NOT_VALIDATED   15
173#define IMG_STATE_NOT_VALIDATED         16
174#define IMG_STATE_CERIFICATED_HC        17
175#define IMG_STATE_NOT_VALIDATED_HC      18
176#define IMG_KEY_HC                      19
177
178#define IMG1_WIDTH						33
179#define IMG1_HEIGHT						22
180#define IMG2_WIDTH						20
181#define IMG2_HEIGHT						20
182#define DATE_WIDTH						30
183#define CW_COL_0						(CV_COL_0+RSC_SP_GRP_INNERBORDER_LEFT)
184#define CW_COL_1						(CW_COL_0+RSC_SP_FLGR_SPACE_X)
185#define CW_COL_1a						(CW_COL_0+IMG2_WIDTH+1)
186#define CW_COL_2						(CW_COL_0+IMG1_WIDTH)
187#define CW_COL_3						(CW_COL_2+RSC_SP_CTRL_GROUP_X)
188#define CW_COL_4						(CW_COL_1+40)
189#define CW_COL_5						(CV_CONT_WIDTH-RSC_SP_GRP_INNERBORDER_RIGHT)
190#define CW_COL_5a						(CW_COL_5-RSC_SP_GRP_INNERBORDER_RIGHT)
191#define CW_COL_4a						(CW_COL_1+38)
192#define CW_COL_4b						(CW_COL_4a+DATE_WIDTH)
193#define CW_COL_4c						(CW_COL_4b+3)
194#define CW_COL_4d						(CW_COL_4c+8)
195#define CW_COL_4e						(CW_COL_4d+3)
196#define CW_ROW_0						(CV_ROW_0+RSC_SP_GRP_INNERBORDER_TOP)
197#define CW_ROW_1						(CW_ROW_0+RSC_SP_GRP_INNERBORDER_TOP)
198#define CW_ROW_2						(CW_ROW_0+IMG1_HEIGHT)
199#define CW_ROW_3						(CW_ROW_2+3)
200#define CW_ROW_4						(CW_ROW_3+RSC_SP_CTRL_Y+RSC_CD_FIXEDLINE_HEIGHT)
201#define CW_ROW_4a						(CW_ROW_4+35)
202#define CW_ROW_5						(CW_ROW_4a+3)
203#define CW_ROW_6						(CW_ROW_5+RSC_SP_CTRL_Y+RSC_CD_FIXEDLINE_HEIGHT)
204#define CW_ROW_7						(CW_ROW_6+RSC_SP_CTRL_Y+RSC_CD_FIXEDTEXT_HEIGHT)
205#define CW_ROW_8						(CW_ROW_7+RSC_SP_CTRL_Y+RSC_CD_FIXEDTEXT_HEIGHT)
206#define CW_ROW_9						(CW_ROW_8+RSC_SP_CTRL_Y+RSC_CD_FIXEDTEXT_HEIGHT)
207#define CW_ROW_10						(CW_ROW_9+2)
208#define CW_ROW_11						(CW_ROW_9+IMG2_HEIGHT)
209
210// --------- tab page Certificate viewer - Details ---------
211
212#define LB_ELEMENTS						1
213#define ML_ELEMENT						2
214
215#define STR_VERSION						1
216#define STR_SERIALNUM					2
217#define STR_SIGALGORITHM				3
218#define STR_ISSUER						4
219#define STR_ISSUER_ID					5
220#define STR_VALIDFROM					6
221#define STR_VALIDTO						7
222#define STR_SUBJECT						8
223#define STR_SUBJECT_ID					9
224#define STR_SUBJECT_PUBKEY_ALGO			10
225#define STR_SUBJECT_PUBKEY_VAL			11
226#define STR_SIGNATURE_ALGO				12
227#define STR_THUMBPRINT_SHA1				13
228#define STR_THUMBPRINT_MD5				14
229
230// --------- tab page Certificate viewer - Certification Path ---------
231
232#define FT_CERTPATH						1
233#define FT_CERTSTATUS					2
234#define ML_CERTSTATUS					3
235#define IMG_CERT_SMALL                  4
236#define IMG_CERT_SMALL_HC               5
237#define IMG_CERT_NOTVALIDATED_SMALL     6
238#define IMG_CERT_NOTVALIDATED_SMALL_HC  7
239#define STR_PATH_CERT_OK                8
240#define STR_PATH_CERT_NOT_VALIDATED     9
241
242#define CVP_ROW_0                       RSC_SP_TBPG_INNERBORDER_TOP
243#define CVP_ROW_1                       (CVP_ROW_0+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
244#define REST_HEIGHT                     (TP_HEIGHT-CVP_ROW_1-2*RSC_SP_GRP_SPACE_Y-RSC_CD_FIXEDTEXT_HEIGHT-RSC_CD_PUSHBUTTON_HEIGHT)
245#define CVP_ROW_2                       (CVP_ROW_1+REST_HEIGHT/3*2+RSC_SP_CTRL_DESC_Y)
246#define CVP_ROW_3                       (CVP_ROW_2+RSC_CD_PUSHBUTTON_HEIGHT)
247#define CVP_ROW_4                       (CVP_ROW_3+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
248
249//#define CV_ROW_0A                      (CV_ROW_0+RSC_SP_CTRL_DESC_Y+RSC_CD_FIXEDTEXT_HEIGHT)
250//#define CV_ROW_2A                      (CV_ROW_2+RSC_SP_CTRL_DESC_Y+RSC_CD_FIXEDTEXT_HEIGHT)
251
252// --------- tab dialog macro security ---------
253
254#define MS_COL_A                        (TD_WIDTH-RSC_SP_DLG_INNERBORDER_LEFT)
255#define MS_COL_B						(MS_COL_A-RSC_CD_PUSHBUTTON_WIDTH)
256#define MS_COL_C						(MS_COL_B-RSC_SP_CTRL_X)
257#define MS_COL_D						(MS_COL_C-RSC_CD_PUSHBUTTON_WIDTH)
258#define MS_COL_E						(MS_COL_D-RSC_SP_CTRL_X)
259#define MS_COL_F						(MS_COL_E-RSC_CD_PUSHBUTTON_WIDTH)
260#define MS_COL_G						(MS_COL_F-RSC_SP_CTRL_X)
261#define MS_COL_H						(MS_COL_G-RSC_CD_PUSHBUTTON_WIDTH)
262
263// --------- tab page security level ---------
264
265#define FL_SECLEVEL						1
266#define RB_VERYHIGH						2
267#define RB_HIGH							3
268#define RB_MEDIUM						4
269#define RB_LOW							5
270#define FI_SEC_READONLY                 6
271
272#define RSC_BIG_RADIOBUTTON             40
273#define SL_RB_DIST_Y                    (RSC_SP_FLGR_SPACE_Y+RSC_BIG_RADIOBUTTON)
274#define SL_COL_0                        RSC_SP_TBPG_INNERBORDER_LEFT
275#define SL_COL_1						(SL_COL_0+RSC_SP_FLGR_SPACE_X)
276#define SL_COL_3						(TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT)
277#define SL_COL_2                        ((SL_COL_3-SL_COL_1)*100/105)
278#define SL_ROW_0						RSC_SP_TBPG_INNERBORDER_TOP
279#define SL_ROW_1                        (SL_ROW_0+SL_RB_DIST_Y)
280#define SL_ROW_2                        (SL_ROW_1+SL_RB_DIST_Y)
281#define SL_ROW_3                        (SL_ROW_2+SL_RB_DIST_Y)
282#define SL_ROW_4                        (TP_HEIGHT-RSC_SP_TBPG_INNERBORDER_BOTTOM)
283
284// --------- tab page trusted sources ---------
285
286#define FL_TRUSTCERT					1
287#define LB_TRUSTCERT					2
288#define PB_ADD_TRUSTCERT				3
289#define PB_VIEW_TRUSTCERT				4
290#define PB_REMOVE_TRUSTCERT				5
291#define FL_TRUSTFILELOC					6
292#define FI_TRUSTFILELOC					7
293#define LB_TRUSTFILELOC					8
294#define FL_ADD_TRUSTFILELOC				9
295#define FL_REMOVE_TRUSTFILELOC			10
296#define FI_TRUSTCERT_RO                 11
297#define FI_TRUSTFILE_RO                 12
298
299#define TS_COL_0                        RSC_SP_TBPG_INNERBORDER_LEFT
300#define TS_COL_1						(TS_COL_0+RSC_SP_FLGR_SPACE_X)
301#define TS_COL_8                        (TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT)
302#define TS_COL_7                        (TS_COL_8-RSC_SP_FLGR_SPACE_X)
303#define TS_COL_6                        (TS_COL_7-RSC_CD_PUSHBUTTON_WIDTH)
304#define TS_COL_5						(TS_COL_6-RSC_SP_CTRL_GROUP_X)
305#define TS_COL_4						(TS_COL_5-RSC_CD_PUSHBUTTON_WIDTH)
306#define TS_COL_3						(TS_COL_4-RSC_SP_CTRL_GROUP_X)
307#define TS_COL_2						(TS_COL_3-RSC_CD_PUSHBUTTON_WIDTH)
308
309#define RSC_CD_TABLISTBOX_HEIGHT        6*RSC_BS_CHARHEIGHT
310#define TS_ROW_0                        RSC_SP_TBPG_INNERBORDER_TOP
311#define TS_ROW_1                        (TS_ROW_0+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
312#define TS_ROW_2                        (TS_ROW_1+RSC_CD_TABLISTBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
313#define TS_ROW_3                        (TS_ROW_2+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_FLGR_SPACE_Y)
314#define TS_ROW_4                        (TS_ROW_3+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
315#define TS_ROW_5                        (TS_ROW_4+3*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_FLGR_SPACE_Y)
316
317#define TS_ROW_8                        (TP_HEIGHT-RSC_SP_TBPG_INNERBORDER_BOTTOM)
318#define TS_ROW_7                        (TS_ROW_8-RSC_CD_PUSHBUTTON_HEIGHT)
319#define TS_ROW_6                        (TS_ROW_7-RSC_SP_FLGR_SPACE_Y)
320
321// --------- signed macro warning ---------
322
323#define FI_DOCNAME						1
324#define FI_DESCR1A						2
325#define FI_SIGNS						3
326#define PB_VIEWSIGNS					4
327#define FI_DESCR2						5
328#define CB_ALWAYSTRUST					6
329#define PB_ENABLE						7
330#define PB_DISABLE						8
331#define FI_DESCR1B						9
332
333#define MW_WIDTH						DLGS_WIDTH
334#define MW_HEIGHT						DLGS_HEIGHT
335
336#define MW_SYMBOL_WIDTH					(20)
337
338#define MW_COL_0						(RSC_SP_DLG_INNERBORDER_LEFT)
339#define MW_COL_1						(MW_COL_0+MW_SYMBOL_WIDTH)
340#define MW_COL_4						(MW_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
341#define MW_COL_3						(MW_COL_4-RSC_CD_PUSHBUTTON_WIDTH)
342#define MW_COL_2						(MW_COL_3-RSC_SP_CTRL_DESC_X)
343#define MW_COL_A						(DLGS_BOTTOM_OK_X(MW_WIDTH))
344#define MW_COL_C						(DLGS_BOTTOM_CANCEL_X(MW_WIDTH))
345#define MW_COL_E						(DLGS_BOTTOM_HELP_X(MW_WIDTH))
346#define MW_ROW_0						(RSC_SP_DLG_INNERBORDER_TOP)
347#define MW_ROW_1						(MW_ROW_0+3*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_Y)
348#define MW_ROW_2						(MW_ROW_1+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_Y)
349#define MW_ROW_7						(MW_HEIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM)
350#define MW_ROW_6						(DLGS_BOTTOM_BTN_Y(MW_HEIGHT))
351#define MW_ROW_5						(DLGS_BOTTOM_FL_Y(MW_HEIGHT))
352#define MW_ROW_4						(MW_ROW_5-RSC_CD_CHECKBOX_HEIGHT-RSC_SP_CTRL_Y)
353#define MW_ROW_3						(MW_ROW_4-4*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_Y)
354
355#endif
356
357