Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
PDFsharp-Team committed Jul 27, 2023
1 parent d751497 commit 91feca7
Show file tree
Hide file tree
Showing 223 changed files with 4,620 additions and 1,248 deletions.
1 change: 1 addition & 0 deletions PdfSharp.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=tabstop/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=tabstops/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=tabstop_0027s/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unfilter/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=versioning/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=xgfx/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# PDFsharp & MigraDoc 6.0

Version **6.0.0-preview-2**
Published **2023-04-25**
Version **6.0.0-preview-3**
Published **2023-07-27**

This is the second preview of the **PDFsharp** project, the main project of PDFsharp & MigraDoc 6.0 with updates for C# 10 and .NET 6.0.
This is the third preview of the **PDFsharp** project, the main project of PDFsharp & MigraDoc 6.0 with updates for C# 10 and .NET 6.0.

PDFsharp: Copyright (c) 2005-2023 empira Software GmbH, Troisdorf (Cologne Area, Germany)
MigraDoc: Copyright (c) 2001-2023 empira Software GmbH, Troisdorf (Cologne Area, Germany)
Expand Down
80 changes: 40 additions & 40 deletions dev/build-local-nuget-packages-release.ps1
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Updates local nuget packages.

#Requires -Version 7
#Requires -PSEdition Core

param (
[Parameter(Mandatory = $false)] [bool]$deleteBinAndObj = $true
)

Push-Location $PSScriptRoot

try {
Write-Host "Delete bin and obj " $deleteBinAndObj
if ($deleteBinAndObj) {
Write-Host "Deleting BIN and OBJ"
.\del-bin-and-obj.ps1
Write-Host "Done deleting bin and obj"
}

Push-Location ..
try {
Write-Host "Invoking ’dotnet build’"
dotnet build -c release
$build = $LASTEXITCODE
Write-Host "’dotnet build’ has finished"
}
finally {
Pop-Location
}

if ($build -gt 0) {
Write-Host "’dotnet build’ failed with code " $build
throw "’dotnet build’ failed with code " + $build
}

.\update-local-nuget-packages-release.ps1
}
finally {
Pop-Location
}
# Updates local nuget packages.

#Requires -Version 7
#Requires -PSEdition Core

param (
[Parameter(Mandatory = $false)] [bool]$deleteBinAndObj = $true
)

Push-Location $PSScriptRoot

try {
Write-Host "Delete bin and obj " $deleteBinAndObj
if ($deleteBinAndObj) {
Write-Host "Deleting BIN and OBJ"
.\del-bin-and-obj.ps1
Write-Host "Done deleting bin and obj"
}

Push-Location ..
try {
Write-Host "Invoking ’dotnet build’"
dotnet build -c release
$build = $LASTEXITCODE
Write-Host "’dotnet build’ has finished"
}
finally {
Pop-Location
}

if ($build -gt 0) {
Write-Host "’dotnet build’ failed with code " $build
throw "’dotnet build’ failed with code " + $build
}

.\update-local-nuget-packages-release.ps1
}
finally {
Pop-Location
}
8 changes: 4 additions & 4 deletions docs/BoilerplateText.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ MigraDoc is a .NET library that allows developers to create documents such as PD

PDFsharp:
This is a preview version of PDFsharp 6.0.0 using .NET 6.
The package ’PdfSharp’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only.
The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
We also publish packages that contain PDFsharp plus MigraDoc.
See the project docs site for further information:
https://docs.pdfsharp.net/history/readme-v6.0.html


PDFsharp & MigraDoc:
This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6.
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only.
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
See the project docs site for further information:
https://docs.pdfsharp.net/history/readme-v6.0.html
37 changes: 37 additions & 0 deletions docs/DevNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,40 @@
## List of files to be checked before publishing a release

README.md


## Comments

### DELETE yyyy-mm-dd

Here is code that is replaced by newer code and should be deleted in the future.
But keeps here at the moment as reference in case the new code has bugs.

