Removed the strong name key as per Cathal's suggestion.master
| /// }// Release this document from memory. | /// }// Release this document from memory. | ||||
| /// </code> | /// </code> | ||||
| /// </example> | /// </example> | ||||
| public Table InsertTable(int coloumnCount, int rowCount) | |||||
| public new Table InsertTable(int coloumnCount, int rowCount) | |||||
| { | { | ||||
| if (rowCount < 1 || coloumnCount < 1) | if (rowCount < 1 || coloumnCount < 1) | ||||
| throw new ArgumentOutOfRangeException("Row and Coloumn count must be greater than zero."); | throw new ArgumentOutOfRangeException("Row and Coloumn count must be greater than zero."); | ||||
| /// }// Release this document from memory. | /// }// Release this document from memory. | ||||
| /// </code> | /// </code> | ||||
| /// </example> | /// </example> | ||||
| public Table InsertTable(int index, Table t) | |||||
| public new Table InsertTable(int index, Table t) | |||||
| { | { | ||||
| Table t2 = base.InsertTable(index, t); | Table t2 = base.InsertTable(index, t); | ||||
| t2.mainPart = mainPart; | t2.mainPart = mainPart; | ||||
| /// }// Release this document from memory. | /// }// Release this document from memory. | ||||
| /// </code> | /// </code> | ||||
| /// </example> | /// </example> | ||||
| public Table InsertTable(Table t) | |||||
| public new Table InsertTable(Table t) | |||||
| { | { | ||||
| t.mainPart = mainPart; | t.mainPart = mainPart; | ||||
| return base.InsertTable(t); | return base.InsertTable(t); | ||||
| /// }// Release this document from memory. | /// }// Release this document from memory. | ||||
| /// </code> | /// </code> | ||||
| /// </example> | /// </example> | ||||
| public Table InsertTable(int index, int coloumnCount, int rowCount) | |||||
| public new Table InsertTable(int index, int coloumnCount, int rowCount) | |||||
| { | { | ||||
| if (rowCount < 1 || coloumnCount < 1) | if (rowCount < 1 || coloumnCount < 1) | ||||
| throw new ArgumentOutOfRangeException("Row and Coloumn count must be greater than zero."); | |||||
| throw new ArgumentOutOfRangeException("Row and Column count must be greater than zero."); | |||||
| Table t = InsertTable(index, coloumnCount, rowCount); | Table t = InsertTable(index, coloumnCount, rowCount); | ||||
| t.mainPart = mainPart; | t.mainPart = mainPart; |
| <SccProvider>SAK</SccProvider> | <SccProvider>SAK</SccProvider> | ||||
| <StartupObject> | <StartupObject> | ||||
| </StartupObject> | </StartupObject> | ||||
| <SignAssembly>true</SignAssembly> | |||||
| <AssemblyOriginatorKeyFile>StrongNameKey.pfx</AssemblyOriginatorKeyFile> | |||||
| <FileUpgradeFlags> | <FileUpgradeFlags> | ||||
| </FileUpgradeFlags> | </FileUpgradeFlags> | ||||
| <OldToolsVersion>3.5</OldToolsVersion> | <OldToolsVersion>3.5</OldToolsVersion> | ||||
| <None Include="Help\Changes in this version 1.0.0.10.docx" /> | <None Include="Help\Changes in this version 1.0.0.10.docx" /> | ||||
| <None Include="Help\DocX v1.0.0.10 - Documentation.chm" /> | <None Include="Help\DocX v1.0.0.10 - Documentation.chm" /> | ||||
| <None Include="Help\Read Me.docx" /> | <None Include="Help\Read Me.docx" /> | ||||
| <None Include="StrongNameKey.pfx" /> | |||||
| </ItemGroup> | </ItemGroup> | ||||
| <ItemGroup> | <ItemGroup> | ||||
| <Content Include="License\License.html" /> | <Content Include="License\License.html" /> |
| /// }// Release this new document form memory. | /// }// Release this new document form memory. | ||||
| /// </code> | /// </code> | ||||
| /// </example> | /// </example> | ||||
| public Paragraph InsertParagraphBeforeSelf(string text) | |||||
| public override Paragraph InsertParagraphBeforeSelf(string text) | |||||
| { | { | ||||
| Paragraph p = base.InsertParagraphBeforeSelf(text); | Paragraph p = base.InsertParagraphBeforeSelf(text); | ||||
| p.PackagePart = mainPart; | p.PackagePart = mainPart; |
| private string name; | private string name; | ||||
| private string descr; | private string descr; | ||||
| private int cx, cy; | private int cx, cy; | ||||
| private string fileName; | |||||
| //private string fileName; | |||||
| private uint rotation; | private uint rotation; | ||||
| private bool hFlip, vFlip; | private bool hFlip, vFlip; | ||||
| private object pictureShape; | private object pictureShape; |
| [assembly: AssemblyCulture("")] | [assembly: AssemblyCulture("")] | ||||
| // Allow the UnitTests to get at internal stuff. | // Allow the UnitTests to get at internal stuff. | ||||
| [assembly: InternalsVisibleTo("UnitTests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008f789f4c5e510820397a319f4470c971513778e65ad102a225ed5b204aef1c6750ba5086268afe54fc515e005447be038d89fdfa5f55935f83e0916a229956b36f0eabf7ea9b2ee2e216b9e63e40a715833a2e5c9c6944de97231dd792ebdc3132cef5c6e0d7160383d7a44ae39933cfaee0aa6ae9fe1175630f443bfce259b2")] | |||||
| [assembly: InternalsVisibleTo("UnitTests")] | |||||
| // Setting ComVisible to false makes the types in this assembly not visible | // Setting ComVisible to false makes the types in this assembly not visible | ||||
| // to COM components. If you need to access a type in this assembly from | // to COM components. If you need to access a type in this assembly from |
| design = (TableDesign)Enum.Parse(typeof(TableDesign), val.Value.Replace("-", string.Empty)); | design = (TableDesign)Enum.Parse(typeof(TableDesign), val.Value.Replace("-", string.Empty)); | ||||
| } | } | ||||
| catch (Exception e) | |||||
| catch (Exception) | |||||
| { | { | ||||
| design = TableDesign.Custom; | design = TableDesign.Custom; | ||||
| } | } |
| p1.RemoveHyperlink(-1); | p1.RemoveHyperlink(-1); | ||||
| Assert.Fail(); | Assert.Fail(); | ||||
| } | } | ||||
| catch (ArgumentException e) { } | |||||
| catch (Exception e) { Assert.Fail(); } | |||||
| catch (ArgumentException) { } | |||||
| catch (Exception) { Assert.Fail(); } | |||||
| // Try and remove a Hyperlink at an index greater than the last. | // Try and remove a Hyperlink at an index greater than the last. | ||||
| // This should throw an exception. | // This should throw an exception. | ||||
| p1.RemoveHyperlink(3); | p1.RemoveHyperlink(3); | ||||
| Assert.Fail(); | Assert.Fail(); | ||||
| } | } | ||||
| catch (ArgumentException e) {} | |||||
| catch (Exception e) { Assert.Fail(); } | |||||
| catch (ArgumentException) {} | |||||
| catch (Exception) { Assert.Fail(); } | |||||
| p1.RemoveHyperlink(0); Assert.IsTrue(p1.Text == "AlinkClink"); | p1.RemoveHyperlink(0); Assert.IsTrue(p1.Text == "AlinkClink"); | ||||
| p1.RemoveHyperlink(1); Assert.IsTrue(p1.Text == "AlinkC"); | p1.RemoveHyperlink(1); Assert.IsTrue(p1.Text == "AlinkC"); | ||||
| p1.RemoveText(p1.Text.Length, 1); | p1.RemoveText(p1.Text.Length, 1); | ||||
| Assert.Fail(); | Assert.Fail(); | ||||
| } | } | ||||
| catch (ArgumentOutOfRangeException e) { } | |||||
| catch (Exception e) { Assert.Fail(); } | |||||
| catch (ArgumentOutOfRangeException) { } | |||||
| catch (Exception) { Assert.Fail(); } | |||||
| // Try and remove text at a negative index. | // Try and remove text at a negative index. | ||||
| // This should throw an exception. | // This should throw an exception. | ||||
| p1.RemoveText(-1, 1); | p1.RemoveText(-1, 1); | ||||
| Assert.Fail(); | Assert.Fail(); | ||||
| } | } | ||||
| catch (ArgumentOutOfRangeException e) { } | |||||
| catch (Exception e) { Assert.Fail(); } | |||||
| catch (ArgumentOutOfRangeException) { } | |||||
| catch (Exception) { Assert.Fail(); } | |||||
| // Difficult | // Difficult | ||||
| //<p> | //<p> | ||||
| p1.InsertText(p1.Text.Length + 1, "-"); | p1.InsertText(p1.Text.Length + 1, "-"); | ||||
| Assert.Fail(); | Assert.Fail(); | ||||
| } | } | ||||
| catch (ArgumentOutOfRangeException e) { } | |||||
| catch (Exception e) { Assert.Fail(); } | |||||
| catch (ArgumentOutOfRangeException) { } | |||||
| catch (Exception) { Assert.Fail(); } | |||||
| // Try and insert text at a negative index. | // Try and insert text at a negative index. | ||||
| // This should throw an exception. | // This should throw an exception. | ||||
| p1.InsertText(-1, "-"); | p1.InsertText(-1, "-"); | ||||
| Assert.Fail(); | Assert.Fail(); | ||||
| } | } | ||||
| catch (ArgumentOutOfRangeException e) { } | |||||
| catch (Exception e) { Assert.Fail(); } | |||||
| catch (ArgumentOutOfRangeException) { } | |||||
| catch (Exception) { Assert.Fail(); } | |||||
| // Difficult | // Difficult | ||||
| //<p> | //<p> |
| <ErrorReport>prompt</ErrorReport> | <ErrorReport>prompt</ErrorReport> | ||||
| <WarningLevel>4</WarningLevel> | <WarningLevel>4</WarningLevel> | ||||
| </PropertyGroup> | </PropertyGroup> | ||||
| <PropertyGroup> | |||||
| <SignAssembly>true</SignAssembly> | |||||
| </PropertyGroup> | |||||
| <PropertyGroup> | |||||
| <AssemblyOriginatorKeyFile>StrongNameKey.pfx</AssemblyOriginatorKeyFile> | |||||
| </PropertyGroup> | |||||
| <ItemGroup> | <ItemGroup> | ||||
| <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | ||||
| <Reference Include="System" /> | <Reference Include="System" /> | ||||
| <None Include="documents\Paragraphs.docx" /> | <None Include="documents\Paragraphs.docx" /> | ||||
| <None Include="documents\Tables.docx" /> | <None Include="documents\Tables.docx" /> | ||||
| <None Include="documents\Template.dotx" /> | <None Include="documents\Template.dotx" /> | ||||
| <None Include="StrongNameKey.pfx" /> | |||||
| </ItemGroup> | </ItemGroup> | ||||
| <ItemGroup> | <ItemGroup> | ||||
| <ProjectReference Include="..\DocX\DocX.csproj"> | <ProjectReference Include="..\DocX\DocX.csproj"> |