Skip to content

Commit 2870393

Browse files
committed
V1.7.0 Released
1 parent aa2e5b9 commit 2870393

File tree

128 files changed

+2306
-829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+2306
-829
lines changed

Xceed.Document.NET/AssemblyVersionInfo.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
@@ -20,7 +21,7 @@ This program is provided to you under the terms of the Microsoft Public
2021
internal static class _XceedVersionInfo
2122
{
2223
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
23-
public const string BaseVersion = "1.6";
24+
public const string BaseVersion = "1.7";
2425
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
2526
public const string Version = BaseVersion +
2627
".0.0";

Xceed.Document.NET/AssemblyVersionInfoCommon.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/

Xceed.Document.NET/Properties/AssemblyInfo.cs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
@@ -26,7 +27,7 @@ This program is provided to you under the terms of the Microsoft Public
2627

2728
[assembly: AssemblyCompany( "Xceed Software Inc." )]
2829
[assembly: AssemblyProduct( "Xceed Document for .NET Standard" )]
29-
[assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2009-2019" )]
30+
[assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2009-2020" )]
3031
[assembly: AssemblyCulture("")]
3132

3233

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

48+
[assembly: InternalsVisibleTo( "Xceed.Words.NETStandard" + ",PublicKey=" +
49+
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
50+
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
51+
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
52+
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
53+
"f92cbfb5")]
54+
4755
[assembly: InternalsVisibleTo( "Xceed.PdfCreator.NET" + ",PublicKey=" +
4856
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
4957
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
5058
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
5159
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
5260
"f92cbfb5")]
5361

62+
[assembly: InternalsVisibleTo( "Xceed.PdfCreator.NETStandard" + ",PublicKey=" +
63+
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
64+
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
65+
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
66+
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
67+
"f92cbfb5")]
68+
5469
[assembly: InternalsVisibleTo( "UnitTests" + ",PublicKey=" +
5570
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
5671
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +

Xceed.Document.NET/Src/Bookmark.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/

Xceed.Document.NET/Src/BookmarkCollection.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/

Xceed.Document.NET/Src/Border.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
@@ -27,7 +28,7 @@ public class Border
2728

2829
public BorderStyle Tcbs { get; set; }
2930
public BorderSize Size { get; set; }
30-
public int Space { get; set; }
31+
public float Space { get; set; }
3132
public Color Color { get; set; }
3233

3334
#endregion
@@ -38,11 +39,11 @@ public Border()
3839
{
3940
this.Tcbs = BorderStyle.Tcbs_single;
4041
this.Size = BorderSize.one;
41-
this.Space = 0;
42+
this.Space = 0f;
4243
this.Color = Color.Black;
4344
}
4445

45-
public Border( BorderStyle tcbs, BorderSize size, int space, Color color )
46+
public Border( BorderStyle tcbs, BorderSize size, float space, Color color )
4647
{
4748
this.Tcbs = tcbs;
4849
this.Size = size;

Xceed.Document.NET/Src/Borders.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/

Xceed.Document.NET/Src/Charts/Axis.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/

Xceed.Document.NET/Src/Charts/BarChart.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
@@ -59,6 +60,13 @@ public BarGrouping BarGrouping
5960
{
6061
XElementHelpers.SetValueFromEnum<BarGrouping>(
6162
ChartXml.Element( XName.Get( "grouping", Document.c.NamespaceName ) ), value );
63+
64+
var overlapVal = ( (value == BarGrouping.Stacked) || ( value == BarGrouping.PercentStacked ) ) ? "100" : "0";
65+
var overlap = ChartXml.Element( XName.Get( "overlap", Document.c.NamespaceName ) );
66+
if( overlap != null )
67+
{
68+
overlap.Attribute( XName.Get( "val" ) ).Value = overlapVal;
69+
}
6270
}
6371
}
6472

@@ -100,6 +108,7 @@ protected override XElement CreateChartXml()
100108
<c:barDir val=""col""/>
101109
<c:grouping val=""clustered""/>
102110
<c:gapWidth val=""150""/>
111+
<c:overlap val=""0""/>
103112
</c:barChart>" );
104113
}
105114

Xceed.Document.NET/Src/Charts/Chart.cs

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
DocX – DocX is the community edition of Xceed Words for .NET
44
5-
Copyright (C) 2009-2019 Xceed Software Inc.
5+
Copyright (C) 2009-2020 Xceed Software Inc.
66
7-
This program is provided to you under the terms of the Microsoft Public
8-
License (Ms-PL) as published at https://github.com/xceedsoftware/DocX/blob/master/license.md
7+
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
8+
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
9+
https://github.com/xceedsoftware/DocX/blob/master/license.md
910
1011
For more features and fast professional support,
1112
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
@@ -253,11 +254,11 @@ public Chart()
253254
/// <summary>
254255
/// Add a new series to this chart
255256
/// </summary>
256-
public void AddSeries( Series series )
257+
public virtual void AddSeries( Series series )
257258
{
258-
var seriesCount = ChartXml.Elements( XName.Get( "ser", Document.c.NamespaceName ) ).Count();
259-
if( seriesCount >= MaxSeriesCount )
260-
throw new InvalidOperationException( "Maximum series for this chart is" + MaxSeriesCount.ToString() + "and have exceeded!" );
259+
var seriesCount = this.ChartXml.Elements( XName.Get( "ser", Document.c.NamespaceName ) ).Count();
260+
if( seriesCount >= this.MaxSeriesCount )
261+
throw new InvalidOperationException( "Maximum series for this chart is" + this.MaxSeriesCount.ToString() + "and have exceeded!" );
261262

262263
//To work in Words, all series need an Index and Order.
263264
var value = seriesCount + 1;
@@ -339,17 +340,22 @@ public Color Color
339340
{
340341
get
341342
{
342-
var colorElement = Xml.Element( XName.Get( "spPr", Document.c.NamespaceName ) );
343-
if( colorElement == null )
343+
var spPr = this.Xml.Element( XName.Get( "spPr", Document.c.NamespaceName ) );
344+
if( spPr == null )
344345
return Color.Transparent;
345-
else
346+
347+
var srgbClr = spPr.Descendants( XName.Get( "srgbClr", Document.a.NamespaceName ) ).FirstOrDefault();
348+
if( srgbClr != null )
346349
{
347-
var val = colorElement.Element( XName.Get( "solidFill", Document.a.NamespaceName ) )
348-
.Element( XName.Get( "srgbClr", Document.a.NamespaceName ) )
349-
.Attribute( XName.Get( "val" ) )
350-
.Value;
351-
return Color.FromArgb( Int32.Parse( val, NumberStyles.HexNumber ) );
350+
var val = srgbClr.Attribute( XName.Get( "val" ) );
351+
if( val != null )
352+
{
353+
var rgb = Color.FromArgb( Int32.Parse( val.Value, NumberStyles.HexNumber ) );
354+
return Color.FromArgb( 255, rgb );
355+
}
352356
}
357+
358+
return Color.Transparent;
353359
}
354360
set
355361
{
@@ -358,9 +364,15 @@ public Color Color
358364
{
359365
colorElement.Remove();
360366
}
361-
colorElement = new XElement( XName.Get( "spPr", Document.c.NamespaceName ),
362-
new XElement( XName.Get( "solidFill", Document.a.NamespaceName ),
363-
new XElement( XName.Get( "srgbClr", Document.a.NamespaceName ), new XAttribute( XName.Get( "val" ), value.ToHex() ) ) ) );
367+
368+
var colorData = new XElement( XName.Get( "solidFill", Document.a.NamespaceName ),
369+
new XElement( XName.Get( "srgbClr", Document.a.NamespaceName ), new XAttribute( XName.Get( "val" ), value.ToHex() ) ) );
370+
371+
// When the chart containing this series is a lineChart, the line will be colored, else the shape will be colored.
372+
colorElement = ( ( this.Xml.Parent != null ) && ( this.Xml.Parent.Name != null ) && (this.Xml.Parent.Name.LocalName == "lineChart" ) )
373+
? new XElement( XName.Get( "spPr", Document.c.NamespaceName ),
374+
new XElement( XName.Get( "ln", Document.a.NamespaceName ), colorData ) )
375+
: new XElement( XName.Get( "spPr", Document.c.NamespaceName ), colorData );
364376
this.Xml.Element( XName.Get( "tx", Document.c.NamespaceName ) ).AddAfterSelf( colorElement );
365377
}
366378
}

0 commit comments

Comments
 (0)