Browse Source

【2025】【综合】代码整理

niehaoyu 2 months ago
parent
commit
c237fcad9d
21 changed files with 255 additions and 451 deletions
  1. 20 15
      PDF Office/PDF Master/Class/PDFTools/Convert/ExtractImage/Controller/KMExtractImageWindowController.swift
  2. 61 61
      PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.xib
  3. 0 156
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPageEditSplitWindowController.swift
  4. 1 0
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/Model/KMBatchRemovePasswordOperation.swift
  5. 0 3
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/KMRemovePasswordWindowController.swift
  6. 3 3
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/KMRemovePasswordWindowController.xib
  7. 0 5
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/View/KMRemovePasswordView.swift
  8. 2 2
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/View/KMRemovePasswordView.xib
  9. 5 1
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/VC/KMBatchOperateRemovePasswordViewController.swift
  10. 3 3
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/VC/KMBatchOperateRemovePasswordViewController.xib
  11. 1 1
      PDF Office/PDF Master/KMClass/KMNPDFPageEdit/KMNPDFInsert/KMNPDFInsertPDFWindowController.swift
  12. 2 2
      PDF Office/PDF Master/KMClass/KMNPDFPageEdit/KMNThumbnailView/KMNThumbnailBaseViewController+Action.swift
  13. 100 75
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift
  14. 1 1
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMNDisplayViewController/KMNDisplayViewController.swift
  15. 1 1
      PDF Office/PDF Master/KMClass/PDFListView/ViewController/KMNAlertTipViewController.swift
  16. 0 0
      PDF Office/PDF Master/KMClass/Tools/Base/KMBaseViewController.swift
  17. 0 44
      PDF Office/PDF Master/Class/Common/Base/KMBaseWindowController.swift
  18. 0 0
      PDF Office/PDF Master/KMClass/Tools/Base/KMHoverView.swift
  19. 38 37
      PDF Office/PDF Master/KMClass/Tools/NSWindowController+Extension/NSWindowController+Extension.swift
  20. 14 14
      PDF Office/PDF Master/KMClass/Tools/Secure/Window/KMPasswordInputWindow.xib
  21. 3 27
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

+ 20 - 15
PDF Office/PDF Master/Class/PDFTools/Convert/ExtractImage/Controller/KMExtractImageWindowController.swift

@@ -32,14 +32,15 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
         return pdfDoc
     }()
     var selectPagesIndex: Int = 0
-//    var pdfConverter: PDFConvertObject?
     lazy var pdfConverter: PDFConvertObject? = {
         let conerter = PDFConvertObject()
         return conerter
     }()
+    
     @IBOutlet var currentPageTextField: NSTextField!
     @IBOutlet var pageCountTextField: NSTextField!
     @IBOutlet var pdfViewBG: NSView!
+    
     var preViewPDFView: CPDFView!
     
     private var fileAttri_: KMFileAttribute?
@@ -48,6 +49,7 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
         NotificationCenter.default.removeObserver(self)
         
     }
+    
     override func windowDidLoad() {
         super.windowDidLoad()
         let preView: CPDFView = CPDFView(frame: self.pdfViewBG.bounds)
@@ -55,6 +57,7 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
         self.preViewPDFView = preView
         configUI()
     }
+    
     func configUI() {
         if !self.docPath.isEmpty && self.docPath.count > 0 {
             let url = URL(fileURLWithPath: docPath)
@@ -96,6 +99,7 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
         self.preViewPDFView.layoutDocumentView()
         NotificationCenter.default.addObserver(self, selector: #selector(pageChangeNotification(notification:)), name: NSNotification.Name.PDFViewPageChanged, object: self.preViewPDFView)
     }
+    
     func selectCurrentPageBtn() {
         self.customPageButton_Action(self.currentPageButton)
     }
@@ -119,12 +123,15 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
             }
         }
     }
+    
     @IBAction func extractImageButton_Action(_ sender: Any) {
         startExtracting()
     }
+    
     @IBAction func cancleButton_Action(_ sender: Any) {
         self.window?.sheetParent?.endSheet(self.window!)
     }
