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 PACKAGE_FILELIST_COMPONENTCONDITION(id,name,cond) \
125 Dir = FILELIST_DIR; \
127 Styles = (FILELIST, USE_INTERNAL_RIGHTS, PACKED); \
128 ComponentCondition = cond; \
132 #define PACKAGE_FILELIST_FONT(id,name) \
134 Dir = FILELIST_DIR; \
136 Styles = (FILELIST, USE_INTERNAL_RIGHTS, PACKED, FONT); \
139 #define PACKAGE_FILELIST_FONT PACKAGE_FILELIST
142 #define SDK_PACKAGE_FILELIST(id,name) \
144 Dir = FILELIST_SDK_DIR; \
146 Styles = (FILELIST, USE_INTERNAL_RIGHTS, PACKED); \
149 #define PACKED_LIB_FILE_BODY \
152 Dir = SCP2_OOO_LIB_DIR
154 #define LIBO_LIB_FILE(id,name) \
157 PACKED_LIB_FILE_BODY; \
160 #define LIBO_LIB_FILE_BINARYTABLE(id,name) \
163 PACKED_LIB_FILE_BODY; \
164 Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY); \
167 #define LIBO_LIB_FILE_COMPONENTCONDITION(id,name,cond) \
170 PACKED_LIB_FILE_BODY; \
171 ComponentCondition = cond; \
174 #define SHLXTHDL_LIB_FILE(id,name) \
179 Dir = gid_Dir_Shlxthdl; \
182 #define SHLXTHDL_X64_LIB_FILE_COMPONENTCONDITION(id,name,cond) \
187 Dir = gid_Dir_Shlxthdl_x64; \
188 ComponentCondition = cond; \
192 // links are created at configure time by odk/config/setsdkenv_unix.sh.in
193 #define SDK_LIBRARY_LINK(id,name,target)
195 #define SDK_LIBRARY_LINK(id,name,target) \
199 Dir = gid_Dir_Lib_Sdk; \
203 #define SDK_LIBRARY_LINK(id,name,target) \
207 Dir = gid_Dir_Lib_Sdk; \
213 #define LIBO_JAR_FILE(id,name) \
217 Dir = gid_Dir_Classes; \
221 #define URE_JAR_FILE(id,name) \
225 Dir = gid_Dir_Classes; \
229 #define CONDITIONAL_MODULE_ENTRY(name,modid) \
230 Module gid_Module_Root_Reg_##name \
232 Name = STRING(CONCAT2(gid_Module_Root_,name)); \
233 Description = STRING(CONCAT2(gid_Module_Root_,name)); \
235 Styles = (HIDDEN_ROOT); \
238 #define REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \
239 RegistryItem gid_Regitem_OpenOffice_##cond##_OpenWith_##doc_type \
240 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
242 Subkey = STRING(CONCAT3(.,key,\OpenWithProgIDs)); \
243 Name = STRING(CONCAT2(CollaboraOffice.,name)); \
247 #define REGISTRY_ENTRY_OPEN_WITH_TMPL(name,cond,doc_type,modid,key) \
248 RegistryItem gid_Regitem_OpenOffice_##cond##_OpenWith_##doc_type \
249 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
251 Subkey = STRING(CONCAT3(.,key,\OpenWithProgIDs)); \
252 Name = STRING(CONCAT2(CollaboraOffice.,name)); \
256 #define CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
257 RegistryItem gid_Regitem__##name \
258 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
259 ModuleID = gid_Module_Root_Reg_##name; \
260 Subkey = STRING(CONCAT2(.,key)); \
261 Value = STRING(CONCAT2(CollaboraOffice.,name)); \
262 ComponentCondition = STRING(CONCAT3(REGISTER_,cond,=1)); \
265 #define CONDITIONAL_REGISTRY_ENTRY_EXT_MEDIATYPE(name,cond,key,mediatype) \
266 RegistryItem gid_Regitem__MediaType_##name \
267 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
268 ModuleID = gid_Module_Root_Reg_##name; \
269 Subkey = STRING(CONCAT2(.,key)); \
270 Name = STRING(Content Type); \
271 Value = STRING(mediatype); \
272 ComponentCondition = STRING(CONCAT3(REGISTER_,cond,=1)); \
275 #define REGISTRY_ENTRY_DOC(name,modid,disp_name) \
276 RegistryItem CONCAT2(gid_Regitem_Openoffice_,name) \
277 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
279 Subkey = STRING(CONCAT2(CollaboraOffice.,name)); \
280 REG_VALUE_LNG(disp_name) \
283 #define REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
284 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_AppUserModelID) \
285 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
287 Subkey = STRING(CONCAT2(CollaboraOffice.,name)); \
288 Name = STRING(AppUserModelID); \
289 Value = STRING(CONCAT2(Collabora.CollaboraOffice.,doc_type)); \
292 #define REGISTRY_ENTRY_ICON(name,modid,icon_id) \
293 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Defaulticon) \
294 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
296 Subkey = STRING(CONCAT3(CollaboraOffice.,name,\DefaultIcon)); \
297 Value = "<progpath>\program\soffice.bin," STRING(icon_id); \
300 #define REGISTRY_ENTRY_SHELL(name,default,modid) \
301 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell) \
302 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
304 Subkey = STRING(CONCAT3(CollaboraOffice.,name,\shell)); \
305 Value = STRING(default); \
308 #define REGISTRY_ENTRY_NEW_CMD_PPA(name,modid,progpath_program_app) \
309 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_New) \
310 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
312 Subkey = STRING(CONCAT3(CollaboraOffice.,name,\shell\new)); \
315 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_New_Command) \
316 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
318 Subkey = STRING(CONCAT3(CollaboraOffice.,name,\shell\new\command)); \
319 Value = "\"" STRING(progpath_program_app) "\" -n \"%1\""; \
322 #define REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
323 REGISTRY_ENTRY_NEW_CMD_PPA(name,modid,<progpath>\program\app)
325 #define REGISTRY_ENTRY_OPEN_CMD_PPA(name,modid,progpath_program_app) \
326 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Open_Command) \
327 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
329 Subkey = STRING(CONCAT3(CollaboraOffice.,name,\shell\open\command)); \
330 Value = "\"" STRING(progpath_program_app) "\" -o \"%1\""; \
333 #define REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
334 REGISTRY_ENTRY_OPEN_CMD_PPA(name,modid,<progpath>\program\app)
336 #define REGISTRY_ENTRY_PRINT_CMD_PPA(name,modid,progpath_program_app) \
337 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Print_Command) \
338 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
340 Subkey = STRING(CONCAT3(CollaboraOffice.,name,\shell\print\command)); \
341 Value = "\"" STRING(progpath_program_app) "\" -p \"%1\""; \
344 #define REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
345 REGISTRY_ENTRY_PRINT_CMD_PPA(name,modid,<progpath>\program\app)
347 #define REGISTRY_ENTRY_PRINTTO_CMD_PPA(name,modid,progpath_program_app) \
348 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Printto_Command) \
349 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
351 Subkey = STRING(CONCAT3(CollaboraOffice.,name,\shell\printto\command)); \
352 Value = "\"" STRING(progpath_program_app) "\" -pt \"%2\" \"%1\""; \
355 #define REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
356 REGISTRY_ENTRY_PRINTTO_CMD_PPA(name,modid,<progpath>\program\app)
358 #define REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
359 RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_FileAssociations_,name) \
360 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
362 Subkey = STRING(Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\Capabilities\FileAssociations); \
363 Name = STRING(CONCAT2(.,key)); \
364 Value = STRING(CONCAT2(CollaboraOffice.,name)); \
368 #define REGISTRY_ENTRY_TEMPLATE_CAPABILITIES(name,modid,key,doc_type) \
369 RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_FileAssociations_,name) \
370 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
372 Subkey = STRING(Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\Capabilities\FileAssociations); \
373 Name = STRING(CONCAT2(.,key)); \
374 Value = STRING(CONCAT2(CollaboraOffice.,name)); \
378 #define REGISTRY_ENTRY_CAPABILITIES_URL(scheme,name,modid,handler) \
379 RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_URLAssociations_,name) \
380 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
382 Subkey = STRING(Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\Capabilities\URLAssociations); \
388 #define CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
389 CONDITIONAL_MODULE_ENTRY(name,modid) \
390 REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \
391 CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
392 REGISTRY_ENTRY_DOC(name,modid,disp_name) \
393 REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
394 REGISTRY_ENTRY_ICON(name,modid,icon_id) \
395 REGISTRY_ENTRY_SHELL(name,default,modid) \
396 REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
397 REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
399 #define CONDITIONAL_REGISTER_DOC_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
400 CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
401 REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
402 REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
403 REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
405 #define CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
406 CONDITIONAL_MODULE_ENTRY(name,modid) \
407 REGISTRY_ENTRY_OPEN_WITH_TMPL(name,cond,doc_type,modid,key) \
408 CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
409 REGISTRY_ENTRY_DOC(name,modid,disp_name) \
410 REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
411 REGISTRY_ENTRY_ICON(name,modid,icon_id) \
412 REGISTRY_ENTRY_SHELL(name,default,modid) \
413 REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
414 REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
415 REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
416 REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
417 REGISTRY_ENTRY_TEMPLATE_CAPABILITIES(name,modid,key,doc_type) \
423 #define REGISTER_PROPERTY_HANDLER_FOR_EXTENSION(extension) \
424 RegistryItem CONCAT2(gid_Regitem_Software_Microsoft_Windows_CurrentVersion_PropertySystem_PropertyHandlers_,extension) \
425 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
426 ModuleID = gid_Module_Optional_Winexplorerext; \
427 Subkey = STRING(CONCAT2(SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.,extension)); \
428 Value = "{AE424E85-F6DF-4910-A6A9-438797986431}"; \
431 RegistryItem CONCAT3(gid_Regitem_Software_Microsoft_Windows_CurrentVersion_PropertySystem_PropertyHandlers_,extension,_x64) \
432 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
433 ModuleID = gid_Module_Optional_Winexplorerext_x64; \
434 ComponentCondition = "VersionNT64"; \
435 Subkey = STRING(CONCAT2(SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.,extension)); \
436 Value = "{AE424E85-F6DF-4910-A6A9-438797986431}"; \
441 #define REGISTER_PROPERTY_HANDLER_FOR_EXTENSION(extension) \
442 RegistryItem CONCAT2(gid_Regitem_Software_Microsoft_Windows_CurrentVersion_PropertySystem_PropertyHandlers_,extension) \
443 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
444 ModuleID = gid_Module_Optional_Winexplorerext; \
445 Subkey = STRING(CONCAT2(SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.,extension)); \
446 Value = "{AE424E85-F6DF-4910-A6A9-438797986431}"; \
452 #define REGISTER_PROPERTY_HANDLER_FOR_EXTENSION(extension) // empty
456 #define SCP2_URE_DL_DIR GID_DIR_URE_LIB
458 #define SCP2_URE_DL_NORMAL(n) n ".dll"
459 #define SCP2_URE_DL_VER(n, v) n v ".dll"
460 #define SCP2_URE_DL_UNO_VER(n, v) n v ".dll"
461 #define SCP2_URE_DL_UNO_COMID_VER(n, v) n v STRING(COMID) ".dll"
463 #define SCP2_URE_DL_NORMAL(n) "lib" n STRING(UNXSUFFIX)
464 #define SCP2_URE_DL_VER(n, v) "lib" n STRING(UNXSUFFIX) "." v
465 #define SCP2_URE_DL_UNO_VER(n, v) "libuno_" n STRING(UNXSUFFIX) "." v
466 #define SCP2_URE_DL_UNO_NORMAL(n) "libuno_" n STRING(UNXSUFFIX)
467 #define SCP2_URE_DL_UNO_COMID_VER(n, v) \
468 "libuno_" n STRING(COMID) STRING(UNXSUFFIX) "." v
469 #define SCP2_URE_DL_UNO_COMID_NORMAL(n) \
470 "libuno_" n STRING(COMID) STRING(UNXSUFFIX)
473 #define SCP2_URE_JDL_NORMAL(n) "lib" n ".jnilib"
475 #define SCP2_URE_JDL_NORMAL(n) SCP2_URE_DL_NORMAL(n)
479 #define FILELIST_DIR PREDEFINED_PROGDIR
480 #define FILELIST_SDK_DIR PREDEFINED_PROGDIR
482 #define FILELIST_DIR gid_Dir_Brand_Root
484 #define FILELIST_SDK_DIR gid_Dir_Sdkoo_Root
486 #define FILELIST_SDK_DIR PREDEFINED_PROGDIR
490 #define UI_FILELIST(name, file) \
491 File CONCAT2(gid_File_Share_Config_Sofficecfg_uiconfig_, name) \
493 Styles = (FILELIST); \
494 Dir = FILELIST_DIR; \
498 #include <langmacros.inc>
500 #define MO_FILELIST_ALL_LANG(name) \
501 File CONCAT3(gid_File_Res_, name, _Lang) \
504 Dir = gid_Dir_Resource; \
505 MO_ALL_LANG_EXCEPT_EN_US_AND_QTZ(name); \
508 #define URE_PRIVATE_LIB(id,name) \
511 Dir = SCP2_URE_DL_DIR; \
516 #define URE_EXECUTABLE(id,name) \
519 Dir = gid_Brand_Dir_Program; \
524 #define LIBO_EXECUTABLE(id,name) \
527 Dir = gid_Brand_Dir_Program; \
532 #define LIBO_EXECUTABLE_COMPONENTCONDITION(id,name,cond) \
535 Dir = gid_Brand_Dir_Program; \
538 ComponentCondition = cond; \
541 #define SDK_EXECUTABLE(id,name) \
544 Dir = gid_Dir_Sdkoo_Bin; \
549 #define GALLERY_NAME(id) \
551 #define GALLERY_FILELIST(id) \
552 File gid_File_Extra_Gall##id \
553 Dir = FILELIST_DIR; \
555 Styles = (FILELIST, WORKSTATION); \
556 Name = STRING(CONCAT3(Gallery/,id,.filelist)); \
558 File gid_File_Extra_GallFiles##id \
559 Dir = FILELIST_DIR; \
561 Styles = (FILELIST, WORKSTATION); \
562 Name = STRING(CONCAT3(Gallery/Files/,id,.filelist)); \
565 #define REGISTER_URI_HANDLER_IMPL(protocol,protid,modid,cond) \
566 RegistryItem CONCAT2(gid_Regitem_,protid) \
567 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
569 Subkey = STRING(protocol); \
570 Value = "URL:" STRING(protocol) " Protocol"; \
573 RegistryItem CONCAT3(gid_Regitem_,protid,_URL_Protocol) \
574 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
576 Subkey = STRING(protocol); \
577 Name = "URL Protocol"; \
579 RegistryItem CONCAT3(gid_Regitem_,protid,_UseOriginalUrlEncoding) \
580 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
582 Subkey = STRING(protocol); \
583 Name = "UseOriginalUrlEncoding"; \
586 RegistryItem CONCAT3(gid_Regitem_,protid,_DefaultIcon) \
587 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
589 Subkey = STRING(CONCAT2(protocol,\DefaultIcon)); \
590 Value = "<progpath>\program\soffice.bin,0"; \
592 RegistryItem CONCAT3(gid_Regitem_,protid,_shell_open_command) \
593 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
595 Subkey = STRING(CONCAT2(protocol,\shell\open\command)); \
596 Value = "\"<progpath>\program\soffice.exe\" \"%1\""; \
599 #define REG_COND(cond) \
600 ComponentCondition = STRING(CONCAT2(cond,=1));
602 #define REG_EMPTY_COND
604 #define REGISTER_URI_HANDLER(protocol,protid,modid) \
605 REGISTER_URI_HANDLER_IMPL(protocol,protid,modid,REG_EMPTY_COND)
607 #define CONDITIONAL_REGISTER_URI_HANDLER(protocol,protid,modid,cond) \
608 CONDITIONAL_MODULE_ENTRY(protid,modid) \
609 REGISTER_URI_HANDLER_IMPL(protocol,protid,gid_Module_Root_Reg_##protid,REG_COND(cond))