Ver código fonte

【OCToSwift】CPDFLinkAnnotation+PDFListView

tangchao 1 ano atrás
pai
commit
4f277a4f79

+ 8 - 10
PDF Office/PDF Master.xcodeproj/project.pbxproj

@@ -2490,6 +2490,9 @@
 		BB6719E52AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6719E42AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift */; };
 		BB6719E62AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6719E42AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift */; };
 		BB6719E72AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6719E42AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift */; };
+		BB6719E92AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6719E82AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift */; };
+		BB6719EA2AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6719E82AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift */; };
+		BB6719EB2AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6719E82AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift */; };
 		BB69C95C299116FD0001A9B1 /* five_line_score.pdf in Resources */ = {isa = PBXBuildFile; fileRef = BB69C959299116FD0001A9B1 /* five_line_score.pdf */; };
 		BB69C95D299116FD0001A9B1 /* five_line_score.pdf in Resources */ = {isa = PBXBuildFile; fileRef = BB69C959299116FD0001A9B1 /* five_line_score.pdf */; };
 		BB69C95E299116FD0001A9B1 /* five_line_score.pdf in Resources */ = {isa = PBXBuildFile; fileRef = BB69C959299116FD0001A9B1 /* five_line_score.pdf */; };
@@ -3312,9 +3315,6 @@
 		F37322FC292DF9410013862C /* CPDFWidgetAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F37322CF292DF9410013862C /* CPDFWidgetAnnotation+PDFListView.m */; };
 		F37322FD292DF9410013862C /* CPDFWidgetAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F37322CF292DF9410013862C /* CPDFWidgetAnnotation+PDFListView.m */; };
 		F37322FE292DF9410013862C /* CPDFWidgetAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F37322CF292DF9410013862C /* CPDFWidgetAnnotation+PDFListView.m */; };
-		F3732302292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F37322D2292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m */; };
-		F3732303292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F37322D2292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m */; };
-		F3732304292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F37322D2292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m */; };
 		F3732305292DF9410013862C /* CPDFSquareAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F37322D4292DF9410013862C /* CPDFSquareAnnotation+PDFListView.m */; };
 		F3732306292DF9410013862C /* CPDFSquareAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F37322D4292DF9410013862C /* CPDFSquareAnnotation+PDFListView.m */; };
 		F3732307292DF9410013862C /* CPDFSquareAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F37322D4292DF9410013862C /* CPDFSquareAnnotation+PDFListView.m */; };
