summaryrefslogtreecommitdiff
path: root/scp2/inc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2016-10-18 16:02:46 +1000
committerMike Kaganski <mike.kaganski@collabora.com>2016-10-18 08:39:53 +0000
commitfdd8686987ca4ee693f5f194c8eb482daa69cfef (patch)
tree8395a7bbac73b7191a07375bfa5ec926eec2b185 /scp2/inc
parent7eea236a24f3be13c04a6e922a62475e27863b99 (diff)
tdf#100837: Register new URI handlers with installer
This patch registers vnd.libreoffice.command unconditionally, and also registerd ms-word, ms-excel, ms-visio and ms-powerpoint handlers according to SELECT_WORD, SELECT_EXCEL, SELECT_VISIO, and SELECT_POWERPOINT properties (that are set in FileTypeDialog). This allows to use these URIs in e.g. SharePoint WebDAV integration Change-Id: I3231a15196858da77f1784a47f86f1729a6044bb Reviewed-on: https://gerrit.libreoffice.org/29988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'scp2/inc')
-rw-r--r--scp2/inc/macros.inc45
1 files changed, 45 insertions, 0 deletions
diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index 30f6760164c5..4de35db91e2e 100644
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -544,5 +544,50 @@ File gid_File_Extra_GallFiles##id \
Name = STRING(CONCAT3(Gallery/Files/,id,.filelist)); \
End
+#define REGISTER_URI_HANDLER_IMPL(protocol,protid,modid,cond) \
+RegistryItem CONCAT2(gid_Regitem_,protid) \
+ ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
+ ModuleID = modid; \
+ Subkey = STRING(protocol); \
+ Value = "URL:" STRING(protocol) " Protocol"; \
+ cond \
+End \
+RegistryItem CONCAT3(gid_Regitem_,protid,_URL_Protocol) \
+ ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
+ ModuleID = modid; \
+ Subkey = STRING(protocol); \
+ Name = "URL Protocol"; \
+End \
+RegistryItem CONCAT3(gid_Regitem_,protid,_UseOriginalUrlEncoding) \
+ ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
+ ModuleID = modid; \
+ Subkey = STRING(protocol); \
+ Name = "UseOriginalUrlEncoding"; \
+ Value = "#1"; \
+End \
+RegistryItem CONCAT3(gid_Regitem_,protid,_DefaultIcon) \
+ ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
+ ModuleID = modid; \
+ Subkey = STRING(CONCAT2(protocol,\DefaultIcon)); \
+ Value = "<progpath>\program\soffice.bin,0"; \
+End \
+RegistryItem CONCAT3(gid_Regitem_,protid,_shell_open_command) \
+ ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
+ ModuleID = modid; \
+ Subkey = STRING(CONCAT2(protocol,\shell\open\command)); \
+ Value = "\"<progpath>\program\soffice.exe\" \"%1\""; \
+End
+
+#define REG_COND(cond) \
+ ComponentCondition = STRING(CONCAT2(cond,=1));
+
+#define REG_EMPTY_COND
+
+#define REGISTER_URI_HANDLER(protocol,protid,modid) \
+ REGISTER_URI_HANDLER_IMPL(protocol,protid,modid,REG_EMPTY_COND)
+
+#define CONDITIONAL_REGISTER_URI_HANDLER(protocol,protid,modid,cond) \
+ CONDITIONAL_MODULE_ENTRY(protid,modid) \
+ REGISTER_URI_HANDLER_IMPL(protocol,protid,gid_Module_Root_Reg_##protid,REG_COND(cond))
#endif // MACROS_INC