Browse Source

【综合】大纲列表优化

tangchao 1 year ago
parent
commit
ef07be3b63

+ 38 - 0
PDF Office/PDF Master/Class/Common/Category/CPDFKit/CPDFOutline+KMExtension.swift

@@ -0,0 +1,38 @@
+//
+//  CPDFOutline+KMExtension.swift
+//  PDF Reader Pro
+//
+//  Created by tangchao on 2024/1/29.
+//
+
+import Foundation
+
+@objc extension CPDFOutline {
+    var km_page: CPDFPage? {
+        get {
+            var dest = self.destination
+            if dest == nil && self.action.responds(to: NSSelectorFromString("destination")) {
+                dest = (self.action as? CPDFGoToAction)?.destination()
+            }
+            return dest?.page()
+        }
+    }
+    
+    var km_pageIndex: UInt {
+        get {
+            return self.km_page?.pageIndex() ?? UInt(NSNotFound)
+        }
+    }
+    
+    var km_pageLabel: String? {
+        get {
+            let page = self.km_page
+            if page != nil {
+                return page?.km_displayLabel
+            } else if self.action.responds(to: NSSelectorFromString("pageIndex")) {
+//                return [NSString stringWithFormat:@"%lu", (unsigned long)([(PDFActionRemoteGoTo *)[self action] pageIndex] + 1)];
+            }
+            return nil
+        }
+    }
+}

+ 25 - 0
PDF Office/PDF Master/Class/Common/Category/CPDFKit/CPDFPage+KMExtension.swift

@@ -0,0 +1,25 @@
+//
+//  CPDFPage+KMExtension.swift
+//  PDF Reader Pro
+//
+//  Created by tangchao on 2024/1/29.
+//
+
+import Foundation
+
+@objc extension CPDFPage {
+    @objc var km_displayLabel: String {
+        get {
+            var label: String?
+//            if ([[self class] usesSequentialPageNumbering] == NO)
+//                label = [self label];
+            return label != nil ? label! : self.km_sequentialLabel
+        }
+    }
+    
+    @objc var km_sequentialLabel: String {
+        get {
+            return "\(self.pageIndex() + 1)"
+        }
+    }
+}

+ 12 - 0
PDF Office/PDF Master/Class/Common/Category/NSObject+KMExtension.swift

@@ -681,6 +681,14 @@ extension NSOutlineView {
         return self.item(atRow: row)
     }
     
+    func selectedItem() -> Any? {
+        let row = self.selectedRow
+        if row < 0 {
+            return nil
+        }
+        return self.item(atRow: row)
+    }
+    
     func km_selectRow(_ row: Int, byExtendingSelection extend: Bool = true) {
         self.selectRowIndexes(IndexSet(integer: row), byExtendingSelection: extend)
     }
@@ -698,6 +706,10 @@ extension KM where Base: NSOutlineView {
     public func clickedItem<T>() -> T {
         return base.clickedItem() as! T
     }
+    
+    public func selectedItem<T>() -> T {
+        return base.selectedItem() as! T
+    }
 }
 
 // MARK: - NSParagraphStyle

+ 1 - 0
PDF Office/PDF Master/Class/Common/Category/NSView+KMExtension.swift

@@ -120,6 +120,7 @@ extension NSView {
 // MARK: - KMExtension
 
 extension NSView {
+    //: 是否为长辈视图(父类,父类的父类......)
     func isElderView(to sv: NSView?) -> Bool {
         guard let _sv = sv else {
             return false

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Action.swift

@@ -1063,7 +1063,7 @@ extension KMLeftSideViewController: NSTextFieldDelegate {
                     }
                 }
                 self.renamePDFOutline(editPDFOutline, label: textField.stringValue)
-//                [self updateSelectRowHeight];
+                self.updateSelectRowHeight()
                 self.tocOutlineView.reloadData()
             }
         }

+ 61 - 14
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Outline.swift

@@ -330,6 +330,48 @@ extension KMLeftSideViewController {
             self.tocOutlineView.reloadData()
         }
     }
