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