Quellcode durchsuchen

【2025】【综合】更新SDK

niehaoyu vor 2 Monaten
Ursprung
Commit
27d411eeb2

+ 4 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFListViewExtension/CPDFListView+AnnotationsCompare.swift

@@ -155,7 +155,7 @@ extension CPDFListView {
         case .border_Style:
             for annotation in annotations {
                 if firstAnnotation != annotation {
-                    if firstAnnotation.border.style != annotation.border.style {
+                    if firstAnnotation.border?.style != annotation.border?.style {
                         multiInfo = true
                         break
                     }
@@ -179,7 +179,7 @@ extension CPDFListView {
         case .line_Width:
             for annotation in annotations {
                 if firstAnnotation != annotation {
-                    if firstAnnotation.border.lineWidth != annotation.border.lineWidth {
+                    if firstAnnotation.border?.lineWidth != annotation.border?.lineWidth {
                         multiInfo = true
                         break
                     }
@@ -190,8 +190,8 @@ extension CPDFListView {
         case .dash_Pattern:
             for annotation in annotations {
                 if firstAnnotation != annotation {
-                    let firstDashPattern = firstAnnotation.border.dashPattern.first as? CGFloat
-                    let dashPattern = annotation.border.dashPattern.first as? CGFloat
+                    let firstDashPattern = firstAnnotation.border?.dashPattern.first as? CGFloat
+                    let dashPattern = annotation.border?.dashPattern.first as? CGFloat
                     
                     if firstDashPattern != dashPattern {
                         multiInfo = true

BIN
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/ComPDFKit


+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFAnnotation.h

@@ -140,7 +140,7 @@ typedef NS_OPTIONS(NSInteger, CPDFAnnotationFlags) {
  * @discussion For the "geometry" annotations (Circle, Ink, Line, Square), the border indicates the line width and whether to draw with a dash pattern or solid pattern.
  * CPDFAnnotation markup types (Highlight, Strikethrough, Underline) ignores the border.
  */
-@property (nonatomic,strong) CPDFBorder *border;
+@property (nonatomic,strong) CPDFBorder *_Nullable border;
 
 /**
  * Method to get / set the opacity for the annotation.

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/_CodeSignature/CodeResources

@@ -251,11 +251,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			/N2G6BumM+ORlTVcjVAABJTJYRA=
+			TXws8zyFd8wjMo1ki2+izRwyX/I=
 			</data>
 			<key>hash2</key>
 			<data>
-			RplosrojBFf4QzNc6Kd9NEQ+c0lhwC0TzSjbssbPgmE=
+			oTVhRaApe3wH/1E7AoPOKcUerkSkzAaeJxAU3xjupBg=
 			</data>
 		</dict>
 		<key>Headers/CPDFAreaMeasureInfo.h</key>

+ 4 - 4
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Line/KMLineController.swift

@@ -291,7 +291,7 @@ class KMLineController: NSViewController {
             colorOpacitySelect.properties.text = String(format: "%.0f%@", opacity*100, "%")
             colorOpacitySelect.reloadData()
             
-            let border: CPDFBorder = annotation.border
+            let border: CPDFBorder = annotation.border ?? CPDFBorder()
             
             dashProperty.state = .normal
             solidProperty.state = .normal
@@ -373,7 +373,7 @@ class KMLineController: NSViewController {
                     
                     lineTypeSelector.reloadData()
                 } else {
-                    let style = annotation.border.style
+                    let style = annotation.border?.style
                     dashProperty.state = .normal
                     solidProperty.state = .normal
                     if style == .dashed {
@@ -397,7 +397,7 @@ class KMLineController: NSViewController {
                     
                     lineWidthSelect.resetText("-")
                 } else {
-                    let border: CPDFBorder = annotation.border
+                    let border: CPDFBorder = annotation.border ?? CPDFBorder()
                     
                     let percent = (border.lineWidth - 1)/17
                     lineWidthSlider.properties.percent = percent
@@ -417,7 +417,7 @@ class KMLineController: NSViewController {
                     lineDashSelect.resetText("-")
                 } else {
                     var dashA = 1.0
-                    for dashPattern in annotation.border.dashPattern {
+                    for dashPattern in annotation.border?.dashPattern ?? [] {
                         if let value = dashPattern as? CGFloat {
                             dashA = value
                             break

+ 4 - 4
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Pen/KMPenController.swift

@@ -218,7 +218,7 @@ class KMPenController: NSViewController {
             colorOpacitySelect.properties.text = String(format: "%.0f%@", opacity*100, "%")
             colorOpacitySelect.reloadData()
             
-            let border: CPDFBorder = annotation.border
+            let border: CPDFBorder = annotation.border ?? CPDFBorder()
             
             dashProperty.state = .normal
             solidProperty.state = .normal
@@ -298,7 +298,7 @@ class KMPenController: NSViewController {
                     
                     lineTypeSelector.reloadData()
                 } else {
-                    let style = annotation.border.style
+                    let style = annotation.border?.style
                     dashProperty.state = .normal
                     solidProperty.state = .normal
                     if style == .dashed {
@@ -322,7 +322,7 @@ class KMPenController: NSViewController {
                     
                     lineWidthSelect.resetText("-")
                 } else {
-                    let border: CPDFBorder = annotation.border
+                    let border: CPDFBorder = annotation.border ?? CPDFBorder()
                     
                     let percent = (border.lineWidth - 1)/17
                     lineWidthSlider.properties.percent = percent
@@ -342,7 +342,7 @@ class KMPenController: NSViewController {
                     lineDashSelect.resetText("-")
                 } else {
                     var dashA = 1.0
-                    for dashPattern in annotation.border.dashPattern {
+                    for dashPattern in annotation.border?.dashPattern ?? [] {
                         if let value = dashPattern as? CGFloat {
                             dashA = value
                             break

+ 4 - 4
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Rectangle/KMRectangleController.swift

@@ -324,7 +324,7 @@ class KMRectangleController: NSViewController {
             
             colorOpacitySelect.properties.text = String(format: "%.0f%@", opacity*100, "%")
             
-            let border: CPDFBorder = annotation.border
+            let border: CPDFBorder = annotation.border ?? CPDFBorder()
             dashProperty.state = .normal
             solidProperty.state = .normal
             if border.style == .dashed {
@@ -409,7 +409,7 @@ class KMRectangleController: NSViewController {
                     
                     lineTypeSelector.reloadData()
                 } else {
-                    let style = annotation.border.style
+                    let style = annotation.border?.style
                     dashProperty.state = .normal
                     solidProperty.state = .normal
                     if style == .dashed {
@@ -434,7 +434,7 @@ class KMRectangleController: NSViewController {
                     
                     lineWidthSelect.resetText("-")
                 } else {
-                    let border: CPDFBorder = annotation.border
+                    let border: CPDFBorder = annotation.border ?? CPDFBorder()
                     
                     let percent = (border.lineWidth - 1)/17
                     lineWidthSlider.properties.percent = percent
@@ -454,7 +454,7 @@ class KMRectangleController: NSViewController {
                     lineDashSelect.resetText("-")
                 } else {
                     var dashA = 1.0
-                    for dashPattern in annotation.border.dashPattern {
+                    for dashPattern in annotation.border?.dashPattern ?? [] {
                         if let value = dashPattern as? CGFloat {
                             dashA = value
                             break

+ 3 - 3
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/TextBox/KMTextBoxController.swift

@@ -384,21 +384,21 @@ class KMTextBoxController: NSViewController {
                 if multiStyle == true {
                     lineStyle = nil
                 } else {
-                    lineStyle = annotation.border.style
+                    lineStyle = annotation.border?.style
                 }
                 
                 let multiLineWidth: Bool = CPDFListView.isAnnotationsContainMultiType(annotations, withType: .line_Width)
                 if multiLineWidth == true {
                     lineWidth = nil
                 } else {
-                    lineWidth = annotation.border.lineWidth
+                    lineWidth = annotation.border?.lineWidth
                 }
                 
                 let multiDashPattern: Bool = CPDFListView.isAnnotationsContainMultiType(annotations, withType: .line_Width)
                 if multiDashPattern == true {
                     dashPattern = nil
                 } else {
-                    if let firstValue = annotation.border.dashPattern.first {
+                    if let firstValue = annotation.border?.dashPattern.first {
                         dashPattern = firstValue as? CGFloat
                     }
                 }