|
@@ -2085,37 +2085,37 @@ extension KMMainViewController {
|
|
|
KMPrint("转档窗口已显示")
|
|
|
return
|
|
|
}
|
|
|
-// var convertT: KMConvertType = .Word
|
|
|
-// var windowController: KMConvertBaseWindowController?
|
|
|
-// if (type == .word) { /// Word
|
|
|
-// convertT = .Word
|
|
|
-// } else if (type == .excel) {
|
|
|
-// convertT = .Excel
|
|
|
-// } else if (type == .ppt || type == .rtf || type == .html || type == .conversion_text) {
|
|
|
-// if (type == .ppt) {
|
|
|
-// convertT = .PPT
|
|
|
-// } else if (type == .rtf) {
|
|
|
-// convertT = .RTF
|
|
|
-// } else if (type == .html) {
|
|
|
-// convertT = .HTML
|
|
|
-// } else if (type == .conversion_text) {
|
|
|
-// convertT = .Text
|
|
|
-// }
|
|
|
-// } else if (type == .csv) {
|
|
|
-// convertT = .CSV
|
|
|
-// } else if (type == .conversion_image) {
|
|
|
-// windowController = KMConvertImageWindowController()
|
|
|
-// }
|
|
|
-// windowController?.subscribeWaterMarkType = type.toSubscribeWaterMarkType()
|
|
|
-//
|
|
|
-// var url: URL?
|
|
|
-// if (documentUrl != nil) {
|
|
|
-// url = documentUrl
|
|
|
-// windowController?.oriDocumentUrl = self.listView.document.documentURL
|
|
|
-// } else {
|
|
|
-// url = self.listView.document.documentURL
|
|
|
-// }
|
|
|
-// self.showAllConvertWindow(convertT: convertT)
|
|
|
+ var convertT: KMConvertType = .Word
|
|
|
+ var windowController: KMConvertBaseWindowController?
|
|
|
+ if (type == .word) { /// Word
|
|
|
+ convertT = .Word
|
|
|
+ } else if (type == .excel) {
|
|
|
+ convertT = .Excel
|
|
|
+ } else if (type == .ppt || type == .rtf || type == .html || type == .conversion_text) {
|
|
|
+ if (type == .ppt) {
|
|
|
+ convertT = .PPT
|
|
|
+ } else if (type == .rtf) {
|
|
|
+ convertT = .RTF
|
|
|
+ } else if (type == .html) {
|
|
|
+ convertT = .HTML
|
|
|
+ } else if (type == .conversion_text) {
|
|
|
+ convertT = .Text
|
|
|
+ }
|
|
|
+ } else if (type == .csv) {
|
|
|
+ convertT = .CSV
|
|
|
+ } else if (type == .conversion_image) {
|
|
|
+ windowController = KMConvertImageWindowController()
|
|
|
+ }
|
|
|
+ windowController?.subscribeWaterMarkType = type.toSubscribeWaterMarkType()
|
|
|
+
|
|
|
+ var url: URL?
|
|
|
+ if (documentUrl != nil) {
|
|
|
+ url = documentUrl
|
|
|
+ windowController?.oriDocumentUrl = self.listView.document.documentURL
|
|
|
+ } else {
|
|
|
+ url = self.listView.document.documentURL
|
|
|
+ }
|
|
|
+ self.showAllConvertWindow(convertT: convertT)
|
|
|
|
|
|
// let model = KMDocumentModel(url: url!)
|
|
|
// if (self.listView.document.password != nil) {
|
|
@@ -2301,7 +2301,7 @@ extension KMMainViewController {
|
|
|
let extract = KMExtractImageWindowController(windowNibName: "KMExtractImageWindowController")
|
|
|
extract.docPath = fileURL?.path ?? ""
|
|
|
extract.password = document?.password ?? ""
|
|
|
- extract.currentPage = self.listView.currentPageIndex - 1
|
|
|
+ extract.currentPage = self.listView.currentPageIndex
|
|
|
// extract.beginSheetModal(for: NSApp.mainWindow!, completionHandler: nil)
|
|
|
self.km_beginSheet(windowC: extract)
|
|
|
extract.selectCurrentPageBtn()
|