+    
+    func updateSelectRowHeight() {
+        var rowHeight: CGFloat = 0
+        let outline: CPDFOutline? = self.tocOutlineView.km.selectedItem()
+        if outline == nil {
+            return
+        }
+        var attributedString = NSMutableAttributedString()
+        var dictAttr1 = [NSAttributedString.Key.font : KMAppearance.Layout.h0Color()]
+        var attr1 = NSAttributedString(string: outline!.label, attributes: dictAttr1)
+        attributedString.append(attr1)
+
+        let row = self.tocOutlineView.selectedRow
+        let viewS = self.tocOutlineView.view(atColumn: 0, row: row, makeIfNecessary: true)
+        let tableColumn = self.tocOutlineView.tableColumn(withIdentifier: kLabelColumnId)
+//    //    id cell = [tableColumn dataCell];
+        let cell = tableColumn?.dataCell(forRow: row)
+        (cell as? NSCell)?.objectValue = attributedString
+//        CGFloat w = leftSideController.view.frame.size.width - 86;//[tableColumn width] > 260 ? [tableColumn width] : 260;
+        let w = self.view.frame.size.width-86
+
+        let num = self.getNum(outline)
+        let gap = self.tocOutlineView.indentationPerLevel
+        rowHeight = ((cell as? NSCell)?.cellSize(forBounds: NSMakeRect(0, 0, w - (num > 0 ? 16 : 0) - gap * num.cgFloat, CGFLOAT_MAX)).height) ?? 0
+        rowHeight = fmax(rowHeight, self.tocOutlineView.rowHeight) + 25
+//        [rowHeights setFloat:rowHeight forKey:outline];
+        var fram = viewS?.frame ?? .zero
+        viewS?.frame = NSMakeRect(fram.origin.x, fram.origin.y, fram.size.width, rowHeight)
+        self.tocOutlineView.reloadData()
+    }
+    
+    func getNum(_ ol: CPDFOutline?) -> Int {
+        var num = 0
+        var outline = ol?.parent
+        repeat {
+            outline = outline?.parent
+            if outline != nil {
+                num += 1
+            }
+        } while outline != nil
+        return num
+    }
 }
 
 // MARK: - Undo & Redo
