浏览代码

Merge branch 'develop_PDFReaderProNew' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProNew

tangchao 10 月之前
父节点
当前提交
307d211de5
共有 18 个文件被更改,包括 1948 次插入1822 次删除
  1. 5 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotation+PDFListView.swift
  2. 43 40
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFInkAnnotation+PDFListView.swift
  3. 101 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableAnnotation.h
  4. 1451 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableAnnotation.m
  5. 0 1562
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableAnnotation.swift
  6. 27 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableCellData.h
  7. 36 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableCellData.m
  8. 0 30
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableCellData.swift
  9. 38 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableDataManager.h
  10. 186 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableDataManager.m
  11. 0 142
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableDataManager.swift
  12. 3 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Extension.m
  13. 18 18
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationTableViewController.swift
  14. 3 3
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift
  15. 2 1
      PDF Office/PDF Master/PDF_Reader_Pro DMG-Bridging-Header.h
  16. 2 0
      PDF Office/PDF Master/PDF_Reader_Pro Edition-Bridging-Header.h
  17. 3 0
      PDF Office/PDF Master/PDF_Reader_Pro-Bridging-Header.h
  18. 30 24
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

+ 5 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotation+PDFListView.swift

@@ -8,6 +8,11 @@
 import Foundation
  
 @objc extension CPDFAnnotation {
+    convenience init(KMNoteBounds bounds: NSRect, document pdfDocument: CPDFDocument) {
+        self.init(document: pdfDocument)
+        self.bounds = bounds
+    }
+    
     convenience init(PDFListViewNoteWith document: CPDFDocument) {
         self.init(document: document)
     }

+ 43 - 40
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFInkAnnotation+PDFListView.swift

@@ -406,49 +406,52 @@ import Foundation
     override func drawSelectionHighlightForView(_ pdfView: CPDFListView, inContext context: CGContext, isHover: Bool) {
         super.drawSelectionHighlightForView(pdfView, inContext: context, isHover: isHover)
         
-        if NSIsEmptyRect(self.bounds) == false {
-//        if (RUNNING_AFTER(10_12) && NSIsEmptyRect([self bounds]) == NO && [self isSkimNote]) {
-            let scale = ceil(1.0 / pdfView.unitWidth(on: self.page))
-            var b = self.bounds
-            var bounds = NSIntegralRect(b)
-            var rect = NSMakeRect(0.0, 0.0, scale * NSWidth(bounds), scale * NSHeight(bounds))
-            var image = NSImage(size: rect.size)
-            image.lockFocus()
-            let transform = NSAffineTransform()
-            transform.scale(by: scale)
-            transform.translateX(by: NSMinX(b) - NSMinX(bounds), yBy: NSMinY(b) - NSMinY(bounds))
-            transform.concat()
-            var path = NSBezierPath()
-            for aPath in self.paths {
-                guard let _path = aPath as? NSBezierPath else {
-                    continue
+        if !self.isKind(of: KMTableAnnotation.self) {
+            if NSIsEmptyRect(self.bounds) == false {
+    //        if (RUNNING_AFTER(10_12) && NSIsEmptyRect([self bounds]) == NO && [self isSkimNote]) {
+                let scale = ceil(1.0 / pdfView.unitWidth(on: self.page))
+                var b = self.bounds
+                var bounds = NSIntegralRect(b)
+                var rect = NSMakeRect(0.0, 0.0, scale * NSWidth(bounds), scale * NSHeight(bounds))
+                var image = NSImage(size: rect.size)
+                image.lockFocus()
+                let transform = NSAffineTransform()
+                transform.scale(by: scale)
+                transform.translateX(by: NSMinX(b) - NSMinX(bounds), yBy: NSMinY(b) - NSMinY(bounds))
+                transform.concat()
+                var path = NSBezierPath()
+                for aPath in self.paths {
+                    guard let _path = aPath as? NSBezierPath else {
+                        continue
+                    }
+                    path.append(_path)
                 }
-                path.append(_path)
-            }
-            let lineWidth = self.lineWidth()
-            path.lineWidth = fmax(1.0, lineWidth)
-            path.lineJoinStyle = .round
-            if self.borderStyle() == .dashed {
-                path.setDashPattern(self.dashPattern() as? NSArray ?? NSArray())
-                path.lineCapStyle = .butt
-            } else {
-                path.lineCapStyle = .round
+                let lineWidth = self.lineWidth()
+                path.lineWidth = fmax(1.0, lineWidth)
+                path.lineJoinStyle = .round
+                if self.borderStyle() == .dashed {
+                    path.setDashPattern(self.dashPattern() as? NSArray ?? NSArray())
+                    path.lineCapStyle = .butt
+                } else {
+                    path.lineCapStyle = .round
+                }
+                NSGraphicsContext.saveGraphicsState()
+                
+                NSShadow.setShadowWithColor(NSColor(white: 0, alpha: 0.33333), blurRadius: 2.0, yOffset: -2.0)
+                NSColor(calibratedWhite: 0, alpha: self.color.alphaComponent).setStroke()
+                path.stroke()
+                NSGraphicsContext.restoreGraphicsState()
+                NSGraphicsContext.current?.compositingOperation = .clear
+                NSColor.black.setStroke()
+                path.stroke()
+                image.unlockFocus()
+                
+    //            CGImageRef cgImage = [image CGImageForProposedRect:&rect context:[NSGraphicsContext graphicsContextWithCGContext:context flipped:NO] hints:nil];
+                let cgImage = image.cgImage(forProposedRect: &rect, context: NSGraphicsContext(cgContext: context, flipped: false), hints: nil)
+                KMContextDrawImage(context, NSRectToCGRect(bounds), cgImage)
             }
-            NSGraphicsContext.saveGraphicsState()
-            
-            NSShadow.setShadowWithColor(NSColor(white: 0, alpha: 0.33333), blurRadius: 2.0, yOffset: -2.0)
-            NSColor(calibratedWhite: 0, alpha: self.color.alphaComponent).setStroke()
-            path.stroke()
-            NSGraphicsContext.restoreGraphicsState()
-            NSGraphicsContext.current?.compositingOperation = .clear
-            NSColor.black.setStroke()
-            path.stroke()
-            image.unlockFocus()
-            
-//            CGImageRef cgImage = [image CGImageForProposedRect:&rect context:[NSGraphicsContext graphicsContextWithCGContext:context flipped:NO] hints:nil];
-            let cgImage = image.cgImage(forProposedRect: &rect, context: NSGraphicsContext(cgContext: context, flipped: false), hints: nil)
-            KMContextDrawImage(context, NSRectToCGRect(bounds), cgImage)
         }
+
     }
     /*
      static void (*original_drawWithBox_inContext)(id, SEL, PDFDisplayBox, CGContextRef) = NULL;

+ 101 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableAnnotation.h

@@ -0,0 +1,101 @@
+//
+//  KMTableAnnotation.h
+//  PDF Reader Pro Edition
+//
+//  Created by dinglingui on 2018/10/15.
+//
+
+#import <Quartz/Quartz.h>
+#import "KMTableCellData.h"
+#import "CPDFListView.h"
+
+struct KMCell {
+    NSInteger row;
+    NSInteger column;
+};
+typedef struct KMCell KMCell;
+
+typedef NS_ENUM(NSInteger, KMTableStyle) {
+    KMTableStyleDefault = 0,
+    KMTableStyleStyle1,
+    KMTableStyleStyle2,
+    KMTableStyleStyle3,
+    KMTableStyleStyle4,
+    KMTableStyleStyle5
+};
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KMTableAnnotation : CPDFInkAnnotation
+
+@property (nonatomic,assign) NSInteger rowNumber;
+
+@property (nonatomic,assign) NSInteger columnNumber;
+
+@property (nonatomic,assign) BOOL isAlternateColor;
+
+@property (nonatomic,retain) NSMutableArray *rowDataList;
+
+@property (nonatomic,retain) NSMutableArray *crossLines;
+
+@property (nonatomic,retain) NSMutableArray *verticalLines;
+
+@property (nonatomic,retain) NSColor *alternatingColor;
+
+@property (nonatomic,assign) KMCell currentCell;
+
+@property (nonatomic,assign) NSRect drawRect;
+
+@property (nonatomic,assign) KMTableStyle tableStyle;
+
+@property (nonatomic,retain) NSMutableArray *oldRowHeights;
+
+@property (nonatomic,retain) NSTextView *textView;
+
+@property (nonatomic, retain) NSScrollView *scrollView;
+
+//第三种table类型显示交替色不一样
+@property (nonatomic,assign) BOOL isStypeTable3;
+
+- (void)createFormWithRow:(NSInteger)row andColumn:(NSInteger)column;
+- (void)createFormWithList:(NSString*)contents andPaths:(NSArray *)paths;
+
+- (NSRect)isInCellWithPoint:(NSPoint)point;
+- (NSBezierPath *)verticalLineWithPoint:(NSPoint)point;
+- (NSBezierPath *)crossLineWithPoint:(NSPoint)point;
+- (NSInteger)headerCount;
+- (NSInteger)sidebarCount;
+- (NSInteger)footerCount;
+- (KMTableCellData *)getCellDataWithRow:(NSInteger)row andColumn:(NSInteger)column;
+- (NSRect)getCellBoundsWithRow:(NSInteger)row column:(NSInteger)column;
+- (void)setCellString:(NSString *)string withRow:(NSInteger)row andColumn:(NSInteger)column;
+- (NSString *)getCellStringWithRow:(NSInteger)row andColumn:(NSInteger)column;
+- (NSMutableArray*)getVerticalLines;
+- (NSMutableArray*)getCrossLines;
+
+- (void)setOldRowHeights;
+
+- (void)afreshDrawLine;
+- (void)drawLine:(NSPoint)point;
+- (void)changeTableStyle:(KMTableStyle)style;
+
+- (void)adaptiveCellHeightWithRow:(NSInteger)row;
+- (void)moveLineFromPoint:(NSPoint)aPoint toPoint:(NSPoint)bPoint;
+- (void)moveVerticalLineOfIndex:(NSInteger)index withDistance:(CGFloat)distance;
+- (void)moveCrossLineOfIndex:(NSInteger)index withDistance:(CGFloat)distance;
+
+- (void)insertColumnAtIndexBehind:(NSInteger)index;
+- (void)insertColumnAtIndexBefore:(NSInteger)index withLineJoinStyle:(NSLineJoinStyle)lineJoinStyle;
+- (void)insertRowAtIndexBehind:(NSInteger)index withLineJoinStyle:(NSLineJoinStyle)lineJoinStyle;
+- (void)insertRowAtIndexBefore:(NSInteger)index withLineJoinStyle:(NSLineJoinStyle)lineJoinStyle;
+- (void)removeColumnAtIndex:(NSInteger)index;
+- (void)removeRowAtIndex:(NSInteger)index;
+- (void)removeRowAtIndexBehindLine:(NSInteger)index;
+
+- (void)writeFormDataToContents;
+- (void)editCellText:(NSPoint)point withView:(CPDFListView *)pdfView;
+- (void)completeEditCellText;
+
+@end
+
+NS_ASSUME_NONNULL_END

文件差异内容过多而无法显示
+ 1451 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableAnnotation.m


文件差异内容过多而无法显示
+ 0 - 1562
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableAnnotation.swift


+ 27 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableCellData.h

@@ -0,0 +1,27 @@
+//
+//  KMTableCellData.h
+//  PDF Reader Pro Edition
+//
+//  Created by dinglingui on 2018/10/15.
+//
+
+#import <Foundation/Foundation.h>
+#import <Cocoa/Cocoa.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KMTableCellData : NSObject
+
+@property (nonatomic,retain) NSString *string;
+
+@property (nonatomic,retain) NSColor * _Nullable  backgroundColor;
+
+@property (nonatomic,retain) NSFont *font;
+
+@property (nonatomic,retain) NSColor  *textColor;
+
+@property (nonatomic,assign) NSTextAlignment textAlignment;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 36 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableCellData.m

@@ -0,0 +1,36 @@
+//
+//  KMTableCellData.m
+//  PDF Reader Pro Edition
+//
+//  Created by dinglingui on 2018/10/15.
+//
+
+#import "KMTableCellData.h"
+
+@implementation KMTableCellData
+
+- (id)init
+{
+    if (self = [super init]) {
+        _string = [[NSString alloc] init];
+        _font = [NSFont systemFontOfSize:10];
+        _textColor = [NSColor colorWithDeviceRed:0 green:0 blue:0 alpha:1];
+        _textAlignment = NSTextAlignmentCenter;
+        _backgroundColor = nil;
+    }
+    return  self;
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    KMTableCellData *copy = [[[self class] allocWithZone:zone] init];
+    copy->_string = [_string copy];
+    copy->_font = [_font copy];
+    copy->_textColor = [_textColor copy];
+    copy->_textAlignment = _textAlignment;
+    copy->_backgroundColor = [_backgroundColor copy];
+    return copy;
+}
+
+
+@end

+ 0 - 30
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableCellData.swift

@@ -1,30 +0,0 @@
-//
-//  KMTableCellData.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2023/11/7.
-//
-
-import Cocoa
-
-class KMTableCellData: NSObject {
-    var string: String = ""
-    var backgroundColor: NSColor?
-    var font: NSFont = NSFont.systemFont(ofSize: 10)
-    var textColor: NSColor = NSColor(deviceRed: 0, green: 0, blue: 0, alpha: 1)
-    var textAlignment: NSTextAlignment = .center
-    
-    required override init() {
-        super.init()
-    }
-
-    func copy(with zone: NSZone? = nil) -> Any {
-        let copy = type(of: self).init()
-        copy.string = string
-        copy.font = font
-        copy.textColor = textColor
-        copy.textAlignment = textAlignment
-        copy.backgroundColor = backgroundColor
-        return copy
-    }
-}

+ 38 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableDataManager.h

@@ -0,0 +1,38 @@
+//
+//  KMTableDataManager.h
+//  PDF Reader Pro Edition
+//
+//  Created by dinglingui on 2018/10/15.
+//
+
+#import <Foundation/Foundation.h>
+#import "KMTableCellData.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+extern NSString *kCellList;
+extern NSString *kIsAlternating;
+extern NSString *kAlternatingColor;
+
+@interface KMTableDataManager : NSObject<NSXMLParserDelegate>
+
+@property (nonatomic,retain) NSMutableArray *cellList;
+
+@property (nonatomic,retain) NSMutableArray *rowList;
+
+@property (nonatomic,retain) KMTableCellData *cellData;
+
+@property (nonatomic,retain) NSMutableString *currentString;
+
+@property (nonatomic,assign) BOOL isAlternating;
+
+@property (nonatomic,retain) NSColor *alternatingColor;
+
+
+- (NSString*)writeFormDataToString:(NSDictionary*)data;
+
+- (NSDictionary*)readCellData:(NSString*)string;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 186 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableDataManager.m

@@ -0,0 +1,186 @@
+//
+//  KMTableDataManager.m
+//  PDF Reader Pro Edition
+//
+//  Created by dinglingui on 2018/10/15.
+//
+
+#import "KMTableDataManager.h"
+#import <Cocoa/Cocoa.h>
+
+NSString *kCellList = @"CellList";
+NSString *kIsAlternating = @"isAlternating";
+NSString *kAlternatingColor = @"alternatingColor";
+
+@implementation KMTableDataManager
+
+- (id)init
+{
+    if (self = [super init]) {
+        _cellList = [[NSMutableArray alloc] init];
+        _rowList = [[NSMutableArray alloc] init];
+        _cellData = [[KMTableCellData alloc] init];
+        _currentString = [[NSMutableString alloc] init];
+        _isAlternating = NO;
+        _alternatingColor = [NSColor colorWithDeviceRed:0.5 green:0.5 blue:0.5 alpha:1];;
+    }
+    return self;
+}
+
+- (NSString*)writeFormDataToString:(NSDictionary*)data
+{
+    NSArray *cellList = [data objectForKey:kCellList];
+    BOOL isAlternating = [[data objectForKey:kIsAlternating] boolValue];
+    NSColor *alternatingColor = [data objectForKey:kAlternatingColor];
+    CGFloat red,green,blue,alpha;
+    [[alternatingColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha];
+    
+    NSMutableString *string = [NSMutableString stringWithString:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"];
+    
+    [string appendString:@"<celllist version=\"2.0\">\n"];
+    [string appendFormat:@"\t<isAlternating>"];
+    [string appendFormat:@"%d",isAlternating];
+    [string appendFormat:@"\t</isAlternating>\n"];
+    [string appendFormat:@"\t<alternatingColor>"];
+    [string appendFormat:@"%f,%f,%f,%f",red,green,blue,alpha];
+    [string appendFormat:@"\t</alternatingColor>\n"];
+    
+    for(NSArray *array in cellList){
+        [string appendFormat:@"\t<row>\n"];
+        for(KMTableCellData *cell in array){
+            CGFloat red,green,blue,alpha;
+            [string appendFormat:@"\t\t<column>\n"];
+            [string appendFormat:@"\t\t\t<string>"];
+            [string appendFormat:@"%@",cell.string];
+            [string appendFormat:@"</string>\n"];
+            if (cell.backgroundColor) {
+                [[cell.backgroundColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha];
+                [string appendFormat:@"\t\t\t<backgroundColor>"];
+                [string appendFormat:@"%f,%f,%f,%f",red,green,blue,alpha];
+                [string appendFormat:@"</backgroundColor>\n"];
+            }
+            [string appendFormat:@"\t\t</column>\n"];
+        }
+        [string appendFormat:@"\t</row>\n"];
+    }
+    [string appendString:@"</celllist>"];
+    return string;
+}
+
+- (NSDictionary*)readCellData:(NSString*)string
+{
+    NSData *  xmldownloaddata = [string dataUsingEncoding:NSUTF8StringEncoding];
+    NSXMLParser * parser = [[NSXMLParser alloc]initWithData:xmldownloaddata];
+    parser.delegate = self;
+    [parser parse];
+    
+    NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys:_cellList,kCellList,
+                         [NSString stringWithFormat:@"%d",_isAlternating],kIsAlternating,
+                         _alternatingColor,kAlternatingColor,nil];
+    return dic;
+}
+
+#pragma mark NSXMLParserDelegate methods
+- (void)parserDidStartDocument:(NSXMLParser *)parser
+{
+    [_cellList removeAllObjects];
+}
+
+- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
+{
+    if([elementName isEqualToString:@"celllist"])
+    {
+        [_cellList removeAllObjects];
+    }else if ([elementName isEqualToString:@"row"]){
+        [_rowList removeAllObjects];
+    }else if ([elementName isEqualToString:@"column"]){
+        _cellData = [[KMTableCellData alloc] init];
+    }else if ([elementName isEqualToString:@"string"]){
+        [_currentString setString:@""];
+    }else if ([elementName isEqualToString:@"fontName"]){
+        [_currentString setString:@""];
+    }else if ([elementName isEqualToString:@"fontSize"]){
+        [_currentString setString:@""];
+    }else if ([elementName isEqualToString:@"textColor"]){
+        [_currentString setString:@""];
+    }else if ([elementName isEqualToString:@"textAlignment"]){
+        [_currentString setString:@""];
+    }else if ([elementName isEqualToString:@"isAlternating"]){
+        [_currentString setString:@""];
+    }else if ([elementName isEqualToString:@"alternatingColor"]){
+        [_currentString setString:@""];
+    }else if ([elementName isEqualToString:@"backgroundColor"]){
+        [_currentString setString:@""];
+    }
+}
+
+- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
+{
+    [_currentString appendString:string];
+}
+
+- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
+{
+    if ([elementName isEqualToString:@"row"]){
+        NSArray *rowList = [_rowList copy];
+        [_cellList addObject:rowList];
+    }else if ([elementName isEqualToString:@"column"]){
+        KMTableCellData *cell = [[KMTableCellData alloc] init];
+        cell.string = _cellData.string;
+        cell.backgroundColor = _cellData.backgroundColor;
+        [_rowList addObject:cell];
+    }else if ([elementName isEqualToString:@"string"]){
+        NSString *str = [_currentString copy];
+        _cellData.string = str;
+    } else if ([elementName isEqualToString:@"isAlternating"]){
+        _isAlternating = [_currentString boolValue];
+    } else if ([elementName isEqualToString:@"alternatingColor"]){
+        NSString *str = [_currentString copy];
+        CGFloat red,green,blue,alpha;
+        NSArray *array = [str componentsSeparatedByString:@","];
+        for (NSUInteger i=0;i<[array count];i++) {
+            switch (i) {
+                case 0:
+                    red = [[array objectAtIndex:i] floatValue];
+                    break;
+                case 1:
+                    green = [[array objectAtIndex:i] floatValue];
+                    break;
+                case 2:
+                    blue = [[array objectAtIndex:i] floatValue];
+                    break;
+                case 3:
+                    alpha = [[array objectAtIndex:i] floatValue];
+                    break;
+                default:
+                    break;
+            }
+        }
+        _alternatingColor = [NSColor colorWithDeviceRed:red green:green blue:blue alpha:alpha];
+    }else if ([elementName isEqualToString:@"backgroundColor"]){
+        NSString *str = [_currentString copy];
+        CGFloat red,green,blue,alpha;
+        NSArray *array = [str componentsSeparatedByString:@","];
+        for (NSUInteger i=0;i<[array count];i++) {
+            switch (i) {
+                case 0:
+                    red = [[array objectAtIndex:i] floatValue];
+                    break;
+                case 1:
+                    green = [[array objectAtIndex:i] floatValue];
+                    break;
+                case 2:
+                    blue = [[array objectAtIndex:i] floatValue];
+                    break;
+                case 3:
+                    alpha = [[array objectAtIndex:i] floatValue];
+                    break;
+                default:
+                    break;
+            }
+        }
+        _cellData.backgroundColor = [NSColor colorWithDeviceRed:red green:green blue:blue alpha:alpha];
+    }
+}
+
+@end

+ 0 - 142
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableDataManager.swift

@@ -1,142 +0,0 @@
-//
-//  KMTableDataManager.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2023/11/7.
-//
-
-import Cocoa
-
-let kCellList: String = "CellList"
-let kIsAlternating: String = "isAlternating"
-let kAlternatingColor: String = "alternatingColor"
-
-class KMTableDataManager: NSObject, XMLParserDelegate {
-    var cellList: [[KMTableCellData]] = []
-    var rowList: [KMTableCellData] = []
-    var cellData: KMTableCellData = KMTableCellData()
-    var currentString: String = ""
-    var isAlternating: Bool = false
-    var alternatingColor: NSColor = NSColor(deviceRed: 0.5, green: 0.5, blue: 0.5, alpha: 1)
-    
-    func writeFormDataToString(data: [String: Any]) -> String {
-        guard let cellList = data[kCellList] as? [[KMTableCellData]],
-              let isAlternating = data[kIsAlternating] as? Bool,
-              let alternatingColor = data[kAlternatingColor] as? NSColor else {
-            return ""
-        }
-        
-        var red: CGFloat = 0, green: CGFloat = 0, blue: CGFloat = 0, alpha: CGFloat = 0
-        alternatingColor.usingColorSpaceName(NSColorSpaceName.calibratedRGB)?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-        
-        var string = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
-        string += "<celllist version=\"2.0\">\n"
-        string += "\t<isAlternating>\(isAlternating)</isAlternating>\n"
-        string += "\t<alternatingColor>\(red),\(green),\(blue),\(alpha)</alternatingColor>\n"
-        
-        for array in cellList {
-            string += "\t<row>\n"
-            for cell in array {
-                var cellRed: CGFloat = 0, cellGreen: CGFloat = 0, cellBlue: CGFloat = 0, cellAlpha: CGFloat = 0
-                string += "\t\t<column>\n"
-                string += "\t\t\t<string>\(cell.string)</string>\n"
-                if let backgroundColor = cell.backgroundColor {
-                    backgroundColor.usingColorSpaceName(NSColorSpaceName.calibratedRGB)?.getRed(&cellRed, green: &cellGreen, blue: &cellBlue, alpha: &cellAlpha)
-                    string += "\t\t\t<backgroundColor>\(cellRed),\(cellGreen),\(cellBlue),\(cellAlpha)</backgroundColor>\n"
-                }
-                string += "\t\t</column>\n"
-            }
-            string += "\t</row>\n"
-        }
-        string += "</celllist>"
-        
-        return string
-    }
-    
-    func readCellData(string: String) -> [String: Any] {
-        guard let xmldownloaddata = string.data(using: .utf8) else {
-            return [:]
-        }
-        let parser = XMLParser(data: xmldownloaddata)
-        parser.delegate = self
-        parser.parse()
-        
-        let dic: [String: Any] = [
-            kCellList: cellList,
-            kIsAlternating: String(isAlternating),
-            kAlternatingColor: alternatingColor 
-        ]
-        return dic
-    }
-    
-    //MARK: NSXMLParserDelegate methods
-    
-    func parserDidStartDocument(_ parser: XMLParser) {
-        self.cellList.removeAll()
-    }
-    
-    func parser(_ parser: XMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [String : String] = [:]) {
-        if elementName == "celllist" {
-            self.cellList.removeAll()
-        } else if elementName == "row" {
-            self.cellList.removeAll()
-        } else if elementName == "column" {
-            self.cellData = KMTableCellData.init()
-        } else if elementName == "string" {
-            self.currentString = ""
-        } else if elementName == "fontName" {
-            self.currentString = ""
-        } else if elementName == "fontSize" {
-            self.currentString = ""
-        } else if elementName == "textColor" {
-            self.currentString = ""
-        } else if elementName == "textAlignment" {
-            self.currentString = ""
-        } else if elementName == "isAlternating" {
-            self.currentString = ""
-        } else if elementName == "alternatingColor" {
-            self.currentString = ""
-        } else if elementName == "backgroundColor" {
-            self.currentString = ""
-        }
-    }
-    
-    func parser(_ parser: XMLParser, foundCharacters string: String) {
-        self.currentString += string
-    }
-    
-    func parser(_ parser: XMLParser, didEndElement elementName: String, namespaceURI: String?, qualifiedName qName: String?) {
-        if elementName == "row" {
-            let rowList = Array(self.rowList)
-            self.cellList.append(rowList)
-        } else if elementName == "column" {
-            let cell = KMTableCellData()
-            cell.string = self.cellData.string
-            cell.backgroundColor = self.cellData.backgroundColor
-            self.rowList.append(cell)
-        } else if elementName == "string" {
-            let str = self.currentString.copy() as! String
-            self.cellData.string = str
-        } else if elementName == "isAlternating" {
-            self.isAlternating = Bool(self.currentString) ?? false
-        } else if elementName == "alternatingColor" {
-            let str = self.currentString.copy() as! String
-            let components = str.components(separatedBy: ",").compactMap { Float($0) }
-            guard components.count == 4 else { return }
-            let red = CGFloat(components[0])
-            let green = CGFloat(components[1])
-            let blue = CGFloat(components[2])
-            let alpha = CGFloat(components[3])
-            self.alternatingColor = NSColor(deviceRed: red, green: green, blue: blue, alpha: alpha)
-        } else if elementName == "backgroundColor" {
-            let str = self.currentString.copy() as! String
-            let components = str.components(separatedBy: ",").compactMap { Float($0) }
-            guard components.count == 4 else { return }
-            let red = CGFloat(components[0])
-            let green = CGFloat(components[1])
-            let blue = CGFloat(components[2])
-            let alpha = CGFloat(components[3])
-            self.cellData.backgroundColor = NSColor(deviceRed: red, green: green, blue: blue, alpha: alpha)
-        }
-    }
-}

+ 3 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Extension.m

@@ -331,16 +331,17 @@ CGFloat DEFAULT_SNAPSHOT_HEIGHT = 200.0;
         bounds.origin.y = NSMaxY([page boundsForBox:[self displayBox]]) - NSHeight(bounds);
     
     if (page != nil) {
-        KMTableAnnotation *table = [[KMTableAnnotation alloc] initWithKMNoteBounds:bounds];
+        KMTableAnnotation *table = [[KMTableAnnotation alloc] initWithKMNoteBounds:bounds document:self.document];
         [table setColor:[NSColor colorWithDeviceRed:169.0/255.0 green:192.0/255.0 blue:213.0/255.0 alpha:1]];
         [table createFormWithRow:4 andColumn:4];
         [self addAnnotation:table toPage:page];
+        [table updateAppearanceInkWithIsAdd:NO];
         [table registerUserName];
 //        [self setActiveAnnotations:[NSMutableArray arrayWithArray:@[table]]];
         [self updateActiveAnnotations:[NSMutableArray arrayWithArray:@[table]]];
 //        [self setNeedsDisplayAnnotation:table];
         
-        [table drawLineWithPoint:CGPointMake(NSMinX(bounds) + 10, NSMaxY(bounds) - 10)];
+        [table drawLine:CGPointMake(NSMinX(bounds) + 10, NSMaxY(bounds) - 10)];
         [self setNeedsDisplayAnnotation:table];
         [[NSNotificationCenter defaultCenter] postNotificationName:@"KMPDFViewActiveAnnotationDidChangeNotification" object:self];
 

+ 18 - 18
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationTableViewController.swift

@@ -285,7 +285,7 @@ class KMAnnotationTableViewController: NSViewController {
     func reloadData(with point: NSPoint) {
         let rect = annotation!.isInCell(with: point)
         if !NSEqualRects(rect, NSRectFromCGRect(CGRect.zero)) {
-            var color = annotation?.getCellData(row: annotation!.currentCell.row, column: annotation!.currentCell.column).backgroundColor
+            var color = annotation?.getCellData(withRow: annotation!.currentCell.row, andColumn: annotation!.currentCell.column).backgroundColor
             
             var maxWidth: CGFloat = 10
             let minHeight: CGFloat = 10
@@ -293,7 +293,7 @@ class KMAnnotationTableViewController: NSViewController {
             if annotation!.currentCell.column == annotation!.columnNumber - 1 {
                 maxWidth = CGFloat(MAXFLOAT)
             } else {
-                if let rect1 = annotation?.getCellBounds(row: annotation!.currentCell.row, column: annotation!.currentCell.column + 1) {
+                if let rect1 = annotation?.getCellBounds(withRow: annotation!.currentCell.row, column: annotation!.currentCell.column + 1) {
                     maxWidth = rect1.size.width + rect.size.width - 10
                 }
             }
@@ -391,9 +391,9 @@ class KMAnnotationTableViewController: NSViewController {
             let row = table?.currentCell.row
             let column = table?.currentCell.column
             if stepper == cellWidthStepper {
-                table?.moveVerticalLine(ofIndex: column!+1, withDistance: self.cellWidthStepper.doubleValue - (table?.getCellBounds(row: row!, column: column!).size.width)!)
+                table?.moveVerticalLine(of: column!+1, withDistance: self.cellWidthStepper.doubleValue - (table?.getCellBounds(withRow: row!, column: column!).size.width)!)
             } else {
-                table?.moveCrossLine(ofIndex: table!.rowNumber - row! - 1, withDistance: (table?.getCellBounds(row: row!, column: column!).size.height)! - self.cellHeightStepper.doubleValue)
+                table?.moveCrossLine(of: table!.rowNumber - row! - 1, withDistance: (table?.getCellBounds(withRow: row!, column: column!).size.height)! - self.cellHeightStepper.doubleValue)
                 table?.setOldRowHeights()
             }
             table?.afreshDrawLine()
@@ -449,21 +449,21 @@ class KMAnnotationTableViewController: NSViewController {
     //MARK: Button Actions
             
     @IBAction func styleButtonAction(_ sender: NSButton) {
-        var tableStyle: KMTableStyle = .Default
+        var tableStyle: KMTableStyle = .default
         if let button = sender as? NSButton {
             switch button.tag {
             case 300:
-                tableStyle = .Default
+                tableStyle = .default
             case 301:
-                tableStyle = .Style1
+                tableStyle = .style1
             case 302:
-                tableStyle = .Style2
+                tableStyle = .style2
             case 303:
-                tableStyle = .Style3
+                tableStyle = .style3
             case 304:
-                tableStyle = .Style4
+                tableStyle = .style4
             case 305:
-                tableStyle = .Style5
+                tableStyle = .style5
             default:
                 break
             }
@@ -512,9 +512,9 @@ class KMAnnotationTableViewController: NSViewController {
         if table.currentCell.row >= 0 && table.currentCell.column >= 0 {
             if self.backgroudColorBoxIsEnabled {
                 if !self.notUpdateBackgroundColor {
-                    table.getCellData(row: table.currentCell.row, column: table.currentCell.column).backgroundColor = self.colorWithCGColor(self.backgrourdColorView.layer?.backgroundColor)
+                    table.getCellData(withRow: table.currentCell.row, andColumn: table.currentCell.column).backgroundColor = self.colorWithCGColor(self.backgrourdColorView.layer?.backgroundColor)
                 } else {
-                    var color = self.annotation?.getCellData(row: self.annotation!.currentCell.row, column: self.annotation!.currentCell.column).backgroundColor
+                    var color = self.annotation?.getCellData(withRow: self.annotation!.currentCell.row, andColumn: self.annotation!.currentCell.column).backgroundColor
                     if color == nil {
                         color = NSColor(deviceRed: 1, green: 1, blue: 1, alpha: 1)
                     }
@@ -524,7 +524,7 @@ class KMAnnotationTableViewController: NSViewController {
         }
         
         table.isAlternateColor = self.alternateColorButton.state == .on
-        table.alternatingColor = self.colorWithCGColor(self.alternateColorView.layer!.backgroundColor)
+        table.alternatingColor = self.colorWithCGColor(self.alternateColorView.layer!.backgroundColor)!
         table.writeFormDataToContents()
         
         if let tableInk = table as? CPDFAnnotation {
@@ -559,7 +559,7 @@ class KMAnnotationTableViewController: NSViewController {
             let count = (popButton.titleOfSelectedItem as NSString?)?.integerValue ?? 0 - table.sidebarCount()
             if count > 0 {
                 for _ in 0..<count {
-                    table.insertColumn(atIndexBefore: 0, withLineJoinStyle: .round)
+                    table.insertColumnAtIndex(before: 0, with: .round)
                 }
             } else if count < 0 {
                 for _ in count..<0 {
@@ -571,7 +571,7 @@ class KMAnnotationTableViewController: NSViewController {
             let count = (popButton.titleOfSelectedItem as NSString?)?.integerValue ?? 0 - table.headerCount()
             if count > 0 {
                 for _ in 0..<count {
-                    table.insertColumn(atIndexBefore: 0, withLineJoinStyle: .round)
+                    table.insertColumnAtIndex(before: 0, with: .round)
                 }
             } else if count < 0 {
                 for _ in count..<0 {
@@ -583,7 +583,7 @@ class KMAnnotationTableViewController: NSViewController {
             let count = (popButton.titleOfSelectedItem as NSString?)?.integerValue ?? 0 - table.footerCount()
             if count > 0 {
                 for _ in 0..<count {
-                    table.insertColumn(atIndexBefore: table.rowNumber - 1, withLineJoinStyle: .bevel)
+                    table.insertColumnAtIndex(before: table.rowNumber - 1, with: .bevel)
                 }
             } else if count < 0 {
                 for _ in count..<0 {
@@ -594,7 +594,7 @@ class KMAnnotationTableViewController: NSViewController {
             break
         }
         
-        table.drawLine(point: self.point)
+        table.drawLine(self.point)
         reloadData(with: self.point)
         pdfView!.needsDisplay = true
     }

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -2940,9 +2940,9 @@ let LOCKED_KEY  = "locked"
                     } else if itemTitles[i] == "Add Row Above" {
                         let path1 = table.crossLines[table.rowNumber - table.currentCell.row]
                         let path2 = table.crossLines[table.rowNumber - table.currentCell.row - 1]
-                        if path1.lineJoinStyle == NSBezierPath.LineJoinStyle.round && table.headerCount() >= 5 {
+                        if (path1 as AnyObject).lineJoinStyle == NSBezierPath.LineJoinStyle.round && table.headerCount() >= 5 {
                             item!.action = nil
-                        } else if path2.lineJoinStyle == NSBezierPath.LineJoinStyle.bevel && table.footerCount() >= 5 {
+                        } else if (path2 as AnyObject).lineJoinStyle == NSBezierPath.LineJoinStyle.bevel && table.footerCount() >= 5 {
                             item!.action = nil
                         }
                     }
@@ -2977,7 +2977,7 @@ let LOCKED_KEY  = "locked"
             let annotation = activeAnno
             annotation.completeEditCellText()
             if !(NSIsEmptyRect(annotation.drawRect)) {
-                annotation.drawLine(point: pagePoint)
+                annotation.drawLine(pagePoint)
                 NotificationCenter.default.post(name: NSNotification.Name.KMPDFViewTableAnnotationDidChange, object: self, userInfo: ["point": NSValue(point: pagePoint)])
             }
             if (annotation.rowNumber - annotation.currentCell.row - 1) < 0 {

+ 2 - 1
PDF Office/PDF Master/PDF_Reader_Pro DMG-Bridging-Header.h

@@ -117,6 +117,7 @@
 
 #import "KMSignatureWindowController.h"
 #import "KMPageEditPopViewController.h"
-
 //广告
 #import "KMRecommondPopWindow.h"
+
+#import "KMTableAnnotation.h"

+ 2 - 0
PDF Office/PDF Master/PDF_Reader_Pro Edition-Bridging-Header.h

@@ -116,3 +116,5 @@
 
 //广告
 #import "KMRecommondPopWindow.h"
+
+#import "KMTableAnnotation.h"

+ 3 - 0
PDF Office/PDF Master/PDF_Reader_Pro-Bridging-Header.h

@@ -116,3 +116,6 @@
 
 //广告
 #import "KMRecommondPopWindow.h"
+
+#import "KMTableAnnotation.h"
+

+ 30 - 24
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -849,6 +849,15 @@
 		9F8DDF342924DA6B006CDC73 /* KMPDFToolsCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8DDF332924DA6B006CDC73 /* KMPDFToolsCollectionView.swift */; };
 		9F8DDF352924DA6B006CDC73 /* KMPDFToolsCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8DDF332924DA6B006CDC73 /* KMPDFToolsCollectionView.swift */; };
 		9F8DDF362924DA6B006CDC73 /* KMPDFToolsCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8DDF332924DA6B006CDC73 /* KMPDFToolsCollectionView.swift */; };
+		9F94617D2BD643720076574B /* KMTableAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F94617B2BD643720076574B /* KMTableAnnotation.m */; };
+		9F94617E2BD643720076574B /* KMTableAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F94617B2BD643720076574B /* KMTableAnnotation.m */; };
+		9F94617F2BD643720076574B /* KMTableAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F94617B2BD643720076574B /* KMTableAnnotation.m */; };
+		9F9461842BD644BF0076574B /* KMTableDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9461812BD644BE0076574B /* KMTableDataManager.m */; };
+		9F9461852BD644BF0076574B /* KMTableDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9461812BD644BE0076574B /* KMTableDataManager.m */; };
+		9F9461862BD644BF0076574B /* KMTableDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9461812BD644BE0076574B /* KMTableDataManager.m */; };
+		9F9461872BD644BF0076574B /* KMTableCellData.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9461832BD644BF0076574B /* KMTableCellData.m */; };
+		9F9461882BD644BF0076574B /* KMTableCellData.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9461832BD644BF0076574B /* KMTableCellData.m */; };
+		9F9461892BD644BF0076574B /* KMTableCellData.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9461832BD644BF0076574B /* KMTableCellData.m */; };
 		9F94747B29FA22700042F949 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9F94747A29FA22700042F949 /* InfoPlist.strings */; };
 		9F94747C29FA22700042F949 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9F94747A29FA22700042F949 /* InfoPlist.strings */; };
 		9F94747D29FA22700042F949 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9F94747A29FA22700042F949 /* InfoPlist.strings */; };