@@ -4512,6 +4512,7 @@
 		BB5F8A1729BB15AD00365ADB /* KMEmailSubWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMEmailSubWindowController.xib; sourceTree = "<group>"; };
 		BB5F8A1829BB15AD00365ADB /* KMEmailSubWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMEmailSubWindowController.m; sourceTree = "<group>"; };
 		BB6719E42AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFLineAnnotation+PDFListView.swift"; sourceTree = "<group>"; };
+		BB6719E82AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFLinkAnnotation+PDFListView.swift"; sourceTree = "<group>"; };
 		BB69C959299116FD0001A9B1 /* five_line_score.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = five_line_score.pdf; sourceTree = "<group>"; };
 		BB69C95A299116FD0001A9B1 /* plaid.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = plaid.pdf; sourceTree = "<group>"; };
 		BB69C95B299116FD0001A9B1 /* horizontal_line.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = horizontal_line.pdf; sourceTree = "<group>"; };
@@ -4853,7 +4854,6 @@
 		F37322B8292DF9410013862C /* CPDFAnnotationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CPDFAnnotationModel.m; sourceTree = "<group>"; };
 		F37322B9292DF9410013862C /* CPDFSquareAnnotation+PDFListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CPDFSquareAnnotation+PDFListView.h"; sourceTree = "<group>"; };
 		F37322BA292DF9410013862C /* CPDFStampAnnotation+PDFListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CPDFStampAnnotation+PDFListView.m"; sourceTree = "<group>"; };
-		F37322BB292DF9410013862C /* CPDFLinkAnnotation+PDFListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CPDFLinkAnnotation+PDFListView.h"; sourceTree = "<group>"; };
 		F37322BD292DF9410013862C /* CPDFMarkupAnnotation+PDFListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CPDFMarkupAnnotation+PDFListView.m"; sourceTree = "<group>"; };
 		F37322BE292DF9410013862C /* CPDFTextAnnotation+PDFListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CPDFTextAnnotation+PDFListView.h"; sourceTree = "<group>"; };
 		F37322BF292DF9410013862C /* CPDFAnnotationHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPDFAnnotationHeader.h; sourceTree = "<group>"; };
@@ -4867,7 +4867,6 @@
 		F37322CC292DF9410013862C /* CPDFAnnotationModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPDFAnnotationModel.h; sourceTree = "<group>"; };
 		F37322CF292DF9410013862C /* CPDFWidgetAnnotation+PDFListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CPDFWidgetAnnotation+PDFListView.m"; sourceTree = "<group>"; };
 		F37322D1292DF9410013862C /* CPDFMarkupAnnotation+PDFListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CPDFMarkupAnnotation+PDFListView.h"; sourceTree = "<group>"; };
-		F37322D2292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CPDFLinkAnnotation+PDFListView.m"; sourceTree = "<group>"; };
 		F37322D3292DF9410013862C /* CPDFStampAnnotation+PDFListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CPDFStampAnnotation+PDFListView.h"; sourceTree = "<group>"; };
 		F37322D4292DF9410013862C /* CPDFSquareAnnotation+PDFListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CPDFSquareAnnotation+PDFListView.m"; sourceTree = "<group>"; };
 		F37322D6292DF9410013862C /* CPDFTextWidgetAnnotation+PDFListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CPDFTextWidgetAnnotation+PDFListView.m"; sourceTree = "<group>"; };
@@ -9185,8 +9184,7 @@
 				BBBB6CD92AD15B900035AA66 /* CPDFFreeTextAnnotation+PDFListView.swift */,
 				BBBB6CDD2AD174080035AA66 /* CPDFInkAnnotation+PDFListView.swift */,
 				BB6719E42AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift */,
-				F37322BB292DF9410013862C /* CPDFLinkAnnotation+PDFListView.h */,
-				F37322D2292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m */,
+				BB6719E82AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift */,
 				F37322D1292DF9410013862C /* CPDFMarkupAnnotation+PDFListView.h */,
 				F37322BD292DF9410013862C /* CPDFMarkupAnnotation+PDFListView.m */,
 				F37322B3292DF9410013862C /* CPDFRedactAnnotation+PDFListView.h */,
@@ -11038,7 +11036,6 @@
 				BB2EDF79296ECE17003BCF58 /* KMPageEditThumbnailItem.swift in Sources */,
 				89E4E6FB2963D341002DBA6F /* KMPopUpButton.m in Sources */,
 				899700E828F3E4D3009AF911 /* MainWindowController.swift in Sources */,
-				F3732302292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m in Sources */,
 				BB6DD81C29348F31001F0544 /* KMSecureTextFiled.swift in Sources */,
 				BB8F4572295ACE380037EA22 /* KMHeaderFooterAdjectiveListCell.swift in Sources */,
 				9FCFEC8C2AD10A4400EAD2CB /* KMTextFieldSheetController.swift in Sources */,
@@ -11220,6 +11217,7 @@
 				9F1F82EA2935D02E0092C4B4 /* KMComboBox.swift in Sources */,
 				BB49ECE5293EF54800C82CA2 /* KMCustomPDFView.swift in Sources */,
 				9F0CB48F29683DEE00007028 /* KMPropertiesPanelLineSubVC.swift in Sources */,
+				BB6719E92AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift in Sources */,
 				AD53B6FE29AC5FCD00D61E81 /* KMLightMemberToken.swift in Sources */,
 				BB0542152965705D00F2665C /* KMCropTipView.swift in Sources */,
 				896DD4552985FB3200ADE514 /* KMPageDisplayThemeCollectionViewItem.swift in Sources */,
@@ -11627,7 +11625,6 @@
 				89752D9B2936E675003FF08E /* KMToolBarBox.swift in Sources */,
 				ADBC373329CA95AA00D93208 /* KMComparativeModel.swift in Sources */,
 				F36EB6CA2987C9FE004C25FB /* KMDocumentAIViewController.m in Sources */,
