|
@@ -220,19 +220,34 @@ class NCService: NSObject {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-// Handwerkcloud
|
|
|
-// let isHandwerkcloudEnabled = NCManageDatabase.shared.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesHWCEnabled, exists: false)
|
|
|
-// if (isHandwerkcloudEnabled) {
|
|
|
-// self.requestHC()
|
|
|
-// }
|
|
|
-
|
|
|
+
|
|
|
+ // Default UTI
|
|
|
+
|
|
|
+ // markdown
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "net.daringfireball.markdown", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "markdown")
|
|
|
+ // document: text
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "org.oasis-open.opendocument.text", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "document")
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "org.openxmlformats.wordprocessingml.document", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "document")
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "com.microsoft.word.doc", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "document")
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "com.apple.iwork.pages.pages", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "pages")
|
|
|
+ // document: sheet
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "org.oasis-open.opendocument.spreadsheet", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.xls.rawValue, name: "sheet")
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "org.openxmlformats.spreadsheetml.sheet", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.xls.rawValue, name: "sheet")
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "com.microsoft.excel.xls", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.xls.rawValue, name: "sheet")
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "com.apple.iwork.numbers.numbers", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.xls.rawValue, name: "numbers")
|
|
|
+ // document: presentation
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "org.oasis-open.opendocument.presentation", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.ppt.rawValue, name: "presentation")
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "org.openxmlformats.presentationml.presentation", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.ppt.rawValue, name: "presentation")
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "com.microsoft.powerpoint.ppt", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.ppt.rawValue, name: "presentation")
|
|
|
+ NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: "com.apple.iwork.keynote.key", classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.ppt.rawValue, name: "keynote")
|
|
|
+
|
|
|
// Added UTI for Collabora
|
|
|
if let richdocumentsMimetypes = NCManageDatabase.shared.getCapabilitiesServerArray(account: account, elements: NCElementsJSON.shared.capabilitiesRichdocumentsMimetypes) {
|
|
|
for mimeType in richdocumentsMimetypes {
|
|
|
NCCommunicationCommon.shared.addInternalTypeIdentifier(typeIdentifier: mimeType, classFile: NCCommunicationCommon.typeClassFile.document.rawValue, iconName: NCCommunicationCommon.typeIconFile.document.rawValue, name: "document")
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
// Added UTI for ONLYOFFICE & Text
|
|
|
if let directEditingCreators = NCManageDatabase.shared.getDirectEditingCreators(account: account) {
|
|
|
for directEditing in directEditingCreators {
|
|
@@ -240,6 +255,11 @@ class NCService: NSObject {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // Handwerkcloud
|
|
|
+ // let isHandwerkcloudEnabled = NCManageDatabase.shared.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesHWCEnabled, exists: false)
|
|
|
+ // if (isHandwerkcloudEnabled) {
|
|
|
+ // self.requestHC()
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
} else if errorCode != 0 {
|