Skip to content

Commit

Permalink
V1.7.0 Released
Browse files Browse the repository at this point in the history
  • Loading branch information
XceedBoucherS committed Jun 29, 2020
1 parent aa2e5b9 commit 2870393
Show file tree
Hide file tree
Showing 128 changed files with 2,306 additions and 829 deletions.
9 changes: 5 additions & 4 deletions Xceed.Document.NET/AssemblyVersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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 +21,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.6";
public const string BaseVersion = "1.7";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
Expand Down
7 changes: 4 additions & 3 deletions Xceed.Document.NET/AssemblyVersionInfoCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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
23 changes: 19 additions & 4 deletions Xceed.Document.NET/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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 @@ -26,7 +27,7 @@ This program is provided to you under the terms of the Microsoft Public

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


Expand All @@ -44,13 +45,27 @@ This program is provided to you under the terms of the Microsoft Public
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
"f92cbfb5")]

[assembly: InternalsVisibleTo( "Xceed.Words.NETStandard" + ",PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
"f92cbfb5")]

[assembly: InternalsVisibleTo( "Xceed.PdfCreator.NET" + ",PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
"f92cbfb5")]

[assembly: InternalsVisibleTo( "Xceed.PdfCreator.NETStandard" + ",PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
"f92cbfb5")]