-				F3732303292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m in Sources */,
 				9FAAA326290A69920046FFCE /* KMToolSetScroller.swift in Sources */,
 				ADB1FE7F29752F2900ED072D /* KMBatchSecurityView.swift in Sources */,
 				BB89724E294C1DCE0045787C /* KMWatermarkAdjectiveListTableCellView.swift in Sources */,
@@ -11861,6 +11858,7 @@
 				BB897266294C724D0045787C /* KMWatermarkAdjectiveOutsideView.swift in Sources */,
 				BBF38A5B294F2B760086D025 /* KMWatermarkPositionView.swift in Sources */,
 				BBFBE74628DD7DB7008B2335 /* AppDelegate.swift in Sources */,
+				BB6719EA2AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift in Sources */,
 				ADD1B6B829420B2300C3FFF7 /* KMPrintChooseView.swift in Sources */,
 				9FCFEC9D2AD152FA00EAD2CB /* CustomAlertView.swift in Sources */,
 				BB147000299DC0D100784A6A /* OIDRedirectHTTPHandler.m in Sources */,
@@ -12389,6 +12387,7 @@
 				F3B7DFAB294C545B00333201 /* NSPopover+PDFListView.m in Sources */,
 				BB89722B294B08720045787C /* KMWatermarkAdjectiveTopBarItemModel.swift in Sources */,
 				BB14700A299DC0D100784A6A /* OIDRegistrationRequest.m in Sources */,
+				BB6719EB2AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift in Sources */,
 				BB147043299DC0D200784A6A /* OIDClientMetadataParameters.m in Sources */,
 				ADB1FEA02975303400ED072D /* KMBatchBatesNumberView.swift in Sources */,
 				BB8F4541295A98960037EA22 /* KMHeaderFooterPropertyController.swift in Sources */,
@@ -12615,7 +12614,6 @@
 				BB9695B429BDA46500FD68D3 /* SKLocalization.m in Sources */,
 				9F3D819029A22AD90087B5AD /* Date+KMExtensions.swift in Sources */,
 				ADC075E3298766D9006C752F /* KMBatchConverPDFImageView.swift in Sources */,
-				F3732304292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m in Sources */,
 				BB897222294AF9080045787C /* KMWatermarkAdjectiveTopBarView.swift in Sources */,
 				8931683F296E436B0073EA59 /* KMPDFSignatureTextView.m in Sources */,
 				9F8DDF362924DA6B006CDC73 /* KMPDFToolsCollectionView.swift in Sources */,

+ 160 - 0
PDF Office/PDF Master.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -132,5 +132,165 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "B237BC2B-50E3-4453-B389-951DD5BFABBE"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/KMLinkAnnotationPropertyEmptyController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "22"
+            endingLineNumber = "22"
+            landmarkName = "viewDidLoad()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "CDA7D543-4E31-4A2F-BF61-B73E00EF5124"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "173"
+            endingLineNumber = "173"
+            landmarkName = "isHidden"
+            landmarkType = "24">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "0F139A36-BEE9-475A-9160-D6413C1C6615"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "175"
+            endingLineNumber = "175"
+            landmarkName = "isHidden"
+            landmarkType = "24">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "75445273-3A79-4813-A25F-A80D13E12E07"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "229"
+            endingLineNumber = "229"
+            landmarkName = "-setAnnotations:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "6C82A7A6-B30F-4990-85DB-994D68D6473B"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "317"
+            endingLineNumber = "317"
+            landmarkName = "-setAnnotations:"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "6C82A7A6-B30F-4990-85DB-994D68D6473B - 636e9881fdf2e251"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[KMAnnotationPropertiesViewController setAnnotations:]"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/work/tangchao/git/PDFOffice/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "317"
+                  endingLineNumber = "317"
+                  offsetFromSymbolStart = "10618">
+               </Location>
+               <Location
+                  uuid = "6C82A7A6-B30F-4990-85DB-994D68D6473B - 636e9881fdf2e251"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[KMAnnotationPropertiesViewController setAnnotations:]"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/work/tangchao/git/PDFOffice/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "317"
+                  endingLineNumber = "317"
+                  offsetFromSymbolStart = "10730">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C0F0D9F6-1082-49B7-AF0D-1672A9B46941"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "204"
+            endingLineNumber = "204"
+            landmarkName = "-setAnnotations:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8326ACDF-C755-45BD-AB22-A56787E78298"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "223"
+            endingLineNumber = "223"
+            landmarkName = "-setAnnotations:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "DB92A795-6981-44FD-A1D0-F2CE3EEC789C"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "222"
+            endingLineNumber = "222"
+            landmarkName = "-setAnnotations:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 0 - 19
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFLinkAnnotation+PDFListView.h