@@ -632,20 +674,25 @@ extension KMLeftSideViewController {
 // MARK: - KMTocOutlineViewDelegate
 
 extension KMLeftSideViewController: KMTocOutlineViewDelegate {
-//    func outlineView(_ anOutlineView: NSOutlineView, highlightLevelForRow row: Int) -> Int {
-//        if ([ov isEqual:leftSideController.tocOutlineView]) {
-//            NSInteger numRows = [ov numberOfRows];
-//            NSUInteger firstPage = [[[ov itemAtRow:row] page] pageIndex];
-//            NSUInteger lastPage = row + 1 < numRows ? [[[ov itemAtRow:row + 1] page] pageIndex] : [[self pdfDocument] pageCount];
-//            NSRange range = NSMakeRange(firstPage, MAX(1LU, lastPage - firstPage));
-//            NSUInteger i, iMax = [lastViewedPages count];
-//            for (i = 0; i < iMax; i++) {
-//                if (NSLocationInRange((NSUInteger)[lastViewedPages pointerAtIndex:i], range))
-//                    return i;
-//            }
-//        }
-//        return NSNotFound;
-//    }
+    func outlineView(_ anOutlineView: NSOutlineView, highlightLevelForRow row: Int) -> Int {
+        if self.tocOutlineView.isEqual(to: anOutlineView) {
+            let numRows = anOutlineView.numberOfRows
+            if let outline = anOutlineView.item(atRow: row) as? CPDFOutline {
+                let firstPage = outline.km_pageIndex
+                var lastPage = self.listView.document.pageCount
+                if row + 1 < numRows {
+                    lastPage = (anOutlineView.item(atRow: row + 1) as? CPDFOutline)?.km_pageIndex ?? UInt(NSNotFound)
+                }
+                //            NSRange range = NSMakeRange(firstPage, MAX(1LU, lastPage - firstPage));
+                //            NSUInteger i, iMax = [lastViewedPages count];
+                //            for (i = 0; i < iMax; i++) {
+                //                if (NSLocationInRange((NSUInteger)[lastViewedPages pointerAtIndex:i], range))
+                //                    return i;
+                //            }
+            }
+        }
+        return NSNotFound
+    }
     
     func outlineView(_ anOutlineView: NSOutlineView, imageContextForItem item: Any?) -> AnyObject? {
         if anOutlineView.isEqual(to: self.tocOutlineView) {

+ 68 - 112
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -256,6 +256,8 @@ class KMLeftSideViewController: KMSideViewController {
     
     private var _dragPDFOutline: CPDFOutline?
     
+    var updatingOutlineSelection = false
+    
     override func loadView() {
         super.loadView()
         
@@ -2784,13 +2786,15 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
     }
     
     func outlineViewSelectionDidChange(_ notification: Notification) {
+        
         if self.tocOutlineView.isEqual(to: notification.object) {
-//        if ([[notification object] isEqual:leftSideController.tocOutlineView] && (mwcFlags.updatingOutlineSelection == 0)){
-//            mwcFlags.updatingOutlineSelection = 1;
-            self.goToSelectedOutlineItem(nil)
-//            mwcFlags.updatingOutlineSelection = 0;
-//            if ([self interactionMode] == SKPresentationMode && [[NSUserDefaults standardUserDefaults] boolForKey:SKAutoHidePresentationContentsKey])
-//                [self hideLeftSideWindow];
+            if self.updatingOutlineSelection == false {
+                self.updatingOutlineSelection = true
+                self.goToSelectedOutlineItem(nil)
+                self.updatingOutlineSelection = false
+                //            if ([self interactionMode] == SKPresentationMode && [[NSUserDefaults standardUserDefaults] boolForKey:SKAutoHidePresentationContentsKey])
+                //                [self hideLeftSideWindow];
+            }
         }
     }
     
@@ -2925,6 +2929,14 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
         return false
     }
     
+    func outlineView(_ outlineView: NSOutlineView, willDisplayOutlineCell cell: Any, for tableColumn: NSTableColumn?, item: Any) {
+        if outlineView.isEqual(to: self.tocOutlineView) {
+            if outlineView.selectionHighlightStyle == .regular && outlineView.isRowSelected(outlineView.row(forItem: item)) {
+                (cell as? NSCell)?.backgroundStyle = .lowered
+            }
+        }
+    }
+    
     /*
      #pragma mark NSOutlineView datasource protocol
 
@@ -2952,14 +2964,6 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
          return [tableColumn dataCellForRow:[ov rowForItem:item]];
      }
 
-     - (void)outlineView:(NSOutlineView *)ov willDisplayOutlineCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item {
-         if ([ov isEqual:leftSideController.tocOutlineView] &&
-             [ov selectionHighlightStyle] == NSTableViewSelectionHighlightStyleRegular &&
-             [ov isRowSelected:[ov rowForItem:item]]) {
-             [cell setBackgroundStyle:NSBackgroundStyleLowered];
-         }
-     }
-
      - (BOOL)outlineView:(NSOutlineView *)ov shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item{
          if ([ov isEqual:rightSideController.noteOutlineView]) {
              if (tableColumn == nil) {
@@ -3038,53 +3042,6 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
          }
      }
 
-     - (void)updateSelectRowHeight{
-         CGFloat rowHeight = 0;
-         PDFOutline *outline = [leftSideController.tocOutlineView itemAtRow:leftSideController.tocOutlineView.selectedRow];
-         if (!outline){
-             return;
-         }
-         NSMutableAttributedString *attributedString = [[[NSMutableAttributedString alloc]init] autorelease];
-         NSDictionary *dictAttr1 = @{NSForegroundColorAttributeName:[KMAppearance KMColor_Layout_H0]};
-         NSAttributedString *attr1 = [[NSAttributedString alloc]initWithString:outline.label attributes:dictAttr1];
-         [attributedString appendAttributedString:attr1];
-         
-         NSInteger *row = [leftSideController.tocOutlineView selectedRow];
-         NSTableCellView *viewS = [leftSideController.tocOutlineView viewAtColumn:0 row:row  makeIfNecessary:YES];
-         NSTableColumn *tableColumn = [leftSideController.tocOutlineView tableColumnWithIdentifier:LABEL_COLUMNID];
-     //    id cell = [tableColumn dataCell];
-         id cell = [tableColumn dataCellForRow:row];
-         [cell setObjectValue:attributedString];
-         CGFloat w = leftSideController.view.frame.size.width - 86;//[tableColumn width] > 260 ? [tableColumn width] : 260;
-         
-         NSInteger num = [self getNum:outline];
-         CGFloat gap = [leftSideController.tocOutlineView indentationPerLevel];
-         rowHeight = [cell cellSizeForBounds:NSMakeRect(0.0, 0.0, w - (num > 0?16:0) - gap*num, CGFLOAT_MAX)].height;
-         rowHeight = fmax(rowHeight, [leftSideController.tocOutlineView rowHeight]) + 25;
-         [rowHeights setFloat:rowHeight forKey:outline];
-         
-         if (@available(macOS 10.13, *)) {
-             
-         } else {
-             rowHeight = 40.0;
-         }
-         CGRect fram = viewS.frame;
-         viewS.frame = CGRectMake(fram.origin.x, fram.origin.y, fram.size.width, rowHeight);
-         [leftSideController.tocOutlineView reloadData];
-     }
-
-     - (NSInteger)getNum:(PDFOutline *)ol{
-         NSInteger num = 0;
-         PDFOutline *outLine = [ol parent];
-         do {
-             outLine = [outLine parent];
-             if (outLine){
-                 num ++;
-             }
-         } while (outLine);
-         return num;
-     }
-
      - (void)sizeOutlineViewToContents:(NSOutlineView*) outlineView;
      {
          NSInteger rowCount = [outlineView numberOfRows];
@@ -3139,56 +3096,6 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
          }
          return noteItems
      }
-    /*
-
-     - (NSArray *)outlineView:(NSOutlineView *)ov typeSelectHelperSelectionStrings:(SKTypeSelectHelper *)typeSelectHelper {
-         if ([ov isEqual:rightSideController.noteOutlineView]) {
-             NSInteger i, count = [rightSideController.noteOutlineView numberOfRows];
-             NSMutableArray *texts = [NSMutableArray arrayWithCapacity:count];
-             for (i = 0; i < count; i++) {
-                 id item = [rightSideController.noteOutlineView itemAtRow:i];
-                 NSString *string = [item string];
-                 [texts addObject:string ?: @""];
-             }
-             return texts;
-         } else if ([ov isEqual:leftSideController.tocOutlineView]) {
-             NSInteger i, count = [leftSideController.tocOutlineView numberOfRows];
-             NSMutableArray *array = [NSMutableArray arrayWithCapacity:count];
-             for (i = 0; i < count; i++)
-                 [array addObject:[[(PDFOutline *)[leftSideController.tocOutlineView itemAtRow:i] label] lossyStringUsingEncoding:NSASCIIStringEncoding]];
-             return array;
-         }
-         return nil;
-     }
-
-     - (void)outlineView:(NSOutlineView *)ov typeSelectHelper:(SKTypeSelectHelper *)typeSelectHelper didFailToFindMatchForSearchString:(NSString *)searchString {
-         if ([ov isEqual:rightSideController.noteOutlineView]) {
-             [statusBar setRightStringValue:[NSString stringWithFormat:NSLocalizedString(@"No match: \"%@\"", @"Status message"), searchString]];
-         } else if ([ov isEqual:leftSideController.tocOutlineView]) {
-             [statusBar setLeftStringValue:[NSString stringWithFormat:NSLocalizedString(@"No match: \"%@\"", @"Status message"), searchString]];
-         }
-     }
-
-     - (void)outlineView:(NSOutlineView *)ov typeSelectHelper:(SKTypeSelectHelper *)typeSelectHelper updateSearchString:(NSString *)searchString {
-         if ([typeSelectHelper isEqual:[leftSideController.thumbnailTableView typeSelectHelper]] || [typeSelectHelper isEqual:[pdfView typeSelectHelper]]) {
-             if (searchString)
-                 [statusBar setLeftStringValue:[NSString stringWithFormat:NSLocalizedString(@"Go to page: %@", @"Status message"), searchString]];
-             else
-                 [self updateLeftStatus];
-         } else if ([typeSelectHelper isEqual:[rightSideController.noteOutlineView typeSelectHelper]]) {
-             if (searchString)
-                 [statusBar setRightStringValue:[NSString stringWithFormat:NSLocalizedString(@"Finding note: \"%@\"", @"Status message"), searchString]];
-             else
-                 [self updateRightStatus];
-         } else if ([typeSelectHelper isEqual:[leftSideController.tocOutlineView typeSelectHelper]]) {
-             if (searchString)
-                 [statusBar setLeftStringValue:[NSString stringWithFormat:NSLocalizedString(@"Finding: \"%@\"", @"Status message"), searchString]];
-             else
-                 [self updateLeftStatus];
-         }
-     }
-
-     */
 }
 
 // MARK: - KMCustomOutlineViewDelegate, KMCustomOutlineViewDataSource
@@ -3271,9 +3178,58 @@ extension KMLeftSideViewController: KMCustomOutlineViewDelegate, KMCustomOutline
         }
     }
 
+    func outlineView(_ anOutlineView: NSOutlineView, typeSelectHelperSelectionStrings aTypeSelectHelper: SKTypeSelectHelper) -> NSArray {
+//        if ([ov isEqual:rightSideController.noteOutlineView]) {
+//            NSInteger i, count = [rightSideController.noteOutlineView numberOfRows];
+//            NSMutableArray *texts = [NSMutableArray arrayWithCapacity:count];
+//            for (i = 0; i < count; i++) {
+//                id item = [rightSideController.noteOutlineView itemAtRow:i];
+//                NSString *string = [item string];
+//                [texts addObject:string ?: @""];
+//            }
+//            return texts;
+//        } else
+        if self.tocOutlineView.isEqual(to: anOutlineView) {
+            let count = self.tocOutlineView.numberOfRows
+            var array = NSMutableArray(capacity: count)
+            for i in 0 ..< count {
+                //                [array addObject:[[(PDFOutline *)[leftSideController.tocOutlineView itemAtRow:i] label] lossyStringUsingEncoding:NSASCIIStringEncoding]];
+                let item = self.tocOutlineView.item(atRow: i) as? CPDFOutline
+                array.add(item?.label ?? "")
+            }
+            return array
+        }
+        return NSArray()
+    }
+    
+    func outlineView(_ anOutlineView: NSOutlineView, typeSelectHelper aTypeSelectHelper: SKTypeSelectHelper, didFailToFindMatchForSearchString searchString: String) {
+//        if ([ov isEqual:rightSideController.noteOutlineView]) {
+//            [statusBar setRightStringValue:[NSString stringWithFormat:NSLocalizedString(@"No match: \"%@\"", @"Status message"), searchString]];
+//        } else if ([ov isEqual:leftSideController.tocOutlineView]) {
+//            [statusBar setLeftStringValue:[NSString stringWithFormat:NSLocalizedString(@"No match: \"%@\"", @"Status message"), searchString]];
+//        }
+    }
+    
+    func tableView(_ aTableView: NSTableView, typeSelectHelper aTypeSelectHelper: SKTypeSelectHelper, updateSearchString searchString: String) {
+//        if ([typeSelectHelper isEqual:[leftSideController.thumbnailTableView typeSelectHelper]] || [typeSelectHelper isEqual:[pdfView typeSelectHelper]]) {
+//            if (searchString)
+//                [statusBar setLeftStringValue:[NSString stringWithFormat:NSLocalizedString(@"Go to page: %@", @"Status message"), searchString]];
+//            else
+//                [self updateLeftStatus];
+//        } else if ([typeSelectHelper isEqual:[rightSideController.noteOutlineView typeSelectHelper]]) {
+//            if (searchString)
+//                [statusBar setRightStringValue:[NSString stringWithFormat:NSLocalizedString(@"Finding note: \"%@\"", @"Status message"), searchString]];
+//            else
+//                [self updateRightStatus];
+//        } else if ([typeSelectHelper isEqual:[leftSideController.tocOutlineView typeSelectHelper]]) {
+//            if (searchString)
+//                [statusBar setLeftStringValue:[NSString stringWithFormat:NSLocalizedString(@"Finding: \"%@\"", @"Status message"), searchString]];
+//            else
+//                [self updateLeftStatus];
+//        }
+    }
 }
 