After the specified date the code can be deleted.

### KEEP

Here is older code that is not used anymore but keeps here for
documentation or reference purposes and shall not be removed.

### TODO

**Here is something to be done __before the project is released__.**

### BUG

**Here is a bug that must be fixed before the project is released.**

### IMPROV

Here is code that substantially works but has potential for improvements
for better reliability.

### OBSERVATION


### EXPERIMENTAL


### TEST
Here is code that should be coved by (more) unit tests.
18 changes: 8 additions & 10 deletions gitversion.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# 23-03-22
# 23-05-24
assembly-versioning-scheme: MajorMinorPatch
mode: Mainline
assembly-informational-format: '{NuGetVersion}'
branches:
develop: # Current development
# 5.0.0-develop.123
# branch: develop -- is always 'develop'
# version: {6.0.0}-develop.123 -- taken from git tag plus 'develop' plus commit count
regex: ^develop$
mode: ContinuousDeployment
increment: None
Expand All @@ -13,11 +14,10 @@ branches:
track-merge-target: true
source-branches: ['feature', 'release']
release: # Release and preview versions.
# 22.40.0 / 22.40.0-rc-1
# 5.0.0-preview-2
# branch: release/6.0.0-preview-3 -- must be same as git tag without leading 'v'.
# version: {6-0-0-preview-3} -- taken from git tag only
regex: ^(release[/-]|master)
# ^(user|feature|fix)[/-]
# Must not have mode set to be mainline
# Must not have mode set to be mainline? WTF?
increment: None
tag: ''
prevent-increment-of-merged-branch-version: true
Expand All @@ -26,8 +26,8 @@ branches:
is-mainline: true
source-branches: ['develop', 'release', 'feature']
feature: # Features and bug fixes.
# 22.40.0-dev-anse-gvupd.1
# 5.0.0-dev-my-branch.123
# branch: feature/my-new-feature -- arbitrary name, e.g. a new preview
# version: {6.0.0}-dev-{my-new-feature}.123 -- taken from git tag plus 'dev-' plus branch name plus commit count
regex: ^(user|feature|fix)[/-]
mode: ContinuousDeployment
increment: None
Expand All @@ -39,6 +39,4 @@ branches:
regex: ^(pull|pull\-requests|pr)[/-]
tag: PullRequest
mode: ContinuousDeployment
#ignore:
# sha: []
merge-message-formats: {}
4 changes: 2 additions & 2 deletions src/foundation/nuget/src/MigraDoc.NuGet-gdi/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6.
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only.
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
See the project docs site for further information:
https://docs.pdfsharp.net/link/readme-v6.0.html
4 changes: 2 additions & 2 deletions src/foundation/nuget/src/MigraDoc.NuGet-wpf/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6.
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only.
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
See the project docs site for further information:
https://docs.pdfsharp.net/link/readme-v6.0.html
4 changes: 2 additions & 2 deletions src/foundation/nuget/src/MigraDoc.NuGet/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6.
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only.
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
See the project docs site for further information:
https://docs.pdfsharp.net/link/readme-v6.0.html
4 changes: 2 additions & 2 deletions src/foundation/nuget/src/PDFsharp.NuGet-gdi/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This is a preview version of PDFsharp 6.0.0 using .NET 6.
The package ’PdfSharp’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only.
The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
We also publish packages that contain PDFsharp plus MigraDoc.
See the project docs site for further information:
https://docs.pdfsharp.net/link/readme-v6.0.html
4 changes: 2 additions & 2 deletions src/foundation/nuget/src/PDFsharp.NuGet-wpf/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This is a preview version of PDFsharp 6.0.0 using .NET 6.
The package ’PdfSharp’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only.
The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
We also publish packages that contain PDFsharp plus MigraDoc.
See the project docs site for further information:
https://docs.pdfsharp.net/link/readme-v6.0.html
4 changes: 2 additions & 2 deletions src/foundation/nuget/src/PDFsharp.NuGet/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This is a preview version of PDFsharp 6.0.0 using .NET 6.
The package ’PdfSharp’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only.
The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
We also publish packages that contain PDFsharp plus MigraDoc.
See the project docs site for further information:
https://docs.pdfsharp.net/link/readme-v6.0.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public static class BackwardCompatibility
/// </summary>
public static bool DoNotCreateLastSection { get; set; } = false;


