Skip to content

Commit b7fbd4a

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents e98bd45 + 01cd447 commit b7fbd4a

File tree

7 files changed

+168
-3
lines changed

7 files changed

+168
-3
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
1717
- Read & write access to Document Object Model.
1818
- Thread safe
1919

20+
## Enhancements in Version 25.4
21+
22+
- Added 'AttachmentsEmbeddingMode' property for PdfSaveOptionsData class.
23+
- Added 'UpdateAmbiguousTextFont' property for SaveOptionsData class.
24+
- Added 'Granularity' property for CompareOptions class.
25+
26+
2027
## Enhancements in Version 25.2
2128

2229
- Added 'IdPrefix' property for HtmlFixedSaveOptionsData and SvgSaveOptionsData class.

include/aspose_words_cloud/models/compare_options.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ namespace aspose::words::cloud::models {
3333
class CompareOptions : public ModelBase
3434
{
3535
public:
36+
/// <summary>
37+
/// Gets or sets the option indicating whether changes are tracked by character or by word.
38+
/// </summary>
39+
enum class Granularity
40+
{
41+
CHAR_LEVEL,
42+
WORD_LEVEL
43+
};
44+
3645
/// <summary>
3746
/// Gets or sets the option that controls which document shall be used as a target during comparison.
3847
/// </summary>
@@ -61,6 +70,17 @@ namespace aspose::words::cloud::models {
6170
ASPOSE_WORDS_CLOUD_EXPORT virtual void setAcceptAllRevisionsBeforeComparison(std::shared_ptr< bool > value);
6271

6372

73+
/// <summary>
74+
/// Gets or sets the option indicating whether changes are tracked by character or by word.
75+
/// </summary>
76+
ASPOSE_WORDS_CLOUD_EXPORT virtual std::shared_ptr< aspose::words::cloud::models::CompareOptions::Granularity > getGranularity() const;
77+
78+
/// <summary>
79+
/// Gets or sets the option indicating whether changes are tracked by character or by word.
80+
/// </summary>
81+
ASPOSE_WORDS_CLOUD_EXPORT virtual void setGranularity(std::shared_ptr< aspose::words::cloud::models::CompareOptions::Granularity > value);
82+
83+
6484
/// <summary>
6585
/// Gets or sets a value indicating whether documents comparison is case insensitive. By default comparison is case sensitive.
6686
/// </summary>
@@ -162,6 +182,7 @@ namespace aspose::words::cloud::models {
162182

163183
protected:
164184
std::shared_ptr< bool > m_AcceptAllRevisionsBeforeComparison;
185+
std::shared_ptr< aspose::words::cloud::models::CompareOptions::Granularity > m_Granularity;
165186
std::shared_ptr< bool > m_IgnoreCaseChanges;
166187
std::shared_ptr< bool > m_IgnoreComments;
167188
std::shared_ptr< bool > m_IgnoreFields;

include/aspose_words_cloud/models/page_setup.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ namespace aspose::words::cloud::models {
166166
PAPER10X14,
167167
PAPER11X17,
168168
NUMBER10_ENVELOPE,
169+
JIS_B4,
170+
JIS_B5,
169171
CUSTOM
170172
};
171173

include/aspose_words_cloud/models/pdf_save_options_data.h

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ namespace aspose::words::cloud::models {
3838
class PdfSaveOptionsData : public FixedPageSaveOptionsData
3939
{
4040
public:
41+
/// <summary>
42+
/// Gets or sets a value determining how attachments are embedded to the PDF document.
43+
/// Default value is None and attachments are not embedded.
44+
/// PDF/A-1, PDF/A-2 and regular PDF/A-4 (not PDF/A-4f) standards do not allow embedded files.
45+
/// None value will be used automatically.
46+
/// </summary>
47+
enum class AttachmentsEmbeddingMode
48+
{
49+
NONE,
50+
ANNOTATIONS,
51+
DOCUMENT_EMBEDDED_FILES
52+
};
53+
4154
/// <summary>
4255
/// Gets or sets the PDF standards compliance level for output documents.
4356
/// </summary>
@@ -145,6 +158,23 @@ namespace aspose::words::cloud::models {
145158
void abstractFixedPageSaveOptionsData() override {}
146159
void abstractSaveOptionsData() override {}
147160

161+
/// <summary>
162+
/// Gets or sets a value determining how attachments are embedded to the PDF document.
163+
/// Default value is None and attachments are not embedded.
164+
/// PDF/A-1, PDF/A-2 and regular PDF/A-4 (not PDF/A-4f) standards do not allow embedded files.
165+
/// None value will be used automatically.
166+
/// </summary>
167+
ASPOSE_WORDS_CLOUD_EXPORT virtual std::shared_ptr< aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode > getAttachmentsEmbeddingMode() const;
168+
169+
/// <summary>
170+
/// Gets or sets a value determining how attachments are embedded to the PDF document.
171+
/// Default value is None and attachments are not embedded.
172+
/// PDF/A-1, PDF/A-2 and regular PDF/A-4 (not PDF/A-4f) standards do not allow embedded files.
173+
/// None value will be used automatically.
174+
/// </summary>
175+
ASPOSE_WORDS_CLOUD_EXPORT virtual void setAttachmentsEmbeddingMode(std::shared_ptr< aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode > value);
176+
177+
148178
/// <summary>
149179
/// Gets or sets a value determining whether or not to cache graphics placed in document's background.
150180
/// Default value is true and background graphics are written to the PDF document as an xObject. When the value is false background graphics are not cached. Some shapes are not supported for caching(shapes with fields, bookmarks, HRefs). Document background graphic is various shapes, charts, images placed in the footer or header,
@@ -244,7 +274,7 @@ namespace aspose::words::cloud::models {
244274
/// false value will be used automatically.
245275
/// Embedding attachments is not supported when encryption is enabled. false value will be used automatically.
246276
/// </summary>
247-
[[deprecated("This property will be removed in the future.")]]
277+
[[deprecated("Obsolete, please use AttachmentsEmbeddingMode instead.")]]
248278
ASPOSE_WORDS_CLOUD_EXPORT virtual std::shared_ptr< bool > getEmbedAttachments() const;
249279

250280
/// <summary>
@@ -255,7 +285,7 @@ namespace aspose::words::cloud::models {
255285
/// false value will be used automatically.
256286
/// Embedding attachments is not supported when encryption is enabled. false value will be used automatically.
257287
/// </summary>
258-
[[deprecated("This property will be removed in the future.")]]
288+
[[deprecated("Obsolete, please use AttachmentsEmbeddingMode instead.")]]
259289
ASPOSE_WORDS_CLOUD_EXPORT virtual void setEmbedAttachments(std::shared_ptr< bool > value);
260290

261291

@@ -522,6 +552,7 @@ namespace aspose::words::cloud::models {
522552

523553

524554
protected:
555+
std::shared_ptr< aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode > m_AttachmentsEmbeddingMode;
525556
std::shared_ptr< bool > m_CacheBackgroundGraphics;
526557
std::shared_ptr< aspose::words::cloud::models::PdfSaveOptionsData::Compliance > m_Compliance;
527558
std::shared_ptr< bool > m_CreateNoteHyperlinks;

include/aspose_words_cloud/models/save_options_data.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,17 @@ namespace aspose::words::cloud::models {
184184
ASPOSE_WORDS_CLOUD_EXPORT virtual void setImlRenderingMode(std::shared_ptr< aspose::words::cloud::models::SaveOptionsData::ImlRenderingMode > value);
185185

186186

187+
/// <summary>
188+
/// Gets or sets a value indicating whether the font attributes will be changed according to the character code being used.
189+
/// </summary>
190+
ASPOSE_WORDS_CLOUD_EXPORT virtual std::shared_ptr< bool > getUpdateAmbiguousTextFont() const;
191+
192+
/// <summary>
193+
/// Gets or sets a value indicating whether the font attributes will be changed according to the character code being used.
194+
/// </summary>
195+
ASPOSE_WORDS_CLOUD_EXPORT virtual void setUpdateAmbiguousTextFont(std::shared_ptr< bool > value);
196+
197+
187198
/// <summary>
188199
/// Gets or sets a value determining whether the Aspose.Words.Properties.BuiltInDocumentProperties.CreatedTime property is updated before saving.
189200
/// Default value is false.
@@ -262,6 +273,7 @@ namespace aspose::words::cloud::models {
262273
std::shared_ptr< aspose::words::cloud::models::SaveOptionsData::DmlRenderingMode > m_DmlRenderingMode;
263274
std::shared_ptr< std::wstring > m_FileName;
264275
std::shared_ptr< aspose::words::cloud::models::SaveOptionsData::ImlRenderingMode > m_ImlRenderingMode;
276+
std::shared_ptr< bool > m_UpdateAmbiguousTextFont;
265277
std::shared_ptr< bool > m_UpdateCreatedTimeProperty;
266278
std::shared_ptr< bool > m_UpdateFields;
267279
std::shared_ptr< bool > m_UpdateLastPrintedProperty;

src/api_client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ namespace aspose::words::cloud {
168168

169169
::httplib::Headers headers;
170170
headers.emplace("Authorization", m_AccessToken);
171-
headers.emplace("x-aspose-client-version", "25.3");
171+
headers.emplace("x-aspose-client-version", "25.4");
172172
headers.emplace("x-aspose-client", "C++ SDK");
173173

174174
for (auto& pair : httpRequest->getHeaders()) {

src/models.cpp

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2702,6 +2702,20 @@ namespace aspose::words::cloud::models {
27022702
/*
27032703
* CompareOptions implementation
27042704
*/
2705+
inline std::string compareOptionsGranularityToString(aspose::words::cloud::models::CompareOptions::Granularity value)
2706+
{
2707+
if (value == aspose::words::cloud::models::CompareOptions::Granularity::CHAR_LEVEL) return "CharLevel";
2708+
if (value == aspose::words::cloud::models::CompareOptions::Granularity::WORD_LEVEL) return "WordLevel";
2709+
throw aspose::words::cloud::ApiException(400, L"Invalid enum value");
2710+
}
2711+
2712+
inline aspose::words::cloud::models::CompareOptions::Granularity compareOptionsGranularityFromString(const std::string& value)
2713+
{
2714+
if (value == "CharLevel") return aspose::words::cloud::models::CompareOptions::Granularity::CHAR_LEVEL;
2715+
if (value == "WordLevel") return aspose::words::cloud::models::CompareOptions::Granularity::WORD_LEVEL;
2716+
throw aspose::words::cloud::ApiException(400, L"Invalid enum value");
2717+
}
2718+
27052719
inline std::string compareOptionsTargetToString(aspose::words::cloud::models::CompareOptions::Target value)
27062720
{
27072721
if (value == aspose::words::cloud::models::CompareOptions::Target::CURRENT) return "Current";
@@ -2721,6 +2735,9 @@ namespace aspose::words::cloud::models {
27212735
if (this->m_AcceptAllRevisionsBeforeComparison) {
27222736
json["AcceptAllRevisionsBeforeComparison"] = *(this->m_AcceptAllRevisionsBeforeComparison);
27232737
}
2738+
if (this->m_Granularity) {
2739+
json["Granularity"] = compareOptionsGranularityToString(*(this->m_Granularity));
2740+
}
27242741
if (this->m_IgnoreCaseChanges) {
27252742
json["IgnoreCaseChanges"] = *(this->m_IgnoreCaseChanges);
27262743
}
@@ -2758,6 +2775,11 @@ namespace aspose::words::cloud::models {
27582775
json["AcceptAllRevisionsBeforeComparison"].get< bool >()
27592776
);
27602777
}
2778+
if (json.contains("Granularity") && !json["Granularity"].is_null()) {
2779+
this->m_Granularity = std::make_shared< aspose::words::cloud::models::CompareOptions::Granularity >(
2780+
compareOptionsGranularityFromString(json["Granularity"].get< std::string >())
2781+
);
2782+
}
27612783
if (json.contains("IgnoreCaseChanges") && !json["IgnoreCaseChanges"].is_null()) {
27622784
this->m_IgnoreCaseChanges = std::make_shared< bool >(
27632785
json["IgnoreCaseChanges"].get< bool >()
@@ -2824,6 +2846,17 @@ namespace aspose::words::cloud::models {
28242846
}
28252847

28262848

2849+
std::shared_ptr< aspose::words::cloud::models::CompareOptions::Granularity > CompareOptions::getGranularity() const
2850+
{
2851+
return this->m_Granularity;
2852+
}
2853+
2854+
void CompareOptions::setGranularity(std::shared_ptr< aspose::words::cloud::models::CompareOptions::Granularity > value)
2855+
{
2856+
this->m_Granularity = value;
2857+
}
2858+
2859+
28272860
std::shared_ptr< bool > CompareOptions::getIgnoreCaseChanges() const
28282861
{
28292862
return this->m_IgnoreCaseChanges;
@@ -16773,6 +16806,8 @@ namespace aspose::words::cloud::models {
1677316806
if (value == aspose::words::cloud::models::PageSetup::PaperSize::PAPER10X14) return "Paper10x14";
1677416807
if (value == aspose::words::cloud::models::PageSetup::PaperSize::PAPER11X17) return "Paper11x17";
1677516808
if (value == aspose::words::cloud::models::PageSetup::PaperSize::NUMBER10_ENVELOPE) return "Number10Envelope";
16809+
if (value == aspose::words::cloud::models::PageSetup::PaperSize::JIS_B4) return "JisB4";
16810+
if (value == aspose::words::cloud::models::PageSetup::PaperSize::JIS_B5) return "JisB5";
1677616811
if (value == aspose::words::cloud::models::PageSetup::PaperSize::CUSTOM) return "Custom";
1677716812
throw aspose::words::cloud::ApiException(400, L"Invalid enum value");
1677816813
}
@@ -16796,6 +16831,8 @@ namespace aspose::words::cloud::models {
1679616831
if (value == "Paper10x14") return aspose::words::cloud::models::PageSetup::PaperSize::PAPER10X14;
1679716832
if (value == "Paper11x17") return aspose::words::cloud::models::PageSetup::PaperSize::PAPER11X17;
1679816833
if (value == "Number10Envelope") return aspose::words::cloud::models::PageSetup::PaperSize::NUMBER10_ENVELOPE;
16834+
if (value == "JisB4") return aspose::words::cloud::models::PageSetup::PaperSize::JIS_B4;
16835+
if (value == "JisB5") return aspose::words::cloud::models::PageSetup::PaperSize::JIS_B5;
1679916836
if (value == "Custom") return aspose::words::cloud::models::PageSetup::PaperSize::CUSTOM;
1680016837
throw aspose::words::cloud::ApiException(400, L"Invalid enum value");
1680116838
}
@@ -19750,6 +19787,22 @@ namespace aspose::words::cloud::models {
1975019787
/*
1975119788
* PdfSaveOptionsData implementation
1975219789
*/
19790+
inline std::string pdfSaveOptionsDataAttachmentsEmbeddingModeToString(aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode value)
19791+
{
19792+
if (value == aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode::NONE) return "None";
19793+
if (value == aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode::ANNOTATIONS) return "Annotations";
19794+
if (value == aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode::DOCUMENT_EMBEDDED_FILES) return "DocumentEmbeddedFiles";
19795+
throw aspose::words::cloud::ApiException(400, L"Invalid enum value");
19796+
}
19797+
19798+
inline aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode pdfSaveOptionsDataAttachmentsEmbeddingModeFromString(const std::string& value)
19799+
{
19800+
if (value == "None") return aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode::NONE;
19801+
if (value == "Annotations") return aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode::ANNOTATIONS;
19802+
if (value == "DocumentEmbeddedFiles") return aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode::DOCUMENT_EMBEDDED_FILES;
19803+
throw aspose::words::cloud::ApiException(400, L"Invalid enum value");
19804+
}
19805+
1975319806
inline std::string pdfSaveOptionsDataComplianceToString(aspose::words::cloud::models::PdfSaveOptionsData::Compliance value)
1975419807
{
1975519808
if (value == aspose::words::cloud::models::PdfSaveOptionsData::Compliance::PDF17) return "Pdf17";
@@ -19909,6 +19962,9 @@ namespace aspose::words::cloud::models {
1990919962
{
1991019963
FixedPageSaveOptionsData::toJson(jsonIfc);
1991119964
::nlohmann::json& json = *((::nlohmann::json*)jsonIfc);
19965+
if (this->m_AttachmentsEmbeddingMode) {
19966+
json["AttachmentsEmbeddingMode"] = pdfSaveOptionsDataAttachmentsEmbeddingModeToString(*(this->m_AttachmentsEmbeddingMode));
19967+
}
1991219968
if (this->m_CacheBackgroundGraphics) {
1991319969
json["CacheBackgroundGraphics"] = *(this->m_CacheBackgroundGraphics);
1991419970
}
@@ -20005,6 +20061,11 @@ namespace aspose::words::cloud::models {
2000520061
{
2000620062
FixedPageSaveOptionsData::fromJson(jsonIfc);
2000720063
::nlohmann::json& json = *((::nlohmann::json*)jsonIfc);
20064+
if (json.contains("AttachmentsEmbeddingMode") && !json["AttachmentsEmbeddingMode"].is_null()) {
20065+
this->m_AttachmentsEmbeddingMode = std::make_shared< aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode >(
20066+
pdfSaveOptionsDataAttachmentsEmbeddingModeFromString(json["AttachmentsEmbeddingMode"].get< std::string >())
20067+
);
20068+
}
2000820069
if (json.contains("CacheBackgroundGraphics") && !json["CacheBackgroundGraphics"].is_null()) {
2000920070
this->m_CacheBackgroundGraphics = std::make_shared< bool >(
2001020071
json["CacheBackgroundGraphics"].get< bool >()
@@ -20207,6 +20268,17 @@ namespace aspose::words::cloud::models {
2020720268

2020820269
}
2020920270

20271+
std::shared_ptr< aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode > PdfSaveOptionsData::getAttachmentsEmbeddingMode() const
20272+
{
20273+
return this->m_AttachmentsEmbeddingMode;
20274+
}
20275+
20276+
void PdfSaveOptionsData::setAttachmentsEmbeddingMode(std::shared_ptr< aspose::words::cloud::models::PdfSaveOptionsData::AttachmentsEmbeddingMode > value)
20277+
{
20278+
this->m_AttachmentsEmbeddingMode = value;
20279+
}
20280+
20281+
2021020282
std::shared_ptr< bool > PdfSaveOptionsData::getCacheBackgroundGraphics() const
2021120283
{
2021220284
return this->m_CacheBackgroundGraphics;
@@ -22717,6 +22789,9 @@ namespace aspose::words::cloud::models {
2271722789
if (this->m_ImlRenderingMode) {
2271822790
json["ImlRenderingMode"] = saveOptionsDataImlRenderingModeToString(*(this->m_ImlRenderingMode));
2271922791
}
22792+
if (this->m_UpdateAmbiguousTextFont) {
22793+
json["UpdateAmbiguousTextFont"] = *(this->m_UpdateAmbiguousTextFont);
22794+
}
2272022795
if (this->m_UpdateCreatedTimeProperty) {
2272122796
json["UpdateCreatedTimeProperty"] = *(this->m_UpdateCreatedTimeProperty);
2272222797
}
@@ -22773,6 +22848,11 @@ namespace aspose::words::cloud::models {
2277322848
saveOptionsDataImlRenderingModeFromString(json["ImlRenderingMode"].get< std::string >())
2277422849
);
2277522850
}
22851+
if (json.contains("UpdateAmbiguousTextFont") && !json["UpdateAmbiguousTextFont"].is_null()) {
22852+
this->m_UpdateAmbiguousTextFont = std::make_shared< bool >(
22853+
json["UpdateAmbiguousTextFont"].get< bool >()
22854+
);
22855+
}
2277622856
if (json.contains("UpdateCreatedTimeProperty") && !json["UpdateCreatedTimeProperty"].is_null()) {
2277722857
this->m_UpdateCreatedTimeProperty = std::make_shared< bool >(
2277822858
json["UpdateCreatedTimeProperty"].get< bool >()
@@ -22833,6 +22913,7 @@ namespace aspose::words::cloud::models {
2283322913

2283422914

2283522915

22916+
2283622917
}
2283722918

2283822919
std::shared_ptr< bool > SaveOptionsData::getAllowEmbeddingPostScriptFonts() const
@@ -22912,6 +22993,17 @@ namespace aspose::words::cloud::models {
2291222993
}
2291322994

2291422995

22996+
std::shared_ptr< bool > SaveOptionsData::getUpdateAmbiguousTextFont() const
22997+
{
22998+
return this->m_UpdateAmbiguousTextFont;
22999+
}
23000+
23001+
void SaveOptionsData::setUpdateAmbiguousTextFont(std::shared_ptr< bool > value)
23002+
{
23003+
this->m_UpdateAmbiguousTextFont = value;
23004+
}
23005+
23006+
2291523007
std::shared_ptr< bool > SaveOptionsData::getUpdateCreatedTimeProperty() const
2291623008
{
2291723009
return this->m_UpdateCreatedTimeProperty;

0 commit comments

Comments
 (0)