-
 // MARK: - Other
 
 extension KMLeftSideViewController {

+ 0 - 9
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Outline/OutlineView/View/KMCustomOutlineView.swift

@@ -27,15 +27,6 @@ import Cocoa
 }
 
 class KMCustomOutlineView: NSOutlineView {
-    /*
-     @interface SKOutlineView : NSOutlineView <SKTypeSelectDelegate> {
-         SKTypeSelectHelper *typeSelectHelper;
-         BOOL supportsQuickLook;
-     }
-     @property (nonatomic) BOOL supportsQuickLook;
-     @property (nonatomic, retain) SKTypeSelectHelper *typeSelectHelper;
-     */
-    
     var supportsQuickLook = false
     private var _typeSelectHelper: SKTypeSelectHelper?
     var typeSelectHelper: SKTypeSelectHelper? {

+ 16 - 0
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -3500,6 +3500,12 @@
 		BB6CA4CF298BB0D000A13864 /* KMPreferenceWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB6CA4CB298BB0D000A13864 /* KMPreferenceWindowController.xib */; };
 		BB6CA4D0298BB0D000A13864 /* KMPreferenceWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB6CA4CB298BB0D000A13864 /* KMPreferenceWindowController.xib */; };
 		BB6CA4D1298BB0D000A13864 /* KMPreferenceWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB6CA4CB298BB0D000A13864 /* KMPreferenceWindowController.xib */; };
