Methods
(async, static) clearDirty() → {boolean}
清除编辑
- Source:
Returns:
true/false:成功/失败
- Type
- boolean
(async, static) close(save) → {boolean}
关闭
Parameters:
| Name | Type | Description |
|---|---|---|
save |
boolean | 是否保存 |
- Source:
Returns:
true/false:成功/失败
- Type
- boolean
(async, static) createObj() → {Promise.<Document>}
构造一个新的Document对象
- Source:
Returns:
- Type
- Promise.<Document>
(async, static) fromXML(strXML) → {int}
从XML导入
Parameters:
| Name | Type | Description |
|---|---|---|
strXML |
String | XML |
- Source:
Returns:
成功:返回1
- Type
- int
(async, static) getAuthor() → {String}
获取文档作者
- Source:
Returns:
文档作者
- Type
- String
(async, static) getCategory() → {String}
获取文档类别
- Source:
Returns:
文档类别
- Type
- String
(async, static) getComments() → {String}
获取文档注释
- Source:
Returns:
文档注释
- Type
- String
(async, static) getDocItemType() → {int}
获取文档项的类型
- Source:
Returns:
文档项类型(DocItemType中的类型)
- Type
- int
(async, static) getFilePath() → {String}
获取文件路径
- Source:
Returns:
文件路径
- Type
- String
(async, static) getIsDirty() → {boolean}
获取文档是否被编辑过
- Source:
Returns:
- Type
- boolean
(async, static) getIsNew() → {boolean}
获取文档是否是新建的
- Source:
Returns:
是否是新建的
- Type
- boolean
(async, static) getKeywords() → {String}
获取文档关键词
- Source:
Returns:
关键词
- Type
- String
(async, static) getMaps() → {Object}
获取地图列表
- Source:
Returns:
获取地图列表对象 (Maps)
- Type
- Object
(async, static) getSubject() → {String}
获取文档主题
- Source:
Returns:
文档主题
- Type
- String
(async, static) getTitle() → {String}
获取文档标题
- Source:
Returns:
文档的标题
- Type
- String
(async, static) getVersion() → {String}
获取文件版本
- Source:
Returns:
获取文件版本
- Type
- String
(async, static) jNew() → {int}
新建
- Source:
Returns:
1/0:成功/失败
- Type
- int
(async, static) open(filePath) → {int}
打开文件
Parameters:
| Name | Type | Description |
|---|---|---|
filePath |
String | 文件路径 |
- Source:
Returns:
1/0 : 成功/失败
- Type
- int
(async, static) save() → {boolean}
保存
- Source:
Returns:
true/false:成功/失败
- Type
- boolean
(async, static) saveAs(filePath) → {boolean}
另存为
Parameters:
| Name | Type | Description |
|---|---|---|
filePath |
String | 文件保存路径 |
- Source:
Returns:
true/false : 成功/失败
- Type
- boolean
(async, static) setAuthor(author) → {Promise.<Void>}
设置文档作者
Parameters:
| Name | Type | Description |
|---|---|---|
author |
String | 文档作者 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setCategory(category) → {Promise.<Void>}
设置文档类别
Parameters:
| Name | Type | Description |
|---|---|---|
category |
String | 文档类别 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setComments(comments) → {Promise.<Void>}
设置文档注释
Parameters:
| Name | Type | Description |
|---|---|---|
comments |
String | 文档注释 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setKeywords(keywords) → {Promise.<Void>}
设置文档关键词
Parameters:
| Name | Type | Description |
|---|---|---|
keywords |
String | 文档关键词 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setSubject(subject) → {Promise.<Void>}
设置文档主题
Parameters:
| Name | Type | Description |
|---|---|---|
subject |
String | 文档主题 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setTitle(title) → {Promise.<Void>}
设置文档标题
Parameters:
| Name | Type | Description |
|---|---|---|
title |
String | 文档标题 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) toXML() → {String}
保存为XML
- Source:
Returns:
成功:返回XML
- Type
- String