+    
     @IBAction func nextPage_Action(_ sender: Any) {
         if self.preViewPDFView.canGoToNextPage() {
             self.preViewPDFView.goToNextPage(sender)
@@ -132,6 +139,7 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
         let index = self.preViewPDFView.document.index(for: self.preViewPDFView.currentPage())
         self.currentPageTextField.stringValue = "\(index + 1)"
     }
+    
     @IBAction func previousPage_Action(_ sender: Any) {
         if self.preViewPDFView.canGoToPreviousPage() {
             self.preViewPDFView.goToPreviousPage(sender)
@@ -187,20 +195,15 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
             return path
         } else {
             let originalFullFileName = path.lastPathComponent
-            let url = URL(fileURLWithPath: path)
-//            let originalFileName = path.lastPathComponent.deletingPathExtension.lastPathComponent
-//            let originalFileName = url.deletingPathExtension().lastPathComponent
-            let originalFileName = originalFullFileName
-//            let originalExtension = path.extension
-            
+              let originalFileName = originalFullFileName
+ 
             let startIndex: Int = 0
             let endIndex: Int = startIndex + originalPath.count - originalFullFileName.count - 1
             let fileLocatePath = originalPath.substring(to: endIndex)
             var i = 1
             while (1 != 0) {
-                var newName = String(format: "%@(%ld)", originalFileName, i)
-//                newName = String(format: "%@%@", newName, originalExtension)
-                let newPath = fileLocatePath.stringByAppendingPathComponent(newName)
+                let newName = String(format: "%@(%ld)", originalFileName, i)
+                 let newPath = fileLocatePath.stringByAppendingPathComponent(newName)
                 if !dManager.fileExists(atPath: newPath) {
                     return newPath
                 } else {
@@ -220,6 +223,7 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
             workspace.activateFileViewerSelecting([url])
         }
     }
+    
     func selectIndexSet() -> NSMutableIndexSet {
         let pageCount = self.pdfDocument?.pageCount
         let indeSet = NSMutableIndexSet()
@@ -269,9 +273,9 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
         }
         return indeSet
     }
-    class func createDestFolder(path: String, isUnique: Bool) -> String { 
-        var ret = true
-        var tUniqueName: String? = nil
+    
+    class func createDestFolder(path: String, isUnique: Bool) -> String {
+         var tUniqueName: String? = nil
         let tFileManager = FileManager.default
         if isUnique {
             tUniqueName = getUniqueFilePath(filePath: path)
@@ -283,13 +287,14 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
             do {
                 try tFileManager.createDirectory(atPath: tUniqueName!, withIntermediateDirectories: true, attributes: nil)
             } catch {
-                ret = false
+
             }
         }
         
         return tUniqueName!
     }
-    class func getUniqueFilePath(filePath: String) -> String { 
+    
+    class func getUniqueFilePath(filePath: String) -> String {
         var i = 0
         var isDirectory = ObjCBool(false)
         var uniqueFilePath = filePath

+ 61 - 61
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -57,18 +57,18 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="740" height="461"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <value key="minSize" type="size" width="700" height="524"/>
             <value key="maxSize" type="size" width="700" height="524"/>
             <view key="contentView" wantsLayer="YES" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="718" height="461"/>
+                <rect key="frame" x="0.0" y="0.0" width="730" height="461"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="9e4-ci-JPQ">
-                        <rect key="frame" x="0.0" y="50" width="359" height="411"/>
+                        <rect key="frame" x="0.0" y="50" width="365" height="411"/>
                         <subviews>
                             <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="X0Q-MI-4li">
-                                <rect key="frame" x="89" y="8" width="26" height="26"/>
+                                <rect key="frame" x="92" y="8" width="26" height="26"/>
                                 <buttonCell key="cell" type="round" bezelStyle="circular" image="NSGoLeftTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="YGV-tr-NS4">
                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                     <font key="font" metaFont="system"/>
@@ -78,7 +78,7 @@
                                 </connections>
                             </button>
                             <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GvR-dU-AwU">
-                                <rect key="frame" x="245" y="8" width="26" height="26"/>
+                                <rect key="frame" x="248" y="8" width="26" height="26"/>
                                 <buttonCell key="cell" type="round" bezelStyle="circular" image="NSGoRightTemplate" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="QOu-1C-uhN">
                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                     <font key="font" metaFont="system"/>
@@ -88,9 +88,9 @@
                                 </connections>
                             </button>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="ioL-gH-agJ">
-                                <rect key="frame" x="152" y="10" width="56" height="22"/>
+                                <rect key="frame" x="155" y="10" width="56" height="22"/>
                                 <subviews>
-                                    <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SOc-Qh-Bb7">
+                                    <textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SOc-Qh-Bb7">
                                         <rect key="frame" x="0.0" y="0.0" width="40" height="22"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="22" id="3Jq-m9-DeQ"/>
@@ -105,7 +105,7 @@
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="z3E-2c-R0k">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="z3E-2c-R0k">
                                         <rect key="frame" x="38" y="3" width="20" height="16"/>
                                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="/ 0" id="DYY-wZ-Qj3">
                                             <font key="font" metaFont="system"/>
@@ -124,7 +124,7 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="CBx-MQ-cXc">
-                                <rect key="frame" x="61" y="58" width="237" height="325"/>
+                                <rect key="frame" x="64" y="58" width="237" height="325"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="237" id="OK9-1V-VQX"/>
                                     <constraint firstAttribute="height" constant="325" id="kqf-Fz-QAp"/>
@@ -144,12 +144,12 @@
                         </constraints>
                     </customView>
                     <box borderType="none" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="3if-Xs-8Lv">
-                        <rect key="frame" x="361" y="340" width="320" height="106"/>
+                        <rect key="frame" x="370" y="338" width="320" height="106"/>
                         <view key="contentView" id="LK9-KO-5na">
                             <rect key="frame" x="0.0" y="0.0" width="320" height="106"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="A06-uc-UOW">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="A06-uc-UOW">
                                     <rect key="frame" x="8" y="90" width="47" height="16"/>
                                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Format" id="I6C-fa-6mM">
                                         <font key="font" metaFont="system"/>
@@ -159,9 +159,6 @@
                                 </textField>
                                 <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="t4K-iL-FMn">
                                     <rect key="frame" x="7" y="56" width="307" height="25"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="300" id="IW3-cd-aif"/>
-                                    </constraints>
                                     <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="KBs-bN-RpD" id="ebx-HJ-6OI">
                                         <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" metaFont="menu"/>
@@ -173,15 +170,15 @@
                                             </items>
                                         </menu>
                                     </popUpButtonCell>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="300" id="IW3-cd-aif"/>
+                                    </constraints>
                                     <connections>
                                         <action selector="buttonClicked_FormatSelect:" target="-2" id="lCG-tq-rib"/>
                                     </connections>
                                 </popUpButton>
                                 <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uzi-Qq-1mA">
                                     <rect key="frame" x="7" y="31" width="307" height="25"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="300" id="oBX-Vi-zz7"/>
-                                    </constraints>
                                     <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="0hG-DD-Tut" id="cKX-RA-nQ3">
                                         <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" metaFont="menu"/>
@@ -193,6 +190,9 @@
                                             </items>
                                         </menu>
                                     </popUpButtonCell>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="300" id="oBX-Vi-zz7"/>
+                                    </constraints>
                                     <connections>
                                         <action selector="buttonClicked_DpiSelect:" target="-2" id="NLj-oZ-ugE"/>
                                     </connections>
@@ -205,16 +205,16 @@
                                         <subviews>
                                             <button translatesAutoresizingMaskIntoConstraints="NO" id="Krh-ke-zCQ">
                                                 <rect key="frame" x="0.0" y="17" width="20" height="14"/>
-                                                <constraints>
-                                                    <constraint firstAttribute="height" constant="14" id="1xt-pb-BQw"/>
-                                                    <constraint firstAttribute="width" constant="20" id="uhJ-3t-Ju2"/>
-                                                </constraints>
                                                 <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="KMImageNameElsei" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="dFD-t2-jnf">
                                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                     <font key="font" metaFont="system"/>
                                                 </buttonCell>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="14" id="1xt-pb-BQw"/>
+                                                    <constraint firstAttribute="width" constant="20" id="uhJ-3t-Ju2"/>
+                                                </constraints>
                                             </button>
-                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ckr-Wn-5Tf">
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ckr-Wn-5Tf">
                                                 <rect key="frame" x="23" y="0.0" width="279" height="34"/>
                                                 <textFieldCell key="cell" title="Export PDF to Word and other Microsoft Office formats" id="sBS-zf-jgA">
                                                     <font key="font" metaFont="system"/>
@@ -239,13 +239,13 @@
                                 </box>
                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0Oz-gz-y6o">
                                     <rect key="frame" x="10" y="0.0" width="300" height="34"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="300" id="ELD-e9-9yi"/>
-                                    </constraints>
                                     <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="left" imageScaling="proportionallyDown" inset="2" id="pOx-Rw-MAb">
                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" usesAppearanceFont="YES"/>
                                     </buttonCell>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="300" id="ELD-e9-9yi"/>
+                                    </constraints>
                                     <connections>
                                         <action selector="buttonClicked_MoreConvert:" target="-2" id="PeR-FV-SSc"/>
                                     </connections>
@@ -269,7 +269,7 @@
                         </view>
                     </box>
                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EbI-Wk-CCv">
-                        <rect key="frame" x="623" y="7" width="82" height="32"/>
+                        <rect key="frame" x="635" y="7" width="82" height="32"/>
                         <buttonCell key="cell" type="push" title="Convert" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="clK-sD-xOl">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                             <font key="font" metaFont="system"/>
@@ -282,7 +282,7 @@ DQ
                         </connections>
                     </button>
                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GDI-DM-qg0">
-                        <rect key="frame" x="552" y="7" width="76" height="32"/>
+                        <rect key="frame" x="564" y="7" width="76" height="32"/>
                         <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="q06-7Z-li8">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                             <font key="font" metaFont="system"/>
@@ -315,13 +315,13 @@ Gw
                         </connections>
                     </button>
                     <box hidden="YES" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="aGQ-OF-WXB">
-                        <rect key="frame" x="361" y="253" width="310" height="68"/>
+                        <rect key="frame" x="367" y="231" width="316" height="84"/>
                         <view key="contentView" id="uh9-fs-9X0">
-                            <rect key="frame" x="3" y="3" width="304" height="62"/>
+                            <rect key="frame" x="4" y="5" width="308" height="76"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="47o-yu-wxa">
-                                    <rect key="frame" x="8" y="35" width="286" height="18"/>
+                                    <rect key="frame" x="8" y="49" width="290" height="18"/>
                                     <buttonCell key="cell" type="radio" title="Convert each page to a separate worksheet" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="hVc-jP-hSM">
                                         <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                                         <font key="font" metaFont="system"/>
@@ -331,7 +331,7 @@ Gw
                                     </connections>
                                 </button>
                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="DRT-Gg-QW1">
-                                    <rect key="frame" x="8" y="9" width="286" height="18"/>
+                                    <rect key="frame" x="8" y="9" width="290" height="32"/>
                                     <buttonCell key="cell" type="radio" title="Convert all pages to a single worksheet(.xlsx)" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="MKV-oI-hZ0">
                                         <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                                         <font key="font" metaFont="system"/>
@@ -354,17 +354,13 @@ Gw
                         <font key="titleFont" metaFont="system"/>
                     </box>
                     <box title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="R2E-0y-EaA">
-                        <rect key="frame" x="361" y="227" width="310" height="94"/>
+                        <rect key="frame" x="367" y="219" width="316" height="96"/>
                         <view key="contentView" id="kdq-H7-lg3">
-                            <rect key="frame" x="3" y="3" width="304" height="88"/>
+                            <rect key="frame" x="4" y="5" width="308" height="88"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
                                 <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CPK-uS-4AE">
                                     <rect key="frame" x="105" y="56" width="152" height="25"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="145" id="5hD-rD-DZ8"/>
-                                        <constraint firstAttribute="height" constant="20" id="8wZ-JW-rou"/>
-                                    </constraints>
                                     <popUpButtonCell key="cell" type="push" title="For Each Page" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="vBM-XN-pKT" id="HZz-2Y-eKt">
                                         <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" metaFont="menu"/>
@@ -375,6 +371,10 @@ Gw
                                             </items>
                                         </menu>
                                     </popUpButtonCell>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="145" id="5hD-rD-DZ8"/>
+                                        <constraint firstAttribute="height" constant="20" id="8wZ-JW-rou"/>
+                                    </constraints>
                                     <connections>
                                         <action selector="buttonClicked_allContentMenu:" target="-2" id="wyQ-bt-seM"/>
                                     </connections>
@@ -401,10 +401,6 @@ Gw
                                 </button>
                                 <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sq1-RM-hUc">
                                     <rect key="frame" x="96" y="30" width="152" height="25"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="145" id="0cK-il-Qad"/>
-                                        <constraint firstAttribute="height" constant="20" id="79Y-YK-1pF"/>
-                                    </constraints>
                                     <popUpButtonCell key="cell" type="push" title="For Each Table" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="kP9-YO-QvE" id="JnU-hE-bwh">
                                         <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" metaFont="menu"/>
@@ -416,6 +412,10 @@ Gw
                                             </items>
                                         </menu>
                                     </popUpButtonCell>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="145" id="0cK-il-Qad"/>
+                                        <constraint firstAttribute="height" constant="20" id="79Y-YK-1pF"/>
+                                    </constraints>
                                     <connections>
                                         <action selector="buttonClicked_tableMenu:" target="-2" id="n4N-sh-aIg"/>
                                     </connections>
@@ -450,7 +450,7 @@ Gw
                         <font key="titleFont" metaFont="system"/>
                     </box>
                     <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="UPM-vO-BAb">
-                        <rect key="frame" x="373" y="225" width="65" height="18"/>
+                        <rect key="frame" x="379" y="219" width="65" height="18"/>
                         <buttonCell key="cell" type="check" title="Check" bezelStyle="regularSquare" imagePosition="left" inset="2" id="2xT-Sc-V3O">
                             <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                             <font key="font" metaFont="system"/>
@@ -459,8 +459,8 @@ Gw
                             <action selector="buttonClicked_extractTable:" target="-2" id="0No-NT-2vF"/>
                         </connections>
                     </button>
-                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hQ6-L6-IW2">
-                        <rect key="frame" x="373" y="320" width="37" height="16"/>
+                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hQ6-L6-IW2">
+                        <rect key="frame" x="379" y="314" width="37" height="16"/>
                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="8X0-Hn-fJf">
                             <font key="font" metaFont="system"/>
                             <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -468,13 +468,13 @@ Gw
                         </textFieldCell>
                     </textField>
                     <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="RKf-EU-J3Q">
-                        <rect key="frame" x="364" y="78" width="304" height="26"/>
+                        <rect key="frame" x="370" y="72" width="310" height="26"/>
                         <view key="contentView" id="VEv-bs-dGD">
-                            <rect key="frame" x="0.0" y="0.0" width="304" height="26"/>
+                            <rect key="frame" x="0.0" y="0.0" width="310" height="26"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
-                                <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="C7X-dj-upX">
-                                    <rect key="frame" x="78" y="0.0" width="229" height="25"/>
+                                <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="C7X-dj-upX">
+                                    <rect key="frame" x="77" y="1" width="236" height="23"/>
                                     <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="fAw-sA-HYt">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -484,7 +484,7 @@ Gw
                                         <action selector="comboxClicked_PageRange:" target="-2" id="OGm-9q-dQX"/>
                                     </connections>
                                 </comboBox>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WyY-GN-uWB">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WyY-GN-uWB">
                                     <rect key="frame" x="3" y="5" width="77" height="16"/>
                                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Page Range" id="Jzz-uI-b7L">
                                         <font key="font" metaFont="system"/>
@@ -504,13 +504,13 @@ Gw
                         </view>
                     </box>
                     <box title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Bpl-Ox-GVU">
-                        <rect key="frame" x="361" y="109" width="310" height="107"/>
+                        <rect key="frame" x="367" y="101" width="316" height="109"/>
                         <view key="contentView" id="hjw-de-suY">
-                            <rect key="frame" x="3" y="3" width="304" height="87"/>
+                            <rect key="frame" x="4" y="5" width="308" height="87"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7HT-Vw-exZ">
-                                    <rect key="frame" x="8" y="60" width="286" height="18"/>
+                                    <rect key="frame" x="8" y="60" width="290" height="18"/>
                                     <buttonCell key="cell" type="check" title="Recognize text if needed" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="jEU-BR-ipB">
                                         <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                                         <font key="font" metaFont="system"/>
@@ -519,8 +519,8 @@ Gw
                                         <action selector="comboxClicked_SupoortOCR:" target="-2" id="lpV-4f-DKW"/>
                                     </connections>
                                 </button>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q5x-u2-fel">
-                                    <rect key="frame" x="8" y="35" width="288" height="16"/>
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q5x-u2-fel">
+                                    <rect key="frame" x="8" y="35" width="292" height="16"/>
                                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Document Language:" id="FGe-fQ-1t7">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -529,9 +529,6 @@ Gw
                                 </textField>
                                 <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lx7-mQ-roc">
                                     <rect key="frame" x="7" y="6" width="257" height="25"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="250" id="wV8-iV-cmR"/>
-                                    </constraints>
                                     <popUpButtonCell key="cell" type="push" title="Chinese" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="18N-pp-JIQ" id="6dK-AP-h63">
                                         <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" metaFont="menu"/>
@@ -663,6 +660,9 @@ Gw
                                             </items>
                                         </menu>
                                     </popUpButtonCell>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="250" id="wV8-iV-cmR"/>
+                                    </constraints>
                                     <connections>
                                         <action selector="comboxClicked_OcrLanguage:" target="-2" id="eCf-WM-PUN"/>
                                     </connections>
@@ -725,7 +725,7 @@ Gw
     </objects>
     <resources>
         <image name="KMImageNameElsei" width="15" height="14"/>
-        <image name="NSGoLeftTemplate" width="10" height="14"/>
-        <image name="NSGoRightTemplate" width="10" height="14"/>
+        <image name="NSGoLeftTemplate" width="12" height="17"/>
+        <image name="NSGoRightTemplate" width="12" height="17"/>
     </resources>
 </document>

+ 0 - 156
PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPageEditSplitWindowController.swift

@@ -1,156 +0,0 @@
-//
-//  KMPageEditSplitWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by tangchao on 2023/1/12.
-//
-
-class KMPageEditSplitWindowController: KMPageEditSettingBaseWindowController {
-    var hasPreView = false
-    
-    override func initSubViews() {
-        super.initSubViews()
-        
-        if (self.hasPreView) {
-            let controller = KMPDFInsertPreviewViewController(nibName: "KMPDFInsertPreviewViewController", bundle: nil)
-            controller.pdfDocument = CPDFDocument(url: self.model?.documentURL)
-            self.contentBox.contentView?.addSubview(controller.view)
-            controller.view.frame = NSMakeRect(0, 40, 176+16*2, 300)
-            controller.view.autoresizingMask = [.maxYMargin]
-            
-            if let settingView: KMPageEditSplitSettingView = KMPageEditSplitSettingView.createFromNib() {
-                self.contentBox.contentView?.addSubview(settingView)
-                let settingViewLeft: CGFloat = 176+16+8
-                settingView.frame = NSRect(x: settingViewLeft, y: 0, width: NSWidth(self.contentBox.frame)-settingViewLeft, height: NSHeight(self.contentBox.frame))
-                settingView.autoresizingMask = [.width, .height]
-                self.settingView = settingView
-                settingView.pageCount = self.model?.pageCount ?? 0
-                settingView.type = (self.model as? KMPageEditSplitSettingModel)?.type ?? 0
-                if (settingView.type == 2) {
-                    settingView.setPageRangeString((self.model as? KMPageEditSplitSettingModel)?.pageRangeString ?? "")
-                }
-                settingView.updateName(self.model?.outputFileName ?? "")
-            }
-        } else {
-            if let settingView: KMPageEditSplitSettingView = KMPageEditSplitSettingView.createFromNib() {
-                self.contentBox.contentView = settingView
-                self.settingView = settingView
-                settingView.pageCount = self.model?.pageCount ?? 0
-                settingView.type = (self.model as? KMPageEditSplitSettingModel)?.type ?? 0
-                if ((self.model as! KMPageEditSplitSettingModel).type == 2) {
-                    settingView.setPageRangeString((self.model as? KMPageEditSplitSettingModel)?.pageRangeString ?? "")
-                }
-                settingView.updateName(self.model!.outputFileName)
-            }
-        }
-        
-        self.settingView?.itemClick = { [unowned self] index, value in
-            if (index == 1) { /// 类型切换
-                (self.model as? KMPageEditSplitSettingModel)?.type = value as? Int ?? 0
-                return
-            }
-            if (index == 2) { /// 平均每几页拆分
-                (self.model as? KMPageEditSplitSettingModel)?.avgNumberForOneFile = value as? Int ?? 0
-                return
-            }
-            if (index == 3) { /// 平均拆分几个文件
-                (self.model as? KMPageEditSplitSettingModel)?.avgSplitNumberFile = value as? Int ?? 0
-                return
-            }
-            if (index == 4) { /// 页面范围切换
-                (self.model as? KMPageEditSplitSettingModel)?.pageRangeType = value as? Int ?? 0
-                return
-            }
-            if (index == 5) { /// 页面范围输入
-                var pageCount = 0
-                if let _pageCount = self.model?.pageCount {
-                    pageCount = _pageCount
-                }
-                if let data = value as? String, let _value = Int(data) {
-                    if (_value < 1 || _value > pageCount) {
-                        let alert = NSAlert()
-                        alert.messageText = NSLocalizedString("Page range must between 1 and \(pageCount)", comment: "")
-                        alert.informativeText = NSLocalizedString("Out of page range", comment: "")
-                        alert.runModal()
-                        (self.settingView as? KMPageEditSplitSettingView)?.setPageRangeString("1")
-                        (self.model as? KMPageEditSplitSettingModel)?.pageRangeType = 2
-                        (self.model as? KMPageEditSplitSettingModel)?.pageRangeString = "1"
-                        return
-                    }
-                }
-                (self.model as? KMPageEditSplitSettingModel)?.pageRangeType = 2
-                (self.model as? KMPageEditSplitSettingModel)?.pageRangeString = value as? String ?? ""
-                return
-            }
-            if (index == 6) { /// 将原始文档名前置
-                (self.model as? KMPageEditSplitSettingModel)?.origFileNameIsPrefix = value as? Bool ?? false
-                
-                (self.settingView as? KMPageEditSplitSettingView)?.updateName(self.model?.outputFileName ?? "")
-                return
-            }
-            if (index == 7) { /// 标签
-                (self.model as? KMPageEditSplitSettingModel)?.hasTag = value as? Bool ?? false
-                
-                (self.settingView as? KMPageEditSplitSettingView)?.updateName(self.model?.outputFileName ?? "")
-                return
-            }
-            if (index == 8) { /// 分隔符
-                (self.model as? KMPageEditSplitSettingModel)?.hasSep = value as? Bool ?? false
-                
-                (self.settingView as? KMPageEditSplitSettingView)?.updateName(self.model?.outputFileName ?? "")
-                return
-            }
-            
-            if (index == 9) { /// 分隔符
-                (self.model as? KMPageEditSplitSettingModel)?.tagString = value as? String ?? ""
-                
-                (self.settingView as? KMPageEditSplitSettingView)?.updateName(self.model?.outputFileName ?? "")
-                return
-            }
-            
-            if (index == 10) { /// 分隔符
-                (self.model as? KMPageEditSplitSettingModel)?.sepString = value as? String ?? ""
-                
-                (self.settingView as? KMPageEditSplitSettingView)?.updateName(self.model?.outputFileName ?? "")
-                return
-            }
-        }
-    }
-    
-    override func initDefaultValue() {
-        super.initDefaultValue()
-        
-        if (self.hasPreView) {
-            self.setWindowSize(NSSize(width: 583, height: 481))
-            self.titleLabel.stringValue = NSLocalizedString("Split", comment: "")
-        } else {
-            self.setWindowSize(NSSize(width: 480, height: 450))
-            self.titleLabel.stringValue = NSLocalizedString("Split Page", comment: "")
-        }
-        
-        self.funcVC?.stringValue = NSLocalizedString("Split", comment: "")
-        self.funcVC?.updateUI()
-    }
-    
-    override func funcButtonAction() {
-        guard let _model = self.model as? KMPageEditSplitSettingModel else {
-            super.funcButtonAction()
-            return
-        }
-        
-        if (_model.pageRangeType == 2) {
-            let pages = KMPageRangeTools.findSelectPage(pageRangeString: _model.pageRangeString, pageCount: _model.pageCount)
-            if (pages.isEmpty) {
-                let alert = NSAlert()
-                alert.messageText = NSLocalizedString("Page range must between 1 and \(_model.pageCount)", comment: "")
-                alert.informativeText = NSLocalizedString("Out of page range", comment: "")
-                alert.runModal()
-                (self.settingView as? KMPageEditSplitSettingView)?.setPageRangeString("1")
-                
-                _model.pageRangeString = "1"
-                return
-            }
-        }
-        super.funcButtonAction()
-    }
-}

+ 1 - 0
PDF Office/PDF Master/Class/PDFTools/RemovePassword/Model/KMBatchRemovePasswordOperation.swift

@@ -70,6 +70,7 @@ class KMBatchRemovePasswordOperation: KMBatchOperation{
             didChangeValue(forKey: "isFinished")
         }
     }
+    
     override func cancel() {
 //        super.cancel()
         if isExecuting {

+ 0 - 3
PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/KMRemovePasswordWindowController.swift

@@ -19,13 +19,10 @@ class KMRemovePasswordWindowController: KMBaseWindowController {
     override func windowDidLoad() {
         super.windowDidLoad()
 
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-        
         self.window!.title = NSLocalizedString("PDF Password Remover", comment: "")
         self.removePasswordView.password = password
         self.removePasswordView.removeAction = { [unowned self] view, files in
             self.doneAction?(self)
-//            self.removeFilesPassword(files: files)
         }
         
         self.removePasswordView.cancelAction = { [unowned self] view in

+ 3 - 3
PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/KMRemovePasswordWindowController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -18,7 +18,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="480" height="270"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <view key="contentView" id="se5-gp-TjO">
                 <rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
                 <autoresizingMask key="autoresizingMask"/>

+ 0 - 5
PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/View/KMRemovePasswordView.swift

@@ -52,11 +52,6 @@ class KMRemovePasswordView: BaseXibView {
 
 extension KMRemovePasswordView {
     @IBAction func batchButtonAction(_ sender: Any) {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
-//            return
-//        }
-
         guard let callBack = batchAction else { return }
         
         callBack(self, files)

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/View/KMRemovePasswordView.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

+ 5 - 1
PDF Office/PDF Master/Class/PDFTools/RemovePassword/VC/KMBatchOperateRemovePasswordViewController.swift

@@ -58,15 +58,16 @@ class KMBatchOperateRemovePasswordViewController: KMBatchOperateBaseViewControll
         super.viewDidLoad()
         localizedLanguage()
         configuUI()
-//        NotificationCenter.default.addObserver(self, selector: #selector(themeChanged(notification:)), name: Notification.Name(rawValue: "AppleInterfaceThemeChangedNotification"), object: nil)
         DistributedNotificationCenter.default().addObserver(self, selector: #selector(themeChanged(notification:)), name: NSNotification.Name("AppleInterfaceThemeChangedNotification"), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(batchFilesCountNotification(notification:)), name: Notification.Name(rawValue: "KMBatchFilesCountNotification"), object: nil)
     }
+    
     @objc func themeChanged(notification: Notification) {
         DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
             self.updateViewColor()
         }
     }
+    
     @objc func batchFilesCountNotification(notification: Notification) {
         let arr: Array? = notification.object as? [KMBatchOperateFile]
         self.files? = arr ?? []
@@ -80,6 +81,7 @@ class KMBatchOperateRemovePasswordViewController: KMBatchOperateBaseViewControll
             self.haveFiles = false
         }
     }
+    
     func updateViewColor() {
         if KMAppearance.isDarkMode() {
             self.view.layer?.backgroundColor = NSColor(red: 0.055, green: 0.067, blue: 0.078, alpha: 1).cgColor
@@ -87,6 +89,7 @@ class KMBatchOperateRemovePasswordViewController: KMBatchOperateBaseViewControll
             self.view.layer?.backgroundColor = NSColor(red: 0.922, green: 0.925, blue: 0.941, alpha: 1).cgColor
         }
     }
+    
     func localizedLanguage() {
         self.titleLabel.stringValue = KMLocalizedString("Remove Password")
         
@@ -95,6 +98,7 @@ class KMBatchOperateRemovePasswordViewController: KMBatchOperateBaseViewControll
         self.secondHintDetailLabel.stringValue = KMLocalizedString("If open password is required, you need to enter the right password first and then remove protections from PDF files.")
         self.actionButton.title = KMLocalizedString("Remove Password")
     }
+    
     func configuUI() {
         self.view.wantsLayer = true
         self.updateViewColor()

+ 3 - 3
PDF Office/PDF Master/Class/PDFTools/RemovePassword/VC/KMBatchOperateRemovePasswordViewController.xib

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMBatchOperateRemovePasswordViewController" customModule="PDF_Master" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMBatchOperateRemovePasswordViewController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="actionButton" destination="FAD-8e-i2O" id="nlZ-Ka-ffE"/>
                 <outlet property="firstHintDetailLabel" destination="oGI-lg-f8q" id="rNt-zA-PrH"/>

+ 1 - 1
PDF Office/PDF Master/KMClass/KMNPDFPageEdit/KMNPDFInsert/KMNPDFInsertPDFWindowController.swift

@@ -481,7 +481,7 @@ class KMNPDFInsertPDFWindowController: KMNBaseWindowController {
                     let pdfDoc = CPDFDocument(url: fileURL)
                     if let data = pdfDoc?.isLocked, data {
                         DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
-                            self.window?.windowController?.showCheckPassword(url: fileURL ?? NSURL.fileURL(withPath: ""), type: .owner, completion: { [weak self] success, resultPassword in
+                            NSWindowController.checkPassword(url: fileURL ?? NSURL.fileURL(withPath: ""), type: .owner, completion: { [weak self] success, resultPassword in
                                 if success && resultPassword.isEmpty == false {
                                     self?.insertDocument = CPDFDocument(url: fileURL)
                                     if let data = self?.insertDocument?.isLocked, data {

+ 2 - 2
PDF Office/PDF Master/KMClass/KMNPDFPageEdit/KMNThumbnailView/KMNThumbnailBaseViewController+Action.swift

@@ -369,7 +369,7 @@ extension KMNThumbnailBaseViewController {
         let pathExtension = URL(fileURLWithPath: path).pathExtension.lowercased()
         if pathExtension == "pdf", let pdf = CPDFDocument(url: URL(fileURLWithPath: path)) {
             if pdf.isLocked {
-                self.view.window?.windowController?.showCheckPassword(url: pdf.documentURL, type: .owner) { success, resultPassword in
+                NSWindowController.checkPassword(url: pdf.documentURL, type: .owner) { success, resultPassword in
                     if (resultPassword.isEmpty == false) {
                         pdf.unlock(withPassword: resultPassword)
                         
@@ -755,7 +755,7 @@ extension KMNThumbnailBaseViewController {
                     let pdfDoc = CPDFDocument(url: fileURL)
                     if let data = pdfDoc?.isLocked, data {
                         DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
-                            self?.view.window?.windowController?.showCheckPassword(url: fileURL ?? NSURL.fileURL(withPath: ""), type: .owner) { result, pwd in
+                            NSWindowController.checkPassword(url: fileURL ?? NSURL.fileURL(withPath: ""), type: .owner) { result, pwd in
                                 if (pwd.isEmpty == false) {
                                     self?.insertFilePath(filePath: fileURL?.path ?? "", pdfPassword: pwd)
                                 }

+ 100 - 75
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -1432,7 +1432,7 @@ struct KMNMWCFlags {
         }
     }
     
-    // MARK: -显示加密弹窗
+    // MARK: - 显示加密弹窗
     public func showSecureWindow() {
         guard let url = self.listView.document?.documentURL else {
             return
@@ -1482,16 +1482,30 @@ struct KMNMWCFlags {
         NSWindow.currentWindow().beginSheet(securityWindowController.window!)
     }
     
+    // MARK: - 解密弹窗
     public func showRemoveSecureWindow() {
-        if !self.document!.allowsCopying || !self.document!.allowsPrinting {
+        var isDocumentLocked: Bool = false
+        if self.document?.allowsCopying == false || self.document?.allowsPrinting == false {
+            isDocumentLocked = true
+        } else if (self.document?.password ?? "").count > 0 {
+            isDocumentLocked = true
+        }
+        if isDocumentLocked == false {
             let alert = NSAlert()
             alert.alertStyle = .warning
-            alert.messageText = NSLocalizedString("Warning", comment: "")
-            alert.informativeText = NSLocalizedString("This is a secured document. Editing is not permitted.", comment: "")
-            alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
-            alert.addButton(withTitle: NSLocalizedString("Remove Security", comment: ""))
+            alert.messageText = KMLocalizedString("This document doesn’t contain any security settings and doesn‘t need to be removed.")
+            alert.addButton(withTitle: KMLocalizedString("OK"))
+            alert.beginSheetModal(for: NSWindow.currentWindow()) { returnCode in
+                
+            }
+        } else {
+            let alert = NSAlert()
+            alert.alertStyle = .warning
+             alert.messageText = KMLocalizedString("Are you sure you want to remove security from this document?", comment: "")
+            alert.addButton(withTitle: KMLocalizedString("Remove", comment: ""))
+            alert.addButton(withTitle: KMLocalizedString("Cancel", comment: ""))
             alert.beginSheetModal(for: NSWindow.currentWindow()) { returnCode in
-                if returnCode == .alertSecondButtonReturn {
+                if returnCode == .alertFirstButtonReturn {
                     DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.25) { [unowned self] in
                         KMBaseWindowController.checkPassword(url: self.document!.documentURL!, type: .owner) { [unowned self] success, resultPassword in
                             if success {
@@ -1501,74 +1515,75 @@ struct KMNMWCFlags {
                     }
                 }
             }
-        } else {
-            let controller = KMRemovePasswordWindowController(windowNibName: "KMRemovePasswordWindowController")
-            controller.pdfDocument = self.document
-            self.currentWindowController = controller
-            
-            controller.batchAction = { [unowned self] controller, files in
-                self.view.window?.endSheet((self.currentWindowController.window)!)
-                self.currentWindowController = nil
-                
-                let baseWindowController = KMBatchOperateBaseWindowController(windowNibName: "KMBatchOperateBaseWindowController")
-                if #available(macOS 10.13, *) {
-                    baseWindowController.window?.makeKeyAndOrderFront(nil)
-                } else {
-                    baseWindowController.showWindow(nil)
-                }
-                let arr = NSMutableArray()
-                let file = KMBatchOperateFile(filePath: self.listView.document!.documentURL!.path, type: .RemovePassword)
-                file.password = document?.password ?? ""
-                arr.add(file)
-                
-                baseWindowController.switchToOperateType(.RemovePassword, files: arr as! [KMBatchOperateFile])
-            }
-            
-            controller.cancelAction = { [unowned self] controller in
-                self.view.window?.endSheet((self.currentWindowController.window)!)
-                self.currentWindowController = nil
-            }
-            
-            controller.doneAction = {  [unowned self] controller in
-                self.view.window?.endSheet((self.currentWindowController.window)!)
-                self.currentWindowController = nil
-                
-                KMBaseWindowController.checkPassword(url: self.document!.documentURL!, type: .owner, password: self.document?.password ?? "") { [unowned self] success, resultPassword in
-                    if success {
-                        
-                        let savePanel = NSSavePanel()
-                        savePanel.nameFieldStringValue = self.listView.document.documentURL.deletingPathExtension().lastPathComponent + "_RemovePassword"
-                        savePanel.allowedFileTypes = ["pdf"]
-                        
-                        savePanel.beginSheetModal(for: NSApp.mainWindow!) {[unowned self] result in
-                            guard result == .OK else { return }
-                            
-                            /// 删除安全性设置
-                            if (!self.listView.document!.allowsCopying || !self.listView.document!.allowsPrinting) {
-                                self.model.isSaveKeyChain = false
-                                self.listView.document.unlock(withPassword: resultPassword)
-                            }
-                            
-                            let document = CPDFDocument.init(url: self.listView.document.documentURL)
-                            guard let document = document else { return }
-                            
-                            document.unlock(withPassword: resultPassword)
-                            let success = document.writeDecrypt(to: savePanel.url)
-                            if success {
-                                self.hiddenSecureLimitTip()
- 
-                                NSWorkspace.shared.activateFileViewerSelecting([savePanel.url!])
-                            } else {
-                                self.hiddenSecureLimitTip()
-                                 
-                            }
-                        }
-                    }
-                }
-            }
-            NSWindow.currentWindow().beginSheet(controller.window!)
-            
-        }
+        } 
+//            else {
+//            let controller = KMRemovePasswordWindowController(windowNibName: "KMRemovePasswordWindowController")
+//            controller.pdfDocument = self.document
+//            self.currentWindowController = controller
+//            
+//            controller.batchAction = { [unowned self] controller, files in
+//                self.view.window?.endSheet((self.currentWindowController.window)!)
+//                self.currentWindowController = nil
+//                
+//                let baseWindowController = KMBatchOperateBaseWindowController(windowNibName: "KMBatchOperateBaseWindowController")
+//                if #available(macOS 10.13, *) {
+//                    baseWindowController.window?.makeKeyAndOrderFront(nil)
+//                } else {
+//                    baseWindowController.showWindow(nil)
+//                }
+//                let arr = NSMutableArray()
+//                let file = KMBatchOperateFile(filePath: self.listView.document!.documentURL!.path, type: .RemovePassword)
+//                file.password = document?.password ?? ""
+//                arr.add(file)
+//                
+//                baseWindowController.switchToOperateType(.RemovePassword, files: arr as! [KMBatchOperateFile])
+//            }
+//            
+//            controller.cancelAction = { [unowned self] controller in
+//                self.view.window?.endSheet((self.currentWindowController.window)!)
+//                self.currentWindowController = nil
+//            }
+//            
+//            controller.doneAction = {  [unowned self] controller in
+//                self.view.window?.endSheet((self.currentWindowController.window)!)
+//                self.currentWindowController = nil
+//                
+//                KMBaseWindowController.checkPassword(url: self.document!.documentURL!, type: .owner, password: self.document?.password ?? "") { [unowned self] success, resultPassword in
+//                    if success {
+//                        
+//                        let savePanel = NSSavePanel()
+//                        savePanel.nameFieldStringValue = self.listView.document.documentURL.deletingPathExtension().lastPathComponent + "_RemovePassword"
+//                        savePanel.allowedFileTypes = ["pdf"]
+//                        
+//                        savePanel.beginSheetModal(for: NSApp.mainWindow!) {[unowned self] result in
+//                            guard result == .OK else { return }
+//                            
+//                            /// 删除安全性设置
+//                            if (!self.listView.document!.allowsCopying || !self.listView.document!.allowsPrinting) {
+//                                self.model.isSaveKeyChain = false
+//                                self.listView.document.unlock(withPassword: resultPassword)
+//                            }
+//                            
+//                            let document = CPDFDocument.init(url: self.listView.document.documentURL)
+//                            guard let document = document else { return }
+//                            
+//                            document.unlock(withPassword: resultPassword)
+//                            let success = document.writeDecrypt(to: savePanel.url)
+//                            if success {
+//                                self.hiddenSecureLimitTip()
+// 
+//                                NSWorkspace.shared.activateFileViewerSelecting([savePanel.url!])
+//                            } else {
+//                                self.hiddenSecureLimitTip()
+//                                 
+//                            }
+//                        }
+//                    }
+//                }
+//            }
+//            NSWindow.currentWindow().beginSheet(controller.window!)
+            
+//        }
     }
     
     //MARK: - 测量
@@ -3376,14 +3391,17 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
                 
             } else if itemIdentifier == KMPDFToolbar_protect_redact_Property_Identifier {
                 self.showRedactProperty(readactAnnotation: nil)
+                
             } else if itemIdentifier == KMPDFToolbar_protect_redact_Apply_Identifier {
                 
             } else if itemIdentifier == KMPDFToolbar_protect_redact_Exit_Identifier {
                 
             } else if itemIdentifier == KMPDFToolbar_protect_security_Identifier {
                 self.showSecureWindow()
+                
             } else if itemIdentifier == KMPDFToolbar_protect_removeSecurity_Identifier {
                 self.showRemoveSecureWindow()
+                
             } else if itemIdentifier == KMPDFToolbar_protect_digitalSign_Identifier {
                 
             }
@@ -3391,28 +3409,35 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
             //MARK: -工具
             if itemIdentifier == KMPDFToolbar_tools_compress_Identifier {
                 self.showCompressController(self.listView.document.documentURL)
+                
             } else if itemIdentifier == KMPDFToolbar_tools_batch_compress_Identifier {
                 self.showBatchCompressController([self.listView.document.documentURL])
+                
             } else if itemIdentifier == KMPDFToolbar_tools_OCR_Identifier {
                 viewManager.showRightSide = !viewManager.showRightSide
                 self.refreshToolbarRightViewInfo()
                 
             } else if itemIdentifier == KMPDFToolbar_tools_merge_Identifier {
                 self.showMergeWindow(self.listView.document.password)
+                
             } else if itemIdentifier == KMPDFToolbar_tools_TTS_Identifier {
                 self.showTTSWindow()
+                
             } else if itemIdentifier == KMPDFToolbar_tools_extractImage_Identifier {
                 self.extractImageAction(num: 2)
+                
             } else if itemIdentifier == KMPDFToolbar_tools_AITools_Identifier {
                 self.viewManager.pdfSideBarType = .aiTools
                 self.sideBarController?.reloadData()
                 if let sideVC = self.sideBarController {
                     self.kmPDFSideBarControllerDidSidebarTypeUpdated(sideVC)
                 }
+                
             }
         } else if itemIdentifier == KMPDFToolbar_ViewDisplay_Identifier {
             //MARK: -Display
             updatePDFDisplaySettingView()
+            
         } else if toolbarManager.getSubToolItemIdentifys(KMPDFToolbar_Right_Identifiers).contains(itemIdentifier) {
             if itemIdentifier == KMPDFToolbar_rightView_Identifier {
                 //MARK: -属性栏

+ 1 - 1
PDF Office/PDF Master/KMClass/KMPDFViewController/KMNDisplayViewController/KMNDisplayViewController.swift

@@ -609,7 +609,7 @@ class KMNDisplayViewController: NSViewController {
                 let pdfDoc = CPDFDocument(url: fileURL)
                 if let data = pdfDoc?.isLocked, data {
                     DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
-                        self?.view.window?.windowController?.showCheckPassword(url: fileURL ?? NSURL.fileURL(withPath: ""), type: .owner) { result, pwd in
+                        NSWindowController.checkPassword(url: fileURL ?? NSURL.fileURL(withPath: ""), type: .owner) { result, pwd in
                             if (pwd.isEmpty == false) {
                                 
                             }

+ 1 - 1
PDF Office/PDF Master/KMClass/PDFListView/ViewController/KMNAlertTipViewController.swift

@@ -300,7 +300,7 @@ class KMNAlertTipViewController: KMNBaseViewController {
 //            if OCRComponentAlert.superview != nil {
 //                OCRComponentAlert.removeFromSuperview()
 //            }
-            OCRComponentAlert.isHidden = true
+//            OCRComponentAlert.isHidden = true
         }
      }
 

PDF Office/PDF Master/Class/Common/Base/KMBaseViewController.swift → PDF Office/PDF Master/KMClass/Tools/Base/KMBaseViewController.swift


+ 0 - 44
PDF Office/PDF Master/Class/Common/Base/KMBaseWindowController.swift

@@ -62,47 +62,3 @@ extension KMBaseWindowController {
         }
     }
 }
-
-extension KMBaseWindowController {
-    static func checkPassword(url: URL, type: KMPasswordInputWindowType, password: String = "", completion: @escaping ((_ success: Bool, _ resultPassword: String) -> Void)) {
-        // 判断路径 + document
-        guard let document = CPDFDocument.init(url: url) else {
-            return completion(false, "")
-        }
-
-        // 判断是否为加密文档
-        if document.isLocked == false {
-            if type == .open {
-                completion(true, "")
-                return
-            }
-        }
-        
-        if document.isLocked == false && (document.allowsCopying && document.allowsPrinting) {
-            completion(true, "")
-            return
-        }
-        
-        // 加密文件,尝试解锁
-        if password.isEmpty == false {
-            let preStatus = document.permissionsStatus
-            document.unlock(withPassword: password)
-            if document.permissionsStatus.rawValue > preStatus.rawValue { // 解密成功
-                completion(true, password)
-                return
-            }
-        }
-        
-        // 弹密码弹窗
-        Task { @MainActor in
-            KMPasswordInputWindow.openWindow(window: NSWindow.currentWindow(), type: type, url: url) { result , password in
-                if (result == .cancel) {
-                    completion(false, "")
-                    return
-                } else {
-                    completion(true, password ?? "")
-                }
-            }
-        }
-    }
-}

PDF Office/PDF Master/Class/Common/Base/KMHoverView.swift → PDF Office/PDF Master/KMClass/Tools/Base/KMHoverView.swift


+ 38 - 37
PDF Office/PDF Master/KMClass/Tools/NSWindowController+Extension/NSWindowController+Extension.swift

@@ -8,16 +8,50 @@
 import Foundation
 
 extension NSWindowController {
-    
-    
+     
     //MARK: - show方法,确保居中显示
     func showKMWindow(_ sender: Any?) {
         self.window?.center()
         
         self.showWindow(sender)
     }
+}
+
+// MARK: - Sheet
+
+extension NSWindowController {
+    static var _sheetParentResponderKey = "KMSheetParentResponderKey"
+    unowned var sheetParentResponder: NSResponder? {
+        get {
+            return objc_getAssociatedObject(self, &Self._sheetParentResponderKey) as? NSResponder
+        }
+    }
     
-    func showCheckPassword(url: URL, type: KMPasswordInputWindowType, password: String = "", completion: @escaping ((_ success: Bool, _ resultPassword: String) -> Void)) {
+    static var _sheetFlagKey = "KMSheetFlagKey"
+    var sheetFlag: Bool {
+        get {
+            return objc_getAssociatedObject(self, &Self._sheetFlagKey) as? Bool ?? false
+        }
+        set {
+            objc_setAssociatedObject(self, &Self._sheetFlagKey, newValue, .OBJC_ASSOCIATION_ASSIGN)
+        }
+    }
+    
+    // MARK: - Private Methods
+    func _setSheetParentResponder(_ newValue: NSResponder?) {
+        objc_setAssociatedObject(self, &Self._sheetParentResponderKey, newValue, .OBJC_ASSOCIATION_ASSIGN)
+    }
+}
+
+extension NSWindowController {
+    func handleRightMouseDown(theEvent: NSEvent) -> Bool {
+        return false
+    }
+}
+
+//MARK: - Password
+extension NSWindowController {
+    static func checkPassword(url: URL, type: KMPasswordInputWindowType, password: String = "", completion: @escaping ((_ success: Bool, _ resultPassword: String) -> Void)) {
         // 判断路径 + document
         guard let document = CPDFDocument.init(url: url) else {
             return completion(false, "")
@@ -48,7 +82,7 @@ extension NSWindowController {
         
         // 弹密码弹窗
         Task { @MainActor in
-            KMPasswordInputWindow.openWindow(window: self.window!, type: type, url: url) { result , password in
+            KMPasswordInputWindow.openWindow(window: NSWindow.currentWindow(), type: type, url: url) { result , password in
                 if (result == .cancel) {
                     completion(false, "")
                     return
@@ -58,37 +92,4 @@ extension NSWindowController {
             }
         }
     }
-    
-}
-
-// MARK: - Sheet
-
-extension NSWindowController {
-    static var _sheetParentResponderKey = "KMSheetParentResponderKey"
-    unowned var sheetParentResponder: NSResponder? {
-        get {
-            return objc_getAssociatedObject(self, &Self._sheetParentResponderKey) as? NSResponder
-        }
-    }
-    
-    static var _sheetFlagKey = "KMSheetFlagKey"
-    var sheetFlag: Bool {
-        get {
-            return objc_getAssociatedObject(self, &Self._sheetFlagKey) as? Bool ?? false
-        }
-        set {
-            objc_setAssociatedObject(self, &Self._sheetFlagKey, newValue, .OBJC_ASSOCIATION_ASSIGN)
-        }
-    }
-    
-    // MARK: - Private Methods
-    func _setSheetParentResponder(_ newValue: NSResponder?) {
-        objc_setAssociatedObject(self, &Self._sheetParentResponderKey, newValue, .OBJC_ASSOCIATION_ASSIGN)
-    }
-}
-
-extension NSWindowController {
-    func handleRightMouseDown(theEvent: NSEvent) -> Bool {
-        return false
-    }
 }

+ 14 - 14
PDF Office/PDF Master/KMClass/Tools/Secure/Window/KMPasswordInputWindow.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -23,7 +23,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="432" height="220"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1025"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <value key="minSize" type="size" width="432" height="220"/>
             <value key="maxSize" type="size" width="432" height="220"/>
             <view key="contentView" wantsLayer="YES" misplaced="YES" id="EiT-Mj-1SZ">
@@ -36,7 +36,7 @@
                             <rect key="frame" x="0.0" y="0.0" width="432" height="44"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="X38-4p-51v">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="X38-4p-51v">
                                     <rect key="frame" x="14" y="16" width="37" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="mNB-xx-ixe">
                                         <font key="font" usesAppearanceFont="YES"/>
@@ -66,7 +66,7 @@
                             <rect key="frame" x="0.0" y="0.0" width="432" height="102"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
-                                <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="xRE-aR-QBJ">
+                                <textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="xRE-aR-QBJ">
                                     <rect key="frame" x="102" y="80" width="316" height="16"/>
                                     <constraints>
                                         <constraint firstAttribute="height" relation="lessThanOrEqual" constant="66" id="Usx-e2-2hd"/>
@@ -83,7 +83,7 @@
                                         <constraint firstAttribute="height" constant="32" id="jiZ-zN-rn8"/>
                                     </constraints>
                                 </customView>
-                                <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="gST-4X-s69">
+                                <textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="gST-4X-s69">
                                     <rect key="frame" x="102" y="16" width="304" height="16"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="300" id="N0S-qp-xpS"/>
@@ -129,10 +129,6 @@
                                 </box>
                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jwm-QT-mwz">
                                     <rect key="frame" x="247" y="9" width="92" height="44"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="78" id="9On-lg-Ifu"/>
-                                        <constraint firstAttribute="height" constant="32" id="YVJ-Ck-tWB"/>
-                                    </constraints>
                                     <buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="9ln-dP-nCD">
                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" metaFont="system"/>
@@ -140,13 +136,13 @@
 Gw
 </string>
                                     </buttonCell>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="78" id="9On-lg-Ifu"/>
+                                        <constraint firstAttribute="height" constant="32" id="YVJ-Ck-tWB"/>
+                                    </constraints>
                                 </button>
                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Dpd-lf-2h1">
                                     <rect key="frame" x="341" y="9" width="82" height="44"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="32" id="19C-1p-OYf"/>
-                                        <constraint firstAttribute="width" constant="68" id="OOr-ag-SdW"/>
-                                    </constraints>
                                     <buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="uBB-Ls-gQs">
                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" metaFont="system"/>
@@ -154,6 +150,10 @@ Gw
 DQ
 </string>
                                     </buttonCell>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="19C-1p-OYf"/>
+                                        <constraint firstAttribute="width" constant="68" id="OOr-ag-SdW"/>
+                                    </constraints>
                                 </button>
                             </subviews>
                             <constraints>

+ 3 - 27
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -3634,9 +3634,6 @@
 		BBD1F78B296FACA300343885 /* KMPageEditExtractSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1F78A296FACA300343885 /* KMPageEditExtractSettingView.swift */; };
 		BBD1F78C296FACA300343885 /* KMPageEditExtractSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1F78A296FACA300343885 /* KMPageEditExtractSettingView.swift */; };
 		BBD1F78D296FACA300343885 /* KMPageEditExtractSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1F78A296FACA300343885 /* KMPageEditExtractSettingView.swift */; };
-		BBD1F78F296FE6A500343885 /* KMPageEditSplitWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1F78E296FE6A500343885 /* KMPageEditSplitWindowController.swift */; };
-		BBD1F790296FE6A500343885 /* KMPageEditSplitWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1F78E296FE6A500343885 /* KMPageEditSplitWindowController.swift */; };
-		BBD1F791296FE6A500343885 /* KMPageEditSplitWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1F78E296FE6A500343885 /* KMPageEditSplitWindowController.swift */; };
 		BBD1F793296FE92500343885 /* KMPageEditSplitSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1F792296FE92500343885 /* KMPageEditSplitSettingView.swift */; };
 		BBD1F794296FE92500343885 /* KMPageEditSplitSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1F792296FE92500343885 /* KMPageEditSplitSettingView.swift */; };
 		BBD1F795296FE92500343885 /* KMPageEditSplitSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1F792296FE92500343885 /* KMPageEditSplitSettingView.swift */; };
@@ -5919,7 +5916,6 @@
 		BBD1F77B296F9BE000343885 /* KMPageEditSettingBaseWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPageEditSettingBaseWindowController.xib; sourceTree = "<group>"; };
 		BBD1F786296FAC7C00343885 /* KMPageEditSettingBaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageEditSettingBaseView.swift; sourceTree = "<group>"; };
 		BBD1F78A296FACA300343885 /* KMPageEditExtractSettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageEditExtractSettingView.swift; sourceTree = "<group>"; };
-		BBD1F78E296FE6A500343885 /* KMPageEditSplitWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageEditSplitWindowController.swift; sourceTree = "<group>"; };
 		BBD1F792296FE92500343885 /* KMPageEditSplitSettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageEditSplitSettingView.swift; sourceTree = "<group>"; };
 		BBD1F797296FF78C00343885 /* KMPageEditSettingBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageEditSettingBaseModel.swift; sourceTree = "<group>"; };
 		BBD1F79B296FF7A600343885 /* KMPageEditSplitSettingModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageEditSplitSettingModel.swift; sourceTree = "<group>"; };
@@ -9375,7 +9371,6 @@
 				BB1D41D12B26D99D00994EDC /* Reusable */,
 				BB10FAEC2AFE232300F18D65 /* LineInspector */,
 				BB0A551B2A3078EB00B6E84B /* Designs */,
-				BB6B43642A04913200E02B54 /* Base */,
 				BBA5429A29F139730041BAD0 /* Control */,
 				BB5F8A0329BB04EF00365ADB /* OC */,
 				BB135C2829B6CD6700FD5965 /* Tools */,
@@ -9643,18 +9638,10 @@
 				BB2EDF49296E6373003BCF58 /* Window */,
 				BB2EDF44296E45FD003BCF58 /* Tools */,
 				BB1EC8042967D32700EC0BC3 /* OCPart */,
-				BB1EC7FB2967B24100EC0BC3 /* Controller */,
 			);
 			path = PageEdit;
 			sourceTree = "<group>";
 		};
-		BB1EC7FB2967B24100EC0BC3 /* Controller */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = Controller;
-			sourceTree = "<group>";
-		};
 		BB1EC8042967D32700EC0BC3 /* OCPart */ = {
 			isa = PBXGroup;
 			children = (
@@ -9841,7 +9828,6 @@
 				BBF62C6B2B033B5A007B7E86 /* KMPDFEditExtractWindow.xib */,
 				BB03D69F2B024AC7008C9976 /* KMPDFEditInsertPageWindow.xib */,
 				BB10FAE82AFE03CC00F18D65 /* KMPDFEditPageRangeWindowController.xib */,
-				BBD1F78E296FE6A500343885 /* KMPageEditSplitWindowController.swift */,
 				BB10FAE42AFE039E00F18D65 /* KMPDFEditPageRangeWindowController.swift */,
 				BB03D68B2B01C782008C9976 /* KMPDFEditInsertBlankPageWindow.swift */,
 				BB03D68F2B01C7AA008C9976 /* KMPDFEditInsertBlankPageWindow.xib */,
@@ -10554,16 +10540,6 @@
 			path = Resource;
 			sourceTree = "<group>";
 		};
-		BB6B43642A04913200E02B54 /* Base */ = {
-			isa = PBXGroup;
-			children = (
-				BB6B43652A04919200E02B54 /* KMBaseViewController.swift */,
-				BB2F18492A0C911B0003F65E /* KMBaseWindowController.swift */,
-				BB0A55172A3074F400B6E84B /* KMHoverView.swift */,
-			);
-			path = Base;
-			sourceTree = "<group>";
-		};
 		BB6B43692A04927300E02B54 /* Base */ = {
 			isa = PBXGroup;
 			children = (
@@ -12192,6 +12168,9 @@
 				F321C20F2CDA0C5E009982C8 /* BaseXibView.swift */,
 				F3DB85E92CCA209600D0AFDE /* KMNBaseViewController.swift */,
 				F3DB85EB2CCA209600D0AFDE /* KMNBaseWindowController.swift */,
+				BB6B43652A04919200E02B54 /* KMBaseViewController.swift */,
+				BB2F18492A0C911B0003F65E /* KMBaseWindowController.swift */,
+				BB0A55172A3074F400B6E84B /* KMHoverView.swift */,
 			);
 			path = Base;
 			sourceTree = "<group>";
@@ -14224,7 +14203,6 @@
 				9F53D54F2AD677A000CCF9D8 /* CPDFListViewConfig.swift in Sources */,
 				AD7D5CB32B9070AF006562CD /* KMSyncDot.swift in Sources */,
 				BB91383F2CEE08C100BAB4A7 /* KMCropPropertyController.swift in Sources */,
-				BBD1F78F296FE6A500343885 /* KMPageEditSplitWindowController.swift in Sources */,
 				9F1FE50529406E4700E952CA /* CTTabStripDragController.m in Sources */,
 				65B143AA2CF06B97001B5A69 /* NSColor+KMExtensions.swift in Sources */,
 				BBA9222B2B4E96450061057A /* KMPurchaseCompareWindowController.m in Sources */,
@@ -15217,7 +15195,6 @@
 				BBEDC2282B98205200970C54 /* Bundle+KMExtension.swift in Sources */,
 				AD199DF92B26A36500D56FEE /* KMPrintPosterPreviewView.swift in Sources */,
 				651675CB2CE3312000019A20 /* KMTocTableCellView.swift in Sources */,
-				BBD1F790296FE6A500343885 /* KMPageEditSplitWindowController.swift in Sources */,
 				BBD761D32D1962CD006C2E48 /* KMPDFFileInfoWindowController.swift in Sources */,
 				9F1FE50629406E4700E952CA /* CTTabStripDragController.m in Sources */,
 				9F1FE4D029406E4700E952CA /* CTTabController.m in Sources */,
@@ -16455,7 +16432,6 @@
 				BBA922242B4E7D340061057A /* HyperLinkButton.swift in Sources */,
 				F337CC392CC6686100D46AF4 /* KMNThumbnailCollectionViewItem.swift in Sources */,
 				656C1E362CD0745200295F82 /* KMConvertOCRSettingItemView.swift in Sources */,
-				BBD1F791296FE6A500343885 /* KMPageEditSplitWindowController.swift in Sources */,
 				BB8810A22B4F7D1000AFA63E /* KMVerificationActivateViewController.m in Sources */,
 				BB67EE192B54FFEF00573BF0 /* ASIDataCompressor.m in Sources */,
 				AD055E212B70B3840035F824 /* KMBookmark.swift in Sources */,