+		BB6D2DA72B674A6300624C24 /* CPDFOutline+KMExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6D2DA62B674A6300624C24 /* CPDFOutline+KMExtension.swift */; };
+		BB6D2DA82B674A6300624C24 /* CPDFOutline+KMExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6D2DA62B674A6300624C24 /* CPDFOutline+KMExtension.swift */; };
+		BB6D2DA92B674A6300624C24 /* CPDFOutline+KMExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6D2DA62B674A6300624C24 /* CPDFOutline+KMExtension.swift */; };
+		BB6D2DAB2B674D7900624C24 /* CPDFPage+KMExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6D2DAA2B674D7900624C24 /* CPDFPage+KMExtension.swift */; };
+		BB6D2DAC2B674D7900624C24 /* CPDFPage+KMExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6D2DAA2B674D7900624C24 /* CPDFPage+KMExtension.swift */; };
+		BB6D2DAD2B674D7900624C24 /* CPDFPage+KMExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6D2DAA2B674D7900624C24 /* CPDFPage+KMExtension.swift */; };
 		BB6DD80C29347F77001F0544 /* KMSecureEncryptWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6DD80A29347F77001F0544 /* KMSecureEncryptWindowController.swift */; };
 		BB6DD80D29347F77001F0544 /* KMSecureEncryptWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6DD80A29347F77001F0544 /* KMSecureEncryptWindowController.swift */; };
 		BB6DD80E29347F77001F0544 /* KMSecureEncryptWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6DD80A29347F77001F0544 /* KMSecureEncryptWindowController.swift */; };
