-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#11) Implement SpacingBetweenLines property
- Loading branch information
Showing
32 changed files
with
392 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/Paragraphs/Enums/HorizontalAlignment.cs → ...s/Formatting/Enums/HorizontalAlignment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...lements/Paragraphs/Enums/TextAlignment.cs → ...agraphs/Formatting/Enums/TextAlignment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ents/Paragraphs/Spacing/AtLeastSpacing.cs → ...aphs/Formatting/Spacing/AtLeastSpacing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Formatting/Spacing/AutoSpacing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using OfficeFlow.Word.Core.Elements.Paragraphs.Formatting.Spacing.Interfaces; | ||
|
||
namespace OfficeFlow.Word.Core.Elements.Paragraphs.Formatting.Spacing; | ||
|
||
public sealed class AutoSpacing : IParagraphSpacing | ||
{ | ||
internal AutoSpacing() | ||
{ } | ||
} |
4 changes: 2 additions & 2 deletions
4
...ements/Paragraphs/Spacing/ExactSpacing.cs → ...graphs/Formatting/Spacing/ExactSpacing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...rd/OfficeFlow.Word.Core/Elements/Paragraphs/Formatting/Spacing/Interfaces/ILineSpacing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace OfficeFlow.Word.Core.Elements.Paragraphs.Formatting.Spacing.Interfaces; | ||
|
||
public interface ILineSpacing; |
3 changes: 3 additions & 0 deletions
3
...ficeFlow.Word.Core/Elements/Paragraphs/Formatting/Spacing/Interfaces/IParagraphSpacing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace OfficeFlow.Word.Core.Elements.Paragraphs.Formatting.Spacing.Interfaces; | ||
|
||
public interface IParagraphSpacing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Formatting/Spacing/MultipleSpacing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using OfficeFlow.Word.Core.Elements.Paragraphs.Formatting.Spacing.Interfaces; | ||
|
||
namespace OfficeFlow.Word.Core.Elements.Paragraphs.Formatting.Spacing; | ||
|
||
public sealed class MultipleSpacing : ILineSpacing, IEquatable<MultipleSpacing> | ||
{ | ||
private const double MinValue = 0.0; | ||
private const double MaxValue = 132.0; | ||
|
||
// TODO[#11]: Design relative measurement units | ||
public double Factor { get; } | ||
|
||
internal MultipleSpacing(double factor) | ||
{ | ||
if (factor is < MinValue or > MaxValue) | ||
throw new ArgumentException( | ||
$"The factor of multiple spacing must be between {MinValue} and {MaxValue}", | ||
nameof(factor)); | ||
|
||
Factor = factor; | ||
} | ||
|
||
public bool Equals(MultipleSpacing? other) | ||
=> other is not null && Factor.Equals(other.Factor); | ||
|
||
/// <inheritdoc /> | ||
public override bool Equals(object? other) | ||
=> other is MultipleSpacing spacing && Equals(spacing); | ||
|
||
/// <inheritdoc /> | ||
public override int GetHashCode() | ||
=> Factor.GetHashCode(); | ||
} |
4 changes: 2 additions & 2 deletions
4
...ts/Paragraphs/Spacing/ParagraphSpacing.cs → ...hs/Formatting/Spacing/ParagraphSpacing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Spacing/AutoSpacing.cs
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Spacing/Interfaces/ILineSpacing.cs
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Spacing/Interfaces/IParagraphSpacing.cs
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Text/Enums/LineBreakType.cs
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Text/Enums/StrikethroughType.cs
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Text/Formatting/Enums/LineBreakType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace OfficeFlow.Word.Core.Elements.Paragraphs.Text.Formatting.Enums; | ||
|
||
public enum LineBreakType | ||
{ | ||
Column, | ||
Page, | ||
TextWrapping | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Text/Formatting/Enums/StrikethroughType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace OfficeFlow.Word.Core.Elements.Paragraphs.Text.Formatting.Enums; | ||
|
||
public enum StrikethroughType | ||
{ | ||
None, | ||
Single, | ||
Double | ||
} |
4 changes: 2 additions & 2 deletions
4
...ore/Elements/Paragraphs/Text/RunFormat.cs → ...s/Paragraphs/Text/Formatting/RunFormat.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Word/OfficeFlow.Word.Core/Elements/Paragraphs/Text/LineBreak.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Word/OfficeFlow.Word.OpenXml.Tests/OpenXmlElementReaderTests/LineBreakTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.