3
0

2 Коммиты 6a9f6c5158 ... 7736276e64

Автор SHA1 Сообщение Дата
  zhudongyong 7736276e64 文档 - 转档(向后兼容)控制参数配置指导手册 1 год назад
  zhudongyong 549408345b 综合 - 字符对照报告显示效果优化; 1 год назад

BIN
KdanAutoTest/KdanAuto.xcodeproj/project.xcworkspace/xcuserdata/zhudongyong.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 2
KdanAutoTest/KdanAuto/Base.lproj/Main.storyboard

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
+<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>

+ 5 - 3
KdanAutoTest/KdanAuto/Class/CompareViewController/StringCompareView/StringCompareCellView.swift

@@ -39,6 +39,9 @@ class StringCompareCellView : NSTableCellView {
     override func awakeFromNib() {
         _sepLine.wantsLayer = true;
         _sepLine.layer?.backgroundColor = NSColor.lightGray.cgColor
+        
+        m_textScrollView.hasVerticalScroller = false
+        m_textScrollView.horizontalScrollElasticity = .none
     }
     
     // Setter & Getter
@@ -106,7 +109,7 @@ extension StringCompareCellView {
         var documentAttributes:NSDictionary!
         let attString = NSAttributedString.init(rtf: checkData, documentAttributes: &documentAttributes)
         
-        var retSize = attString!.boundingRect(with: CGSizeMake(990, 1000),
+        var retSize = attString!.boundingRect(with: CGSizeMake(990, CGFLOAT_MAX),
                                                                   options: .usesLineFragmentOrigin.union(.usesFontLeading)).size
         
         return retSize.height + 50
@@ -118,10 +121,9 @@ extension StringCompareCellView {
 class CustomScrollView: NSScrollView {
     
     override func scroll(_ point: NSPoint) {
-        
     }
     
     override func scrollWheel(with event: NSEvent) {
-        // Do nothing, effectively disabling scrolling
+        self.nextResponder?.scrollWheel(with: event);
     }
 }

+ 3 - 3
KdanAutoTest/KdanAuto/Class/CompareViewController/StringCompareView/StringCompareCellView.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="21701" 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="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -26,7 +26,7 @@
                     <rect key="frame" x="5" y="5" width="990" height="767"/>
                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     <subviews>
-                        <scrollView focusRingType="none" fixedFrame="YES" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" id="Lxj-Lu-JTX" customClass="CustomScrollView">
+                        <scrollView focusRingType="none" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" id="Lxj-Lu-JTX" customClass="CustomScrollView" customModule="KdanAuto" customModuleProvider="target">
                             <rect key="frame" x="0.0" y="0.0" width="990" height="767"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <clipView key="contentView" drawsBackground="NO" id="C3h-63-7lm">

+ 2 - 2
KdanAutoTest/KdanAuto/Class/CompareViewController/StringCompareView/StringCompareViewController.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="21701" 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="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

BIN
PropertySettingGuide.pdf


+ 173 - 1
PropertySettingGuide/PropertySettingGuide.md

@@ -210,6 +210,10 @@
 
 
 ##三、参数设置规则
+参数设置文件,在 Xcode 工程AdvanceSettingPropertyRules.plist 文件中,亦可直接修改位于 App 的如下配置文件中的配置:
+
+	xxx//KdanAuto.app/Contents/Resources/AdvanceSettingPropertyRules.plist
+
 ### Classs - 测试类型设置
 作用于具体文档的具体测试类型,目前有支持的测试类型有:AutoTest(全类型文档,自动转档及快照对照测试)、PDFCompareTest(PDF 文档,逐页快照对比测试)、StringAutoTest(TXT/RTF 文档,自动转档及字符对比测试)、StringAutoCompare(TXT/RTF 文档,字符对比测试)
 
@@ -314,5 +318,173 @@
 ### Params - 转档控制参数设置
 用于控制转档成各种文档过程中的转档控制参数,支持参数种类有 *BOOL*、*Bool*、*bool*、*size_t*、*int*、*uint8_t*、*int8_t*、*int16_t*、*uint16_t*、*int32_t*、*uint32_t*、*int64_t*、*uint64_t*、*NSInteger*、*NSUInteger*、*float*、*double*、*CGRect*、*NSRect*、*CGSize*、*NSSize*、*NSString*以及*枚举值*
 
-####1、各
+####【参数设置示例】BOOL
+SDK 接口头文件公开的,支持外部设置的BOOl 类型属性
+
+	 如CSV 格式转档,控制 CSV 表格是否合并的参数 isMergeCSV(如下图)
+	 - 参数类型(ValueType):BOOL
+	 - 属性(Property):isMergeCSV
+	 - 属性别名(Name): Merge CSV (可自定)
+	 - 默认值(DefaultValue):NO(待定)
+	 
+![](bool.param.png)
+
+	//plist 中对应的设置, 效果如下图
+	<dict>
+		<key>ValueType</key>
+		<string>BOOL</string>
+		<key>Property</key>
+		<string>isMergeCSV</string>
+		<key>Name</key>
+		<string>Merge CSV</string>
+		<key>DefaultValue</key>
+		<false/>
+	</dict>
+
+![](bool.property.png)
+
+在 KdanAuto 参数设置界面呈现的效果
+
+![](bool.ui.png)
+
+
+####【参数设置示例】NSInteger(枚举)
+SDK 接口头文件公开的,支持外部设置的NSInteger (枚举类型)属性
+
+	 如Excel 格式转档,控制 Excel 转档的参数 'contentOptions' 和 'worksheetOptions'(如下图)
+	 
+	 属性contentOptions相关信息:
+	 - 参数类型(ValueType):CPDFConvertExcelContentOptions,实际是NSInteger类型
+	 - 属性(Property):contentOptions
+	 - 属性别名(Name): Content Options (可自定)
+	 - 默认值(DefaultValue): 2(对应 CPDFConvertExcelContentAllContent,待定)
+	 - 枚举值可选项(Values):
+		 - 	选项一:
+		 	- 名称(Name): Only Text(可自定)
+		 	- 参数值(Value): 0
+		 - 	选项二:
+		 	- 名称(Name): Only Table(可自定)
+		 	- 参数值(Value): 1
+		 - 	选项三:
+		 	- 名称(Name): All Content(可自定)
+		 	- 参数值(Value): 2
+	 
+	 属性worksheetOptions相关信息:
+	 - 参数类型(ValueType):CPDFConvertExcelWorksheetOptions,实际是NSInteger类型
+	 - 属性(Property):worksheetOptions
+	 - 属性别名(Name): Worksheet Options (可自定)
+	 - 默认值(DefaultValue): 0(对应 CPDFConvertExcelWorksheetForEachTable,待定)
+	 - 枚举值可选项(Values):
+		 - 	选项一:
+		 	- 名称(Name): EachTable(可自定)
+		 	- 参数值(Value): 0
+		 - 	选项二:
+		 	- 名称(Name): EachPage(可自定)
+		 	- 参数值(Value): 1
+		 - 	选项三:
+		 	- 名称(Name): For The Document(可自定)
+		 	- 参数值(Value): 2
+	 
+![](enum.params.png)
+
+	//plist 中contentOptions属性对应的设置, 效果如下图
+	<dict>
+		<key>ValueType</key>
+		<string>NSInteger</string>
+		<key>Property</key>
+		<string>contentOptions</string>
+		<key>Name</key>
+		<string>Content Options</string>
+		<key>DefaultValue</key>
+		<integer>2</integer>
+		<key>Values</key>
+		<array>
+			<dict>
+				<key>Value</key>
+				<integer>0</integer>
+				<key>Name</key>
+				<string>Only Text</string>
+			</dict>
+			<dict>
+				<key>Value</key>
+				<integer>1</integer>
+				<key>Name</key>
+				<string>Only Table</string>
+			</dict>
+			<dict>
+				<key>Value</key>
+				<integer>2</integer>
+				<key>Name</key>
+				<string>All Content</string>
+			</dict>
+		</array>
+	</dict>
+	
+	//plist 中worksheetOptions属性对应的设置, 效果如下图
+	<dict>
+		<key>ValueType</key>
+		<string>NSInteger</string>
+		<key>Property</key>
+		<string>worksheetOptions</string>
+		<key>Name</key>
+		<string>Worksheet Options</string>
+		<key>DefaultValue</key>
+		<real>0</real>
+		<key>Values</key>
+		<array>
+			<dict>
+				<key>Value</key>
+				<integer>0</integer>
+				<key>Name</key>
+				<string>EachTable</string>
+			</dict>
+			<dict>
+				<key>Value</key>
+				<integer>1</integer>
+				<key>Name</key>
+				<string>EachPage</string>
+			</dict>
+			<dict>
+				<key>Value</key>
+				<integer>2</integer>
+				<key>Name</key>
+				<string>For The Document</string>
+			</dict>
+		</array>
+	</dict>
+
+![](enum.property.png)
+
+在 KdanAuto 参数设置界面呈现的效果
+
+![](enum.ui.png)
+
+
+####【参数设置示例】int
+SDK 接口头文件公开的,支持外部设置的int 类型属性
+
+	 如Img 格式转档,控制 图片清晰度的 DPI 参数 'imageDpi'(如下图)
+	 - 参数类型(ValueType):int
+	 - 属性(Property):imageDpi
+	 - 属性别名(Name): Image DPI (可自定)
+	 - 默认值(DefaultValue):216(待定)
+	 
+![](int.params.png)
+
+	//plist 中对应的设置, 效果如下图
+	<dict>
+		<key>ValueType</key>
+		<string>int</string>
+		<key>Property</key>
+		<string>imageDpi</string>
+		<key>Name</key>
+		<string>Image DPI</string>
+		<key>DefaultValue</key>
+		<integer>216</integer>
+	</dict>
+
+![](int.property.png)
+
+在 KdanAuto 参数设置界面呈现的效果
 
+![](int.ui.png)

BIN
PropertySettingGuide/bool.param.png


BIN
PropertySettingGuide/bool.property.png


BIN
PropertySettingGuide/bool.ui.png


BIN
PropertySettingGuide/enum.params.png


BIN
PropertySettingGuide/enum.property.png


BIN
PropertySettingGuide/enum.ui.png


BIN
PropertySettingGuide/int.params.png


BIN
PropertySettingGuide/int.property.png


BIN
PropertySettingGuide/int.ui.png