Skip to content

Commit bb72dd8

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 4965bb6 + 97f6c47 commit bb72dd8

File tree

72 files changed

+2608
-317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2608
-317
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [21.8.0] - Aspose Words Cloud for Dart 21.8 Release Notes
2+
3+
- Added new api methods to get, insert, update or delete custom xml parts from documents.
4+
- Added parameter 'ResultDocumentFormat' to Compare API
5+
- Added 'ExportLanguageToSpanTag' pdf save option
6+
- Added 'FlatOpcXmlMappingOnly' save option
7+
8+
19
## [21.7.0] - Aspose Words Cloud for Dart 21.7 Release Notes
210

311
- ImlRenderingMode option introduced witch is used to determine how ink (InkML) objects are rendered

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Add this dependency to your *pubspec.yaml*:
2727

2828
```yaml
2929
dependencies:
30-
aspose_words_cloud: 21.7.0
30+
aspose_words_cloud: 21.8.0
3131
```
3232
3333
## Getting Started

examples/AcceptAllRevisions.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ final wordsApi = WordsApi(config);
88
final fileName = 'test_doc.docx';
99

1010
// Upload original document to cloud storage.
11-
final requestFileContentData = (await File(fileName).readAsBytes()).buffer.asByteData();
12-
final uploadFileRequest = UploadFileRequest(requestFileContentData, fileName);
11+
final myVar1 = (await File(fileName).readAsBytes()).buffer.asByteData();
12+
final myVar2 = fileName;
13+
final uploadFileRequest = UploadFileRequest(myVar1, myVar2);
1314
await wordsApi.uploadFile(uploadFileRequest);
1415

1516
// Calls AcceptAllRevisions method for document in cloud.
16-
final request = AcceptAllRevisionsRequest(fileName);
17+
final myVar3 = fileName;
18+
final request = AcceptAllRevisionsRequest(myVar3);
1719
await wordsApi.acceptAllRevisions(request);

examples/AcceptAllRevisionsOnline.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ final wordsApi = WordsApi(config);
55
final fileName = 'test_doc.docx';
66

