Skip to content

Support for .NETStandard 2.1 #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions Xceed.Document.NET/AssemblyVersionInfo.cs
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
/***************************************************************************************
///***************************************************************************************

DocX – DocX is the community edition of Xceed Words for .NET
// DocX – DocX is the community edition of Xceed Words for .NET

Copyright (C) 2009-2017 Xceed Software Inc.
// Copyright (C) 2009-2017 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
// This program is provided to you under the terms of the Microsoft Public
// License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license

For more features and fast professional support,
pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
// For more features and fast professional support,
// pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/

*************************************************************************************/
// *************************************************************************************/


#pragma warning disable 0436
[assembly: System.Reflection.AssemblyVersion( _XceedVersionInfo.Version )]
#pragma warning restore 0436
//#pragma warning disable 0436
//[assembly: System.Reflection.AssemblyVersion( _XceedVersionInfo.Version )]
//#pragma warning restore 0436

internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "1.4";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string PublicKeyToken = "ba83ff368b7563c6";
//internal static class _XceedVersionInfo
//{
// [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
// public const string BaseVersion = "1.4";
// [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
// public const string Version = BaseVersion +
// ".0.0";
// [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
// public const string PublicKeyToken = "ba83ff368b7563c6";


}
//}
21 changes: 0 additions & 21 deletions Xceed.Document.NET/AssemblyVersionInfoCommon.cs

This file was deleted.

70 changes: 39 additions & 31 deletions Xceed.Document.NET/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,49 +21,57 @@ This program is provided to you under the terms of the Microsoft Public
// General Information about an assembly is controlled through the following
// 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: AssemblyTitle( "Xceed Document for .NET" )]
//[assembly: AssemblyDescription( "This assembly implements the classes for Xceed Document for .NET." )]

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


// 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
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]


// Allow the Xceed.Words.NET to get at internal stuff.
[assembly: InternalsVisibleTo( "Xceed.Words.NET" + ",PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
"f92cbfb5")]

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

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

#pragma warning disable 1699
//[assembly: AssemblyDelaySign( false )]
//[assembly: AssemblyKeyFile( @"..\..\sn.snk" )]
//[assembly: AssemblyKeyName( "" )]
#pragma warning restore 1699

[assembly: ComVisible(false)]


// Allow the Xceed.Words.NET to get at internal stuff.
[assembly: InternalsVisibleTo("Xceed.Words.NET" + ",PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
"f92cbfb5")]

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

#pragma warning disable 1699
[assembly: AssemblyDelaySign( false )]
[assembly: AssemblyKeyFile( @"..\..\sn.snk" )]
[assembly: AssemblyKeyName( "" )]
#pragma warning restore 1699
[assembly: InternalsVisibleTo("Xceed.PdfCreator.NET" + ",PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
"f92cbfb5")]

