Skip to content

Commit 5ec0c32

Browse files
Reformat CompareTool javadocs, add details about diffPrefix arg to all overloads
ITXT-CR-749 Autoported commit. Original commit hash: [bff5c021de]
1 parent dce1926 commit 5ec0c32

File tree

2 files changed

+29
-21
lines changed

2 files changed

+29
-21
lines changed

itext/itext.kernel/itext/kernel/utils/CompareTool.cs

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,10 @@ public virtual String CompareByContent(String outPdf, String cmpPdf, String outP
469469
/// <param name="cmpPdf">the absolute path to the cmp-file, which is to be compared to output file.</param>
470470
/// <param name="outPath">the absolute path to the folder, which will be used to store image files for visual comparison.
471471
/// </param>
472-
/// <param name="differenceImagePrefix">file name prefix for image files with marked visual differences if there is any.
473-
/// </param>
472+
/// <param name="differenceImagePrefix">
473+
/// file name prefix for image files with marked visual differences if there is any;
474+
/// if it's set to null the prefix defaults to diff_%outPdfFileName%_ format.
475+
/// </param>
474476
/// <returns>
475477
/// string containing text report of the encountered content differences and also list of the pages that are
476478
/// visually different, or null if there are no content and therefore no visual differences.
@@ -517,8 +519,10 @@ public virtual String CompareByContent(String outPdf, String cmpPdf, String outP
517519
/// <param name="cmpPdf">the absolute path to the cmp-file, which is to be compared to output file.</param>
518520
/// <param name="outPath">the absolute path to the folder, which will be used to store image files for visual comparison.
519521
/// </param>
520-
/// <param name="differenceImagePrefix">file name prefix for image files with marked visual differences if there is any.
521-
/// </param>
522+
/// <param name="differenceImagePrefix">
523+
/// file name prefix for image files with marked visual differences if there is any;
524+
/// if it's set to null the prefix defaults to diff_%outPdfFileName%_ format.
525+
/// </param>
522526
/// <param name="outPass">password for the encrypted document specified by the outPdf absolute path.</param>
523527
/// <param name="cmpPass">password for the encrypted document specified by the cmpPdf absolute path.</param>
524528
/// <returns>
@@ -560,8 +564,10 @@ public virtual String CompareByContent(String outPdf, String cmpPdf, String outP
560564
/// <param name="cmpPdf">the absolute path to the cmp-file, which is to be compared to output file.</param>
561565
/// <param name="outPath">the absolute path to the folder, which will be used to store image files for visual comparison.
562566
/// </param>
563-
/// <param name="differenceImagePrefix">file name prefix for image files with marked visual differences if there is any.
564-
/// </param>
567+
/// <param name="differenceImagePrefix">
568+
/// file name prefix for image files with marked visual differences if there is any;
569+
/// if it's set to null the prefix defaults to diff_%outPdfFileName%_ format.
570+
/// </param>
565571
/// <param name="ignoredAreas">a map with one-based page numbers as keys and lists of ignored rectangles as values.
566572
/// </param>
567573
/// <returns>
@@ -604,8 +610,10 @@ public virtual String CompareByContent(String outPdf, String cmpPdf, String outP
604610
/// <param name="cmpPdf">the absolute path to the cmp-file, which is to be compared to output file.</param>
605611
/// <param name="outPath">the absolute path to the folder, which will be used to store image files for visual comparison.
606612
/// </param>
607-
/// <param name="differenceImagePrefix">file name prefix for image files with marked visual differences if there is any.
608-
/// </param>
613+
/// <param name="differenceImagePrefix">
614+
/// file name prefix for image files with marked visual differences if there is any;
615+
/// if it's set to null the prefix defaults to diff_%outPdfFileName%_ format.
616+
/// </param>
609617
/// <param name="ignoredAreas">a map with one-based page numbers as keys and lists of ignored rectangles as values.
610618
/// </param>
611619
/// <param name="outPass">password for the encrypted document specified by the outPdf absolute path.</param>
@@ -2430,12 +2438,6 @@ public override bool Equals(Object obj) {
24302438
return obj.GetType() == GetType() && key.Equals(((CompareTool.ObjectPath.DictPathItem)obj).key);
24312439
}
24322440

2433-
protected internal override XmlElement ToXmlNode(XmlDocument document) {
2434-
XmlElement element = document.CreateElement("dictKey");
2435-
element.AppendChild(document.CreateTextNode(key.ToString()));
2436-
return element;
2437-
}
2438-
24392441
/// <summary>
24402442
/// The key which defines to which entry of the
24412443
/// <see cref="iText.Kernel.Pdf.PdfDictionary"/>
@@ -2453,6 +2455,12 @@ protected internal override XmlElement ToXmlNode(XmlDocument document) {
24532455
public virtual PdfName GetKey() {
24542456
return key;
24552457
}
2458+
2459+
protected internal override XmlElement ToXmlNode(XmlDocument document) {
2460+
XmlElement element = document.CreateElement("dictKey");
2461+
element.AppendChild(document.CreateTextNode(key.ToString()));
2462+
return element;
2463+
}
24562464
}
24572465

24582466
/// <summary>
@@ -2492,12 +2500,6 @@ public override bool Equals(Object obj) {
24922500
return obj.GetType() == GetType() && index == ((CompareTool.ObjectPath.ArrayPathItem)obj).index;
24932501
}
24942502

2495-
protected internal override XmlElement ToXmlNode(XmlDocument document) {
2496-
XmlElement element = document.CreateElement("arrayIndex");
2497-
element.AppendChild(document.CreateTextNode(index.ToString()));
2498-
return element;
2499-
}
2500-
25012503
/// <summary>
25022504
/// The index which defines element of the
25032505
/// <see cref="iText.Kernel.Pdf.PdfArray"/>
@@ -2510,6 +2512,12 @@ protected internal override XmlElement ToXmlNode(XmlDocument document) {
25102512
public virtual int GetIndex() {
25112513
return index;
25122514
}
2515+
2516+
protected internal override XmlElement ToXmlNode(XmlDocument document) {
2517+
XmlElement element = document.CreateElement("arrayIndex");
2518+
element.AppendChild(document.CreateTextNode(index.ToString()));
2519+
return element;
2520+
}
25132521
}
25142522

25152523
/// <summary>

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d1fb502b6ce201adef926ae458591c2a98191f09
1+
bff5c021deff1084c9900878ac6c85f983d82b76

0 commit comments

Comments
 (0)