@@ -1,19 +0,0 @@
-//
-//  CPDFLinkAnnotation+PDFListView.h
-//  ComPDFKit
-//
-//  Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
-//
-//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
-//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
-//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
-//  This notice may not be removed from this file.
-//
-
-#import <ComPDFKit/ComPDFKit.h>
-
-@interface CPDFLinkAnnotation (PDFListView)
-
-- (NSSet *)keysForValuesToObserveForUndo;
-
-@end

+ 0 - 128
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFLinkAnnotation+PDFListView.m

@@ -1,128 +0,0 @@
-//
-//  CPDFLinkAnnotation+PDFListView.m
-//  ComPDFKit
-//
-//  Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
-//
-//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
-//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
-//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
-//  This notice may not be removed from this file.
-//
-
-#import "CPDFLinkAnnotation+PDFListView.h"
-#import "CPDFListView+Tool.h"
-#import "NSString+PDFListView.h"
-#import "CPDFListView+Private.h"
-#import <PDF_Master-Swift.h>
-
-@implementation CPDFLinkAnnotation (PDFListView)
-
-- (NSSet *)keysForValuesToObserveForUndo {
-    static NSSet *circleKeys = nil;
-    if (circleKeys == nil) {
-        NSMutableSet *mutableKeys = [[super keysForValuesToObserveForUndo] mutableCopy];
-        [mutableKeys addObjectsFromArray:@[CPDFAnnotationDestinationKey,
-                                           CPDFAnnotationURLKey]];
-        circleKeys = [mutableKeys copy];
-    }
-    return circleKeys;
-}
-
-- (BOOL)isResizable {
-    return YES;
-}
-
-- (BOOL)isMovable {
-    return YES;
-}
-
-- (void)drawSelectionHighlightForView:(CPDFListView *)pdfView inContext:(CGContextRef)context isHover:(BOOL)isHover {
-    if (NSIsEmptyRect([self bounds]))
-        return;
-    
-    if(CAnnotationTypeLink != pdfView.annotationType) return;
-    
-    NSRect rect = [self borderRecctForView:pdfView];
-    CGFloat lineWidth = [pdfView unitWidthOnPage:[self page]];
-    CGContextSaveGState(context);
-    CGColorRef color = [CPDFListViewConfig defaultManager].annotationBorderColor.CGColor;
-    CGContextSetStrokeColorWithColor(context, color);
-    if(isHover) {
-        CGFloat length[] = {5,2};
-        CGContextSetLineDash(context, 0, length, 2);
-        CGContextStrokeRectWithWidth(context, CGRectInset(NSRectToCGRect(rect), 0,0), lineWidth);
-    } else {
-        CGContextStrokeRectWithWidth(context, CGRectInset(NSRectToCGRect(rect), 0,0), lineWidth);
-    }
-    CGContextRestoreGState(context);
-    CGContextSaveGState(context);
-    if ([self isResizable] && (pdfView.activeAnnotations.count == 1 || pdfView.selectAnnotations.count > 0) && !isHover) 
-        CPDFListViewDrawResizeHandles(context, rect, 4.0 * lineWidth, YES);
-    CGContextRestoreGState(context);
-    
-//    CGContextRestoreGState(context);
-//    CGContextSaveGState(context);
-//    NSString *string = NSLocalizedString(@"No Destination", nil);
-//    if(destination) {
-//        CPDFPage *page = destination.page;
-//       NSString * url = self.URL;
-//
-//        if(destination.page) {
-//            NSUInteger index = [pdfView.document indexForPage:page] + 1;
-//            string = [NSString stringWithFormat:@"%@ %@",NSLocalizedString(@"to Page",nil),@(index)];
-//        } else if(url.length > 0) {
-//            string = url;
-//        }
-//    }
-//    if (string) {
-//        CGRect linkBounds = self.bounds;
-//        #define kMaxFontSize 50.f
-//        #define kMinFontSize 1.0
-//
-//        float fontSize = kMaxFontSize;
-//        CGSize borderDefaultSize = [string sizeOfFontSize:fontSize];
-//        while ((borderDefaultSize.width >linkBounds.size.width || borderDefaultSize.height >linkBounds.size.height) && (fontSize > kMinFontSize)){
-//            fontSize--;
-//            borderDefaultSize = [string sizeOfFontSize:fontSize];
-//        }
-//
-//        fontSize -=2;
-//
-//        UniChar *characters;
-//         CGGlyph *glyphs;
-//         CFIndex count;
-//         CTFontRef ctFont = CTFontCreateWithName(CFSTR("Helvetica"), fontSize, NULL);
-//         CTFontDescriptorRef ctFontDesRef = CTFontCopyFontDescriptor(ctFont);
-//         CGFontRef cgFont = CTFontCopyGraphicsFont(ctFont,&ctFontDesRef );
-//         CGContextSetFont(context, cgFont);
-//         CFNumberRef pointSizeRef = (CFNumberRef)CTFontDescriptorCopyAttribute(ctFontDesRef,kCTFontSizeAttribute);
-//        CGFloat tFontSize = fontSize;
-//        CGContextSetFontSize(context, tFontSize);
-//        CGContextSetTextDrawingMode(context, kCGTextStrokeClip);
-//        count = CFStringGetLength((CFStringRef)string);
-//        characters = (UniChar *)malloc(sizeof(UniChar) * count);
-//        glyphs = (CGGlyph *)malloc(sizeof(CGGlyph) * count);
-//        CFStringGetCharacters((CFStringRef)string, CFRangeMake(0, count), characters);
-//        CTFontGetGlyphsForCharacters(ctFont, characters, glyphs, count);
-//        CGContextShowGlyphsAtPoint(context, linkBounds.origin.x, linkBounds.size.height/2 + rect.origin.y, glyphs, string.length);
-//        free(characters);
-//        free(glyphs);
-//    }
-//    CGContextRestoreGState(context);
-}
-
-- (NSString *)toolTipsString {
-    NSString *contentString = nil;
-    CPDFDestination *destination = self.destination;
-    if(destination) {
-        CPDFPage *page = destination.page;
-        contentString = [NSString stringWithFormat:NSLocalizedString(@"Go to Page %ld", nil),[page.document indexForPage:page]+1];
-    } else {
-        NSString *url = self.URL;
-        contentString = url;
-    }
-    return contentString?:@"";
-}
-
-@end

