2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 /* =====================================================
22 * global helper macros
23 * =====================================================*/
25 #define DOSTRING( x ) #x
26 #define STRING( x ) DOSTRING( x )
27 #define DOCONCAT2( x, y ) x##y
28 #define CONCAT2( x, y) DOCONCAT2(x,y)
29 #define DOCONCAT3( x, y, z ) x##y##z
30 #define CONCAT3( x, y, z ) DOCONCAT3(x,y,z)
31 #define DOCONCAT4( x, y, z, a ) x##y##z##a
32 #define CONCAT4( x, y, z, a ) DOCONCAT4(x,y,z,a)
33 #define DOCONCAT5( x, y, z, a, b ) x##y##z##a##b
34 #define CONCAT5( x, y, z, a, b ) DOCONCAT5(x,y,z,a,b)
35 #define DOCONCAT6( x, y, z, a, b, c ) x##y##z##a##b##c
36 #define CONCAT6( x, y, z, a, b, c ) DOCONCAT6(x,y,z,a,b,c)
37 #define DOCONCAT7( x, y, z, a, b, c, u) x##y##z##a##b##c##u
38 #define CONCAT7( x, y, z, a, b, c, u) DOCONCAT7(x,y,z,a,b,c,u)
39 #define DOCONCAT8( x, y, z, a, b, c, u, v) x##y##z##a##b##c##u##v
40 #define CONCAT8( x, y, z, a, b, c, u, v) DOCONCAT8(x,y,z,a,b,c,u,v)
41 #define DOCONCAT9( x, y, z, a, b, c, u, v, w) x##y##z##a##b##c##u##v##w
42 #define CONCAT9( x, y, z, a, b, c, u, v, w) DOCONCAT9(x,y,z,a,b,c,u,v,w)
44 #define MOD_NAME_DESC(id) \
45 ALL_LANG(Name,STR_NAME_##id); \
46 ALL_LANG(Description,STR_DESC_##id)
48 #define REG_VALUE_LNG(id) \
49 ALL_LANG(Value,STR_REG_VAL_##id);
53 #define UNXSUFFIX .dylib
60 #define PROFILENAME(name) STRING(CONCAT2(name,rc))
62 #define PROFILENAME(name) STRING(CONCAT2(name,.ini))
66 #define GID_BRAND_DIR_ETC gid_Brand_Dir_Share
67 #define GID_DIR_PY gid_Brand_Dir_Share
68 #define GID_DIR_URE_LIB gid_Dir_Frameworks
70 #define GID_BRAND_DIR_ETC gid_Brand_Dir_Program
71 #define GID_DIR_PY gid_Brand_Dir_Program
72 #define GID_DIR_URE_LIB gid_Brand_Dir_Program
75 #define RESFILENAME(name,lang) STRING(CONCAT3(name,lang,.res))
76 #define READMETXTFILENAME(name,lang,ext) STRING(CONCAT4(name,lang,.,ext))
77 #define READMEFILENAME(name,lang) STRING(CONCAT2(name,lang))
78 #define EXTRAFILENAME(name,lang) STRING(CONCAT3(name,lang,.zip))
79 #define EXTRAFILELISTNAME(prefix,name,lang) STRING(CONCAT4(prefix,name,lang,.filelist))
80 #define CONFIGLANGFILENAME(name,lang,ext) STRING(CONCAT4(name,lang,.,ext))
82 #define SCP2_OOO_BIN_DIR gid_Brand_Dir_Program
85 #define SCP2_OOO_LIB_DIR gid_Dir_Frameworks
87 #define SCP2_OOO_LIB_DIR SCP2_OOO_BIN_DIR
90 #define BIN_FILE_BODY \
93 #define LIB_FILE_BODY \
96 #define TXT_FILE_BODY \
99 #define USER_FILE_BODY \
102 #define PACKED_TXT_FILE_BODY \
106 #ifdef WITH_HELPPACK_INTEGRATION
107 #define FILELIST_TXT_FILE_BODY_HELPPACK \
109 Styles = (FILELIST,FORCEHELPPACK,LANGUAGEMODULE)
111 #define FILELIST_TXT_FILE_BODY_HELPPACK \
113 Styles = (FILELIST,HELPPACK,LANGUAGEMODULE)
116 #define PACKAGE_FILELIST(id,name) \
118 Dir = FILELIST_DIR; \
120 Styles = (FILELIST, USE_INTERNAL_RIGHTS, PACKED); \
123 #define PACKED_LIB_FILE_BODY \
126 Dir = SCP2_OOO_LIB_DIR
128 #define LIBO_LIB_FILE(id,name) \
131 PACKED_LIB_FILE_BODY; \
134 #define LIBO_LIB_FILE_BINARYTABLE(id,name) \
137 PACKED_LIB_FILE_BODY; \
138 Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY); \
141 #define LIBO_LIB_FILE_COMPONENTCONDITION(id,name,cond) \
144 PACKED_LIB_FILE_BODY; \
145 ComponentCondition = cond; \
148 #define SHLXTHDL_LIB_FILE(id,name) \
153 Dir = gid_Dir_Shlxthdl; \
156 #define SHLXTHDL_LIB_FILE_COMPONENTCONDITION(id,name,cond) \
161 Dir = gid_Dir_Shlxthdl; \
162 ComponentCondition = cond; \
166 // links are created at configure time by odk/config/setsdkenv_unix.sh.in
167 #define SDK_LIBRARY_LINK(id,name,target)
169 #define SDK_LIBRARY_LINK(id,name,target) \
173 Dir = gid_Dir_Lib_Sdk; \
177 #define SDK_LIBRARY_LINK(id,name,target) \
181 Dir = gid_Dir_Lib_Sdk; \
187 #define STD_RES_FILE(id,name) \
190 RESFILE_ALL_LANG(name); \
191 Dir = gid_Dir_Resource; \
196 #define STD_FONT_FILELIST(id,name) \
199 Dir = FILELIST_DIR; \
200 Styles = (FILELIST, PACKED, FONT_WARN_IF_EXISTS); \
206 #define STD_FONT_FILELIST(id,name) \
209 Dir = FILELIST_DIR; \
210 Styles = (FILELIST,PACKED,FONT,DONT_DELETE,FONT_WARN_IF_EXISTS); \
215 #define LIBO_JAR_FILE(id,name) \
219 Dir = gid_Dir_Classes; \
223 #define URE_JAR_FILE(id,name) \
227 Dir = gid_Dir_Classes; \
231 #define CONDITIONAL_MODULE_ENTRY(name,modid) \
232 Module gid_Module_Root_Reg_##name \
234 Name = STRING(CONCAT2(gid_Module_Root_,name)); \
235 Description = STRING(CONCAT2(gid_Module_Root_,name)); \
237 Styles = (HIDDEN_ROOT); \
240 #define REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \
241 RegistryItem gid_Regitem_OpenOffice_##cond##_OpenWith_##doc_type \
242 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
244 Subkey = STRING(CONCAT3(.,key,\OpenWithProgIDs)); \
245 Name = STRING(CONCAT2(LibreOffice.,name)); \
249 #define REGISTRY_ENTRY_OPEN_WITH_TMPL(name,cond,doc_type,modid,key) \
250 RegistryItem gid_Regitem_OpenOffice_##cond##_OpenWith_##doc_type \
251 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
253 Subkey = STRING(CONCAT3(.,key,\OpenWithProgIDs)); \
254 Name = STRING(CONCAT2(LibreOffice.,name)); \
258 #define CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
259 RegistryItem gid_Regitem__##name \
260 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
261 ModuleID = gid_Module_Root_Reg_##name; \
262 Subkey = STRING(CONCAT2(.,key)); \
263 Value = STRING(CONCAT2(LibreOffice.,name)); \
264 ComponentCondition = STRING(CONCAT3(REGISTER_,cond,=1)); \
267 #define CONDITIONAL_REGISTRY_ENTRY_EXT_MEDIATYPE(name,cond,key,mediatype) \
268 RegistryItem gid_Regitem__MediaType_##name \
269 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
270 ModuleID = gid_Module_Root_Reg_##name; \
271 Subkey = STRING(CONCAT2(.,key)); \
272 Name = STRING(Content Type); \
273 Value = STRING(mediatype); \
274 ComponentCondition = STRING(CONCAT3(REGISTER_,cond,=1)); \
277 #define CONDITIONAL_REGISTRY_ENTRY_MEDIATYPE_DEF_EXT(name,cond,key,mediatype) \
278 RegistryItem gid_Regitem__MediaType_DefExt_##name \
279 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
280 ModuleID = gid_Module_Root_Reg_##name; \
281 Subkey = STRING(CONCAT2(MIME\Database\Content Type\,mediatype)); \
282 Name = STRING(Extension); \
283 Value = STRING(CONCAT2(.,key)); \
284 ComponentCondition = STRING(CONCAT3(REGISTER_,cond,=1)); \
287 #define REGISTRY_ENTRY_DOC(name,modid,disp_name) \
288 RegistryItem CONCAT2(gid_Regitem_Openoffice_,name) \
289 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
291 Subkey = STRING(CONCAT2(LibreOffice.,name)); \
292 REG_VALUE_LNG(disp_name) \
295 #define REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
296 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_AppUserModelID) \
297 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
299 ComponentCondition = STRING(VersionNT >= 601); \
300 Subkey = STRING(CONCAT2(LibreOffice.,name)); \
301 Name = STRING(AppUserModelID); \
302 Value = STRING(CONCAT2(TheDocumentFoundation.LibreOffice.,doc_type)); \
305 #define REGISTRY_ENTRY_ICON(name,modid,icon_id) \
306 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Defaulticon) \
307 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
309 Subkey = STRING(CONCAT3(LibreOffice.,name,\DefaultIcon)); \
310 Value = "<progpath>\program\soffice.bin," STRING(icon_id); \
313 #define REGISTRY_ENTRY_SHELL(name,default,modid) \
314 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell) \
315 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
317 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell)); \
318 Value = STRING(default); \
321 #define REGISTRY_ENTRY_NEW_CMD_PPA(name,modid,progpath_program_app) \
322 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_New) \
323 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
325 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\new)); \
328 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_New_Command) \
329 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
331 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\new\command)); \
332 Value = "\"" STRING(progpath_program_app) "\" -n \"%1\""; \
335 #define REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
336 REGISTRY_ENTRY_NEW_CMD_PPA(name,modid,<progpath>\program\app)
338 #define REGISTRY_ENTRY_OPEN_CMD_PPA(name,modid,progpath_program_app) \
339 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Open_Command) \
340 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
342 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\open\command)); \
343 Value = "\"" STRING(progpath_program_app) "\" -o \"%1\""; \
346 #define REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
347 REGISTRY_ENTRY_OPEN_CMD_PPA(name,modid,<progpath>\program\app)
349 #define REGISTRY_ENTRY_PRINT_CMD_PPA(name,modid,progpath_program_app) \
350 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Print_Command) \
351 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
353 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\print\command)); \
354 Value = "\"" STRING(progpath_program_app) "\" -p \"%1\""; \
357 #define REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
358 REGISTRY_ENTRY_PRINT_CMD_PPA(name,modid,<progpath>\program\app)
360 #define REGISTRY_ENTRY_PRINTTO_CMD_PPA(name,modid,progpath_program_app) \
361 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Printto_Command) \
362 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
364 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\printto\command)); \
365 Value = "\"" STRING(progpath_program_app) "\" -pt \"%2\" \"%1\""; \
368 #define REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
369 REGISTRY_ENTRY_PRINTTO_CMD_PPA(name,modid,<progpath>\program\app)
371 #define REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
372 RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_FileAssociations_,name) \
373 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
375 Subkey = STRING(Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\Capabilities\FileAssociations); \
376 Name = STRING(CONCAT2(.,key)); \
377 Value = STRING(CONCAT2(LibreOffice.,name)); \
381 #define REGISTRY_ENTRY_TEMPLATE_CAPABILITIES(name,modid,key,doc_type) \
382 RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_FileAssociations_,name) \
383 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
385 Subkey = STRING(Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\Capabilities\FileAssociations); \
386 Name = STRING(CONCAT2(.,key)); \
387 Value = STRING(CONCAT2(LibreOffice.,name)); \
391 #define REGISTRY_ENTRY_CAPABILITIES_URL(scheme,name,modid,handler) \
392 RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_URLAssociations_,name) \
393 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
395 Subkey = STRING(Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\Capabilities\URLAssociations); \
401 #define CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
402 CONDITIONAL_MODULE_ENTRY(name,modid) \
403 REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \
404 CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
405 REGISTRY_ENTRY_DOC(name,modid,disp_name) \
406 REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
407 REGISTRY_ENTRY_ICON(name,modid,icon_id) \
408 REGISTRY_ENTRY_SHELL(name,default,modid) \
409 REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
410 REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
412 #define CONDITIONAL_REGISTER_DOC_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
413 CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
414 REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
415 REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
416 REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
418 #define CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
419 CONDITIONAL_MODULE_ENTRY(name,modid) \
420 REGISTRY_ENTRY_OPEN_WITH_TMPL(name,cond,doc_type,modid,key) \
421 CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
422 REGISTRY_ENTRY_DOC(name,modid,disp_name) \
423 REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
424 REGISTRY_ENTRY_ICON(name,modid,icon_id) \
425 REGISTRY_ENTRY_SHELL(name,default,modid) \
426 REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
427 REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
428 REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
429 REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
430 REGISTRY_ENTRY_TEMPLATE_CAPABILITIES(name,modid,key,doc_type) \
436 #define REGISTER_PROPERTY_HANDLER_FOR_EXTENSION(extension) \
437 RegistryItem CONCAT2(gid_Regitem_Software_Microsoft_Windows_CurrentVersion_PropertySystem_PropertyHandlers_,extension) \
438 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
439 ModuleID = gid_Module_Optional_Winexplorerext; \
440 ComponentCondition = "VersionNT >= 600"; \
441 Subkey = STRING(CONCAT2(SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.,extension)); \
442 Value = "{AE424E85-F6DF-4910-A6A9-438797986431}"; \
445 RegistryItem CONCAT3(gid_Regitem_Software_Microsoft_Windows_CurrentVersion_PropertySystem_PropertyHandlers_,extension,_x64) \
446 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
447 ModuleID = gid_Module_Optional_Winexplorerext_x64; \
448 ComponentCondition = "VersionNT64 >= 600"; \
449 Subkey = STRING(CONCAT2(SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.,extension)); \
450 Value = "{AE424E85-F6DF-4910-A6A9-438797986431}"; \
455 #define REGISTER_PROPERTY_HANDLER_FOR_EXTENSION(extension) \
456 RegistryItem CONCAT2(gid_Regitem_Software_Microsoft_Windows_CurrentVersion_PropertySystem_PropertyHandlers_,extension) \
457 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
458 ModuleID = gid_Module_Optional_Winexplorerext; \
459 ComponentCondition = "VersionNT >= 600"; \
460 Subkey = STRING(CONCAT2(SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.,extension)); \
461 Value = "{AE424E85-F6DF-4910-A6A9-438797986431}"; \
467 #define REGISTER_PROPERTY_HANDLER_FOR_EXTENSION(extension) // empty
471 #define SCP2_URE_DL_DIR GID_DIR_URE_LIB
473 #define SCP2_URE_DL_NORMAL(n) n ".dll"
474 #define SCP2_URE_DL_VER(n, v) n v ".dll"
475 #define SCP2_URE_DL_UNO_VER(n, v) n v ".dll"
476 #define SCP2_URE_DL_UNO_COMID_VER(n, v) n v STRING(COMID) ".dll"
478 #define SCP2_URE_DL_NORMAL(n) "lib" n STRING(UNXSUFFIX)
479 #define SCP2_URE_DL_VER(n, v) "lib" n STRING(UNXSUFFIX) "." v
480 #define SCP2_URE_DL_UNO_VER(n, v) "libuno_" n STRING(UNXSUFFIX) "." v
481 #define SCP2_URE_DL_UNO_NORMAL(n) "libuno_" n STRING(UNXSUFFIX)
482 #define SCP2_URE_DL_UNO_COMID_VER(n, v) \
483 "libuno_" n STRING(COMID) STRING(UNXSUFFIX) "." v
484 #define SCP2_URE_DL_UNO_COMID_NORMAL(n) \
485 "libuno_" n STRING(COMID) STRING(UNXSUFFIX)
488 #define SCP2_URE_JDL_NORMAL(n) "lib" n ".jnilib"
490 #define SCP2_URE_JDL_NORMAL(n) SCP2_URE_DL_NORMAL(n)
494 #define FILELIST_DIR PREDEFINED_PROGDIR
495 #define FILELIST_SDK_DIR PREDEFINED_PROGDIR
497 #define FILELIST_DIR gid_Dir_Brand_Root
499 #define FILELIST_SDK_DIR gid_Dir_Sdkoo_Root
501 #define FILELIST_SDK_DIR PREDEFINED_PROGDIR
505 #define UI_FILELIST(name, file) \
506 File CONCAT2(gid_File_Share_Config_Sofficecfg_uiconfig_, name) \
508 Styles = (FILELIST); \
509 Dir = FILELIST_DIR; \
513 #include <langmacros.inc>
515 #define UI_FILELIST_ALL_LANG(name, file) \
516 File CONCAT3(gid_File_Share_Config_Sofficecfg_uiconfig_, name, _Lang) \
519 Dir = gid_Dir_Share_Config_Sofficecfg; \
520 UI_ALL_LANG_BUT_EN_US(file); \
523 #define URE_PRIVATE_LIB(id,name) \
526 Dir = SCP2_URE_DL_DIR; \
531 #define URE_EXECUTABLE(id,name) \
534 Dir = gid_Brand_Dir_Program; \
539 #define LIBO_EXECUTABLE(id,name) \
542 Dir = gid_Brand_Dir_Program; \
547 #define LIBO_EXECUTABLE_COMPONENTCONDITION(id,name,cond) \
550 Dir = gid_Brand_Dir_Program; \
553 ComponentCondition = cond; \
556 #define SDK_EXECUTABLE(id,name) \
559 Dir = gid_Dir_Sdkoo_Bin; \
564 #define GALLERY_NAME(id) \
566 #define GALLERY_FILELIST(id) \
567 File gid_File_Extra_Gall##id \
568 Dir = FILELIST_DIR; \
570 Styles = (FILELIST, WORKSTATION); \
571 Name = STRING(CONCAT3(Gallery/,id,.filelist)); \
573 File gid_File_Extra_GallFiles##id \
574 Dir = FILELIST_DIR; \
576 Styles = (FILELIST, WORKSTATION); \
577 Name = STRING(CONCAT3(Gallery/Files/,id,.filelist)); \
580 #define REGISTER_URI_HANDLER_IMPL(protocol,protid,modid,cond) \
581 RegistryItem CONCAT2(gid_Regitem_,protid) \
582 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
584 Subkey = STRING(protocol); \
585 Value = "URL:" STRING(protocol) " Protocol"; \
588 RegistryItem CONCAT3(gid_Regitem_,protid,_URL_Protocol) \
589 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
591 Subkey = STRING(protocol); \
592 Name = "URL Protocol"; \
594 RegistryItem CONCAT3(gid_Regitem_,protid,_UseOriginalUrlEncoding) \
595 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
597 Subkey = STRING(protocol); \
598 Name = "UseOriginalUrlEncoding"; \
601 RegistryItem CONCAT3(gid_Regitem_,protid,_DefaultIcon) \
602 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
604 Subkey = STRING(CONCAT2(protocol,\DefaultIcon)); \
605 Value = "<progpath>\program\soffice.bin,0"; \
607 RegistryItem CONCAT3(gid_Regitem_,protid,_shell_open_command) \
608 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
610 Subkey = STRING(CONCAT2(protocol,\shell\open\command)); \
611 Value = "\"<progpath>\program\soffice.exe\" \"%1\""; \
614 #define REG_COND(cond) \
615 ComponentCondition = STRING(CONCAT2(cond,=1));
617 #define REG_EMPTY_COND
619 #define REGISTER_URI_HANDLER(protocol,protid,modid) \
620 REGISTER_URI_HANDLER_IMPL(protocol,protid,modid,REG_EMPTY_COND)
622 #define CONDITIONAL_REGISTER_URI_HANDLER(protocol,protid,modid,cond) \
623 CONDITIONAL_MODULE_ENTRY(protid,modid) \
624 REGISTER_URI_HANDLER_IMPL(protocol,protid,gid_Module_Root_Reg_##protid,REG_COND(cond))