@@ -1163,15 +1172,6 @@
 		9FF816E12AFA5BA80087EFC5 /* KMAnnotationTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF816E02AFA5BA80087EFC5 /* KMAnnotationTableViewController.xib */; };
 		9FF816E22AFA5BA80087EFC5 /* KMAnnotationTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF816E02AFA5BA80087EFC5 /* KMAnnotationTableViewController.xib */; };
 		9FF816E32AFA5BA80087EFC5 /* KMAnnotationTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF816E02AFA5BA80087EFC5 /* KMAnnotationTableViewController.xib */; };
-		9FF816E62AFA5D650087EFC5 /* KMTableAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816E52AFA5D650087EFC5 /* KMTableAnnotation.swift */; };
-		9FF816E72AFA5D650087EFC5 /* KMTableAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816E52AFA5D650087EFC5 /* KMTableAnnotation.swift */; };
-		9FF816E82AFA5D650087EFC5 /* KMTableAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816E52AFA5D650087EFC5 /* KMTableAnnotation.swift */; };
-		9FF816EA2AFA5D760087EFC5 /* KMTableCellData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816E92AFA5D760087EFC5 /* KMTableCellData.swift */; };
-		9FF816EB2AFA5D760087EFC5 /* KMTableCellData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816E92AFA5D760087EFC5 /* KMTableCellData.swift */; };
-		9FF816EC2AFA5D760087EFC5 /* KMTableCellData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816E92AFA5D760087EFC5 /* KMTableCellData.swift */; };
-		9FF816EE2AFA5D840087EFC5 /* KMTableDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816ED2AFA5D840087EFC5 /* KMTableDataManager.swift */; };
-		9FF816EF2AFA5D840087EFC5 /* KMTableDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816ED2AFA5D840087EFC5 /* KMTableDataManager.swift */; };
-		9FF816F02AFA5D840087EFC5 /* KMTableDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816ED2AFA5D840087EFC5 /* KMTableDataManager.swift */; };
 		9FF816F32AFB18290087EFC5 /* NSGeometry_KMExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816F22AFB18290087EFC5 /* NSGeometry_KMExtensions.swift */; };
 		9FF816F42AFB18290087EFC5 /* NSGeometry_KMExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816F22AFB18290087EFC5 /* NSGeometry_KMExtensions.swift */; };
 		9FF816F52AFB18290087EFC5 /* NSGeometry_KMExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816F22AFB18290087EFC5 /* NSGeometry_KMExtensions.swift */; };