77
// Calls AcceptAllRevisionsOnline method for document in cloud.
8-
final requestDocumentData = (await File(fileName).readAsBytes()).buffer.asByteData();
9-
final request = AcceptAllRevisionsOnlineRequest(requestDocumentData);
8+
final requestDocument = (await File(fileName).readAsBytes()).buffer.asByteData();
9+
final request = AcceptAllRevisionsOnlineRequest(requestDocument);
1010
final acceptAllRevisionsOnlineResult = await wordsApi.acceptAllRevisionsOnline(request);
1111
await File('test_result.docx').writeAsBytes(
1212
acceptAllRevisionsOnlineResult.document.buffer.asUint8List(acceptAllRevisionsOnlineResult.document.offsetInBytes, acceptAllRevisionsOnlineResult.document.lengthInBytes)

lib/aspose_words_cloud.dart

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ export 'src/models/comments_response.dart';
5555
export 'src/models/compare_data.dart';
5656
export 'src/models/compare_options.dart';
5757
export 'src/models/csv_data_load_options.dart';
58+
export 'src/models/custom_xml_part.dart';
59+
export 'src/models/custom_xml_part_insert.dart';
60+
export 'src/models/custom_xml_part_link.dart';
61+
export 'src/models/custom_xml_part_response.dart';
62+
export 'src/models/custom_xml_part_update.dart';
63+
export 'src/models/custom_xml_parts_collection.dart';
64+
export 'src/models/custom_xml_parts_response.dart';
5865
export 'src/models/doc_save_options_data.dart';
5966
export 'src/models/document.dart';
6067
export 'src/models/document_entry.dart';
@@ -303,6 +310,10 @@ export 'src/requests/delete_comment_online_request.dart';
303310
export 'src/requests/delete_comment_request.dart';
304311
export 'src/requests/delete_comments_online_request.dart';
305312
export 'src/requests/delete_comments_request.dart';
313+
export 'src/requests/delete_custom_xml_part_online_request.dart';
314+
export 'src/requests/delete_custom_xml_part_request.dart';
315+
export 'src/requests/delete_custom_xml_parts_online_request.dart';
316+
export 'src/requests/delete_custom_xml_parts_request.dart';
306317
export 'src/requests/delete_document_property_online_request.dart';
307318
export 'src/requests/delete_document_property_request.dart';
308319
export 'src/requests/delete_drawing_object_online_request.dart';
@@ -359,6 +370,10 @@ export 'src/requests/get_comment_online_request.dart';
359370
export 'src/requests/get_comment_request.dart';
360371
export 'src/requests/get_comments_online_request.dart';
361372
export 'src/requests/get_comments_request.dart';
373+
export 'src/requests/get_custom_xml_part_online_request.dart';
374+
export 'src/requests/get_custom_xml_part_request.dart';
375+
export 'src/requests/get_custom_xml_parts_online_request.dart';
376+
export 'src/requests/get_custom_xml_parts_request.dart';
362377
export 'src/requests/get_document_drawing_object_by_index_online_request.dart';
363378
export 'src/requests/get_document_drawing_object_by_index_request.dart';
364379
export 'src/requests/get_document_drawing_object_image_data_online_request.dart';
@@ -457,6 +472,8 @@ export 'src/requests/get_tables_online_request.dart';
457472
export 'src/requests/get_tables_request.dart';
458473
export 'src/requests/insert_comment_online_request.dart';
459474
export 'src/requests/insert_comment_request.dart';
475+
export 'src/requests/insert_custom_xml_part_online_request.dart';
476+
export 'src/requests/insert_custom_xml_part_request.dart';
460477
export 'src/requests/insert_drawing_object_online_request.dart';
461478
export 'src/requests/insert_drawing_object_request.dart';
462479
export 'src/requests/insert_field_online_request.dart';
@@ -534,6 +551,8 @@ export 'src/requests/update_border_online_request.dart';
534551
export 'src/requests/update_border_request.dart';
535552
export 'src/requests/update_comment_online_request.dart';
536553
export 'src/requests/update_comment_request.dart';
554+
export 'src/requests/update_custom_xml_part_online_request.dart';
555+
export 'src/requests/update_custom_xml_part_request.dart';
537556
export 'src/requests/update_drawing_object_online_request.dart';
538557
export 'src/requests/update_drawing_object_request.dart';
539558
export 'src/requests/update_field_online_request.dart';
@@ -580,6 +599,7 @@ export 'src/responses/delete_paragraph_list_format_online_response.dart';
580599
export 'src/responses/delete_paragraph_tab_stop_online_response.dart';
581600
export 'src/responses/delete_watermark_online_response.dart';
582601
export 'src/responses/insert_comment_online_response.dart';
602+
export 'src/responses/insert_custom_xml_part_online_response.dart';
583603
export 'src/responses/insert_drawing_object_online_response.dart';
584604
export 'src/responses/insert_field_online_response.dart';
585605
export 'src/responses/insert_footnote_online_response.dart';
@@ -610,6 +630,7 @@ export 'src/responses/unprotect_document_online_response.dart';
610630
export 'src/responses/update_bookmark_online_response.dart';
611631
export 'src/responses/update_border_online_response.dart';
612632
export 'src/responses/update_comment_online_response.dart';
633+
export 'src/responses/update_custom_xml_part_online_response.dart';
613634
export 'src/responses/update_drawing_object_online_response.dart';
614635
export 'src/responses/update_field_online_response.dart';
615636
export 'src/responses/update_fields_online_response.dart';

lib/src/api_client.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ class ApiClient {
433433

434434
var httpRequest = http.Request(requestData.method, Uri.parse(requestData.url));
435435
httpRequest.headers['x-aspose-client'] = 'dart sdk';
436-
httpRequest.headers['x-aspose-client-version'] = '21.7';
436+
httpRequest.headers['x-aspose-client-version'] = '21.8';
437437
httpRequest.headers['Authorization'] = await _getAuthToken();
438438
if (requestData.headers != null) {
439439
httpRequest.headers.addAll(requestData.headers);

lib/src/models/compare_data.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ class CompareData implements ModelBase {
4343
/// Gets or sets the date and time to use for revisions.
4444
DateTime dateTime;
4545

46+
/// Gets or sets the result document format.
47+
String resultDocumentFormat;
48+
4649
@override
4750
void deserialize(Map<String, dynamic> json) {
4851
if (json == null) {
@@ -73,6 +76,12 @@ class CompareData implements ModelBase {
7376
} else {
7477
dateTime = null;
7578
}
79+
80+
if (json.containsKey('ResultDocumentFormat')) {
81+
resultDocumentFormat = json['ResultDocumentFormat'] as String;
82+
} else {
83+
resultDocumentFormat = null;
84+
}
7685
}
7786

7887
@override
@@ -93,6 +102,10 @@ class CompareData implements ModelBase {
93102
if (dateTime != null) {
94103
_result['DateTime'] = dateTime.toIso8601String();
95104
}
105+
106+
if (resultDocumentFormat != null) {
107+
_result['ResultDocumentFormat'] = resultDocumentFormat;
108+
}
96109
return _result;
97110
}
98111
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="custom_xml_part.dart">
4+
* Copyright (c) 2021 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
library aspose_words_cloud;
29+
30+
import '../../aspose_words_cloud.dart';
31+
32+
/// DTO container with a CustomXmlPart.
33+
class CustomXmlPart extends CustomXmlPartLink {
34+
/// Gets or sets the custom xml part data.
35+
String data;
36+
37+
/// Gets or sets the custom xml part id.
38+
String id;
39+
40+
@override
41+
void deserialize(Map<String, dynamic> json) {
42+
if (json == null) {
43+
throw ApiException(400, 'Failed to deserialize CustomXmlPart data model.');
44+
}
45+
46+
super.deserialize(json);
47+
if (json.containsKey('Data')) {
48+
data = json['Data'] as String;
49+
} else {
50+
data = null;
51+
}
52+
53+
if (json.containsKey('Id')) {
54+
id = json['Id'] as String;
55+
} else {
56+
id = null;
57+
}
58+
}
59+
60+
@override
61+
Map<String, dynamic> serialize() {
62+
var _result = <String, dynamic>{};
63+
_result.addAll(super.serialize());
64+
if (data != null) {
65+
_result['Data'] = data;
66+
}
67+
68+
if (id != null) {
69+
_result['Id'] = id;
70+
}
71+
return _result;
72+
}
73+
}
74+
75+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="custom_xml_part_insert.dart">
4+
* Copyright (c) 2021 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
library aspose_words_cloud;
29+
30+
import '../../aspose_words_cloud.dart';
31+
32+
/// Custom xml part insert.
33+
class CustomXmlPartInsert extends CustomXmlPart {
34+
35+
@override
36+
void deserialize(Map<String, dynamic> json) {
37+
if (json == null) {
38+
throw ApiException(400, 'Failed to deserialize CustomXmlPartInsert data model.');
39+
}
40+
41+
super.deserialize(json);
42+
}
43+
44+
@override
45+
Map<String, dynamic> serialize() {
46+
var _result = <String, dynamic>{};
47+
_result.addAll(super.serialize());
48+
return _result;
49+
}
50+
}
51+
52+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="custom_xml_part_link.dart">
4+
* Copyright (c) 2021 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
library aspose_words_cloud;
29+
30+
import '../../aspose_words_cloud.dart';
31+
32+
/// CustomXmlPart link.
33+
class CustomXmlPartLink extends LinkElement {
34+
35+
@override
36+
void deserialize(Map<String, dynamic> json) {
37+
if (json == null) {
38+
throw ApiException(400, 'Failed to deserialize CustomXmlPartLink data model.');
39+
}
40+
41+
super.deserialize(json);
42+
}
43+
44+
@override
45+
Map<String, dynamic> serialize() {
46+
var _result = <String, dynamic>{};
47+
_result.addAll(super.serialize());
48+
return _result;
49+
}
50+
}
51+
52+

0 commit comments

Comments
 (0)