From 74e1476b0ad8f9af79b333283c1757e7a239e951 Mon Sep 17 00:00:00 2001 From: Peder Husom Date: Fri, 25 Oct 2019 15:13:24 +0200 Subject: [PATCH 1/6] Initial support for netcore --- Xceed.Document.NET/AssemblyVersionInfo.cs | 42 +++++------ .../AssemblyVersionInfoCommon.cs | 21 ------ Xceed.Document.NET/Properties/AssemblyInfo.cs | 70 +++++++++++-------- Xceed.Document.NET/Src/Document.cs | 2 +- Xceed.Document.NET/Src/HelperFunctions.cs | 2 +- Xceed.Document.NET/Src/Paragraph.cs | 2 +- .../Xceed.Document.NETCore.csproj | 18 +++++ Xceed.Words.NET.sln | 47 ++++++++++++- Xceed.Words.NET/AssemblyVersionInfo.cs | 31 -------- Xceed.Words.NET/AssemblyVersionInfoCommon.cs | 21 ------ Xceed.Words.NET/Properties/AssemblyInfo.cs | 43 ------------ Xceed.Words.NET/Xceed.Words.NETCore.csproj | 11 +++ .../Xceed.Words.NETCore.csproj.user | 6 ++ 13 files changed, 143 insertions(+), 173 deletions(-) delete mode 100644 Xceed.Document.NET/AssemblyVersionInfoCommon.cs create mode 100644 Xceed.Document.NET/Xceed.Document.NETCore.csproj delete mode 100644 Xceed.Words.NET/AssemblyVersionInfo.cs delete mode 100644 Xceed.Words.NET/AssemblyVersionInfoCommon.cs delete mode 100644 Xceed.Words.NET/Properties/AssemblyInfo.cs create mode 100644 Xceed.Words.NET/Xceed.Words.NETCore.csproj create mode 100644 Xceed.Words.NET/Xceed.Words.NETCore.csproj.user diff --git a/Xceed.Document.NET/AssemblyVersionInfo.cs b/Xceed.Document.NET/AssemblyVersionInfo.cs index c034dc61..78b7f293 100644 --- a/Xceed.Document.NET/AssemblyVersionInfo.cs +++ b/Xceed.Document.NET/AssemblyVersionInfo.cs @@ -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"; -} +//} diff --git a/Xceed.Document.NET/AssemblyVersionInfoCommon.cs b/Xceed.Document.NET/AssemblyVersionInfoCommon.cs deleted file mode 100644 index 4beadfcf..00000000 --- a/Xceed.Document.NET/AssemblyVersionInfoCommon.cs +++ /dev/null @@ -1,21 +0,0 @@ -/*************************************************************************************** - - DocX – DocX is the community edition of Xceed Words for .NET - - 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 - - For more features and fast professional support, - pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/ - - *************************************************************************************/ - - -internal static class _XceedVersionInfoCommon -{ -[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] - public const string Build = ".*"; - -} diff --git a/Xceed.Document.NET/Properties/AssemblyInfo.cs b/Xceed.Document.NET/Properties/AssemblyInfo.cs index 94dcdc5e..4f7f2853 100644 --- a/Xceed.Document.NET/Properties/AssemblyInfo.cs +++ b/Xceed.Document.NET/Properties/AssemblyInfo.cs @@ -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")] \ No newline at end of file diff --git a/Xceed.Document.NET/Src/Document.cs b/Xceed.Document.NET/Src/Document.cs index 8baedec9..8caece8a 100644 --- a/Xceed.Document.NET/Src/Document.cs +++ b/Xceed.Document.NET/Src/Document.cs @@ -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 ) ); } } diff --git a/Xceed.Document.NET/Src/HelperFunctions.cs b/Xceed.Document.NET/Src/HelperFunctions.cs index 35232091..99e2e129 100644 --- a/Xceed.Document.NET/Src/HelperFunctions.cs +++ b/Xceed.Document.NET/Src/HelperFunctions.cs @@ -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 ) ); diff --git a/Xceed.Document.NET/Src/Paragraph.cs b/Xceed.Document.NET/Src/Paragraph.cs index 1a80de3f..2a28e452 100644 --- a/Xceed.Document.NET/Src/Paragraph.cs +++ b/Xceed.Document.NET/Src/Paragraph.cs @@ -4607,7 +4607,7 @@ internal static XElement CreateEdit( EditType t, DateTime edit_time, object cont string author = ""; try { - author = WindowsIdentity.GetCurrent().Name; + author = "Unknown"; } catch( Exception ) { diff --git a/Xceed.Document.NET/Xceed.Document.NETCore.csproj b/Xceed.Document.NET/Xceed.Document.NETCore.csproj new file mode 100644 index 00000000..d1d8d8bf --- /dev/null +++ b/Xceed.Document.NET/Xceed.Document.NETCore.csproj @@ -0,0 +1,18 @@ + + + netstandard2.1 + true + sn.snk + + + + + + + + + + + + + \ No newline at end of file diff --git a/Xceed.Words.NET.sln b/Xceed.Words.NET.sln index dac1ce1c..fef93821 100644 --- a/Xceed.Words.NET.sln +++ b/Xceed.Words.NET.sln @@ -1,7 +1,7 @@  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 @@ -9,6 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xceed.Words.NET", "Xceed.Wo 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 @@ -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 diff --git a/Xceed.Words.NET/AssemblyVersionInfo.cs b/Xceed.Words.NET/AssemblyVersionInfo.cs deleted file mode 100644 index c034dc61..00000000 --- a/Xceed.Words.NET/AssemblyVersionInfo.cs +++ /dev/null @@ -1,31 +0,0 @@ -/*************************************************************************************** - - DocX – DocX is the community edition of Xceed Words for .NET - - 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 - - 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 - -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"; - - -} diff --git a/Xceed.Words.NET/AssemblyVersionInfoCommon.cs b/Xceed.Words.NET/AssemblyVersionInfoCommon.cs deleted file mode 100644 index 4beadfcf..00000000 --- a/Xceed.Words.NET/AssemblyVersionInfoCommon.cs +++ /dev/null @@ -1,21 +0,0 @@ -/*************************************************************************************** - - DocX – DocX is the community edition of Xceed Words for .NET - - 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 - - For more features and fast professional support, - pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/ - - *************************************************************************************/ - - -internal static class _XceedVersionInfoCommon -{ -[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] - public const string Build = ".*"; - -} diff --git a/Xceed.Words.NET/Properties/AssemblyInfo.cs b/Xceed.Words.NET/Properties/AssemblyInfo.cs deleted file mode 100644 index 7d0fa715..00000000 --- a/Xceed.Words.NET/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,43 +0,0 @@ -/*************************************************************************************** - - DocX – DocX is the community edition of Xceed Words for .NET - - 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 - - For more features and fast professional support, - pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/ - - *************************************************************************************/ - - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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 Words for .NET" )] -[assembly: AssemblyDescription( "This assembly implements the classes for Xceed Words for .NET." )] - -[assembly: AssemblyCompany( "Xceed Software Inc." )] -[assembly: AssemblyProduct( "Xceed Words 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)] - -#pragma warning disable 1699 -[assembly: AssemblyDelaySign( false )] -[assembly: AssemblyKeyFile( @"..\..\sn.snk" )] -[assembly: AssemblyKeyName( "" )] -#pragma warning restore 1699 - diff --git a/Xceed.Words.NET/Xceed.Words.NETCore.csproj b/Xceed.Words.NET/Xceed.Words.NETCore.csproj new file mode 100644 index 00000000..a2fc8459 --- /dev/null +++ b/Xceed.Words.NET/Xceed.Words.NETCore.csproj @@ -0,0 +1,11 @@ + + + netstandard2.1 + true + false + sn.snk + + + + + diff --git a/Xceed.Words.NET/Xceed.Words.NETCore.csproj.user b/Xceed.Words.NET/Xceed.Words.NETCore.csproj.user new file mode 100644 index 00000000..96ae8c4e --- /dev/null +++ b/Xceed.Words.NET/Xceed.Words.NETCore.csproj.user @@ -0,0 +1,6 @@ + + + + <_LastSelectedProfileId>C:\Users\pederh\Documents\Projects\DocX\Xceed.Words.NET\Properties\PublishProfiles\FolderProfile.pubxml + + \ No newline at end of file From 82cabae1bfcaf38f7a4874b7b40811037a3888d2 Mon Sep 17 00:00:00 2001 From: Peder Husom Date: Fri, 25 Oct 2019 15:13:24 +0200 Subject: [PATCH 2/6] Initial support for netcore --- Xceed.Document.NET/AssemblyVersionInfo.cs | 42 +++++------ .../AssemblyVersionInfoCommon.cs | 21 ------ Xceed.Document.NET/Properties/AssemblyInfo.cs | 70 +++++++++++-------- Xceed.Document.NET/Src/Document.cs | 2 +- Xceed.Document.NET/Src/HelperFunctions.cs | 2 +- Xceed.Document.NET/Src/Paragraph.cs | 2 +- .../Xceed.Document.NETCore.csproj | 18 +++++ Xceed.Words.NET.sln | 47 ++++++++++++- Xceed.Words.NET/AssemblyVersionInfo.cs | 31 -------- Xceed.Words.NET/AssemblyVersionInfoCommon.cs | 21 ------ Xceed.Words.NET/Properties/AssemblyInfo.cs | 43 ------------ Xceed.Words.NET/Xceed.Words.NETCore.csproj | 11 +++ 12 files changed, 137 insertions(+), 173 deletions(-) delete mode 100644 Xceed.Document.NET/AssemblyVersionInfoCommon.cs create mode 100644 Xceed.Document.NET/Xceed.Document.NETCore.csproj delete mode 100644 Xceed.Words.NET/AssemblyVersionInfo.cs delete mode 100644 Xceed.Words.NET/AssemblyVersionInfoCommon.cs delete mode 100644 Xceed.Words.NET/Properties/AssemblyInfo.cs create mode 100644 Xceed.Words.NET/Xceed.Words.NETCore.csproj diff --git a/Xceed.Document.NET/AssemblyVersionInfo.cs b/Xceed.Document.NET/AssemblyVersionInfo.cs index c034dc61..78b7f293 100644 --- a/Xceed.Document.NET/AssemblyVersionInfo.cs +++ b/Xceed.Document.NET/AssemblyVersionInfo.cs @@ -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"; -} +//} diff --git a/Xceed.Document.NET/AssemblyVersionInfoCommon.cs b/Xceed.Document.NET/AssemblyVersionInfoCommon.cs deleted file mode 100644 index 4beadfcf..00000000 --- a/Xceed.Document.NET/AssemblyVersionInfoCommon.cs +++ /dev/null @@ -1,21 +0,0 @@ -/*************************************************************************************** - - DocX – DocX is the community edition of Xceed Words for .NET - - 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 - - For more features and fast professional support, - pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/ - - *************************************************************************************/ - - -internal static class _XceedVersionInfoCommon -{ -[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] - public const string Build = ".*"; - -} diff --git a/Xceed.Document.NET/Properties/AssemblyInfo.cs b/Xceed.Document.NET/Properties/AssemblyInfo.cs index 94dcdc5e..4f7f2853 100644 --- a/Xceed.Document.NET/Properties/AssemblyInfo.cs +++ b/Xceed.Document.NET/Properties/AssemblyInfo.cs @@ -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")] \ No newline at end of file diff --git a/Xceed.Document.NET/Src/Document.cs b/Xceed.Document.NET/Src/Document.cs index 8baedec9..8caece8a 100644 --- a/Xceed.Document.NET/Src/Document.cs +++ b/Xceed.Document.NET/Src/Document.cs @@ -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 ) ); } } diff --git a/Xceed.Document.NET/Src/HelperFunctions.cs b/Xceed.Document.NET/Src/HelperFunctions.cs index 35232091..99e2e129 100644 --- a/Xceed.Document.NET/Src/HelperFunctions.cs +++ b/Xceed.Document.NET/Src/HelperFunctions.cs @@ -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 ) ); diff --git a/Xceed.Document.NET/Src/Paragraph.cs b/Xceed.Document.NET/Src/Paragraph.cs index 1a80de3f..2a28e452 100644 --- a/Xceed.Document.NET/Src/Paragraph.cs +++ b/Xceed.Document.NET/Src/Paragraph.cs @@ -4607,7 +4607,7 @@ internal static XElement CreateEdit( EditType t, DateTime edit_time, object cont string author = ""; try { - author = WindowsIdentity.GetCurrent().Name; + author = "Unknown"; } catch( Exception ) { diff --git a/Xceed.Document.NET/Xceed.Document.NETCore.csproj b/Xceed.Document.NET/Xceed.Document.NETCore.csproj new file mode 100644 index 00000000..d1d8d8bf --- /dev/null +++ b/Xceed.Document.NET/Xceed.Document.NETCore.csproj @@ -0,0 +1,18 @@ + + + netstandard2.1 + true + sn.snk + + + + + + + + + + + + + \ No newline at end of file diff --git a/Xceed.Words.NET.sln b/Xceed.Words.NET.sln index dac1ce1c..fef93821 100644 --- a/Xceed.Words.NET.sln +++ b/Xceed.Words.NET.sln @@ -1,7 +1,7 @@  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 @@ -9,6 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xceed.Words.NET", "Xceed.Wo 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 @@ -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 diff --git a/Xceed.Words.NET/AssemblyVersionInfo.cs b/Xceed.Words.NET/AssemblyVersionInfo.cs deleted file mode 100644 index c034dc61..00000000 --- a/Xceed.Words.NET/AssemblyVersionInfo.cs +++ /dev/null @@ -1,31 +0,0 @@ -/*************************************************************************************** - - DocX – DocX is the community edition of Xceed Words for .NET - - 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 - - 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 - -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"; - - -} diff --git a/Xceed.Words.NET/AssemblyVersionInfoCommon.cs b/Xceed.Words.NET/AssemblyVersionInfoCommon.cs deleted file mode 100644 index 4beadfcf..00000000 --- a/Xceed.Words.NET/AssemblyVersionInfoCommon.cs +++ /dev/null @@ -1,21 +0,0 @@ -/*************************************************************************************** - - DocX – DocX is the community edition of Xceed Words for .NET - - 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 - - For more features and fast professional support, - pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/ - - *************************************************************************************/ - - -internal static class _XceedVersionInfoCommon -{ -[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] - public const string Build = ".*"; - -} diff --git a/Xceed.Words.NET/Properties/AssemblyInfo.cs b/Xceed.Words.NET/Properties/AssemblyInfo.cs deleted file mode 100644 index 7d0fa715..00000000 --- a/Xceed.Words.NET/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,43 +0,0 @@ -/*************************************************************************************** - - DocX – DocX is the community edition of Xceed Words for .NET - - 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 - - For more features and fast professional support, - pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/ - - *************************************************************************************/ - - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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 Words for .NET" )] -[assembly: AssemblyDescription( "This assembly implements the classes for Xceed Words for .NET." )] - -[assembly: AssemblyCompany( "Xceed Software Inc." )] -[assembly: AssemblyProduct( "Xceed Words 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)] - -#pragma warning disable 1699 -[assembly: AssemblyDelaySign( false )] -[assembly: AssemblyKeyFile( @"..\..\sn.snk" )] -[assembly: AssemblyKeyName( "" )] -#pragma warning restore 1699 - diff --git a/Xceed.Words.NET/Xceed.Words.NETCore.csproj b/Xceed.Words.NET/Xceed.Words.NETCore.csproj new file mode 100644 index 00000000..a2fc8459 --- /dev/null +++ b/Xceed.Words.NET/Xceed.Words.NETCore.csproj @@ -0,0 +1,11 @@ + + + netstandard2.1 + true + false + sn.snk + + + + + From 0e6c895771c6eafe47113b9d22049cb52bd9600c Mon Sep 17 00:00:00 2001 From: Peder Husom Date: Fri, 25 Oct 2019 15:22:49 +0200 Subject: [PATCH 3/6] Delete user file --- Xceed.Words.NET/Xceed.Words.NETCore.csproj.user | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 Xceed.Words.NET/Xceed.Words.NETCore.csproj.user diff --git a/Xceed.Words.NET/Xceed.Words.NETCore.csproj.user b/Xceed.Words.NET/Xceed.Words.NETCore.csproj.user deleted file mode 100644 index 96ae8c4e..00000000 --- a/Xceed.Words.NET/Xceed.Words.NETCore.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - <_LastSelectedProfileId>C:\Users\pederh\Documents\Projects\DocX\Xceed.Words.NET\Properties\PublishProfiles\FolderProfile.pubxml - - \ No newline at end of file From 8b1d64c2f4b1dda8d63b0a28446174374cdca41e Mon Sep 17 00:00:00 2001 From: Peder Husom Date: Mon, 11 Nov 2019 10:03:53 +0100 Subject: [PATCH 4/6] Fixes problem with file not saving --- Xceed.Words.NET/DocX.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Xceed.Words.NET/DocX.cs b/Xceed.Words.NET/DocX.cs index 6b910dfd..1f0371f1 100644 --- a/Xceed.Words.NET/DocX.cs +++ b/Xceed.Words.NET/DocX.cs @@ -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 ) From f6d0d3af835f6204f7e317c3afac05197c4df6a4 Mon Sep 17 00:00:00 2001 From: Peder Husom Date: Mon, 11 Nov 2019 10:04:18 +0100 Subject: [PATCH 5/6] Gives paragraphs some sensible debug display --- Xceed.Document.NET/Src/Paragraph.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Xceed.Document.NET/Src/Paragraph.cs b/Xceed.Document.NET/Src/Paragraph.cs index 2a28e452..444287e0 100644 --- a/Xceed.Document.NET/Src/Paragraph.cs +++ b/Xceed.Document.NET/Src/Paragraph.cs @@ -27,6 +27,7 @@ This program is provided to you under the terms of the Microsoft Public namespace Xceed.Document.NET { + [DebuggerDisplay("{Text}")] /// /// Represents a document paragraph. /// From 70e892bfbeb44e343480d28bf1ac446ed9a1a963 Mon Sep 17 00:00:00 2001 From: Peder Husom Date: Tue, 19 Nov 2019 10:08:09 +0100 Subject: [PATCH 6/6] Added search in headers & footers. Works for docx --- Xceed.Document.NET/Src/Container.cs | 32 +++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Xceed.Document.NET/Src/Container.cs b/Xceed.Document.NET/Src/Container.cs index 5a2acc1b..a3d09c6b 100644 --- a/Xceed.Document.NET/Src/Container.cs +++ b/Xceed.Document.NET/Src/Container.cs @@ -286,12 +286,40 @@ public virtual List FindUniqueByPattern( string pattern, RegexOptions op { var rawResults = new List(); - foreach( Paragraph p in Paragraphs ) - { // accumulate the search results from all paragraphs + // Search in headers + var headerList = new List
() { 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