|
@@ -2970,8 +2970,9 @@ extension KMMainViewController {
|
|
|
|
|
|
|
|
|
//MARK: - Redact密文
|
|
|
- func showRedactProperty() {
|
|
|
+ func showRedactProperty(readactAnnotation: CPDFRedactAnnotation?) {
|
|
|
let properties = KMRedactPropertiesWindowController()
|
|
|
+ properties.readactAnnotation = readactAnnotation
|
|
|
self.km_beginSheet(windowC: properties)
|
|
|
|
|
|
}
|
|
@@ -3381,7 +3382,7 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
|
|
|
if itemIdentifier == KMPDFToolbar_protect_redact_Identifier {
|
|
|
|
|
|
} else if itemIdentifier == KMPDFToolbar_protect_redact_Property_Identifier {
|
|
|
- self.showRedactProperty()
|
|
|
+ self.showRedactProperty(readactAnnotation: nil)
|
|
|
} else if itemIdentifier == KMPDFToolbar_protect_redact_Apply_Identifier {
|
|
|
|
|
|
} else if itemIdentifier == KMPDFToolbar_protect_redact_Exit_Identifier {
|
|
@@ -4577,7 +4578,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
|
|
|
|
|
|
let isShowPopUI:Bool = false
|
|
|
|
|
|
- if let page = listView.pageAndPoint(&pagePoint, for: theEvent, nearest: false) {
|
|
|
+ if let page = pdfListView.pageAndPoint(&pagePoint, for: theEvent, nearest: false) {
|
|
|
if view.window?.interactionMode == .presentation {
|
|
|
let menuStruct = clickPresentationMenu(point: pagePoint)
|
|
|
groupListMenuGroup?.groupDelegate = self
|
|
@@ -4647,7 +4648,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Redact_Apply)
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Redact_Multipage)
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Space)
|
|
|
- menuStringArr.append(PDFViewMenuIdentifier_Normal_Properties)
|
|
|
+ menuStringArr.append(PDFViewMenuIdentifier_Normal_RedactProperties)
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Redact_Default)
|
|
|
} else if listView.activeAnnotation.isKind(of: CPDFLinkAnnotation.self) {
|
|
|
let link = listView.activeAnnotation as? CPDFLinkAnnotation
|
|
@@ -4689,6 +4690,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowPopUI)
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Space)
|
|
|
}
|
|
|
+ menuStringArr.append(PDFViewMenuIdentifier_Normal_SortAnnotation)
|
|
|
}
|
|
|
} else {
|
|
|
let currentSelection = pdfListView.currentSelection
|
|
@@ -4700,6 +4702,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
|
|
|
if pdfListView.canPaste() {
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Normal_Past)
|
|
|
}
|
|
|
+ menuStringArr.append(PDFViewMenuIdentifier_Space)
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Normal_Hight)
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Normal_Underline)
|
|
|
menuStringArr.append(PDFViewMenuIdentifier_Normal_StrikeOut)
|
|
@@ -5133,6 +5136,10 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ func pdfListViewSplitModeShowBar()->Bool {
|
|
|
+ return viewManager.splitShowBottomBar
|
|
|
+ }
|
|
|
+
|
|
|
//MARK: -Crop
|
|
|
func pdfListViewChangedSelectionOrMagnification(_ pdfListView: CPDFListView!) {
|
|
|
reloadPopUIWindow()
|
|
@@ -5188,6 +5195,8 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
|
|
|
cancelMeasureType()
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
private func handleLineAnnotation(_ annotation: CPDFLineAnnotation) {
|
|
|
if perimeterMeasureInfoWindowController?.window?.isVisible == true {
|
|
|
perimeterMeasureInfoWindowController?.hideFloatingWindow()
|
|
@@ -5485,7 +5494,14 @@ extension KMMainViewController: ComponentGroupDelegate {
|
|
|
kmPDFSideBarControllerDidSidebarTypeUpdated(sideVC)
|
|
|
}
|
|
|
} else if (menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_Past) {
|
|
|
- listView.copy(nil)
|
|
|
+ let theEvent = menuItemProperty?.representedObject
|
|
|
+
|
|
|
+ if let currentEvent = theEvent as? NSEvent {
|
|
|
+ var pagePoint = CGPoint.zero
|
|
|
+ if let page = listView.pageAndPoint(&pagePoint, for: currentEvent, nearest: false) {
|
|
|
+ listView.menuPointPaste(pagePoint, page: page, isRightPaste: true)
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if (menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_SelectAllText) {
|
|
|
listView.selectAll(nil)
|
|
|
} else if (menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_AddBook) {
|
|
@@ -5614,8 +5630,7 @@ extension KMMainViewController: ComponentGroupDelegate {
|
|
|
}
|
|
|
}
|
|
|
} else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_EnterPageNum) {
|
|
|
-
|
|
|
-
|
|
|
+ sideBarController?.beginEditing()
|
|
|
} else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_PageBack) {
|
|
|
if let objectListView = menuItemProperty?.representedObject as? CPDFListView {
|
|
|
if(objectListView.canGoBack() == true) {
|
|
@@ -5935,6 +5950,10 @@ extension KMMainViewController: ComponentGroupDelegate {
|
|
|
listView.cropAction()
|
|
|
} else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Edit_Replace) {
|
|
|
listView.replaceImageEdit()
|
|
|
+ } else if (menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_RedactProperties) {
|
|
|
+ if let redactAnnotation = listView.activeAnnotation as? CPDFRedactAnnotation{
|
|
|
+ showRedactProperty(readactAnnotation: redactAnnotation)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|