소스 검색

#5 : Cleaned up warnings from invalid XML comments

master
Chris Ponty 10 년 전
부모
커밋
e842c87302
8개의 변경된 파일117개의 추가작업 그리고 126개의 파일을 삭제
  1. 7
    7
      DocX/Container.cs
  2. 9
    16
      DocX/DocX.cs
  3. 1
    0
      DocX/DocX.csproj
  4. 0
    2
      DocX/HelperFunctions.cs
  5. 3
    1
      DocX/Hyperlink.cs
  6. 90
    97
      DocX/Paragraph.cs
  7. 2
    0
      DocX/Picture.cs
  8. 5
    3
      DocX/Table.cs

+ 7
- 7
DocX/Container.cs 파일 보기

@@ -20,7 +20,7 @@ namespace Novacode
/// using (DocX document = DocX.Load(@"Test.docx"))
/// {
/// // All Paragraphs in this document.
/// List<Paragraph> documentParagraphs = document.Paragraphs;
/// <![CDATA[ List<Paragraph> ]]> documentParagraphs = document.Paragraphs;
///
/// // Make sure this document contains at least one Table.
/// if (document.Tables.Count() > 0)
@@ -29,7 +29,7 @@ namespace Novacode
/// Table t = document.Tables[0];
///
/// // All Paragraphs in this Table.
/// List<Paragraph> tableParagraphs = t.Paragraphs;
/// <![CDATA[ List<Paragraph> ]]> tableParagraphs = t.Paragraphs;
///
/// // Make sure this Table contains at least one Row.
/// if (t.Rows.Count() > 0)
@@ -38,7 +38,7 @@ namespace Novacode
/// Row r = t.Rows[0];
///
/// // All Paragraphs in this Row.
/// List<Paragraph> rowParagraphs = r.Paragraphs;
/// <![CDATA[ List<Paragraph> ]]> rowParagraphs = r.Paragraphs;
///
/// // Make sure this Row contains at least one Cell.
/// if (r.Cells.Count() > 0)
@@ -47,7 +47,7 @@ namespace Novacode
/// Cell c = r.Cells[0];
///
/// // All Paragraphs in this Cell.
/// List<Paragraph> cellParagraphs = c.Paragraphs;
/// <![CDATA[ List<Paragraph> ]]> cellParagraphs = c.Paragraphs;
/// }
/// }
/// }
@@ -101,7 +101,7 @@ namespace Novacode
return paragraphs.AsReadOnly();
}
}
// <summary>
/// <summary>
/// Removes paragraph at specified position
/// </summary>
/// <param name="index">Index of paragraph to remove</param>
@@ -126,7 +126,7 @@ namespace Novacode
/// <summary>
/// Removes paragraph
/// </summary>
/// <param name="paragraph">Paragraph to remove</param>
/// <param name="p">Paragraph to remove</param>
/// <returns>True if removed</returns>
public bool RemoveParagraph(Paragraph p)
{
@@ -395,7 +395,7 @@ namespace Novacode
/// Find all unique instances of the given Regex Pattern,
/// returning the list of the unique strings found
/// </summary>
/// <param name="str"></param>
/// <param name="pattern"></param>
/// <param name="options"></param>
/// <returns></returns>
public virtual List<string> FindUniqueByPattern(string pattern, RegexOptions options)

+ 9
- 16
DocX/DocX.cs 파일 보기

@@ -247,7 +247,7 @@ namespace Novacode
/// }
/// </code>
/// </example>
/// <seealso cref="AddProtection"/>
/// <seealso cref="AddProtection(EditRestrictions)"/>
/// <seealso cref="RemoveProtection"/>
/// <seealso cref="GetProtectionType"/>
public bool isProtected
@@ -282,7 +282,7 @@ namespace Novacode
/// }
/// </code>
/// </example>
/// <seealso cref="AddProtection"/>
/// <seealso cref="AddProtection(EditRestrictions)"/>
/// <seealso cref="RemoveProtection"/>
/// <seealso cref="isProtected"/>
public EditRestrictions GetProtectionType()
@@ -494,7 +494,7 @@ namespace Novacode
/// }
/// </code>
/// </example>
/// <seealso cref="AddProtection"/>
/// <seealso cref="AddProtection(EditRestrictions)"/>
/// <seealso cref="GetProtectionType"/>
/// <seealso cref="isProtected"/>
public void RemoveProtection()
@@ -594,6 +594,8 @@ namespace Novacode
/// <summary>
/// Should the Document use different Headers and Footers for odd and even pages?
/// </summary>
/// <example>
/// <code>
/// // Create a document.
/// using (DocX document = DocX.Create(@"Test.docx"))
/// {
@@ -622,6 +624,7 @@ namespace Novacode
/// // Save all changes to this document.
/// document.Save();
/// }// Release this document from memory.
/// </code>
/// </example>
public bool DifferentOddAndEvenPages
{
@@ -2243,6 +2246,7 @@ namespace Novacode
/// Creates a document using a Stream.
/// </summary>
/// <param name="stream">The Stream to create the document from.</param>
/// <param name="documentType"></param>
/// <returns>Returns a DocX object which represents the document.</returns>
/// <example>
/// Creating a document from a FileStream.
@@ -2288,7 +2292,6 @@ namespace Novacode
/// }
/// </code>
/// </example>
/// <seealso cref="DocX.Create(string)"/>
/// <seealso cref="DocX.Load(System.IO.Stream)"/>
/// <seealso cref="DocX.Load(string)"/>
/// <seealso cref="DocX.Save()"/>
@@ -2310,6 +2313,7 @@ namespace Novacode
/// Creates a document using a fully qualified or relative filename.
/// </summary>
/// <param name="filename">The fully qualified or relative filename.</param>
/// <param name="documentType"></param>
/// <returns>Returns a DocX object which represents the document.</returns>
/// <example>
/// <code>
@@ -2332,7 +2336,6 @@ namespace Novacode
/// document.Save();
/// }// Release this document from memory
/// </code>
/// <seealso cref="DocX.Create(System.IO.Stream)"/>
/// <seealso cref="DocX.Load(System.IO.Stream)"/>
/// <seealso cref="DocX.Load(string)"/>
/// <seealso cref="DocX.Save()"/>
@@ -2604,8 +2607,6 @@ namespace Novacode
/// </code>
/// </example>
/// <seealso cref="DocX.Load(string)"/>
/// <seealso cref="DocX.Create(System.IO.Stream)"/>
/// <seealso cref="DocX.Create(string)"/>
/// <seealso cref="DocX.Save()"/>
public static DocX Load(Stream stream)
{
@@ -2655,8 +2656,6 @@ namespace Novacode
/// }// Release this document from memory.
/// </code>
/// <seealso cref="DocX.Load(System.IO.Stream)"/>
/// <seealso cref="DocX.Create(System.IO.Stream)"/>
/// <seealso cref="DocX.Create(string)"/>
/// <seealso cref="DocX.Save()"/>
/// </example>
public static DocX Load(string filename)
@@ -3360,8 +3359,6 @@ namespace Novacode
/// </code>
/// </example>
/// <seealso cref="DocX.SaveAs(string)"/>
/// <seealso cref="DocX.Create(System.IO.Stream)"/>
/// <seealso cref="DocX.Create(string)"/>
/// <seealso cref="DocX.Load(System.IO.Stream)"/>
/// <seealso cref="DocX.Load(string)"/>
/// <!--
@@ -3660,8 +3657,6 @@ namespace Novacode
/// </code>
/// </example>
/// <seealso cref="DocX.Save()"/>
/// <seealso cref="DocX.Create(System.IO.Stream)"/>
/// <seealso cref="DocX.Create(string)"/>
/// <seealso cref="DocX.Load(System.IO.Stream)"/>
/// <seealso cref="DocX.Load(string)"/>
public void SaveAs(string filename)
@@ -3721,8 +3716,6 @@ namespace Novacode
/// </code>
/// </example>
/// <seealso cref="DocX.Save()"/>
/// <seealso cref="DocX.Create(System.IO.Stream)"/>
/// <seealso cref="DocX.Create(string)"/>
/// <seealso cref="DocX.Load(System.IO.Stream)"/>
/// <seealso cref="DocX.Load(string)"/>
public void SaveAs(Stream stream)
@@ -4284,7 +4277,7 @@ namespace Novacode
}
/// <summary>
/// Inserts at TOC into the current document before the provided <see cref="reference"/>
/// Inserts at TOC into the current document before the provided <paramref name="reference"/>
/// </summary>
/// <param name="reference">The paragraph to use as reference</param>
/// <param name="title">The title of the TOC</param>

+ 1
- 0
DocX/DocX.csproj 파일 보기

@@ -50,6 +50,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\DocX.XML</DocumentationFile>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>

+ 0
- 2
DocX/HelperFunctions.cs 파일 보기

@@ -333,7 +333,6 @@ namespace Novacode
/// when the default bullet, numbered and multilevel lists are added to a blank document
/// </summary>
/// <param name="package"></param>
/// <param name="mainDocumentPart"></param>
/// <returns></returns>
internal static XDocument AddDefaultNumberingXml(Package package)
{
@@ -360,7 +359,6 @@ namespace Novacode
/// If this document does not contain a /word/styles.xml add the default one generated by Microsoft Word.
/// </summary>
/// <param name="package"></param>
/// <param name="mainDocumentPart"></param>
/// <returns></returns>
internal static XDocument AddDefaultStylesXml(Package package)
{

+ 3
- 1
DocX/Hyperlink.cs 파일 보기

@@ -65,7 +65,7 @@ namespace Novacode
/// using (DocX document = DocX.Load(@"Test.docx"))
/// {
/// // Get all of the hyperlinks in this document
/// List<Hyperlink> hyperlinks = document.Hyperlinks;
/// List&lt;Hyperlink&gt; hyperlinks = document.Hyperlinks;
///
/// // Change the first hyperlinks text and Uri
/// Hyperlink h0 = hyperlinks[0];
@@ -140,6 +140,7 @@ namespace Novacode
/// <example>
/// Change the Uri of a Hyperlink.
/// <code>
/// <![CDATA[
/// // Create a document.
/// using (DocX document = DocX.Load(@"Test.docx"))
/// {
@@ -154,6 +155,7 @@ namespace Novacode
/// // Save this document.
/// document.Save();
/// }
/// ]]>
/// </code>
/// </example>
public Uri Uri

+ 90
- 97
DocX/Paragraph.cs 파일 보기

@@ -97,6 +97,7 @@ namespace Novacode
/// <example>
/// Returns a list of all Pictures in a Paragraph.
/// <code>
/// <![CDATA[
/// // Create a document.
/// using (DocX document = DocX.Load(@"Test.docx"))
/// {
@@ -109,6 +110,7 @@ namespace Novacode
/// // Save this document.
/// document.Save();
/// }
/// ]]>
/// </code>
/// </example>
public List<Picture> Pictures
@@ -165,7 +167,7 @@ namespace Novacode
/// Paragraph p = document.Paragraphs[0];
///
/// // Get all of the hyperlinks in this Paragraph.
/// List<Hyperlink> hyperlinks = paragraph.Hyperlinks;
/// <![CDATA[ List<Hyperlink> ]]> hyperlinks = paragraph.Hyperlinks;
///
/// // Change the first hyperlinks text and Uri
/// Hyperlink h0 = hyperlinks[0];
@@ -1508,46 +1510,46 @@ namespace Novacode
// return newPicture;
//}
/// <summary>
/// Insert a Picture at the end of this paragraph.
/// </summary>
/// <param name="description">A string to describe this Picture.</param>
/// <param name="imageID">The unique id that identifies the Image this Picture represents.</param>
/// <param name="name">The name of this image.</param>
/// <returns>A Picture.</returns>
/// <example>
/// <code>
/// // Create a document using a relative filename.
/// using (DocX document = DocX.Create(@"Test.docx"))
/// {
/// // Add a new Paragraph to this document.
/// Paragraph p = document.InsertParagraph("Here is Picture 1", false);
///
/// // Add an Image to this document.
/// Novacode.Image img = document.AddImage(@"Image.jpg");
///
/// // Insert pic at the end of Paragraph p.
/// Picture pic = p.InsertPicture(img.Id, "Photo 31415", "A pie I baked.");
///
/// // Rotate the Picture clockwise by 30 degrees.
/// pic.Rotation = 30;
///
/// // Resize the Picture.
/// pic.Width = 400;
/// pic.Height = 300;
///
/// // Set the shape of this Picture to be a cube.
/// pic.SetPictureShape(BasicShapes.cube);
///
/// // Flip the Picture Horizontally.
/// pic.FlipHorizontal = true;
///
/// // Save all changes made to this document.
/// document.Save();
/// }// Release this document from memory.
/// </code>
/// </example>
/// Removed to simplify the API.
// <summary>
// Insert a Picture at the end of this paragraph.
// </summary>
// <param name="description">A string to describe this Picture.</param>
// <param name="imageID">The unique id that identifies the Image this Picture represents.</param>
// <param name="name">The name of this image.</param>
// <returns>A Picture.</returns>
// <example>
// <code>
// // Create a document using a relative filename.
// using (DocX document = DocX.Create(@"Test.docx"))
// {
// // Add a new Paragraph to this document.
// Paragraph p = document.InsertParagraph("Here is Picture 1", false);
//
// // Add an Image to this document.
// Novacode.Image img = document.AddImage(@"Image.jpg");
//
// // Insert pic at the end of Paragraph p.
// Picture pic = p.InsertPicture(img.Id, "Photo 31415", "A pie I baked.");
//
// // Rotate the Picture clockwise by 30 degrees.
// pic.Rotation = 30;
//
// // Resize the Picture.
// pic.Width = 400;
// pic.Height = 300;
//
// // Set the shape of this Picture to be a cube.
// pic.SetPictureShape(BasicShapes.cube);
//
// // Flip the Picture Horizontally.
// pic.FlipHorizontal = true;
//
// // Save all changes made to this document.
// document.Save();
// }// Release this document from memory.
// </code>
// </example>
// Removed to simplify the API.
//public Picture InsertPicture(string imageID, string name, string description)
//{
// Picture p = CreatePicture(Document, imageID, name, description);
@@ -1591,47 +1593,47 @@ namespace Novacode
// return p;
//}
/// <summary>
/// Insert a Picture into this Paragraph at a specified index.
/// </summary>
/// <param name="description">A string to describe this Picture.</param>
/// <param name="imageID">The unique id that identifies the Image this Picture represents.</param>
/// <param name="name">The name of this image.</param>
/// <param name="index">The index to insert this Picture at.</param>
/// <returns>A Picture.</returns>
/// <example>
/// <code>
/// // Create a document using a relative filename.
/// using (DocX document = DocX.Create(@"Test.docx"))
/// {
/// // Add a new Paragraph to this document.
/// Paragraph p = document.InsertParagraph("Here is Picture 1", false);
///
/// // Add an Image to this document.
/// Novacode.Image img = document.AddImage(@"Image.jpg");
///
/// // Insert pic at the start of Paragraph p.
/// Picture pic = p.InsertPicture(0, img.Id, "Photo 31415", "A pie I baked.");
///
/// // Rotate the Picture clockwise by 30 degrees.
/// pic.Rotation = 30;
///
/// // Resize the Picture.
/// pic.Width = 400;
/// pic.Height = 300;
///
/// // Set the shape of this Picture to be a cube.
/// pic.SetPictureShape(BasicShapes.cube);
///
/// // Flip the Picture Horizontally.
/// pic.FlipHorizontal = true;
///
/// // Save all changes made to this document.
/// document.Save();
/// }// Release this document from memory.
/// </code>
/// </example>
/// Removed to simplify API.
// <summary>
// Insert a Picture into this Paragraph at a specified index.
// </summary>
// <param name="description">A string to describe this Picture.</param>
// <param name="imageID">The unique id that identifies the Image this Picture represents.</param>
// <param name="name">The name of this image.</param>
// <param name="index">The index to insert this Picture at.</param>
// <returns>A Picture.</returns>
// <example>
// <code>
// // Create a document using a relative filename.
// using (DocX document = DocX.Create(@"Test.docx"))
// {
// // Add a new Paragraph to this document.
// Paragraph p = document.InsertParagraph("Here is Picture 1", false);
//
// // Add an Image to this document.
// Novacode.Image img = document.AddImage(@"Image.jpg");
//
// // Insert pic at the start of Paragraph p.
// Picture pic = p.InsertPicture(0, img.Id, "Photo 31415", "A pie I baked.");
//
// // Rotate the Picture clockwise by 30 degrees.
// pic.Rotation = 30;
//
// // Resize the Picture.
// pic.Width = 400;
// pic.Height = 300;
//
// // Set the shape of this Picture to be a cube.
// pic.SetPictureShape(BasicShapes.cube);
//
// // Flip the Picture Horizontally.
// pic.FlipHorizontal = true;
//
// // Save all changes made to this document.
// document.Save();
// }// Release this document from memory.
// </code>
// </example>
// Removed to simplify API.
//public Picture InsertPicture(int index, string imageID, string name, string description)
//{
// Picture picture = CreatePicture(Document, imageID, name, description);
@@ -1661,6 +1663,7 @@ namespace Novacode
/// <summary>
/// Create a new Picture.
/// </summary>
/// <param name="document"></param>
/// <param name="id">A unique id that identifies an Image embedded in this document.</param>
/// <param name="name">The name of this Picture.</param>
/// <param name="descr">The description of this Picture.</param>
@@ -1921,8 +1924,6 @@ namespace Novacode
/// </example>
/// <seealso cref="Paragraph.RemoveText(int, bool)"/>
/// <seealso cref="Paragraph.RemoveText(int, int, bool)"/>
/// <seealso cref="Paragraph.ReplaceText(string, string, bool)"/>
/// <seealso cref="Paragraph.ReplaceText(string, string, bool, RegexOptions)"/>
/// <param name="value">The System.String to insert.</param>
/// <param name="trackChanges">Flag this insert as a change.</param>
/// <param name="formatting">The text formatting.</param>
@@ -1988,8 +1989,6 @@ namespace Novacode
/// </example>
/// <seealso cref="Paragraph.RemoveText(int, bool)"/>
/// <seealso cref="Paragraph.RemoveText(int, int, bool)"/>
/// <seealso cref="Paragraph.ReplaceText(string, string, bool)"/>
/// <seealso cref="Paragraph.ReplaceText(string, string, bool, RegexOptions)"/>
/// <param name="index">The index position of the insertion.</param>
/// <param name="value">The System.String to insert.</param>
/// <param name="trackChanges">Flag this insert as a change.</param>
@@ -3500,11 +3499,12 @@ namespace Novacode
/// Append a field of type document property, this field will display the custom property cp, at the end of this paragraph.
/// </summary>
/// <param name="cp">The custom property to display.</param>
/// <param name="trackChanges"></param>
/// <param name="f">The formatting to use for this text.</param>
/// <example>
/// Create, add and display a custom property in a document.
/// <code>
///// Load a document.
/// // Load a document.
///using (DocX document = DocX.Create("CustomProperty_Add.docx"))
///{
/// // Add a few Custom Properties to this document.
@@ -3541,6 +3541,7 @@ namespace Novacode
/// Insert a field of type document property, this field will display the custom property cp, at the end of this paragraph.
/// </summary>
/// <param name="cp">The custom property to display.</param>
/// <param name="trackChanges"></param>
/// <param name="f">The formatting to use for this text.</param>
/// <example>
/// Create, add and display a custom property in a document.
@@ -3618,10 +3619,6 @@ namespace Novacode
/// }// Release this document from memory.
/// </code>
/// </example>
/// <seealso cref="Paragraph.ReplaceText(string, string, bool)"/>
/// <seealso cref="Paragraph.ReplaceText(string, string, bool, RegexOptions)"/>
/// <seealso cref="Paragraph.InsertText(string, bool)"/>
/// <seealso cref="Paragraph.InsertText(int, string, bool)"/>
/// <seealso cref="Paragraph.InsertText(int, string, bool, Formatting)"/>
/// <seealso cref="Paragraph.InsertText(string, bool, Formatting)"/>
/// <param name="index">The position to begin deleting characters.</param>
@@ -3745,8 +3742,6 @@ namespace Novacode
/// }// Release this document from memory.
/// </code>
/// </example>
/// <seealso cref="Paragraph.ReplaceText(string, string, bool)"/>
/// <seealso cref="Paragraph.ReplaceText(string, string, bool, RegexOptions)"/>
/// <seealso cref="Paragraph.InsertText(int, string, bool, Formatting)"/>
/// <seealso cref="Paragraph.InsertText(string, bool, Formatting)"/>
/// <param name="index">The position to begin deleting characters.</param>
@@ -3797,8 +3792,6 @@ namespace Novacode
/// </example>
/// <seealso cref="Paragraph.RemoveText(int, int, bool)"/>
/// <seealso cref="Paragraph.RemoveText(int, bool)"/>
/// <seealso cref="Paragraph.InsertText(string, bool)"/>
/// <seealso cref="Paragraph.InsertText(int, string, bool)"/>
/// <seealso cref="Paragraph.InsertText(int, string, bool, Formatting)"/>
/// <seealso cref="Paragraph.InsertText(string, bool, Formatting)"/>
/// <param name="newValue">A System.String to replace all occurances of oldValue.</param>
@@ -3875,7 +3868,7 @@ namespace Novacode
/// foreach(Paragraph p in document.Paragraphs)
/// {
/// // Find all instances of 'go' in this paragraph.
/// List&lt;int&gt; gos = document.FindAll("go");
/// <![CDATA[ List<int> ]]> gos = document.FindAll("go");
///
/// /*
/// * Insert 'don't' in frount of every instance of 'go' in this document to produce 'don't go'.
@@ -3915,7 +3908,7 @@ namespace Novacode
/// foreach(Paragraph p in document.Paragraphs)
/// {
/// // Find all instances of 'go' in this paragraph (Ignore case).
/// List&lt;int&gt; gos = document.FindAll("go", RegexOptions.IgnoreCase);
/// <![CDATA[ List<int> ]]> gos = document.FindAll("go", RegexOptions.IgnoreCase);
///
/// /*
/// * Insert 'don't' in frount of every instance of 'go' in this document to produce 'don't go'.

+ 2
- 0
DocX/Picture.cs 파일 보기

@@ -37,7 +37,9 @@ namespace Novacode
/// <summary>
/// Wraps an XElement as an Image
/// </summary>
/// <param name="document"></param>
/// <param name="i">The XElement i to wrap</param>
/// <param name="img"></param>
internal Picture(DocX document, XElement i, Image img):base(document, i)
{
picture_rels = new Dictionary<PackagePart, PackageRelationship>();

+ 5
- 3
DocX/Table.cs 파일 보기

@@ -103,6 +103,7 @@ namespace Novacode
/// <example>
/// Returns a list of all Pictures in a Table.
/// <code>
/// <![CDATA[
/// // Create a document.
/// using (DocX document = DocX.Load(@"Test.docx"))
/// {
@@ -115,6 +116,7 @@ namespace Novacode
/// // Save this document.
/// document.Save();
/// }
/// ]]>
/// </code>
/// </example>
public List<Picture> Pictures
@@ -173,7 +175,7 @@ namespace Novacode
/// Table t = document.Tables[0];
///
/// // Get a list of all Hyperlinks in this Table.
/// List<Hyperlink> hyperlinks = t.Hyperlinks;
/// List&lt;Hyperlink&gt; hyperlinks = t.Hyperlinks;
///
/// // Save this document.
/// document.Save();
@@ -2603,7 +2605,7 @@ namespace Novacode
/// <example>
/// Creates a table with 3 cells and sets the vertical alignment of each to 1 of the 3 available options.
/// <code>
///// Create a new document.
/// // Create a new document.
///using(DocX document = DocX.Create("Test.docx"))
///{
/// // Insert a Table into this document.
@@ -3348,7 +3350,7 @@ namespace Novacode
/// </summary>
/// <example>
/// <code>
///// Create a new document.
/// // Create a new document.
///using (DocX document = DocX.Create("Test.docx"))
///{
/// // Insert a table into this document.

Loading…
취소
저장