Skip to content

Commit 338adbe

Browse files
SDK regenerated by CI server [ci skip]
1 parent 6ac67b1 commit 338adbe

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
2121

2222
- Added 'AttachmentsEmbeddingMode' property for PdfSaveOptionsData class.
2323
- Added 'UpdateAmbiguousTextFont' property for SaveOptionsData class.
24+
- Added 'Granularity' property for CompareOptions class.
2425

2526

2627
## Enhancements in Version 25.2

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;

src/models.cpp

Lines changed: 33 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;

0 commit comments

Comments
 (0)