[assembly: InternalsVisibleTo("UnitTests" + ",PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100d59d8147eb2015" +
"ca98a92da860fd766d101271d8c2f545894870fd6183255737d79347bbf5250291ae75651e1150" +
"1b7452ee003b80b936614cdda51db8eb6f8fde913e67d45395b480a992be17bf04744a7fe803ea" +
"131b925dcf84a73d22264352eca7c3fcf9387f3eee1d60ac7974f04866e6c72928dc0609abe341" +
"f92cbfb5")]
32 changes: 30 additions & 2 deletions Xceed.Document.NET/Src/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,40 @@ public virtual List<string> FindUniqueByPattern( string pattern, RegexOptions op
{
var rawResults = new List<string>();

foreach( Paragraph p in Paragraphs )
{ // accumulate the search results from all paragraphs
// Search in headers
var headerList = new List<Header>() { this.Document.Headers.First, this.Document.Headers.Even, this.Document.Headers.Odd };
foreach (Header h in headerList)
{
if (h != null)
{
foreach (Paragraph p in h.Paragraphs)
{
var partials = p.FindAllByPattern(pattern, options);
rawResults.AddRange(partials);
}
}
}

foreach ( Paragraph p in Paragraphs )
{
var partials = p.FindAllByPattern( pattern, options );
rawResults.AddRange( partials );
}

// Search in footers
var footerList = new List<Footer> { this.Document.Footers.First, this.Document.Footers.Even, this.Document.Footers.Odd };
foreach (Footer f in footerList)
{
if (f != null)
{
foreach (Paragraph p in f.Paragraphs)
{
var partials = p.FindAllByPattern(pattern, options);
rawResults.AddRange(partials);
}
}
}

// this dictionary is used to collect results and test for uniqueness
var uniqueResults = new Dictionary<string, int>();

Expand Down
2 changes: 1 addition & 1 deletion Xceed.Document.NET/Src/Document.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public Color PageBackground
var color = background.Attribute( XName.Get( "color", Document.w.NamespaceName ) );
if( color != null )
{
return ColorTranslator.FromHtml( string.Format( "#{0}", color.Value ) );
return ColorTranslator.FromHtml( string.Format( "#{0}", color.Value ) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion Xceed.Document.NET/Src/HelperFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ internal static XElement CreateEdit( EditType t, DateTime edit_time, object cont
(
new XElement( Document.w + t.ToString(),
new XAttribute( Document.w + "id", 0 ),
new XAttribute( Document.w + "author", WindowsIdentity.GetCurrent().Name ),
new XAttribute( Document.w + "author", "Unknown"),
new XAttribute( Document.w + "date", edit_time ),
content )
);
Expand Down
3 changes: 2 additions & 1 deletion Xceed.Document.NET/Src/Paragraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This program is provided to you under the terms of the Microsoft Public

namespace Xceed.Document.NET
{
[DebuggerDisplay("{Text}")]
/// <summary>
/// Represents a document paragraph.
/// </summary>
Expand Down Expand Up @@ -4607,7 +4608,7 @@ internal static XElement CreateEdit( EditType t, DateTime edit_time, object cont
string author = "";
try
{
author = WindowsIdentity.GetCurrent().Name;
author = "Unknown";
}
catch( Exception )
{
Expand Down
18 changes: 18 additions & 0 deletions Xceed.Document.NET/Xceed.Document.NETCore.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>sn.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="4.6.0" />
<PackageReference Include="System.IO.Packaging" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Resources\numbering.default_bullet_abstract.xml.gz" />
<EmbeddedResource Include="Resources\numbering.default_decimal_abstract.xml.gz" />
<EmbeddedResource Include="Resources\numbering.xml.gz" />
</ItemGroup>
</Project>
47 changes: 45 additions & 2 deletions Xceed.Words.NET.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.29326.143
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xceed.Words.NET.Examples", "Xceed.Words.NET.Examples\Xceed.Words.NET.Examples.csproj", "{F3022BB7-0E40-4C80-A495-37FEAF3671AB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xceed.Words.NET", "Xceed.Words.NET\Xceed.Words.NET.csproj", "{6A9B96D0-A011-4F33-8EE2-AC31C948CCA9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xceed.Document.NET", "Xceed.Document.NET\Xceed.Document.NET.csproj", "{E863D072-AA8B-4108-B5F1-785241B37F67}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xceed.Words.NETCore", "Xceed.Words.NET\Xceed.Words.NETCore.csproj", "{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xceed.Document.NETCore", "Xceed.Document.NET\Xceed.Document.NETCore.csproj", "{29B91334-6106-45DA-9CE2-751CFF156F85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -74,10 +78,49 @@ Global
{E863D072-AA8B-4108-B5F1-785241B37F67}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{E863D072-AA8B-4108-B5F1-785241B37F67}.Release|x86.ActiveCfg = Release|Any CPU
{E863D072-AA8B-4108-B5F1-785241B37F67}.Release|x86.Build.0 = Release|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Debug|Any CPU.Build.0 = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Debug|x86.ActiveCfg = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Debug|x86.Build.0 = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.PerformanceTest|Any CPU.ActiveCfg = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.PerformanceTest|Any CPU.Build.0 = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.PerformanceTest|Mixed Platforms.ActiveCfg = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.PerformanceTest|Mixed Platforms.Build.0 = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.PerformanceTest|x86.ActiveCfg = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.PerformanceTest|x86.Build.0 = Debug|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Release|Any CPU.ActiveCfg = Release|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Release|Any CPU.Build.0 = Release|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Release|x86.ActiveCfg = Release|Any CPU
{115CFF51-E5FC-4E39-A3AC-3D8AF9383773}.Release|x86.Build.0 = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Debug|x86.ActiveCfg = Debug|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Debug|x86.Build.0 = Debug|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.PerformanceTest|Any CPU.ActiveCfg = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.PerformanceTest|Any CPU.Build.0 = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.PerformanceTest|Mixed Platforms.ActiveCfg = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.PerformanceTest|Mixed Platforms.Build.0 = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.PerformanceTest|x86.ActiveCfg = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.PerformanceTest|x86.Build.0 = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Release|Any CPU.Build.0 = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Release|x86.ActiveCfg = Release|Any CPU
{29B91334-6106-45DA-9CE2-751CFF156F85}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {ADA39414-8C91-4B1B-937D-A46399E43070}
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = Xceed.Words.NET.vsmdi
EndGlobalSection
Expand Down
31 changes: 0 additions & 31 deletions Xceed.Words.NET/AssemblyVersionInfo.cs

This file was deleted.

21 changes: 0 additions & 21 deletions Xceed.Words.NET/AssemblyVersionInfoCommon.cs

This file was deleted.

1 change: 1 addition & 0 deletions Xceed.Words.NET/DocX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ select e.Attribute( r + "id" ).Value

// Close the document so that it can be saved.
_package.Flush();
_package.Close();

#region Save this document back to a file or stream, that was specified by the user at save time.
if( _filename != null )
Expand Down
Loading