Skip to content

Commit

Permalink
clean up syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjebo committed Jan 5, 2023
1 parent 8266a2c commit 7220f4b
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/DocumentFormat.OpenXml.Framework/Packaging/OpenSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ namespace DocumentFormat.OpenXml.Packaging
/// </summary>
public class OpenSettings
{
private bool? _autoSave;
private MarkupCompatibilityProcessSettings? _mcSettings;
private bool? _ignoreExceptionsOnCalcChainPartMissing;

/// <summary>
/// Initializes a new instance of the <see cref="OpenSettings"/> class.
Expand Down Expand Up @@ -40,11 +38,7 @@ internal OpenSettings(OpenSettings? other)
/// Gets or sets a value indicating whether to auto save document modifications.
/// The default value is true.
/// </summary>
public bool AutoSave
{
get => _autoSave ?? true;
set => _autoSave = value;
}
public bool AutoSave { get; set; } = true;

/// <summary>
/// Gets or sets the value of the markup compatibility processing mode.
Expand All @@ -53,10 +47,7 @@ public MarkupCompatibilityProcessSettings MarkupCompatibilityProcessSettings
{
get
{
if (_mcSettings is null)
{
_mcSettings = new MarkupCompatibilityProcessSettings(MarkupCompatibilityProcessMode.NoProcess, FileFormatVersions.Office2007);
}
_mcSettings ??= new MarkupCompatibilityProcessSettings(MarkupCompatibilityProcessMode.NoProcess, FileFormatVersions.Office2007);

return _mcSettings;
}
Expand Down Expand Up @@ -84,10 +75,6 @@ public MarkupCompatibilityProcessSettings MarkupCompatibilityProcessSettings
/// Gets or sets a value indicating whether to ignore an exception if the calcChain part is missing.
/// The default value is false which means missing calcChain part will throw an exception upon package open.
/// </summary>
public bool IgnoreExceptionOnCalcChainPartMissing
{
get => _ignoreExceptionsOnCalcChainPartMissing ?? false;
set => _ignoreExceptionsOnCalcChainPartMissing = value;
}
public bool IgnoreExceptionOnCalcChainPartMissing { get; set; }
}
}

0 comments on commit 7220f4b

Please sign in to comment.