Browse Source

【综合】整理代码

tangchao 3 months ago
parent
commit
7f6d5f8c60

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

@@ -1325,7 +1325,7 @@ extension KMLeftSideViewController: NSTableViewDelegate, NSTableViewDataSource {
                 let model = self.searchResults[row]
                 let isEditing =  self.listView?.isEditing() ?? false
                 if isEditing {
-                    self.mainViewController?.srHanddler.showSelection(model.selection)
+//                    self.mainViewController?.srHanddler.showSelection(model.selection)
                     return
                 }
                 

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

@@ -34,10 +34,10 @@ extension KMMainViewController {
                 opt.insert(.matchWholeWord)
             }
             
-            let datas = self.srHanddler.pdfView?.document.findEditAllPageString(searchString, with: opt) ?? []
-            if let sel = datas.first?.first {
-                self.srHanddler.showSelection(sel)
-            }
+            let datas = self.listView.document.findEditAllPageString(searchString, with: opt) ?? []
+//            if let sel = datas.first?.first {
+//                self.srHanddler.showSelection(sel)
+//            }
             
             self.searchResults.removeAll()
             var _selections: [CPDFSelection] = []

+ 18 - 10
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -269,8 +269,6 @@ struct KMNMWCFlags {
     var perimeterMeasureInfoWindowController: CPerimeterMeasureInfoWindowController?
     var areaMeasureInfoWindowController: CAreaMeasureInfoWindowController?
     
-    var srHanddler: KMSearchReplaceHanddler = KMSearchReplaceHanddler()
-    
     //MARK: - func
     deinit {
         NotificationCenter.default.removeObserver(self)
@@ -1659,7 +1657,7 @@ struct KMNMWCFlags {
     
     // 搜索 & 替换
     
-    func showSearchPopWindow(type: KMNBotaSearchType) {
+    func showSearchPopWindow(type: KMNBotaSearchType, handdler: KMNSearchHanddler) {
         if type == .search {
             self.view.window?.makeFirstResponder(nil)
             let winC = KMSearchReplaceWindowController(with: listView, type: .search)
@@ -1670,11 +1668,15 @@ struct KMNMWCFlags {
                 if toolMode == .editPDFToolMode &&  isEditing {
                     
                 } else { // 进入内容编辑模式
-                 }
+                    self?.viewManager.toolMode = .Edit
+                    self?.updatePDFViewAnnotationMode()
+                }
             }
             winC.itemClick = { idx, _ in
                 if idx == 1 {
                     self.toggleOpenLeftSide(pdfSideBarType: .search)
+                    
+                    
                 }
             }
             let targetView = self.pdfToolbarController?.leftViewButton
@@ -1686,7 +1688,10 @@ struct KMNMWCFlags {
             let winFramePoint = NSPoint(x: x, y: y)
             winC.window?.setFrameOrigin(winFramePoint)
             
-            winC.startModal(nil)
+            winC.update(keyborad: handdler.searchKey, replaceKey: handdler.replaceKey, results: handdler.searchResults)
+            
+//            winC.startModal(nil)
+            self.view.window?.addChildWindow(winC.window!, ordered: .above)
         } else if type == .replace {
             if IAPProductsManager.default().isAvailableAllFunction() == false {
                 let winC = KMPurchaseCompareWindowController.sharedInstance()
@@ -1701,7 +1706,9 @@ struct KMNMWCFlags {
             if toolMode == .editPDFToolMode && isEditing {
                 
             } else { // 进入内容编辑模式
-             }
+                viewManager.toolMode = .Edit
+                updatePDFViewAnnotationMode()
+            }
             
             let winC = KMSearchReplaceWindowController(with: self.listView, type: .replace)
             self.currentWindowController = winC
@@ -1711,6 +1718,8 @@ struct KMNMWCFlags {
                 if toolMode == .editPDFToolMode && isEditing {
                     
                 } else { // 进入内容编辑模式
+                    self?.viewManager.toolMode = .Edit
+                    self?.updatePDFViewAnnotationMode()
                  }
             }
             
@@ -1728,7 +1737,8 @@ struct KMNMWCFlags {
             let winFramePoint = NSPoint(x: x, y: y)
             winC.window?.setFrameOrigin(winFramePoint)
             
-            winC.startModal(nil)
+//            winC.startModal(nil)
+            self.view.window?.addChildWindow(winC.window!, ordered: .above)
         }
     }
     
@@ -3757,7 +3767,7 @@ extension KMMainViewController: KMNLeftSideViewControllerDelegate {
         closeLeftPane()
         
         let handdler = controller.searchViewC.handdler
-        showSearchPopWindow(type: handdler.type)
+        showSearchPopWindow(type: handdler.type, handdler: handdler)
     }
 }
 
@@ -3881,8 +3891,6 @@ extension KMMainViewController {
     func viewDidLoadOld() {
         mwcFlags.settingUpWindow = 1
         
-        self.srHanddler.pdfView = self.listView
-        
         self.initToolbar()
         
         if (UserDefaults.standard.object(forKey: CPDFOfficeLeftSidePaneWidthKey) != nil) {

+ 1 - 1
PDF Office/PDF Master/KMClass/Left/Search/Controller/KMBotaSearchViewController.swift

@@ -452,7 +452,7 @@ class KMBotaSearchViewController: KMNBotaBaseViewController {
 extension KMBotaSearchViewController: NSTableViewDelegate, NSTableViewDataSource {
     func numberOfRows(in tableView: NSTableView) -> Int {
         var datas: [Any] = []
-        for sectionM in self.handdler.searchResults {
+        for sectionM in self.handdler.searchSectionResults {
             if sectionM.items.count > 0 {
                 datas.append(sectionM)
                 if sectionM.isExpand == false {

+ 58 - 4
PDF Office/PDF Master/KMClass/Left/Search/Tools/KMNSearchHanddler.swift

@@ -8,12 +8,17 @@
 import Cocoa
 
 class KMNSearchHanddler: NSObject {
-    
     weak var pdfView: CPDFView?
     
     var type: KMNBotaSearchType = .search
     
-    var searchResults: [KMBotaSearchSectionModel] = []
+    var searchKey: String = ""
+    var replaceKey: String = ""
+    
+    var showIdx = 0
+    
+    var searchSectionResults: [KMBotaSearchSectionModel] = []
+    var searchResults: [KMSearchMode] = []
     
     func search(keyword: String, isCase: Bool, isWholeWord: Bool, callback: @escaping (([KMBotaSearchSectionModel]?) -> Void)) {
         guard let document = self.pdfView?.document else {
@@ -30,6 +35,8 @@ class KMNSearchHanddler: NSObject {
         }
         
         let theKeyword = keyword.decomposedStringWithCompatibilityMapping
+        searchKey = theKeyword
+        
         var opt = CPDFSearchOptions()
         if isCase {
             opt.insert(.caseSensitive)
@@ -41,6 +48,7 @@ class KMNSearchHanddler: NSObject {
             let result = document.findString(theKeyword, with: opt)
             
             self.searchResults.removeAll()
+            self.searchSectionResults.removeAll()
             for sels in result ?? [] {
                 let sectionM = KMBotaSearchSectionModel()
                 sectionM.pageIndex = Int(sels.first?.page.pageIndex() ?? 0)
@@ -52,15 +60,61 @@ class KMNSearchHanddler: NSObject {
                     sectionM.items.append(mode)
 
                     sel.setColor(NSColor(red: 236/255.0, green: 241/255.0, blue: 83/255.0, alpha: 0.5))
+                    
+                    self.searchResults.append(mode)
                 }
                 
-                self.searchResults.append(sectionM)
+                self.searchSectionResults.append(sectionM)
             }
             
             DispatchQueue.main.async {
-                callback(self.searchResults)
+                callback(self.searchSectionResults)
             }
         }
     }
+    
+    func replace(searchS: String, replaceS: String?, sel: CPDFSelection, callback: @escaping ((CPDFSelection?)->Void)) -> Bool {
+        return self.pdfView?.document.replace(with: sel, search: searchS, toReplace: replaceS, completionHandler: { newSel in
+            callback(newSel)
+        }) ?? false
+    }
 
+    func showSelection(_ sel: CPDFSelection?) {
+        guard let theSel = sel else {
+            let isEditing = self.pdfView?.isEditing() ?? false
+            if isEditing {
+                self.pdfView?.setHighlightedSelection(nil, animated: true)
+            } else {
+                self.pdfView?.setHighlightedSelections([])
+            }
+            self.pdfView?.setNeedsDisplayAnnotationViewForVisiblePages()
+            return
+        }
+        guard let document = self.pdfView?.document else {
+            return
+        }
+        
+        theSel.setColor(NSColor(red: 236/255.0, green: 241/255.0, blue: 83/255.0, alpha: 0.5))
+        
+        let pageIdx = document.index(for: theSel.page)
+        self.pdfView?.go(toPageIndex: Int(pageIdx), animated: false)
+        self.pdfView?.go(to: theSel.bounds, on: theSel.page)
+        let isEditing = self.pdfView?.isEditing() ?? false
+        if isEditing {
+            self.pdfView?.setHighlightedSelection(theSel, animated: true)
+        } else {
+            self.pdfView?.setHighlightedSelections([theSel])
+        }
+        self.pdfView?.setNeedsDisplayAnnotationViewForVisiblePages()
+    }
+    
+    func clearData() {
+        let isEditing = self.pdfView?.isEditing() ?? false
+        if isEditing {
+            self.pdfView?.setHighlightedSelection(nil, animated: false)
+        } else {
+            self.pdfView?.setHighlightedSelections([])
+        }
+        self.pdfView?.setNeedsDisplayAnnotationViewForVisiblePages()
+    }
 }

+ 0 - 210
PDF Office/PDF Master/KMClass/Left/Search/Tools/KMSearchReplaceHanddler.swift

@@ -1,210 +0,0 @@
-//
-//  KMSearchReplaceHanddler.swift
-//  PDF Reader Pro
-//
-//  Created by User-Tangchao on 2024/8/8.
-//
-
-import Cocoa
-
-class KMSearchReplaceHanddler: NSObject {
-    weak var pdfView: CPDFView?
-    
-    var searchResults: [KMSearchMode] = []
-    var showIdx = 0
-    
-    func search(key: String, isCase: Bool, display: Bool, needShowAll: Bool) {
-        guard let document = self.pdfView?.document else {
-            NSSound.beep()
-            return
-        }
-        if document.isFinding {
-            document.cancelFindString()
-        }
-        if key.isEmpty {
-            self.searchResults = []
-//            self.leftSideViewController.searchResults = self.searchResults
-            self.pdfView?.setHighlightedSelections([])
-            self.pdfView?.setHighlightedSelection(nil, animated: false)
-            self.pdfView?.setNeedsDisplayAnnotationViewForVisiblePages()
-        } else {
-            let wholeWordSearch = isCase == true ? 1 : 0
-            var findArray : [[CPDFSelection]]
-            if isCase {
-                    findArray = document.findString(key, with: .matchWholeWord) ?? []
-
-            } else {
-                    findArray = document.findString(key, with: [.caseSensitive, .matchWholeWord]) ?? []
-
-                
-            }
-            self.searchResults.removeAll()
-            var _selections: [CPDFSelection] = []
-            for selections in findArray {
-                for selection in selections {
-                    let mode : KMSearchMode = KMSearchMode()
-                    mode.selection = selection
-                    mode.attributedString = KMOCToolClass.getAttributedString(selection: selection, keyword: key)
-                    mode.selectionPageIndex = document.index(for: selection.page)
-                    self.searchResults.insert(mode, at: self.searchResults.count)
-                    _selections.append(selection)
-                    selection.setColor(NSColor(red: 236/255.0, green: 241/255.0, blue: 83/255.0, alpha: 0.5))
-//                    self.listView.setHighlight(selection, forBorderColor: .yellow, fill: .red, animated: false)
-                }
-//                self.listView.setHighlightedSelections(selections )
-            }
-            
-            if needShowAll {
-                self.pdfView?.setHighlightedSelections(_selections)
-            }
-            if _selections.isEmpty {
-                self.pdfView?.setHighlightedSelection(nil, animated: false)
-            }
-            self.pdfView?.setNeedsDisplayAnnotationViewForVisiblePages()
-//            self.leftSideViewController.searchResults = self.searchResults
-        }
-        
-//        if display {
-//            if self.leftSideViewController.findPaneState == .singular {
-//                self.leftSideViewController.displayFindViewAnimating(true)
-//            } else {
-//                self.leftSideViewController.displayGroupedFindViewAnimating(true)
-//            }
-//        }
-    }
-    
-    func search(keyword: String, isCase: Bool, isWholeWord: Bool, callback: @escaping (([KMSearchMode]?) -> Void)) {
-        guard let document = self.pdfView?.document else {
-            NSSound.beep()
-            callback(nil)
-            return
-        }
-        if document.isFinding {
-            document.cancelFindString()
-        }
-        if keyword.isEmpty {
-            callback(nil)
-            return
-        }
-        
-        let theKeyword = keyword.decomposedStringWithCompatibilityMapping
-        var opt = CPDFSearchOptions()
-        if isCase {
-            opt.insert(.caseSensitive)
-        }
-        if isWholeWord {
-            opt.insert(.matchWholeWord)
-        }
-        DispatchQueue.global().async {
-            let result = document.findString(theKeyword, with: opt)
-            
-            self.searchResults.removeAll()
-            for sels in result ?? [] {
-                for sel in sels {
-                    let mode : KMSearchMode = KMSearchMode()
-                    mode.selection = sel
-                    mode.attributedString = KMOCToolClass.getAttributedString(selection: sel, keyword: theKeyword)
-                    mode.selectionPageIndex = document.index(for: sel.page)
-                    self.searchResults.insert(mode, at: self.searchResults.count)
-
-                    sel.setColor(NSColor(red: 236/255.0, green: 241/255.0, blue: 83/255.0, alpha: 0.5))
-                }
-            }
-            
-            DispatchQueue.main.async {
-                callback(self.searchResults)
-            }
-        }
-    }
-    
-    func newSearch(keyword: String, isCase: Bool, isWholeWord: Bool, callback: @escaping (([KMSearchMode]?) -> Void)) {
-        guard let document = self.pdfView?.document else {
-            NSSound.beep()
-            callback(nil)
-            return
-        }
-        if document.isFinding {
-            document.cancelFindString()
-        }
-        if keyword.isEmpty {
-            callback(nil)
-            return
-        }
-        
-        let theKeyword = keyword.decomposedStringWithCompatibilityMapping
-        var opt = CPDFSearchOptions()
-        if isCase {
-            opt.insert(.caseSensitive)
-        }
-        if isWholeWord {
-            opt.insert(.matchWholeWord)
-        }
-        DispatchQueue.global().async {
-            let result = document.findString(theKeyword, with: opt)
-            
-            self.searchResults.removeAll()
-            for sels in result ?? [] {
-                for sel in sels {
-                    let mode : KMSearchMode = KMSearchMode()
-                    mode.selection = sel
-                    mode.attributedString = KMOCToolClass.getAttributedString(selection: sel, keyword: theKeyword)
-                    mode.selectionPageIndex = document.index(for: sel.page)
-                    self.searchResults.insert(mode, at: self.searchResults.count)
-
-                    sel.setColor(NSColor(red: 236/255.0, green: 241/255.0, blue: 83/255.0, alpha: 0.5))
-                }
-            }
-            
-            DispatchQueue.main.async {
-                callback(self.searchResults)
-            }
-        }
-    }
-    
-//    func findEdit
-    
-    func replace(searchS: String, replaceS: String?, sel: CPDFSelection, callback: @escaping ((CPDFSelection?)->Void)) -> Bool {
-        return self.pdfView?.document.replace(with: sel, search: searchS, toReplace: replaceS, completionHandler: { newSel in
-            callback(newSel)
-        }) ?? false
-    }
-    
-    func showSelection(_ sel: CPDFSelection?) {
-        guard let theSel = sel else {
-            let isEditing = self.pdfView?.isEditing() ?? false
-            if isEditing {
-                self.pdfView?.setHighlightedSelection(nil, animated: true)
-            } else {
-                self.pdfView?.setHighlightedSelections([])
-            }
-            self.pdfView?.setNeedsDisplayAnnotationViewForVisiblePages()
-            return
-        }
-        guard let document = self.pdfView?.document else {
-            return
-        }
-        
-        theSel.setColor(NSColor(red: 236/255.0, green: 241/255.0, blue: 83/255.0, alpha: 0.5))
-        
-        let pageIdx = document.index(for: theSel.page)
-        self.pdfView?.go(toPageIndex: Int(pageIdx), animated: false)
-        self.pdfView?.go(to: theSel.bounds, on: theSel.page)
-        let isEditing = self.pdfView?.isEditing() ?? false
-        if isEditing {
-            self.pdfView?.setHighlightedSelection(theSel, animated: true)
-        } else {
-            self.pdfView?.setHighlightedSelections([theSel])
-        }
-        self.pdfView?.setNeedsDisplayAnnotationViewForVisiblePages()
-    }
-    
-    func clearData() {
-        let isEditing = self.pdfView?.isEditing() ?? false
-        if isEditing {
-            self.pdfView?.setHighlightedSelection(nil, animated: false)
-        } else {
-            self.pdfView?.setHighlightedSelections([])
-        }
-        self.pdfView?.setNeedsDisplayAnnotationViewForVisiblePages()
-    }
-}

+ 25 - 0
PDF Office/PDF Master/KMClass/Left/Search/View/KMNSearchReplaceItemView.swift

@@ -40,6 +40,7 @@ class KMNSearchReplaceItemView: NSView {
         prop.placeholder = KMLocalizedString("Replace with...")
 //        KMImagenameBotaSearchInputPrefiex
         view.properties = prop
+        view.delegate = self
         return view
     }()
     
@@ -50,6 +51,7 @@ class KMNSearchReplaceItemView: NSView {
         prop.size = .xxs
         prop.buttonText = KMLocalizedString("Replace All")
         view.properties = prop
+        view.setTarget(self, action: #selector(replaceAllAction))
         return view
     }()
     
@@ -60,6 +62,7 @@ class KMNSearchReplaceItemView: NSView {
         prop.size = .xxs
         prop.buttonText = KMLocalizedString("Replace")
         view.properties = prop
+        view.setTarget(self, action: #selector(replaceAction))
         return view
     }()
     
@@ -91,6 +94,10 @@ class KMNSearchReplaceItemView: NSView {
         }
     }
     
+    var itemClick: KMCommonClickBlock?
+    var valueDidChange: KMValueDidChangeBlock?
+    var inputDidEditBlock: KMEmptyBlock?
+    
     convenience init() {
         self.init(frame: .init(x: 0, y: 0, width: 300, height: 60))
         
@@ -123,4 +130,22 @@ class KMNSearchReplaceItemView: NSView {
         replaceAllButton_.km_add_bottom_constraint()
         replaceAllButton_.km_add_width_constraint(constant: replaceAllButton_.properties.propertyInfo.viewWidth)
     }
+    
+    @objc func replaceAllAction() {
+        itemClick?(1)
+    }
+    
+    @objc func replaceAction() {
+        itemClick?(2)
+    }
+}
+
+extension KMNSearchReplaceItemView: ComponentInputDelegate {
+    func componentInputDidChanged(inputView: ComponentInput) {
+        valueDidChange?(inputView.properties.text, nil)
+    }
+    
+    func componentInputDidEndEditing(inputView: ComponentInput) {
+        inputDidEditBlock?()
+    }
 }

+ 34 - 14
PDF Office/PDF Master/KMClass/Left/Search/Window/KMSearchReplaceWindowController.swift

@@ -26,11 +26,8 @@ class KMSearchReplaceWindowController_Window: NSWindow {
 
 class KMSearchReplaceWindowController: KMNBaseWindowController {
     @IBOutlet weak var titleBarBox: NSBox!
-    
     @IBOutlet weak var tabBox: NSBox!
-    
     @IBOutlet weak var searchBox: NSBox!
-    
     @IBOutlet weak var replaceBox: NSBox!
     
     var replaceCallback: (() -> Void)?
@@ -38,23 +35,20 @@ class KMSearchReplaceWindowController: KMNBaseWindowController {
     
     private var _modalSession: NSApplication.ModalSession?
     
-    private var handdler: KMSearchReplaceHanddler = KMSearchReplaceHanddler()
+    private var handdler = KMNSearchHanddler()
     private var type_: KMSearchReplaceType = .search
     
     private var currentSel: CPDFSelection?
-    
     private var finding_ = false
     
     private lazy var titleBarView_: KMNSearchReplaceTitleBarView = {
         let view = KMNSearchReplaceTitleBarView()
         return view
     }()
-    
     private lazy var searchItemView_: KMNSearchReplaceSearchItemView = {
         let view = KMNSearchReplaceSearchItemView()
         return view
     }()
-    
     private lazy var replaceItemView_: KMNSearchReplacePopItemView = {
         let view = KMNSearchReplacePopItemView()
         return view
@@ -65,19 +59,16 @@ class KMSearchReplaceWindowController: KMNBaseWindowController {
             return searchItemView_.previousButton
         }
     }
-    
     var nextButton: ComponentButton {
         get {
             return searchItemView_.nextButton
         }
     }
-    
     var replaceAllButton: ComponentButton {
         get {
             return replaceItemView_.replaceAllButton
         }
     }
-    
     var replaceButton: ComponentButton {
         get {
             return replaceItemView_.replaceButton
@@ -116,7 +107,7 @@ class KMSearchReplaceWindowController: KMNBaseWindowController {
             } else if idx == 2 {
                 _closeAction(NSButton())
                 
-                itemClick?(1)
+                itemClick?(1, handdler)
             }
         }
         
@@ -131,6 +122,7 @@ class KMSearchReplaceWindowController: KMNBaseWindowController {
         }
         searchItemView_.valueDidChange = { [unowned self] value, _ in
             if let data = value as? String {
+                handdler.searchKey = data
                 search(keyboard: data)
             }
         }
@@ -145,6 +137,18 @@ class KMSearchReplaceWindowController: KMNBaseWindowController {
         
         replaceBox.borderWidth = 0
         replaceBox.contentView = replaceItemView_
+        replaceItemView_.itemClick = { [unowned self] idx, _ in
+            if idx == 1 {
+                _replaceAllAction(NSButton())
+            } else if idx == 2 {
+                _replaceAction(NSButton())
+            }
+        }
+        replaceItemView_.valueDidChange = { [unowned self] value, _ in
+            if let data = value as? String {
+                handdler.replaceKey = data
+            }
+        }
         
         updateButtonStatus()
         if searchItemView_.inputValue.isEmpty {
@@ -194,11 +198,27 @@ class KMSearchReplaceWindowController: KMNBaseWindowController {
         }
     }
     
+    func update(keyborad: String, replaceKey: String, results: [KMSearchMode]) {
+        searchItemView_.inputValue = keyborad
+        replaceItemView_.inputValue = replaceKey
+        
+        if results.isEmpty == false {
+            handdler.searchResults = results
+            self.currentSel = results.first?.selection
+            if let sel = self.currentSel {
+                self.handdler.showSelection(sel)
+            }
+        }
+        
+        updateButtonStatus()
+    }
+    
     // MARK: - Actions
     
     @objc private func _closeAction(_ sender: NSButton) {
-        self.endModal(sender)
+//        self.endModal(sender)
         
+        self.window?.orderOut(nil)
         self.handdler.clearData()
     }
     
@@ -524,7 +544,7 @@ class KMSearchReplaceWindowController: KMNBaseWindowController {
                 self?.finding_ = false
                 self?._endLoading()
                 
-                guard let sels = datas, sels.isEmpty == false else {
+                guard let sels = self?.handdler.searchResults, sels.isEmpty == false else {
                     let alert = NSAlert()
                     alert.informativeText = NSLocalizedString("No related content found, please change keyword.", comment: "")
                     alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
@@ -532,7 +552,7 @@ class KMSearchReplaceWindowController: KMNBaseWindowController {
                     alert.beginSheetModal(for: (self?.window)!)
                     return
                 }
-                if let sel = datas?.first?.selection {
+                if let sel = sels.first?.selection {
                     self?.handdler.showIdx = 0
                     self?.handdler.showSelection(sel)
                 }

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

@@ -245,9 +245,6 @@
 		657851712CFEE38E0023D640 /* KMSearchReplaceWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6578516D2CFEE38E0023D640 /* KMSearchReplaceWindowController.xib */; };
 		657851722CFEE38E0023D640 /* KMSearchReplaceWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6578516D2CFEE38E0023D640 /* KMSearchReplaceWindowController.xib */; };
 		657851732CFEE38E0023D640 /* KMSearchReplaceWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6578516D2CFEE38E0023D640 /* KMSearchReplaceWindowController.xib */; };
-		657851752CFEE3A10023D640 /* KMSearchReplaceHanddler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 657851742CFEE3A10023D640 /* KMSearchReplaceHanddler.swift */; };
-		657851762CFEE3A10023D640 /* KMSearchReplaceHanddler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 657851742CFEE3A10023D640 /* KMSearchReplaceHanddler.swift */; };
-		657851772CFEE3A10023D640 /* KMSearchReplaceHanddler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 657851742CFEE3A10023D640 /* KMSearchReplaceHanddler.swift */; };
 		657851792CFEE4580023D640 /* KMNSearchReplaceTitleBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 657851782CFEE4580023D640 /* KMNSearchReplaceTitleBarView.swift */; };
 		6578517A2CFEE4580023D640 /* KMNSearchReplaceTitleBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 657851782CFEE4580023D640 /* KMNSearchReplaceTitleBarView.swift */; };
 		6578517B2CFEE4580023D640 /* KMNSearchReplaceTitleBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 657851782CFEE4580023D640 /* KMNSearchReplaceTitleBarView.swift */; };
@@ -5642,7 +5639,6 @@
 		657851612CFEA3C40023D640 /* KMSearchMode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMSearchMode.swift; sourceTree = "<group>"; };
 		6578516C2CFEE38E0023D640 /* KMSearchReplaceWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMSearchReplaceWindowController.swift; sourceTree = "<group>"; };
 		6578516D2CFEE38E0023D640 /* KMSearchReplaceWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMSearchReplaceWindowController.xib; sourceTree = "<group>"; };
-		657851742CFEE3A10023D640 /* KMSearchReplaceHanddler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMSearchReplaceHanddler.swift; sourceTree = "<group>"; };
 		657851782CFEE4580023D640 /* KMNSearchReplaceTitleBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMNSearchReplaceTitleBarView.swift; sourceTree = "<group>"; };
 		6578517C2CFEE4850023D640 /* KMNSearchReplaceSearchItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMNSearchReplaceSearchItemView.swift; sourceTree = "<group>"; };
 		657865EA2CE1E7DD00AFE2DB /* KMNBookmarkHanddler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMNBookmarkHanddler.swift; sourceTree = "<group>"; };
@@ -8239,7 +8235,6 @@
 		65F9F4832CFC162B00F187A8 /* Tools */ = {
 			isa = PBXGroup;
 			children = (
-				657851742CFEE3A10023D640 /* KMSearchReplaceHanddler.swift */,
 				65F9F4842CFC16A100F187A8 /* KMNSearchHanddler.swift */,
 			);
 			path = Tools;
@@ -17489,7 +17484,6 @@
 				AD9527C6295295110039D2BC /* KMPrintPrinterModel.swift in Sources */,
 				AD4C71712B9ADFE0003A6286 /* NSError_Extensions.swift in Sources */,
 				BB146FE4299DC0D100784A6A /* GTLRURITemplate.m in Sources */,
-				657851752CFEE3A10023D640 /* KMSearchReplaceHanddler.swift in Sources */,
 				BBE788F62CBD2464008086E2 /* SliderVC.swift in Sources */,
 				9F1FE50D29407B2B00E952CA /* KMUploadFilePanel.swift in Sources */,
 				BBE0688A2CDDF116000512BC /* KMBatesController.swift in Sources */,
@@ -18434,7 +18428,6 @@
 				9F02017A2A1B5C0300C9B673 /* KMAIServerConfig.swift in Sources */,
 				9F0CB4B62977BC1000007028 /* KMPropertiesPanelPreviewSubVC.swift in Sources */,
 				BB88109B2B4F7CD100AFA63E /* KMVerificationTrialViewController.m in Sources */,
-				657851762CFEE3A10023D640 /* KMSearchReplaceHanddler.swift in Sources */,
 				F3EF179D2CD5FF8D0007D364 /* KMNThumnailHeaderViewController.swift in Sources */,
 				9F1FE4E229406E4700E952CA /* GTMNSAnimation+Duration.m in Sources */,
 				BB2C846D2BAE716600AF6142 /* KMBotaTableRowView.swift in Sources */,
@@ -19400,7 +19393,6 @@
 				F35242902CCB768B0000A901 /* KMNFileAttribute.swift in Sources */,
 				BBBB6CD82AD150D20035AA66 /* CPDFCircleAnnotation+PDFListView.swift in Sources */,
 				BB19A7692CB7D0F4008204DC /* KMHomeFilesEmptyHeaderView.swift in Sources */,
-				657851772CFEE3A10023D640 /* KMSearchReplaceHanddler.swift in Sources */,
 				6578517F2CFEE4850023D640 /* KMNSearchReplaceSearchItemView.swift in Sources */,
 				BBCB9EA82CCDF65000563AC8 /* KMNDisplayViewController.swift in Sources */,
 				BB3D076B2CD08FDB00EB94DF /* KMSplitPDFViewController.swift in Sources */,