Skip to content

Commit

Permalink
V1.6.0 Released
Browse files Browse the repository at this point in the history
  • Loading branch information
XceedBoucherS committed Jan 30, 2020
1 parent e484b0c commit a758737
Show file tree
Hide file tree
Showing 140 changed files with 2,079 additions and 16,452 deletions.
6 changes: 3 additions & 3 deletions Xceed.Document.NET/AssemblyVersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand All @@ -20,7 +20,7 @@ This program is provided to you under the terms of the Microsoft Public
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "1.5";
public const string BaseVersion = "1.6";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/AssemblyVersionInfoCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
13 changes: 8 additions & 5 deletions Xceed.Document.NET/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand All @@ -22,11 +22,11 @@ This program is provided to you under the terms of the Microsoft Public
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle( "Xceed Document for .NET" )]
[assembly: AssemblyDescription( "This assembly implements the classes for Xceed Document for .NET." )]
[assembly: AssemblyDescription( "This assembly implements the classes for Xceed Document for .NET Standard." )]

[assembly: AssemblyCompany( "Xceed Software Inc." )]
[assembly: AssemblyProduct( "Xceed Document for .NET" )]
[assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2009-2018" )]
[assembly: AssemblyProduct( "Xceed Document for .NET Standard" )]
[assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2009-2019" )]
[assembly: AssemblyCulture("")]


Expand Down Expand Up @@ -61,6 +61,9 @@ This program is provided to you under the terms of the Microsoft Public






#pragma warning disable 1699
[assembly: AssemblyDelaySign( false )]
[assembly: AssemblyKeyFile( @"..\..\sn.snk" )]
Expand Down
9 changes: 7 additions & 2 deletions Xceed.Document.NET/Src/Bookmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down Expand Up @@ -45,6 +45,11 @@ public void SetText( string text )
this.Paragraph.ReplaceAtBookmark( text, this.Name );
}

public void Remove()
{
this.Paragraph.RemoveBookmark( this.Name );
}

#endregion
}
}
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/BookmarkCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/Border.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/Borders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/Charts/Axis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/Charts/BarChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/Charts/Chart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/Charts/LineChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/Charts/PieChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/Charts/XElementHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
82 changes: 77 additions & 5 deletions Xceed.Document.NET/Src/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down Expand Up @@ -145,6 +145,12 @@ public virtual List<Picture> Pictures
}
}







public virtual List<List> Lists
{
get
Expand Down Expand Up @@ -434,6 +440,63 @@ public virtual void ReplaceText( string searchValue,
}
}

public virtual void ReplaceTextWithObject( string searchValue,
DocumentElement objectToAdd,
bool trackChanges = false,
RegexOptions options = RegexOptions.None,
Formatting matchFormatting = null,
MatchFormattingOptions fo = MatchFormattingOptions.SubsetMatch,
bool escapeRegEx = true,
bool removeEmptyParagraph = true )
{
if( string.IsNullOrEmpty( searchValue ) )
{
throw new ArgumentException( "searchValue cannot be null or empty.", "searchValue" );
}
if( objectToAdd == null )
{
throw new ArgumentException( "objectToAdd cannot be null.", "objectToAdd" );
}

// ReplaceText in Headers of the document.
foreach( var section in this.Document.Sections )
{
var headerList = new List<Header>() { section.Headers.First, section.Headers.Even, section.Headers.Odd };
foreach( var h in headerList )
{
if( h != null )
{
foreach( var p in h.Paragraphs )
{
p.ReplaceTextWithObject( searchValue, objectToAdd, trackChanges, options, matchFormatting, fo, escapeRegEx, removeEmptyParagraph );
}
}
}
}

// ReplaceText int main body of document.
foreach( Paragraph p in this.Paragraphs )
{
p.ReplaceTextWithObject( searchValue, objectToAdd, trackChanges, options, matchFormatting, fo, escapeRegEx, removeEmptyParagraph );
}

// ReplaceText in Footers of the document.
foreach( var section in this.Document.Sections )
{
var footerList = new List<Footer> { section.Footers.First, section.Footers.Even, section.Footers.Odd };
foreach( var f in footerList )
{
if( f != null )
{
foreach( var p in f.Paragraphs )
{
p.ReplaceTextWithObject( searchValue, objectToAdd, trackChanges, options, matchFormatting, fo, escapeRegEx, removeEmptyParagraph );
}
}
}
}
}

public virtual void InsertAtBookmark( string toInsert, string bookmarkName, Formatting formatting = null )
{
if( string.IsNullOrWhiteSpace( bookmarkName ) )
Expand Down Expand Up @@ -705,10 +768,10 @@ public bool RemoveParagraph( Paragraph paragraph )
return this.RemoveParagraphAt( index );
}

public virtual Paragraph InsertEquation( string equation )
public virtual Paragraph InsertEquation( string equation, Alignment align = Alignment.center )
{
Paragraph p = InsertParagraph();
p.AppendEquation( equation );
p.AppendEquation( equation, align );
return p;
}

Expand Down Expand Up @@ -906,6 +969,7 @@ internal List<Paragraph> GetParagraphs()
continue;
}
var paragraph = new Paragraph( this.Document, xElement, index );
paragraph.PackagePart = this.PackagePart;
paragraphs.Add( paragraph );
index += HelperFunctions.GetText( xElement ).Length;
}
Expand Down Expand Up @@ -976,6 +1040,10 @@ private ContainerType GetParentFromXmlName( string xmlName )
{
case "body":
return ContainerType.Body;
case "hdr":
return ContainerType.Header;
case "ftr":
return ContainerType.Footer;
case "p":
return ContainerType.Paragraph;
case "tbl":
Expand All @@ -984,6 +1052,8 @@ private ContainerType GetParentFromXmlName( string xmlName )
return ContainerType.Section;
case "tc":
return ContainerType.Cell;
case "txbxContent":
return ContainerType.Shape;
default:
return ContainerType.None;
}
Expand Down Expand Up @@ -1038,7 +1108,9 @@ private void InitParagraphs( List<Paragraph> paragraphs )
foreach( var p in paragraphs )
{
var nextElement = p.Xml.ElementsAfterSelf().FirstOrDefault();
while( ( nextElement != null ) && ( nextElement.Name.Equals( Document.w + "tbl" ) ) )
var containsSectionBreak = p.GetOrCreate_pPr().Element( XName.Get( "sectPr", Document.w.NamespaceName ) );
// Add FollowingTable to paragraph....only when paragraph is not the last one from a section.
while( ( nextElement != null ) && ( nextElement.Name.Equals( Document.w + "tbl" ) ) && ( containsSectionBreak == null ) )
{
if( p.FollowingTables == null )
{
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/CustomProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
4 changes: 2 additions & 2 deletions Xceed.Document.NET/Src/DocProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2017 Xceed Software Inc.
Copyright (C) 2009-2019 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
Expand Down
Loading

0 comments on commit a758737

Please sign in to comment.