@@ -5541,6 +5541,12 @@
 		9F8DDF2B2924B855006CDC73 /* KMPDFToolsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPDFToolsViewController.swift; sourceTree = "<group>"; };
 		9F8DDF2C2924B855006CDC73 /* KMPDFToolsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPDFToolsViewController.xib; sourceTree = "<group>"; };
 		9F8DDF332924DA6B006CDC73 /* KMPDFToolsCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPDFToolsCollectionView.swift; sourceTree = "<group>"; };
+		9F94617B2BD643720076574B /* KMTableAnnotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMTableAnnotation.m; sourceTree = "<group>"; };
+		9F94617C2BD643720076574B /* KMTableAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMTableAnnotation.h; sourceTree = "<group>"; };
+		9F9461802BD644BE0076574B /* KMTableDataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMTableDataManager.h; sourceTree = "<group>"; };
+		9F9461812BD644BE0076574B /* KMTableDataManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMTableDataManager.m; sourceTree = "<group>"; };
+		9F9461822BD644BF0076574B /* KMTableCellData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMTableCellData.h; sourceTree = "<group>"; };
+		9F9461832BD644BF0076574B /* KMTableCellData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMTableCellData.m; sourceTree = "<group>"; };
 		9F94747A29FA22700042F949 /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = InfoPlist.strings; sourceTree = "<group>"; };
 		9F94747E29FA24200042F949 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
 		9FA607D828F8227500B46586 /* KMBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBox.swift; sourceTree = "<group>"; };
@@ -5650,9 +5656,6 @@
 		9FF0D05F2B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPDFAnnotationTextWidgetSub.swift; sourceTree = "<group>"; };
 		9FF816DC2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMAnnotationTableViewController.swift; sourceTree = "<group>"; };
 		9FF816E02AFA5BA80087EFC5 /* KMAnnotationTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMAnnotationTableViewController.xib; sourceTree = "<group>"; };
-		9FF816E52AFA5D650087EFC5 /* KMTableAnnotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMTableAnnotation.swift; sourceTree = "<group>"; };
-		9FF816E92AFA5D760087EFC5 /* KMTableCellData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMTableCellData.swift; sourceTree = "<group>"; };
-		9FF816ED2AFA5D840087EFC5 /* KMTableDataManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMTableDataManager.swift; sourceTree = "<group>"; };
 		9FF816F22AFB18290087EFC5 /* NSGeometry_KMExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSGeometry_KMExtensions.swift; sourceTree = "<group>"; };
 		9FF94F0729A62B5000B1EF69 /* KMDesignSelect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMDesignSelect.swift; sourceTree = "<group>"; };
 		9FF94F0829A62B5000B1EF69 /* KMDesignSelect.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMDesignSelect.xib; sourceTree = "<group>"; };
@@ -8450,9 +8453,12 @@
 		9FF816E42AFA5D400087EFC5 /* Table */ = {
 			isa = PBXGroup;
 			children = (
-				9FF816E52AFA5D650087EFC5 /* KMTableAnnotation.swift */,
-				9FF816E92AFA5D760087EFC5 /* KMTableCellData.swift */,
-				9FF816ED2AFA5D840087EFC5 /* KMTableDataManager.swift */,
+				9F94617C2BD643720076574B /* KMTableAnnotation.h */,
+				9F94617B2BD643720076574B /* KMTableAnnotation.m */,
+				9F9461822BD644BF0076574B /* KMTableCellData.h */,
+				9F9461832BD644BF0076574B /* KMTableCellData.m */,
+				9F9461802BD644BE0076574B /* KMTableDataManager.h */,
+				9F9461812BD644BE0076574B /* KMTableDataManager.m */,
 			);
 			path = Table;
 			sourceTree = "<group>";
@@ -15363,7 +15369,6 @@
 				BBEC00C7295C319400A26C98 /* KMBatesManager.swift in Sources */,
 				BB147020299DC0D100784A6A /* OIDServiceDiscovery.m in Sources */,
 				AD3AAD7D2B0DFFB100DE5FE7 /* KMAngleIndicateView.swift in Sources */,
-				9FF816E62AFA5D650087EFC5 /* KMTableAnnotation.swift in Sources */,
 				9F0201652A176AF200C9B673 /* KMDottedLineView.swift in Sources */,
 				9FF0D0582B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift in Sources */,
 				BBBB6CDA2AD15B900035AA66 /* CPDFFreeTextAnnotation+PDFListView.swift in Sources */,
@@ -15390,6 +15395,7 @@
 				BB6710642BC672260018CE54 /* KMSignatureWindowController.m in Sources */,
 				9FD0FA4B29D43D6800F2AB0D /* KMDeviceBrowserWindowController.swift in Sources */,
 				BB2C84782BAE71E400AF6142 /* KMBotaTableView.swift in Sources */,
+				9F9461842BD644BF0076574B /* KMTableDataManager.m in Sources */,
 				AD015FB729AB484400A57062 /* KMLightMemberConfig.swift in Sources */,
 				BBD1F77C296F9BE000343885 /* KMPageEditSettingBaseWindowController.swift in Sources */,
 				BB2F184A2A0C911B0003F65E /* KMBaseWindowController.swift in Sources */,
@@ -15502,7 +15508,6 @@
 				AD7D5CC22B9566D0006562CD /* KMBookmarkOutlineView.swift in Sources */,
 				BB49ED1D293F4FB200C82CA2 /* KMConvertPPTsSettingView.swift in Sources */,
 				BB146FD2299DC0D100784A6A /* GTLRDateTime.m in Sources */,
-				9FF816EA2AFA5D760087EFC5 /* KMTableCellData.swift in Sources */,
 				BB8F457A295AFB330037EA22 /* KMHeaderFooterFontInfoView.swift in Sources */,
 				AD055E6C2B8732680035F824 /* SKTextWithIconCell.m in Sources */,
 				9F53D5572AD6908600CCF9D8 /* KMAnnotationLinkViewController.swift in Sources */,
@@ -15575,7 +15580,6 @@
 				AD7D5C922B8F20FE006562CD /* synctex_parser_utils.m in Sources */,
 				BB1BFF5D2AE9F1FF003EB179 /* KMBatchOperateBaseWindowController.swift in Sources */,
 				F36AD77729642FE80015AD53 /* CPDFListView+UndoManager.m in Sources */,
-				9FF816EE2AFA5D840087EFC5 /* KMTableDataManager.swift in Sources */,
 				ADDEEA492AD38BDB00EF675D /* KMSignatureHelpViewController.swift in Sources */,
 				BB146FBA299DC0D100784A6A /* GTLRBase64.m in Sources */,
 				BB1B0ACB2B4FC6E900889528 /* KMFunctionGuideWindowController.swift in Sources */,
@@ -15626,6 +15630,7 @@
 				BB146FB1299DC0D100784A6A /* GTLRErrorObject.m in Sources */,
 				ADAFDA482AEA7F1300F084BC /* KMAdvertisementShowView.swift in Sources */,
 				BB03D6942B021124008C9976 /* NSSegmentedControl+KMExtension.swift in Sources */,
+				9F9461872BD644BF0076574B /* KMTableCellData.m in Sources */,
 				BBC28F412B0EE7D600D73206 /* KMGroupFindTableRowView.swift in Sources */,
 				BBB9B319299A5D6D004F3235 /* KMCloudServer.m in Sources */,
 				ADE86A782B0221E100414DFA /* KMSecurityWindowController.swift in Sources */,
@@ -16081,6 +16086,7 @@
 				BB6719E52AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift in Sources */,
 				9FBA0EF528FFC8A0001117AF /* KMCollectionView.swift in Sources */,
 				BB8810A02B4F7D1000AFA63E /* KMVerificationActivateViewController.m in Sources */,
+				9F94617D2BD643720076574B /* KMTableAnnotation.m in Sources */,
 				9F0CB4672967E5CB00007028 /* KMPropertiesPanelSubViewController.swift in Sources */,
 				BB1A916A2AFB7868005E5FD8 /* KMConvertWindowController.swift in Sources */,
 				BB147044299DC0D200784A6A /* OIDURLQueryComponent.m in Sources */,
@@ -16778,7 +16784,6 @@
 				AD055E4B2B72346E0035F824 /* KMBookmarkSheetView.swift in Sources */,
 				BB3A669B2B07520800575343 /* KMCustomOutlineView.swift in Sources */,
 				BB04FD0D2B206F3600D80F7B /* KMPlanViewController.swift in Sources */,
-				9FF816EB2AFA5D760087EFC5 /* KMTableCellData.swift in Sources */,
 				9FB2210F2B1AE35E00A5B208 /* NSBitmapImageRep_KMExtension.swift in Sources */,
 				9F1FE4E529406E4700E952CA /* GTMNSColor+Luminance.m in Sources */,
 				BB8116002992682F0008F536 /* KMSecureLimitAlertView.swift in Sources */,
@@ -16831,6 +16836,7 @@
 				BB14701E299DC0D100784A6A /* OIDIDToken.m in Sources */,
 				9F53D5482AD664C300CCF9D8 /* CPDFListHoverAnnotationViewController.swift in Sources */,
 				AD3AAD762B0DCEAA00DE5FE7 /* KMCompareSaveView.swift in Sources */,
+				9F9461852BD644BF0076574B /* KMTableDataManager.m in Sources */,
 				9FCFEC8D2AD10A4400EAD2CB /* KMTextFieldSheetController.swift in Sources */,
 				BBC8A7722B06408600FA9377 /* KMBotaSearchViewController.swift in Sources */,
 				BB49ECF2293F40F500C82CA2 /* KMConvertPageRangeSettingItemView.swift in Sources */,
@@ -16850,7 +16856,6 @@
 				BB853C832AF8BAF0009C20C1 /* KMSetPasswordObject.swift in Sources */,
 				BBB3FF9D2B56852700145C4A /* NSDocument+KMExtensions.swift in Sources */,
 				BBEC00B0295C2AF300A26C98 /* KMBatesPreviewController.swift in Sources */,
-				9FF816E72AFA5D650087EFC5 /* KMTableAnnotation.swift in Sources */,
 				BB0A551E2A30793F00B6E84B /* KMDesignTextField.swift in Sources */,
 				BB1969E12B2856A900922736 /* KMSnapshotPDFView.swift in Sources */,
 				BBF170592AE296B90013CE02 /* KMView.swift in Sources */,
@@ -16959,7 +16964,6 @@
 				BB6719F62AD2C949003D44D5 /* CPDFRedactAnnotation+PDFListView.swift in Sources */,
 				ADCFFC0329C004AD007D3657 /* KMBookMarkTableRowView.swift in Sources */,
 				AD055E892B882E7F0035F824 /* SKBookmark.m in Sources */,
-				9FF816EF2AFA5D840087EFC5 /* KMTableDataManager.swift in Sources */,
 				ADDEEA872AD7805200EF675D /* KMGeneralButton.swift in Sources */,
 				BB5BE4EE2B060E2F00D51BF2 /* KMLanguageViewController.swift in Sources */,
 				BBBAECFD2B57713F00266BD3 /* KMTransitionInfo.swift in Sources */,
@@ -17409,6 +17413,7 @@
 				9F1FE4F129406E4700E952CA /* BackgroundGradientView.m in Sources */,
 				BBAC26A52AFE134300563A08 /* KMToolbarItemPopViewController.swift in Sources */,
 				9F0CB4BE2977C06300007028 /* KMPropertiesPanelColorSubVC.swift in Sources */,
+				9F94617E2BD643720076574B /* KMTableAnnotation.m in Sources */,
 				AD1CA41A2A061CE10070541F /* KMAnnotationScreenTypeViewItem.swift in Sources */,
 				BB0A55152A3052F800B6E84B /* KMCustomTextField.swift in Sources */,
 				BBB9B329299A5D6D004F3235 /* GTMAppAuthFetcherAuthorization+Keychain.m in Sources */,
@@ -17421,6 +17426,7 @@
 				BB65A0792AF8E2F2003A27A0 /* KMSyncPreferences.swift in Sources */,
 				9F78EFC328F7E395001E66F4 /* KMHomeViewController+Action.swift in Sources */,
 				ADE3C1EE29A5AFB100793B13 /* KMRequestServerManager.swift in Sources */,
+				9F9461882BD644BF0076574B /* KMTableCellData.m in Sources */,
 				ADDF837E2B391A5D00A81A4E /* DSignatureDetailsViewController.swift in Sources */,
 				9F1FE50029406E4700E952CA /* CTTabStripModel.m in Sources */,
 				BB03D69D2B0249A2008C9976 /* KMPDFEditInsertPageWindow.swift in Sources */,
@@ -17727,6 +17733,7 @@
 				BB86C1EF28F544F4005AD968 /* CPDFListView+Event.m in Sources */,
 				BB6710662BC672260018CE54 /* KMSignatureWindowController.m in Sources */,
 				ADBC2D39299F0A5A006280C8 /* KMPrintHelpViewController.swift in Sources */,
+				9F9461862BD644BF0076574B /* KMTableDataManager.m in Sources */,
 				BB2C847A2BAE71E400AF6142 /* KMBotaTableView.swift in Sources */,
 				BB146FE0299DC0D100784A6A /* GTLRDriveObjects.m in Sources */,
 				89D9896E28FD50EF003A3E87 /* KMAnnotationCollectionViewItem.swift in Sources */,
@@ -17931,9 +17938,7 @@
 				BB0FE0482B734DD1001E0F88 /* AIInfoConfig.swift in Sources */,
 				9FCFEC6A2AC2EAD500EAD2CB /* CPDFListViewColorMenuItemView.swift in Sources */,
 				BB8F4559295AA1270037EA22 /* KMHeaderFooterPropertyInfoController.swift in Sources */,
-				9FF816F02AFA5D840087EFC5 /* KMTableDataManager.swift in Sources */,
 				ADE787A42AA5A833002EC85A /* KMAccountExceptionWindowController.swift in Sources */,
-				9FF816EC2AFA5D760087EFC5 /* KMTableCellData.swift in Sources */,
 				BB162E94294FFE020088E9D1 /* KMWatermarkModel.swift in Sources */,
 				BB2C84812BAE732800AF6142 /* KMBotaLeftView.swift in Sources */,
 				AD867F9629D955BF00F00440 /* KMBOTAOutlineCellView.swift in Sources */,
@@ -17963,6 +17968,7 @@
 				AD3AAD5E2B0DA3D400DE5FE7 /* KMCompareTextViewItem.swift in Sources */,
 				BBB9B30F299A5D6D004F3235 /* KMCloudUploadOperationQueue.m in Sources */,
 				BB14700D299DC0D100784A6A /* OIDAuthorizationRequest.m in Sources */,
+				9F9461892BD644BF0076574B /* KMTableCellData.m in Sources */,
 				9F1FE4B329406E4700E952CA /* CTTabWindowController.m in Sources */,
 				ADE86AC22B034C7100414DFA /* KMBackgroundWindowController.swift in Sources */,
 				BBFE6E812930EBD400142C01 /* KMCompressWindowController.swift in Sources */,
@@ -18233,7 +18239,6 @@
 				9F0CB4BF2977C06300007028 /* KMPropertiesPanelColorSubVC.swift in Sources */,
 				ADD1B6BD29420B4A00C3FFF7 /* KMPrintPreviewView.swift in Sources */,
 				BB146FF2299DC0D100784A6A /* GTLRUploadParameters.m in Sources */,
-				9FF816E82AFA5D650087EFC5 /* KMTableAnnotation.swift in Sources */,
 				ADDF83222B391A5C00A81A4E /* KMPDFDigitalSignViewController.swift in Sources */,
 				BB6B436D2A04935000E02B54 /* KMPDFThumbViewBaseController.swift in Sources */,
 				BB1E7F322B511079002D9785 /* SKInspectPublicTool.swift in Sources */,
@@ -18419,6 +18424,7 @@
 				BB2C845C2BAE6DC100AF6142 /* KMLeftMethodMode.swift in Sources */,
 				AD1CA41B2A061CE10070541F /* KMAnnotationScreenTypeViewItem.swift in Sources */,
 				BB276A4E2B03760000AB5578 /* KMOperationQueue.swift in Sources */,
+				9F94617F2BD643720076574B /* KMTableAnnotation.m in Sources */,
 				AD055E552B73220A0035F824 /* KMBookmarkManager.swift in Sources */,
 				AD8810A229A8459000178CA1 /* KMComparativeTableViewController.swift in Sources */,
 				9F0CB4A129683E2600007028 /* KMPropertiesPanelSizeSubVC.swift in Sources */,