@@ -6294,6 +6300,8 @@
 		BB6BA4C72B0B4A4100462CAE /* KMLeftSideEmptyFileViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMLeftSideEmptyFileViewController.xib; sourceTree = "<group>"; };
 		BB6CA4CA298BB0D000A13864 /* KMPreferenceWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPreferenceWindowController.swift; sourceTree = "<group>"; };
 		BB6CA4CB298BB0D000A13864 /* KMPreferenceWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPreferenceWindowController.xib; sourceTree = "<group>"; };
+		BB6D2DA62B674A6300624C24 /* CPDFOutline+KMExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFOutline+KMExtension.swift"; sourceTree = "<group>"; };
+		BB6D2DAA2B674D7900624C24 /* CPDFPage+KMExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFPage+KMExtension.swift"; sourceTree = "<group>"; };
 		BB6DD80A29347F77001F0544 /* KMSecureEncryptWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMSecureEncryptWindowController.swift; sourceTree = "<group>"; };
 		BB6DD80B29347F77001F0544 /* KMSecureEncryptWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMSecureEncryptWindowController.xib; sourceTree = "<group>"; };
 		BB6DD813293486FA001F0544 /* KMSecureEncryptPasswordCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMSecureEncryptPasswordCellView.swift; sourceTree = "<group>"; };
@@ -10393,6 +10401,8 @@
 			isa = PBXGroup;
 			children = (
 				BB27BF3B2B33E85200A0BAAE /* CPDFView+KMExtension.swift */,
+				BB6D2DA62B674A6300624C24 /* CPDFOutline+KMExtension.swift */,
+				BB6D2DAA2B674D7900624C24 /* CPDFPage+KMExtension.swift */,
 			);
 			path = CPDFKit;
 			sourceTree = "<group>";
@@ -14654,6 +14664,7 @@
 				ADBC2D28299DCA76006280C8 /* NSTextField+Layer.swift in Sources */,
 				ADF6B8762A48155E0090CB78 /* KMComparativeViewCollectionItem.swift in Sources */,
 				BB49ECF1293F40F500C82CA2 /* KMConvertPageRangeSettingItemView.swift in Sources */,