// TODO Space before on new page

/// <summary>
Expand Down Expand Up @@ -109,7 +108,6 @@ public static class BackwardCompatibility
// public static FeatureNotAvailableAction GlyphsToPath { get; set; } = FeatureNotAvailableAction.DoNothing;
//}


/// <summary>
/// Compatibility settings for MigraDoc.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ internal Symbol ScanSingleLineComment()
return Symbol.Comment;
}


/// <summary>
/// Gets the current symbol.
/// </summary>
Expand Down Expand Up @@ -1340,7 +1339,6 @@ Symbol ScanPunctuator()
// return str;
//}


/// <summary>
/// Scans verbatim strings like «@"String with ""quoted"" text"».
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ static class TH // RENAME TODO
{
#region General Messages


//public static string? BaseStyleRequired => GetString(DomMsgID.BaseStyleRequired);

//public static string? EmptyBaseStyle => GetString(DomMsgID.EmptyBaseStyle);
Expand Down Expand Up @@ -106,7 +105,6 @@ public static ArgumentException ArgumentException_UndefinedBaseStyle(string base

public static string InvalidDocumentObjectType => "The given document object is not valid in this context.";


//// ----- General Messages ---------------------------------------------------------------------
//StyleExpected,
//BaseStyleRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public static partial void ArgbValueIsConsideredEmptyColor(
this ILogger logger,
LogLevel level);


// What to log?

// Image not found (not loadable, not found, ...)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public void SetNull(DocumentObject dom, string name)
if (vd.ValueName is "Owner" or "Tag" or "Document" or "Section")
continue;


if (vd.IsRefOnly is false)
{
//ValueDescriptors[index].SetNull(dom);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Series()
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new Series Clone()
public new Series Clone()
=> (Series)DeepCopy();

/// <summary>
Expand Down Expand Up @@ -116,7 +116,11 @@ public LineFormat LineFormat
public FillFormat FillFormat
{
get => Values.FillFormat ??= new(this);
set => Values.FillFormat = value;
set
{
SetParent(value);
Values.FillFormat = value;
}
}

/// <summary>
Expand Down Expand Up @@ -306,15 +310,20 @@ internal SeriesValues(DocumentObject owner) : base(owner)
public Color? MarkerForegroundColor
{
get => _color;
set => _color = DocumentObjectModel.Color.MakeNullIfEmpty(value);
set => _color = Color.MakeNullIfEmpty(value);
}
Color? _color;

/// <summary>
/// Gets or sets the internal nullable implementation value of the enclosing document object property.
/// See enclosing document object class for documentation of this property.
/// </summary>
public Color? MarkerBackgroundColor { get; set; } // BUG Differs from MarkerForegroundColor
public Color? MarkerBackgroundColor
{
get => _markerBackgroundColor;
set => _markerBackgroundColor = Color.MakeNullIfEmpty(value);
}
Color? _markerBackgroundColor;

/// <summary>
/// Gets or sets the internal nullable implementation value of the enclosing document object property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ public string Style
public ParagraphFormat Format
{
get => Values.Format ??= new(this);
set => Values.Format = value;
set
{
SetParent(value);
Values.Format = value;
}
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ public string Format
public Font Font
{
get => Values.Font ??= new(this);
set => Values.Font = value;
set
{
SetParent(value);
Values.Font = value;
}
}

/// <summary>
Expand Down
Loading

0 comments on commit 91feca7

Please sign in to comment.