+ 69 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFLinkAnnotation+PDFListView.swift

@@ -0,0 +1,69 @@
+//
+//  CPDFLinkAnnotation+PDFListView.swift
+//  PDF Master
+//
+//  Created by tangchao on 2023/10/8.
+//
+
+import Foundation
+
+@objc extension CPDFLinkAnnotation {
+    private static var _l2_keys: Set<AnyHashable>?
+    override func keysForValuesToObserveForUndo() -> Set<AnyHashable>! {
+        if (CPDFLinkAnnotation._l2_keys == nil) {
+            CPDFLinkAnnotation._l2_keys = super.keysForValuesToObserveForUndo()
+            _ = CPDFLinkAnnotation._l2_keys?.insert(CPDFAnnotationDestinationKey)
+            _ = CPDFLinkAnnotation._l2_keys?.insert(CPDFAnnotationURLKey)
+        }
+        return CPDFLinkAnnotation._l2_keys
+    }
+    
+    override func isResizable() -> Bool {
+        return true
+    }
+    override func isMovable() -> Bool {
+        return true
+    }
+    
+    override func drawSelectionHighlightForView(_ pdfView: CPDFListView, inContext context: CGContext, isHover: Bool) {
+        if (NSIsEmptyRect(self.bounds)) {
+            return
+        }
+        if (pdfView.annotationType != .link) {
+            return
+        }
+        
+        let rect = self.borderRecct(for: pdfView)
+        
+        let lineWidth = pdfView.unitWidth(on: self.page)
+        context.saveGState()
+        let color = CPDFListViewConfig.defaultManager().annotationBorderColor.cgColor
+        context.setStrokeColor(color)
+        if (isHover) {
+            let lengths: [CGFloat] = [5.0, 2.0]
+            context.setLineDash(phase: 0.0, lengths: lengths)
+            context.stroke(CGRectInset(NSRectToCGRect(rect), 0,0), width: lineWidth)
+        } else {
+            context.stroke(CGRectInset(NSRectToCGRect(rect), 0,0), width: lineWidth)
+        }
+        context.restoreGState()
+        context.saveGState()
+        if (self.isResizable() && (pdfView.activeAnnotations.count == 1 || pdfView.selectAnnotations.count > 0) && !isHover) {
+            CPDFListViewDrawResizeHandles(context, rect, 4.0 * lineWidth, true)
+        }
+        context.restoreGState()
+    }
+    
+    override func toolTipsString() -> String {
+        var contentString: String?
+        if let destination = self.destination() {
+            if let page = destination.page() {
+                contentString = String(format: NSLocalizedString("Go to Page %ld", comment: ""), page.document.index(for: page)+1)
+            }
+        } else {
+            let url = self.url()
+            contentString = url
+        }
+        return contentString ?? ""
+    }
+}

