Skip to content

Commit 4965bb6

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 00fac70 + db2b3eb commit 4965bb6

File tree

55 files changed

+565
-326
lines changed

Some content is hidden

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

55 files changed

+565
-326
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [21.7.0] - Aspose Words Cloud for Dart 21.7 Release Notes
2+
3+
- ImlRenderingMode option introduced witch is used to determine how ink (InkML) objects are rendered
4+
- MaxCharactersPerLine option introduced which is used to specify the maximum number of characters per one line
5+
- Added new API method to get a RSA public key to encrypt document passwords
6+
- Added encryptedPassword common query option to pass an encrypted document password
7+
8+
19
## [21.6.0] - Aspose Words Cloud for Dart 21.6 Release Notes
210

311
- Implemented beta version of CompareDocumentOnline feature with both document sending in request

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.6.0
30+
aspose_words_cloud: 21.7.0
3131
```
3232
3333
## Getting Started

examples/AcceptAllRevisions.dart

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

1010
// Upload original document to cloud storage.
11-
final fileContentData = (await File(fileName).readAsBytes()).buffer.asByteData();
12-
final uploadFileRequest = UploadFileRequest(fileContentData, fileName);
11+
final requestFileContentData = (await File(fileName).readAsBytes()).buffer.asByteData();
12+
final uploadFileRequest = UploadFileRequest(requestFileContentData, fileName);
1313
await wordsApi.uploadFile(uploadFileRequest);
1414

1515
// Calls AcceptAllRevisions method for document in cloud.

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 documentData = (await File(fileName).readAsBytes()).buffer.asByteData();
9-
final request = AcceptAllRevisionsOnlineRequest(documentData);
8+
final requestDocumentData = (await File(fileName).readAsBytes()).buffer.asByteData();
9+
final request = AcceptAllRevisionsOnlineRequest(requestDocumentData);
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ export 'src/models/protection_data.dart';
182182
export 'src/models/protection_data_response.dart';
183183
export 'src/models/protection_request.dart';
184184
export 'src/models/ps_save_options_data.dart';
185+
export 'src/models/public_key_response.dart';
185186
export 'src/models/range_document.dart';
186187
export 'src/models/range_document_dto.dart';
187188
export 'src/models/range_text_response.dart';
@@ -419,6 +420,7 @@ export 'src/requests/get_paragraph_tab_stops_online_request.dart';
419420
export 'src/requests/get_paragraph_tab_stops_request.dart';
420421
export 'src/requests/get_paragraphs_online_request.dart';
421422
export 'src/requests/get_paragraphs_request.dart';
423+
export 'src/requests/get_public_key_request.dart';
422424
export 'src/requests/get_range_text_online_request.dart';
423425
export 'src/requests/get_range_text_request.dart';
424426
export 'src/requests/get_run_font_online_request.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.6';
436+
httpRequest.headers['x-aspose-client-version'] = '21.7';
437437
httpRequest.headers['Authorization'] = await _getAuthToken();
438438
if (requestData.headers != null) {
439439
httpRequest.headers.addAll(requestData.headers);
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="public_key_response.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+
/// REST response for RSA public key info.
33+
class PublicKeyResponse extends WordsResponse {
34+
/// Gets or sets RSA key exponent as Base64 string.
35+
String exponent;
36+
37+
/// Gets or sets RSA key modulus as Base64 string.
38+
String modulus;
39+
40+
@override
41+
void deserialize(Map<String, dynamic> json) {
42+
if (json == null) {
43+
throw ApiException(400, 'Failed to deserialize PublicKeyResponse data model.');
44+
}
45+
46+
super.deserialize(json);
47+
if (json.containsKey('Exponent')) {
48+
exponent = json['Exponent'] as String;
49+
} else {
50+
exponent = null;
51+
}
52+
53+
if (json.containsKey('Modulus')) {
54+
modulus = json['Modulus'] as String;
55+
} else {
56+
modulus = null;
57+
}
58+
}
59+
60+
@override
61+
Map<String, dynamic> serialize() {
62+
var _result = <String, dynamic>{};
63+
_result.addAll(super.serialize());
64+
if (exponent != null) {
65+
_result['Exponent'] = exponent;
66+
}
67+
68+
if (modulus != null) {
69+
_result['Modulus'] = modulus;
70+
}
71+
return _result;
72+
}
73+
}
74+
75+

lib/src/models/save_options_data.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ class SaveOptionsData implements ModelBase {
5050
/// Gets or sets the name of destination file.
5151
String fileName;
5252

53+
/// Gets or sets the value determining how ink (InkML) objects are rendered.
54+
String imlRenderingMode;
55+
5356
/// Gets or sets the format of save.
5457
String saveFormat;
5558

@@ -120,6 +123,12 @@ class SaveOptionsData implements ModelBase {
120123
fileName = null;
121124
}
122125

126+
if (json.containsKey('ImlRenderingMode')) {
127+
imlRenderingMode = json['ImlRenderingMode'] as String;
128+
} else {
129+
imlRenderingMode = null;
130+
}
131+
123132
if (json.containsKey('SaveFormat')) {
124133
saveFormat = json['SaveFormat'] as String;
125134
} else {
@@ -194,6 +203,10 @@ class SaveOptionsData implements ModelBase {
194203
_result['FileName'] = fileName;
195204
}
196205

206+
if (imlRenderingMode != null) {
207+
_result['ImlRenderingMode'] = imlRenderingMode;
208+
}
209+
197210
if (saveFormat != null) {
198211
_result['SaveFormat'] = saveFormat;
199212
}

lib/src/models/text_save_options_data.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ class TextSaveOptionsData extends TxtSaveOptionsBaseData {
3535
/// The default value is true.
3636
bool addBidiMarks;
3737

38+
/// Gets or sets an integer value that specifies the maximum number of characters per one line.
39+
/// The default value is 0, that means no limit.
40+
int maxCharactersPerLine;
41+
3842
/// Gets or sets a value indicating whether the program should attempt to preserve layout of tables when saving in the plain text format.
3943
bool preserveTableLayout;
4044

@@ -54,6 +58,12 @@ class TextSaveOptionsData extends TxtSaveOptionsBaseData {
5458
addBidiMarks = null;
5559
}
5660

61+
if (json.containsKey('MaxCharactersPerLine')) {
62+
maxCharactersPerLine = json['MaxCharactersPerLine'] as int;
63+
} else {
64+
maxCharactersPerLine = null;
65+
}
66+
5767
if (json.containsKey('PreserveTableLayout')) {
5868
preserveTableLayout = json['PreserveTableLayout'] as bool;
5969
} else {
@@ -75,6 +85,10 @@ class TextSaveOptionsData extends TxtSaveOptionsBaseData {
7585
_result['AddBidiMarks'] = addBidiMarks;
7686
}
7787

88+
if (maxCharactersPerLine != null) {
89+
_result['MaxCharactersPerLine'] = maxCharactersPerLine;
90+
}
91+
7892
if (preserveTableLayout != null) {
7993
_result['PreserveTableLayout'] = preserveTableLayout;
8094
}

lib/src/requests/append_document_online_request.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import '../api_request_part.dart';
3535

3636
/// Request model for AppendDocumentOnline operation.
3737
class AppendDocumentOnlineRequest implements RequestBase {
38-
/// The document.
38+
/// Original document.
3939
final ByteData document;
4040

4141
/// <see cref="DocumentEntryList"/> with a list of documents to append.

0 commit comments

Comments
 (0)