Skip to content

Commit

Permalink
Merge pull request #91 from nextcloud/develop
Browse files Browse the repository at this point in the history
Develop (fix collabora)
  • Loading branch information
Ivansss committed Jul 30, 2021
2 parents b7d970b + b6c4ec5 commit 9beaa65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
4 changes: 2 additions & 2 deletions NCCommunication.xcodeproj/project.pbxproj
Expand Up @@ -451,7 +451,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.99.1;
MARKETING_VERSION = 0.99.2;
PLIST_FILE_OUTPUT_FORMAT = "same-as-input";
PRODUCT_BUNDLE_IDENTIFIER = it.twsweb.NCCommunication;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand Down Expand Up @@ -486,7 +486,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.99.1;
MARKETING_VERSION = 0.99.2;
PLIST_FILE_OUTPUT_FORMAT = "same-as-input";
PRODUCT_BUNDLE_IDENTIFIER = it.twsweb.NCCommunication;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand Down
27 changes: 8 additions & 19 deletions NCCommunication/NCCommunicationCommon.swift
Expand Up @@ -288,6 +288,7 @@ import MobileCoreServices
var resultIconName: String = ""
var resultFileName: String = ""
var resultExtension: String = ""
let inUTIString: String = inUTI as String

if let fileExtension = UTTypeCopyPreferredTagWithClass(inUTI as CFString, kUTTagClassFilenameExtension) {
resultExtension = String(fileExtension.takeRetainedValue())
Expand Down Expand Up @@ -321,7 +322,7 @@ import MobileCoreServices
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.txt.rawValue
resultFileName = "document"
} else if inUTI as String == "net.daringfireball.markdown" {
} else if inUTIString == "net.daringfireball.markdown" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.document.rawValue
resultFileName = "markdown"
Expand All @@ -330,39 +331,27 @@ import MobileCoreServices
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.txt.rawValue
resultFileName = "text"
} else if inUTI as String == "org.openxmlformats.wordprocessingml.document" {
} else if inUTIString == "org.oasis-open.opendocument.text" || inUTIString == "org.openxmlformats.wordprocessingml.document" || inUTIString == "com.microsoft.word.doc" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.document.rawValue
resultFileName = "document"
} else if inUTI as String == "com.microsoft.word.doc" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.document.rawValue
resultFileName = "document"
} else if inUTI as String == "com.apple.iwork.pages.pages" {
} else if inUTIString == "com.apple.iwork.pages.pages" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.document.rawValue
resultFileName = "pages"
} else if inUTI as String == "org.openxmlformats.spreadsheetml.sheet" {
} else if inUTIString == "org.oasis-open.opendocument.spreadsheet" || inUTIString == "org.openxmlformats.spreadsheetml.sheet" || inUTIString == "com.microsoft.excel.xls" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.xls.rawValue
resultFileName = "sheet"
} else if inUTI as String == "com.microsoft.excel.xls" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.xls.rawValue
resultFileName = "sheet"
} else if inUTI as String == "com.apple.iwork.numbers.numbers" {
} else if inUTIString == "com.apple.iwork.numbers.numbers" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.xls.rawValue
resultFileName = "numbers"
} else if inUTI as String == "org.openxmlformats.presentationml.presentation" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.ppt.rawValue
resultFileName = "presentation"
} else if inUTI as String == "com.microsoft.powerpoint.ppt" {
} else if inUTIString == "org.oasis-open.opendocument.presentation" || inUTIString == "org.openxmlformats.presentationml.presentation" || inUTIString == "com.microsoft.powerpoint.ppt" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.ppt.rawValue
resultFileName = "presentation"
} else if inUTI as String == "com.apple.iwork.keynote.key" {
} else if inUTIString == "com.apple.iwork.keynote.key" {
resultTypeFile = typeFile.document.rawValue
resultIconName = iconName.ppt.rawValue
resultFileName = "keynote"
Expand Down

0 comments on commit 9beaa65

Please sign in to comment.