+				BB6D2DA72B674A6300624C24 /* CPDFOutline+KMExtension.swift in Sources */,
 				BBBF68802A3BF17F0058E14E /* KMFilePromiseProvider.swift in Sources */,
 				ADDF832C2B391A5C00A81A4E /* NSEvent+PDFListView.m in Sources */,
 				9F0CB46F2967E63100007028 /* KMPropertiesPanelNameSubVC.swift in Sources */,
@@ -14951,6 +14962,7 @@
 				9FD0D2B32AD5265A00DA3FF8 /* CPDFListAnnotationNoteWindowController.swift in Sources */,
 				BB74DA7F2AC42959006EDFE7 /* NSButton+KMExtension.swift in Sources */,
 				BBF38A62294F53FD0086D025 /* KMWatermarkFileView.swift in Sources */,
+				BB6D2DAB2B674D7900624C24 /* CPDFPage+KMExtension.swift in Sources */,
 				BB88107C2B4F7A1F00AFA63E /* KMActivityALertViewController.m in Sources */,
 				BBC3482E29559E12008D2CD1 /* KMBackgroundModel.swift in Sources */,
 				BBCE57182A72723600508EFC /* NSResponder+KMExtension.swift in Sources */,
@@ -16115,6 +16127,7 @@
 				ADBC2D38299F0A5A006280C8 /* KMPrintHelpViewController.swift in Sources */,
 				9FBC48C0299E23B100CA39D7 /* NSViewController+DesignToken.swift in Sources */,
 				AD3AAD422B0B7B6C00DE5FE7 /* KMCompareManager.swift in Sources */,
+				BB6D2DAC2B674D7900624C24 /* CPDFPage+KMExtension.swift in Sources */,
 				BB853CAB2AF8FA46009C20C1 /* KMHeaderFooterManagerWindowController.swift in Sources */,
 				ADB2D6E7294740F30029D2B3 /* KMPrintPaperSetWindowController.swift in Sources */,
 				9F53D5542AD683A700CCF9D8 /* KMAnnotationPropertyBaseController.swift in Sources */,
@@ -16305,6 +16318,7 @@
 				BB8F456E295AC1220037EA22 /* KMHeaderFooterAdjectiveModel.swift in Sources */,
 				F3599174292B62F5000D25DE /* CStringConstants.m in Sources */,
 				BBC8A7692B05EB8000FA9377 /* KMThumbnailTableviewCell.swift in Sources */,
+				BB6D2DA82B674A6300624C24 /* CPDFOutline+KMExtension.swift in Sources */,
 				89752DEB293875FC003FF08E /* KMMainToolbarController.swift in Sources */,
 				ADFA8F122B60E01C002595A4 /* KMSecureAlertView.swift in Sources */,
 				BB147012299DC0D100784A6A /* OIDError.m in Sources */,
@@ -16711,6 +16725,7 @@
 				9F8539E029470A0700DF644E /* KMTabStripView.swift in Sources */,
 				BBA8B7AC2935DC120097D183 /* KMRemovePasswordResultTipView.swift in Sources */,
 				BB146FDD299DC0D100784A6A /* GTLRDriveService.m in Sources */,
+				BB6D2DA92B674A6300624C24 /* CPDFOutline+KMExtension.swift in Sources */,
 				AD8810AB29A8463600178CA1 /* KMAccountInfoWindowController.swift in Sources */,
 				BBC3480E29558DC1008D2CD1 /* KMBackgroundController.swift in Sources */,
 				BBF62C722B0347AF007B7E86 /* SplitWindowController.swift in Sources */,
@@ -16750,6 +16765,7 @@
 				BB8810AB2B4F7D7500AFA63E /* KMVerificationViewController.m in Sources */,
 				BBE78F1D2B36F69F0071AC1A /* KMLeftSideViewController+Note.swift in Sources */,
 				BBCE571A2A72723600508EFC /* NSResponder+KMExtension.swift in Sources */,
+				BB6D2DAD2B674D7900624C24 /* CPDFPage+KMExtension.swift in Sources */,
 				BB67EE252B54FFEF00573BF0 /* ASIInputStream.m in Sources */,
 				BB146FDA299DC0D100784A6A /* GTLRFramework.m in Sources */,
 				AD85D1A02AEF927D000F4D28 /* KMQucikToolsModel.swift in Sources */,