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_LIB_FILE_COMPONENTCONDITION(id,name,cond) \
187 Dir = gid_Dir_Shlxthdl; \
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(LibreOffice.,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(LibreOffice.,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(LibreOffice.,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 CONDITIONAL_REGISTRY_ENTRY_MEDIATYPE_DEF_EXT(name,cond,key,mediatype) \
276 RegistryItem gid_Regitem__MediaType_DefExt_##name \
277 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
278 ModuleID = gid_Module_Root_Reg_##name; \
279 Subkey = STRING(CONCAT2(MIME\Database\Content Type\,mediatype)); \
280 Name = STRING(Extension); \
281 Value = STRING(CONCAT2(.,key)); \
282 ComponentCondition = STRING(CONCAT3(REGISTER_,cond,=1)); \
285 #define REGISTRY_ENTRY_DOC(name,modid,disp_name) \
286 RegistryItem CONCAT2(gid_Regitem_Openoffice_,name) \
287 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
289 Subkey = STRING(CONCAT2(LibreOffice.,name)); \
290 REG_VALUE_LNG(disp_name) \
293 #define REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
294 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_AppUserModelID) \
295 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
297 Subkey = STRING(CONCAT2(LibreOffice.,name)); \
298 Name = STRING(AppUserModelID); \
299 Value = STRING(CONCAT2(TheDocumentFoundation.LibreOffice.,doc_type)); \
302 #define REGISTRY_ENTRY_ICON(name,modid,icon_id) \
303 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Defaulticon) \
304 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
306 Subkey = STRING(CONCAT3(LibreOffice.,name,\DefaultIcon)); \
307 Value = "<progpath>\program\soffice.bin," STRING(icon_id); \
310 #define REGISTRY_ENTRY_SHELL(name,default,modid) \
311 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell) \
312 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
314 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell)); \
315 Value = STRING(default); \
318 #define REGISTRY_ENTRY_NEW_CMD_PPA(name,modid,progpath_program_app) \
319 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_New) \
320 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
322 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\new)); \
325 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_New_Command) \
326 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
328 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\new\command)); \
329 Value = "\"" STRING(progpath_program_app) "\" -n \"%1\""; \
332 #define REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
333 REGISTRY_ENTRY_NEW_CMD_PPA(name,modid,<progpath>\program\app)
335 #define REGISTRY_ENTRY_OPEN_CMD_PPA(name,modid,progpath_program_app) \
336 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Open_Command) \
337 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
339 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\open\command)); \
340 Value = "\"" STRING(progpath_program_app) "\" -o \"%1\""; \
343 #define REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
344 REGISTRY_ENTRY_OPEN_CMD_PPA(name,modid,<progpath>\program\app)
346 #define REGISTRY_ENTRY_PRINT_CMD_PPA(name,modid,progpath_program_app) \
347 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Print_Command) \
348 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
350 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\print\command)); \
351 Value = "\"" STRING(progpath_program_app) "\" -p \"%1\""; \
354 #define REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
355 REGISTRY_ENTRY_PRINT_CMD_PPA(name,modid,<progpath>\program\app)
357 #define REGISTRY_ENTRY_PRINTTO_CMD_PPA(name,modid,progpath_program_app) \
358 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Printto_Command) \
359 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
361 Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\printto\command)); \
362 Value = "\"" STRING(progpath_program_app) "\" -pt \"%2\" \"%1\""; \
365 #define REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
366 REGISTRY_ENTRY_PRINTTO_CMD_PPA(name,modid,<progpath>\program\app)
368 #define REGISTRY_ENTRY_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(LibreOffice.,name)); \
378 #define REGISTRY_ENTRY_TEMPLATE_CAPABILITIES(name,modid,key,doc_type) \
379 RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_FileAssociations_,name) \
380 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
382 Subkey = STRING(Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\Capabilities\FileAssociations); \
383 Name = STRING(CONCAT2(.,key)); \
384 Value = STRING(CONCAT2(LibreOffice.,name)); \
388 #define REGISTRY_ENTRY_CAPABILITIES_URL(scheme,name,modid,handler) \
389 RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_URLAssociations_,name) \
390 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
392 Subkey = STRING(Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\Capabilities\URLAssociations); \
398 #define CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
399 CONDITIONAL_MODULE_ENTRY(name,modid) \
400 REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \
401 CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
402 REGISTRY_ENTRY_DOC(name,modid,disp_name) \
403 REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
404 REGISTRY_ENTRY_ICON(name,modid,icon_id) \
405 REGISTRY_ENTRY_SHELL(name,default,modid) \
406 REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
407 REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
409 #define CONDITIONAL_REGISTER_DOC_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
410 CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
411 REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
412 REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
413 REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
415 #define CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
416 CONDITIONAL_MODULE_ENTRY(name,modid) \
417 REGISTRY_ENTRY_OPEN_WITH_TMPL(name,cond,doc_type,modid,key) \
418 CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
419 REGISTRY_ENTRY_DOC(name,modid,disp_name) \
420 REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
421 REGISTRY_ENTRY_ICON(name,modid,icon_id) \
422 REGISTRY_ENTRY_SHELL(name,default,modid) \
423 REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
424 REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
425 REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
426 REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
427 REGISTRY_ENTRY_TEMPLATE_CAPABILITIES(name,modid,key,doc_type) \
433 #define REGISTER_PROPERTY_HANDLER_FOR_EXTENSION(extension) \
434 RegistryItem CONCAT2(gid_Regitem_Software_Microsoft_Windows_CurrentVersion_PropertySystem_PropertyHandlers_,extension) \
435 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
436 ModuleID = gid_Module_Optional_Winexplorerext; \
437 Subkey = STRING(CONCAT2(SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.,extension)); \
438 Value = "{AE424E85-F6DF-4910-A6A9-438797986431}"; \
441 RegistryItem CONCAT3(gid_Regitem_Software_Microsoft_Windows_CurrentVersion_PropertySystem_PropertyHandlers_,extension,_x64) \
442 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
443 ModuleID = gid_Module_Optional_Winexplorerext_x64; \
444 ComponentCondition = "VersionNT64"; \
445 Subkey = STRING(CONCAT2(SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.,extension)); \
446 Value = "{AE424E85-F6DF-4910-A6A9-438797986431}"; \
451 #define REGISTER_PROPERTY_HANDLER_FOR_EXTENSION(extension) \
452 RegistryItem CONCAT2(gid_Regitem_Software_Microsoft_Windows_CurrentVersion_PropertySystem_PropertyHandlers_,extension) \
453 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
454 ModuleID = gid_Module_Optional_Winexplorerext; \
455 Subkey = STRING(CONCAT2(SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.,extension)); \
456 Value = "{AE424E85-F6DF-4910-A6A9-438797986431}"; \
462 #define REGISTER_PROPERTY_HANDLER_FOR_EXTENSION(extension) // empty
466 #define SCP2_URE_DL_DIR GID_DIR_URE_LIB
468 #define SCP2_URE_DL_NORMAL(n) n ".dll"
469 #define SCP2_URE_DL_VER(n, v) n v ".dll"
470 #define SCP2_URE_DL_UNO_VER(n, v) n v ".dll"
471 #define SCP2_URE_DL_UNO_COMID_VER(n, v) n v STRING(COMID) ".dll"
473 #define SCP2_URE_DL_NORMAL(n) "lib" n STRING(UNXSUFFIX)
474 #define SCP2_URE_DL_VER(n, v) "lib" n STRING(UNXSUFFIX) "." v
475 #define SCP2_URE_DL_UNO_VER(n, v) "libuno_" n STRING(UNXSUFFIX) "." v
476 #define SCP2_URE_DL_UNO_NORMAL(n) "libuno_" n STRING(UNXSUFFIX)
477 #define SCP2_URE_DL_UNO_COMID_VER(n, v) \
478 "libuno_" n STRING(COMID) STRING(UNXSUFFIX) "." v
479 #define SCP2_URE_DL_UNO_COMID_NORMAL(n) \
480 "libuno_" n STRING(COMID) STRING(UNXSUFFIX)
483 #define SCP2_URE_JDL_NORMAL(n) "lib" n ".jnilib"
485 #define SCP2_URE_JDL_NORMAL(n) SCP2_URE_DL_NORMAL(n)
489 #define FILELIST_DIR PREDEFINED_PROGDIR
490 #define FILELIST_SDK_DIR PREDEFINED_PROGDIR
492 #define FILELIST_DIR gid_Dir_Brand_Root
494 #define FILELIST_SDK_DIR gid_Dir_Sdkoo_Root
496 #define FILELIST_SDK_DIR PREDEFINED_PROGDIR
500 #define UI_FILELIST(name, file) \
501 File CONCAT2(gid_File_Share_Config_Sofficecfg_uiconfig_, name) \
503 Styles = (FILELIST); \
504 Dir = FILELIST_DIR; \
508 #include <langmacros.inc>
510 #define MO_FILELIST_ALL_LANG(name) \
511 File CONCAT3(gid_File_Res_, name, _Lang) \
514 Dir = gid_Dir_Resource; \
515 MO_ALL_LANG_EXCEPT_EN_US_AND_QTZ(name); \
518 #define URE_PRIVATE_LIB(id,name) \
521 Dir = SCP2_URE_DL_DIR; \
526 #define URE_EXECUTABLE(id,name) \
529 Dir = gid_Brand_Dir_Program; \
534 #define LIBO_EXECUTABLE(id,name) \
537 Dir = gid_Brand_Dir_Program; \
542 #define LIBO_EXECUTABLE_COMPONENTCONDITION(id,name,cond) \
545 Dir = gid_Brand_Dir_Program; \
548 ComponentCondition = cond; \
551 #define SDK_EXECUTABLE(id,name) \
554 Dir = gid_Dir_Sdkoo_Bin; \
559 #define GALLERY_NAME(id) \
561 #define GALLERY_FILELIST(id) \
562 File gid_File_Extra_Gall##id \
563 Dir = FILELIST_DIR; \
565 Styles = (FILELIST, WORKSTATION); \
566 Name = STRING(CONCAT3(Gallery/,id,.filelist)); \
568 File gid_File_Extra_GallFiles##id \
569 Dir = FILELIST_DIR; \
571 Styles = (FILELIST, WORKSTATION); \
572 Name = STRING(CONCAT3(Gallery/Files/,id,.filelist)); \
575 #define REGISTER_URI_HANDLER_IMPL(protocol,protid,modid,cond) \
576 RegistryItem CONCAT2(gid_Regitem_,protid) \
577 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
579 Subkey = STRING(protocol); \
580 Value = "URL:" STRING(protocol) " Protocol"; \
583 RegistryItem CONCAT3(gid_Regitem_,protid,_URL_Protocol) \
584 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
586 Subkey = STRING(protocol); \
587 Name = "URL Protocol"; \
589 RegistryItem CONCAT3(gid_Regitem_,protid,_UseOriginalUrlEncoding) \
590 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
592 Subkey = STRING(protocol); \
593 Name = "UseOriginalUrlEncoding"; \
596 RegistryItem CONCAT3(gid_Regitem_,protid,_DefaultIcon) \
597 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
599 Subkey = STRING(CONCAT2(protocol,\DefaultIcon)); \
600 Value = "<progpath>\program\soffice.bin,0"; \
602 RegistryItem CONCAT3(gid_Regitem_,protid,_shell_open_command) \
603 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
605 Subkey = STRING(CONCAT2(protocol,\shell\open\command)); \
606 Value = "\"<progpath>\program\soffice.exe\" \"%1\""; \
609 #define REG_COND(cond) \
610 ComponentCondition = STRING(CONCAT2(cond,=1));
612 #define REG_EMPTY_COND
614 #define REGISTER_URI_HANDLER(protocol,protid,modid) \
615 REGISTER_URI_HANDLER_IMPL(protocol,protid,modid,REG_EMPTY_COND)
617 #define CONDITIONAL_REGISTER_URI_HANDLER(protocol,protid,modid,cond) \
618 CONDITIONAL_MODULE_ENTRY(protid,modid) \
619 REGISTER_URI_HANDLER_IMPL(protocol,protid,gid_Module_Root_Reg_##protid,REG_COND(cond))