[assembly: InternalsVisibleTo( "UnitTests" + ",PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
Expand Down
7 changes: 4 additions & 3 deletions Xceed.Document.NET/Src/Bookmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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
7 changes: 4 additions & 3 deletions Xceed.Document.NET/Src/BookmarkCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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: 7 additions & 6 deletions Xceed.Document.NET/Src/Border.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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 @@ -27,7 +28,7 @@ public class Border

public BorderStyle Tcbs { get; set; }
public BorderSize Size { get; set; }
public int Space { get; set; }
public float Space { get; set; }
public Color Color { get; set; }

#endregion
Expand All @@ -38,11 +39,11 @@ public Border()
{
this.Tcbs = BorderStyle.Tcbs_single;
this.Size = BorderSize.one;
this.Space = 0;
this.Space = 0f;
this.Color = Color.Black;
}

public Border( BorderStyle tcbs, BorderSize size, int space, Color color )
public Border( BorderStyle tcbs, BorderSize size, float space, Color color )
{
this.Tcbs = tcbs;
this.Size = size;
Expand Down
7 changes: 4 additions & 3 deletions Xceed.Document.NET/Src/Borders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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
7 changes: 4 additions & 3 deletions Xceed.Document.NET/Src/Charts/Axis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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
15 changes: 12 additions & 3 deletions Xceed.Document.NET/Src/Charts/BarChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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 @@ -59,6 +60,13 @@ public BarGrouping BarGrouping
{
XElementHelpers.SetValueFromEnum<BarGrouping>(
ChartXml.Element( XName.Get( "grouping", Document.c.NamespaceName ) ), value );

var overlapVal = ( (value == BarGrouping.Stacked) || ( value == BarGrouping.PercentStacked ) ) ? "100" : "0";
var overlap = ChartXml.Element( XName.Get( "overlap", Document.c.NamespaceName ) );
if( overlap != null )
{
overlap.Attribute( XName.Get( "val" ) ).Value = overlapVal;
}
}
}

Expand Down Expand Up @@ -100,6 +108,7 @@ protected override XElement CreateChartXml()
<c:barDir val=""col""/>
<c:grouping val=""clustered""/>
<c:gapWidth val=""150""/>
<c:overlap val=""0""/>
</c:barChart>" );
}

Expand Down
48 changes: 30 additions & 18 deletions Xceed.Document.NET/Src/Charts/Chart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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 @@ -253,11 +254,11 @@ public Chart()
/// <summary>
/// Add a new series to this chart
/// </summary>
public void AddSeries( Series series )
public virtual void AddSeries( Series series )
{
var seriesCount = ChartXml.Elements( XName.Get( "ser", Document.c.NamespaceName ) ).Count();
if( seriesCount >= MaxSeriesCount )
throw new InvalidOperationException( "Maximum series for this chart is" + MaxSeriesCount.ToString() + "and have exceeded!" );
var seriesCount = this.ChartXml.Elements( XName.Get( "ser", Document.c.NamespaceName ) ).Count();
if( seriesCount >= this.MaxSeriesCount )
throw new InvalidOperationException( "Maximum series for this chart is" + this.MaxSeriesCount.ToString() + "and have exceeded!" );

//To work in Words, all series need an Index and Order.
var value = seriesCount + 1;
Expand Down Expand Up @@ -339,17 +340,22 @@ public Color Color
{
get
{
var colorElement = Xml.Element( XName.Get( "spPr", Document.c.NamespaceName ) );
if( colorElement == null )
var spPr = this.Xml.Element( XName.Get( "spPr", Document.c.NamespaceName ) );
if( spPr == null )
return Color.Transparent;
else

var srgbClr = spPr.Descendants( XName.Get( "srgbClr", Document.a.NamespaceName ) ).FirstOrDefault();
if( srgbClr != null )
{
var val = colorElement.Element( XName.Get( "solidFill", Document.a.NamespaceName ) )
.Element( XName.Get( "srgbClr", Document.a.NamespaceName ) )
.Attribute( XName.Get( "val" ) )
.Value;
return Color.FromArgb( Int32.Parse( val, NumberStyles.HexNumber ) );
var val = srgbClr.Attribute( XName.Get( "val" ) );
if( val != null )
{
var rgb = Color.FromArgb( Int32.Parse( val.Value, NumberStyles.HexNumber ) );
return Color.FromArgb( 255, rgb );
}
}

return Color.Transparent;
}
set
{
Expand All @@ -358,9 +364,15 @@ public Color Color
{
colorElement.Remove();
}
colorElement = new XElement( XName.Get( "spPr", Document.c.NamespaceName ),
new XElement( XName.Get( "solidFill", Document.a.NamespaceName ),
new XElement( XName.Get( "srgbClr", Document.a.NamespaceName ), new XAttribute( XName.Get( "val" ), value.ToHex() ) ) ) );

var colorData = new XElement( XName.Get( "solidFill", Document.a.NamespaceName ),
new XElement( XName.Get( "srgbClr", Document.a.NamespaceName ), new XAttribute( XName.Get( "val" ), value.ToHex() ) ) );

// When the chart containing this series is a lineChart, the line will be colored, else the shape will be colored.
colorElement = ( ( this.Xml.Parent != null ) && ( this.Xml.Parent.Name != null ) && (this.Xml.Parent.Name.LocalName == "lineChart" ) )
? new XElement( XName.Get( "spPr", Document.c.NamespaceName ),
new XElement( XName.Get( "ln", Document.a.NamespaceName ), colorData ) )
: new XElement( XName.Get( "spPr", Document.c.NamespaceName ), colorData );
this.Xml.Element( XName.Get( "tx", Document.c.NamespaceName ) ).AddAfterSelf( colorElement );
}
}
Expand Down
25 changes: 21 additions & 4 deletions Xceed.Document.NET/Src/Charts/LineChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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 @@ -15,6 +16,7 @@ This program is provided to you under the terms of the Microsoft Public

using System.IO.Packaging;
using System.Xml.Linq;
using System.Linq;

namespace Xceed.Document.NET
{
Expand Down Expand Up @@ -52,10 +54,25 @@ public LineChart()
}


#endregion
#endregion

#region Overrides

public override void AddSeries( Series series )
{
// When the series has a Color set => LineChart series will color its line, not its content.
var spPr = series.Xml.Element( XName.Get( "spPr", Document.c.NamespaceName ) );
if( spPr != null )
{
var spPrContent = spPr.Elements().First();
var newSpPr = new XElement( XName.Get( "spPr", Document.c.NamespaceName ), new XElement( XName.Get( "ln", Document.a.NamespaceName ), spPrContent ) );
spPr.AddAfterSelf( newSpPr );
spPr.Remove();
}

base.AddSeries( series );
}

protected override XElement CreateChartXml()
{
return XElement.Parse(
Expand Down
7 changes: 4 additions & 3 deletions Xceed.Document.NET/Src/Charts/PieChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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
7 changes: 4 additions & 3 deletions Xceed.Document.NET/Src/Charts/XElementHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
DocX – DocX is the community edition of Xceed Words for .NET
Copyright (C) 2009-2019 Xceed Software Inc.
Copyright (C) 2009-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) 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 2870393

Please sign in to comment.