Skip to content

Commit

Permalink
Fixed examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vderyushev committed Jun 5, 2024
1 parent 00c1499 commit 356c92e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Examples/ApiExamples/ApiExamples/ExCharts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,7 @@ public void TreemapChart()
//ExStart:TreemapChart
//GistId:65919861586e42e24f61a3ccb65f8f4e
//ExFor:ChartSeriesCollection.Add(String, ChartMultilevelValue[], double[])
//ExFor:ChartMultilevelValue(String, String)
//ExFor:ChartMultilevelValue.#ctor(String, String)
//ExSummary:Shows how to create treemap chart.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Expand Down
2 changes: 1 addition & 1 deletion Examples/ApiExamples/ApiExamples/ExComment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public void UtcDateTime()
doc = new Document(ArtifactsDir + "Comment.UtcDateTime.docx");

comment = (Comment)doc.GetChild(NodeType.Comment, 0, true);
// By default DateTimeUtc without millisaconds.
// DateTimeUtc return data without milliseconds.
Assert.AreEqual(dateTime.ToUniversalTime().ToString("yyyy-MM-dd hh:mm:ss"), comment.DateTimeUtc.ToString("yyyy-MM-dd hh:mm:ss"));
//ExEnd:UtcDateTime
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/ApiExamples/ApiExamples/ExDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ public void UpdateThumbnail()

// 2 - Use the first image found in the document:
ThumbnailGeneratingOptions options = new ThumbnailGeneratingOptions();
Assert.AreEqual(new Size(600, 900), options.ThumbnailSize); //ExSKip
Assert.AreEqual(new Size(600, 900), options.ThumbnailSize); //ExSkip
Assert.True(options.GenerateFromFirstPage); //ExSkip
options.ThumbnailSize = new Size(400, 400);
options.GenerateFromFirstPage = false;
Expand Down
1 change: 1 addition & 0 deletions Examples/ApiExamples/ApiExamples/ExReportingEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,7 @@ public void RemoveParagraphsSelectively()
//GistId:65919861586e42e24f61a3ccb65f8f4e
//ExFor:ReportingEngine.BuildReport(Document, Object, String)
//ExSummary:Shows how to remove paragraphs selectively.
// Template contains tags with an exclamation mark. For such tags, empty paragraphs will be removed.
Document doc = new Document(MyDir + "Reporting engine template - Selective remove paragraphs.docx");

ReportingEngine engine = new ReportingEngine();
Expand Down
5 changes: 3 additions & 2 deletions Examples/ApiExamples/ApiExamples/ExRevision.cs
Original file line number Diff line number Diff line change
Expand Up @@ -726,11 +726,12 @@ public void IgnoreStoreItemId()
//ExStart:IgnoreStoreItemId
//GistId:65919861586e42e24f61a3ccb65f8f4e
//ExFor:AdvancedCompareOptions.IgnoreStoreItemId
//ExSummary:Shows how to compare SDT with same text and different store item id.
//ExSummary:Shows how to compare SDT with same content but different store item id.
Document docA = new Document(MyDir + "Document with SDT 1.docx");
Document docB = new Document(MyDir + "Document with SDT 2.docx");

Aspose.Words.Comparing.CompareOptions compareOptions = new Aspose.Words.Comparing.CompareOptions();
// Configure options to compare SDT with same content but different store item id.
CompareOptions compareOptions = new CompareOptions();
compareOptions.AdvancedOptions.IgnoreStoreItemId = false;

docA.Compare(docB, "user", DateTime.Now, compareOptions);
Expand Down

0 comments on commit 356c92e

Please sign in to comment.