+ 0 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/ComPDFUIKit.h

@@ -19,7 +19,6 @@
 
 #import "CPDFTextAnnotation+PDFListView.h"
 #import "CPDFStampAnnotation+PDFListView.h"
-#import "CPDFLinkAnnotation+PDFListView.h"
 #import "CPDFMarkupAnnotation+PDFListView.h"
 #import "CPDFRedactAnnotation+PDFListView.h"
 #import "CPDFSquareAnnotation+PDFListView.h"

+ 4 - 4
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationLinkViewController.xib

@@ -45,7 +45,7 @@
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="JJK-2N-aw6">
                                 <rect key="frame" x="16" y="621" width="241" height="32"/>
                                 <subviews>
-                                    <box boxType="custom" borderWidth="0.0" cornerRadius="6" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="zgu-Qr-Ncj" customClass="KMBox">
+                                    <box boxType="custom" borderWidth="0.0" cornerRadius="6" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="zgu-Qr-Ncj" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
                                         <rect key="frame" x="1" y="1" width="80" height="30"/>
                                         <view key="contentView" id="dst-aU-30R">
                                             <rect key="frame" x="0.0" y="0.0" width="80" height="30"/>
@@ -67,7 +67,7 @@
                                         </view>
                                         <color key="fillColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                     </box>
-                                    <box boxType="custom" borderWidth="0.0" cornerRadius="6" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="QFw-6H-nzJ" customClass="KMBox">
+                                    <box boxType="custom" borderWidth="0.0" cornerRadius="6" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="QFw-6H-nzJ" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
                                         <rect key="frame" x="80" y="1" width="81" height="30"/>
                                         <view key="contentView" id="ckt-EI-xxA">
                                             <rect key="frame" x="0.0" y="0.0" width="81" height="30"/>
@@ -88,7 +88,7 @@
                                             </constraints>
                                         </view>
                                     </box>
-                                    <box boxType="custom" borderWidth="0.0" cornerRadius="6" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="gpf-Ry-9Ts" customClass="KMBox">
+                                    <box boxType="custom" borderWidth="0.0" cornerRadius="6" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="gpf-Ry-9Ts" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
                                         <rect key="frame" x="161" y="1" width="79" height="30"/>
                                         <view key="contentView" id="fRb-0f-pvG">
                                             <rect key="frame" x="0.0" y="0.0" width="79" height="30"/>
@@ -255,7 +255,7 @@
                                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                                     </textFieldCell>
                                                 </textField>
-                                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="h0Y-PW-Dk3" customClass="KMCoverButton">
+                                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="h0Y-PW-Dk3" customClass="KMCoverButton" customModule="PDF_Master" customModuleProvider="target">
                                                     <rect key="frame" x="0.0" y="0.0" width="239" height="30"/>
                                                     <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="KeZ-a0-2Og">
                                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>