From f9d075bc3fb13e723e52dbeac29d16fca023bcf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Thu, 13 Aug 2020 22:19:57 +0200 Subject: [PATCH 01/23] Enable nullable reference types --- src/WpfMath.Example/WpfMath.Example.csproj | 9 ++++++++- src/WpfMath/Atoms/AccentedAtom.cs | 2 ++ src/WpfMath/Atoms/Atom.cs | 2 ++ src/WpfMath/Atoms/BigOperatorAtom.cs | 2 ++ src/WpfMath/Atoms/CharAtom.cs | 2 ++ src/WpfMath/Atoms/CharSymbol.cs | 2 ++ src/WpfMath/Atoms/DummyAtom.cs | 2 ++ src/WpfMath/Atoms/FencedAtom.cs | 2 ++ src/WpfMath/Atoms/FixedCharAtom.cs | 2 ++ src/WpfMath/Atoms/FractionAtom.cs | 2 ++ src/WpfMath/Atoms/IRow.cs | 2 ++ src/WpfMath/Atoms/MatrixAtom.cs | 2 ++ src/WpfMath/Atoms/NullAtom.cs | 2 ++ src/WpfMath/Atoms/OverUnderDelimiter.cs | 2 ++ src/WpfMath/Atoms/OverlinedAtom.cs | 2 ++ src/WpfMath/Atoms/PhantomAtom.cs | 2 ++ src/WpfMath/Atoms/Radical.cs | 2 ++ src/WpfMath/Atoms/RowAtom.cs | 2 ++ src/WpfMath/Atoms/ScriptsAtom.cs | 2 ++ src/WpfMath/Atoms/SpaceAtom.cs | 2 ++ src/WpfMath/Atoms/StyledAtom.cs | 2 ++ src/WpfMath/Atoms/SymbolAtom.cs | 2 ++ src/WpfMath/Atoms/TypedAtom.cs | 2 ++ src/WpfMath/Atoms/UnderOverAtom.cs | 2 ++ src/WpfMath/Atoms/UnderlinedAtom.cs | 2 ++ src/WpfMath/Atoms/VerticalCenteredAtom.cs | 2 ++ src/WpfMath/Boxes/Box.cs | 2 ++ src/WpfMath/Boxes/CharBox.cs | 2 ++ src/WpfMath/Boxes/GlueBox.cs | 2 ++ src/WpfMath/Boxes/HorizontalBox.cs | 2 ++ src/WpfMath/Boxes/HorizontalRule.cs | 2 ++ src/WpfMath/Boxes/OverBar.cs | 2 ++ src/WpfMath/Boxes/OverUnderBox.cs | 2 ++ src/WpfMath/Boxes/StrutBox.cs | 2 ++ src/WpfMath/Boxes/VerticalBox.cs | 2 ++ src/WpfMath/CharFont.cs | 2 ++ src/WpfMath/CharInfo.cs | 2 ++ src/WpfMath/Colors/CmykColorParser.cs | 2 ++ src/WpfMath/Colors/FixedComponentCountColorParser.cs | 2 ++ src/WpfMath/Colors/FloatRgbColorParser.cs | 2 ++ src/WpfMath/Colors/GrayscaleColorParser.cs | 2 ++ src/WpfMath/Colors/HtmlColorParser.cs | 2 ++ src/WpfMath/Colors/IColorParser.cs | 2 ++ src/WpfMath/Colors/IntegerRgbColorParser.cs | 2 ++ src/WpfMath/Colors/PredefinedColorParser.cs | 2 ++ src/WpfMath/Colors/RgbColorParserBase.cs | 2 ++ src/WpfMath/Colors/SingleComponentColorParser.cs | 2 ++ src/WpfMath/Colors/StandardColorParsers.cs | 2 ++ src/WpfMath/Controls/FormulaControl.xaml.cs | 2 ++ src/WpfMath/Controls/VisualContainerElement.cs | 2 ++ src/WpfMath/Converters/SVGConverter.cs | 2 ++ src/WpfMath/DefaultTexFont.cs | 2 ++ src/WpfMath/DefaultTexFontParser.cs | 2 ++ src/WpfMath/DelimiterFactory.cs | 2 ++ src/WpfMath/DelimiterInfo.cs | 2 ++ src/WpfMath/DelimiterMappingNotFoundException.cs | 2 ++ .../Exceptions/TexCharacterMappingNotFoundException.cs | 2 ++ src/WpfMath/Exceptions/TexException.cs | 2 ++ src/WpfMath/Exceptions/TexNotSupportedException.cs | 2 ++ src/WpfMath/Exceptions/TexParseException.cs | 2 ++ .../Exceptions/TextStyleMappingNotFoundException.cs | 2 ++ src/WpfMath/Exceptions/TypeFaceNotFoundException.cs | 2 ++ src/WpfMath/ExtensionChar.cs | 2 ++ src/WpfMath/Extensions.cs | 2 ++ src/WpfMath/FormulaNotFoundException.cs | 2 ++ src/WpfMath/Glue.cs | 2 ++ src/WpfMath/GlueSettingsParser.cs | 2 ++ src/WpfMath/ITeXFont.cs | 2 ++ src/WpfMath/Parsers/CommandParsers.cs | 2 ++ src/WpfMath/Parsers/DefaultCommandEnvironment.cs | 2 ++ src/WpfMath/Parsers/ICommandEnvironment.cs | 2 ++ src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs | 2 ++ .../Parsers/Matrices/MatrixInternalEnvironment.cs | 2 ++ src/WpfMath/Parsers/Matrices/NextRowCommand.cs | 2 ++ src/WpfMath/Parsers/NonRecursiveEnvironment.cs | 2 ++ src/WpfMath/Parsers/StandardCommands.cs | 2 ++ src/WpfMath/PredefinedTexFormulaSettingsParser.cs | 2 ++ src/WpfMath/Rendering/GeometryElementRenderer.cs | 2 ++ src/WpfMath/Rendering/GeometryHelper.cs | 2 ++ src/WpfMath/Rendering/IElementRenderer.cs | 2 ++ src/WpfMath/Rendering/Transformations/Transformation.cs | 2 ++ src/WpfMath/Rendering/WpfElementRenderer.cs | 2 ++ src/WpfMath/SourceSpan.cs | 2 ++ src/WpfMath/SymbolMappingNotFoundException.cs | 2 ++ src/WpfMath/SymbolNotFoundException.cs | 2 ++ src/WpfMath/SystemFont.cs | 2 ++ src/WpfMath/TexEnvironment.cs | 2 ++ src/WpfMath/TexFontInfo.cs | 2 ++ src/WpfMath/TexFontMetrics.cs | 2 ++ src/WpfMath/TexFontUtilities.cs | 2 ++ src/WpfMath/TexFormula.cs | 2 ++ src/WpfMath/TexFormulaHelper.cs | 2 ++ src/WpfMath/TexFormulaParser.cs | 2 ++ src/WpfMath/TexPredefinedFormulaParser.cs | 2 ++ src/WpfMath/TexRenderer.cs | 2 ++ src/WpfMath/TexSymbolParser.cs | 2 ++ src/WpfMath/TexUtilities.cs | 2 ++ src/WpfMath/Utils/Result.cs | 2 ++ src/WpfMath/Utils/TupleExtensions.cs | 2 ++ src/WpfMath/WpfMath.csproj | 7 +++++++ src/WpfMath/XmlUtilities.cs | 2 ++ 101 files changed, 213 insertions(+), 1 deletion(-) diff --git a/src/WpfMath.Example/WpfMath.Example.csproj b/src/WpfMath.Example/WpfMath.Example.csproj index aaafc474..57522b58 100644 --- a/src/WpfMath.Example/WpfMath.Example.csproj +++ b/src/WpfMath.Example/WpfMath.Example.csproj @@ -6,8 +6,15 @@ true Full false + enable - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + diff --git a/src/WpfMath/Atoms/AccentedAtom.cs b/src/WpfMath/Atoms/AccentedAtom.cs index cb2501fc..4558b64d 100644 --- a/src/WpfMath/Atoms/AccentedAtom.cs +++ b/src/WpfMath/Atoms/AccentedAtom.cs @@ -1,6 +1,8 @@ using System; using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing base atom with accent above it. diff --git a/src/WpfMath/Atoms/Atom.cs b/src/WpfMath/Atoms/Atom.cs index 27d25578..399677fb 100644 --- a/src/WpfMath/Atoms/Atom.cs +++ b/src/WpfMath/Atoms/Atom.cs @@ -1,5 +1,7 @@ using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom (smallest unit) of TexFormula. diff --git a/src/WpfMath/Atoms/BigOperatorAtom.cs b/src/WpfMath/Atoms/BigOperatorAtom.cs index a54fff26..e07b2fd3 100644 --- a/src/WpfMath/Atoms/BigOperatorAtom.cs +++ b/src/WpfMath/Atoms/BigOperatorAtom.cs @@ -1,6 +1,8 @@ using System; using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing big operator with optional limits. diff --git a/src/WpfMath/Atoms/CharAtom.cs b/src/WpfMath/Atoms/CharAtom.cs index 86197450..35bd2b2e 100644 --- a/src/WpfMath/Atoms/CharAtom.cs +++ b/src/WpfMath/Atoms/CharAtom.cs @@ -1,5 +1,7 @@ using WpfMath.Utils; +#nullable disable + namespace WpfMath.Atoms { // Atom representing single character in specific text style. diff --git a/src/WpfMath/Atoms/CharSymbol.cs b/src/WpfMath/Atoms/CharSymbol.cs index 5ed44ca0..664a2d46 100644 --- a/src/WpfMath/Atoms/CharSymbol.cs +++ b/src/WpfMath/Atoms/CharSymbol.cs @@ -1,6 +1,8 @@ using WpfMath.Boxes; using WpfMath.Utils; +#nullable disable + namespace WpfMath.Atoms { // Atom representing single character that can be marked as text symbol. diff --git a/src/WpfMath/Atoms/DummyAtom.cs b/src/WpfMath/Atoms/DummyAtom.cs index 1160d414..6a0ae075 100644 --- a/src/WpfMath/Atoms/DummyAtom.cs +++ b/src/WpfMath/Atoms/DummyAtom.cs @@ -1,6 +1,8 @@ using WpfMath.Boxes; using WpfMath.Utils; +#nullable disable + namespace WpfMath.Atoms { // Dummy atom representing atom whose type can change or which can be replaced by a ligature. diff --git a/src/WpfMath/Atoms/FencedAtom.cs b/src/WpfMath/Atoms/FencedAtom.cs index a78f1285..f79c15a6 100644 --- a/src/WpfMath/Atoms/FencedAtom.cs +++ b/src/WpfMath/Atoms/FencedAtom.cs @@ -1,6 +1,8 @@ using System; using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing base atom surrounded by delimeters. diff --git a/src/WpfMath/Atoms/FixedCharAtom.cs b/src/WpfMath/Atoms/FixedCharAtom.cs index c0f907d4..cf36a8c5 100644 --- a/src/WpfMath/Atoms/FixedCharAtom.cs +++ b/src/WpfMath/Atoms/FixedCharAtom.cs @@ -1,5 +1,7 @@ using WpfMath.Utils; +#nullable disable + namespace WpfMath.Atoms { // Atom representing character that does not depend on text style. diff --git a/src/WpfMath/Atoms/FractionAtom.cs b/src/WpfMath/Atoms/FractionAtom.cs index fac995fd..1a1437c2 100644 --- a/src/WpfMath/Atoms/FractionAtom.cs +++ b/src/WpfMath/Atoms/FractionAtom.cs @@ -1,5 +1,7 @@ using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing fraction, with or without separation line. diff --git a/src/WpfMath/Atoms/IRow.cs b/src/WpfMath/Atoms/IRow.cs index 02b66807..16475dc0 100644 --- a/src/WpfMath/Atoms/IRow.cs +++ b/src/WpfMath/Atoms/IRow.cs @@ -1,5 +1,7 @@ using WpfMath.Atoms; +#nullable disable + namespace WpfMath { // Atom consisting of child atoms displayed in horizontal row with glueElement between them. diff --git a/src/WpfMath/Atoms/MatrixAtom.cs b/src/WpfMath/Atoms/MatrixAtom.cs index e2a66b3d..c01cda0e 100644 --- a/src/WpfMath/Atoms/MatrixAtom.cs +++ b/src/WpfMath/Atoms/MatrixAtom.cs @@ -5,6 +5,8 @@ using WpfMath.Boxes; using WpfMath.Utils; +#nullable disable + namespace WpfMath.Atoms { /// An atom representing a tabular arrangement of atoms. diff --git a/src/WpfMath/Atoms/NullAtom.cs b/src/WpfMath/Atoms/NullAtom.cs index f421caaa..676babcf 100644 --- a/src/WpfMath/Atoms/NullAtom.cs +++ b/src/WpfMath/Atoms/NullAtom.cs @@ -1,5 +1,7 @@ using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { internal class NullAtom : Atom diff --git a/src/WpfMath/Atoms/OverUnderDelimiter.cs b/src/WpfMath/Atoms/OverUnderDelimiter.cs index c32387b1..19b7db65 100644 --- a/src/WpfMath/Atoms/OverUnderDelimiter.cs +++ b/src/WpfMath/Atoms/OverUnderDelimiter.cs @@ -2,6 +2,8 @@ using WpfMath.Atoms; using WpfMath.Boxes; +#nullable disable + namespace WpfMath { // Atom representing other atom with delimeter and script atoms over or under it. diff --git a/src/WpfMath/Atoms/OverlinedAtom.cs b/src/WpfMath/Atoms/OverlinedAtom.cs index a29ab1b8..bfd9ee2d 100644 --- a/src/WpfMath/Atoms/OverlinedAtom.cs +++ b/src/WpfMath/Atoms/OverlinedAtom.cs @@ -1,5 +1,7 @@ using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing other atom with horizontal rule above it. diff --git a/src/WpfMath/Atoms/PhantomAtom.cs b/src/WpfMath/Atoms/PhantomAtom.cs index e3e909b6..4bd2599c 100644 --- a/src/WpfMath/Atoms/PhantomAtom.cs +++ b/src/WpfMath/Atoms/PhantomAtom.cs @@ -1,5 +1,7 @@ using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing other atom that is not rendered. diff --git a/src/WpfMath/Atoms/Radical.cs b/src/WpfMath/Atoms/Radical.cs index 6bc0040a..d2f05354 100644 --- a/src/WpfMath/Atoms/Radical.cs +++ b/src/WpfMath/Atoms/Radical.cs @@ -2,6 +2,8 @@ using WpfMath.Atoms; using WpfMath.Boxes; +#nullable disable + namespace WpfMath { /// diff --git a/src/WpfMath/Atoms/RowAtom.cs b/src/WpfMath/Atoms/RowAtom.cs index 96026f1d..9b215d73 100644 --- a/src/WpfMath/Atoms/RowAtom.cs +++ b/src/WpfMath/Atoms/RowAtom.cs @@ -4,6 +4,8 @@ using System.Linq; using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing horizontal row of other atoms, separated by glue. diff --git a/src/WpfMath/Atoms/ScriptsAtom.cs b/src/WpfMath/Atoms/ScriptsAtom.cs index 7410a859..f949f24f 100644 --- a/src/WpfMath/Atoms/ScriptsAtom.cs +++ b/src/WpfMath/Atoms/ScriptsAtom.cs @@ -1,6 +1,8 @@ using System; using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing scripts to attach to other atom. diff --git a/src/WpfMath/Atoms/SpaceAtom.cs b/src/WpfMath/Atoms/SpaceAtom.cs index 19b734fe..a5083bd3 100644 --- a/src/WpfMath/Atoms/SpaceAtom.cs +++ b/src/WpfMath/Atoms/SpaceAtom.cs @@ -1,6 +1,8 @@ using System; using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing whitespace. diff --git a/src/WpfMath/Atoms/StyledAtom.cs b/src/WpfMath/Atoms/StyledAtom.cs index db065274..229288ad 100644 --- a/src/WpfMath/Atoms/StyledAtom.cs +++ b/src/WpfMath/Atoms/StyledAtom.cs @@ -1,6 +1,8 @@ using System.Windows.Media; using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom specifying graphical style. diff --git a/src/WpfMath/Atoms/SymbolAtom.cs b/src/WpfMath/Atoms/SymbolAtom.cs index 7045bdea..cf921b22 100644 --- a/src/WpfMath/Atoms/SymbolAtom.cs +++ b/src/WpfMath/Atoms/SymbolAtom.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using WpfMath.Utils; +#nullable disable + namespace WpfMath.Atoms { // Atom representing symbol (non-alphanumeric character). diff --git a/src/WpfMath/Atoms/TypedAtom.cs b/src/WpfMath/Atoms/TypedAtom.cs index 5c7ce6db..5f0585d5 100644 --- a/src/WpfMath/Atoms/TypedAtom.cs +++ b/src/WpfMath/Atoms/TypedAtom.cs @@ -1,5 +1,7 @@ using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing other atom with custom left and right types. diff --git a/src/WpfMath/Atoms/UnderOverAtom.cs b/src/WpfMath/Atoms/UnderOverAtom.cs index 09b10fc6..630bdf07 100644 --- a/src/WpfMath/Atoms/UnderOverAtom.cs +++ b/src/WpfMath/Atoms/UnderOverAtom.cs @@ -1,6 +1,8 @@ using System; using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing other atom with atoms optionally over and under it. diff --git a/src/WpfMath/Atoms/UnderlinedAtom.cs b/src/WpfMath/Atoms/UnderlinedAtom.cs index f19bebfd..21646697 100644 --- a/src/WpfMath/Atoms/UnderlinedAtom.cs +++ b/src/WpfMath/Atoms/UnderlinedAtom.cs @@ -1,5 +1,7 @@ using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing other atom that is underlined. diff --git a/src/WpfMath/Atoms/VerticalCenteredAtom.cs b/src/WpfMath/Atoms/VerticalCenteredAtom.cs index 6cf528f7..6a87339a 100644 --- a/src/WpfMath/Atoms/VerticalCenteredAtom.cs +++ b/src/WpfMath/Atoms/VerticalCenteredAtom.cs @@ -1,5 +1,7 @@ using WpfMath.Boxes; +#nullable disable + namespace WpfMath.Atoms { // Atom representing other atom vertically centered with respect to axis. diff --git a/src/WpfMath/Boxes/Box.cs b/src/WpfMath/Boxes/Box.cs index be760846..82b1919e 100644 --- a/src/WpfMath/Boxes/Box.cs +++ b/src/WpfMath/Boxes/Box.cs @@ -3,6 +3,8 @@ using System.Windows.Media; using WpfMath.Rendering; +#nullable disable + namespace WpfMath.Boxes { // Represents graphical box that is part of math expression, and can itself contain child boxes. diff --git a/src/WpfMath/Boxes/CharBox.cs b/src/WpfMath/Boxes/CharBox.cs index a864f150..e4a60378 100644 --- a/src/WpfMath/Boxes/CharBox.cs +++ b/src/WpfMath/Boxes/CharBox.cs @@ -4,6 +4,8 @@ using WpfMath.Exceptions; using WpfMath.Rendering; +#nullable disable + namespace WpfMath.Boxes { // Box representing single character. diff --git a/src/WpfMath/Boxes/GlueBox.cs b/src/WpfMath/Boxes/GlueBox.cs index bad54081..608387df 100644 --- a/src/WpfMath/Boxes/GlueBox.cs +++ b/src/WpfMath/Boxes/GlueBox.cs @@ -1,5 +1,7 @@ using WpfMath.Rendering; +#nullable disable + namespace WpfMath.Boxes { // Box representing glue. diff --git a/src/WpfMath/Boxes/HorizontalBox.cs b/src/WpfMath/Boxes/HorizontalBox.cs index de95bc9d..e770caef 100644 --- a/src/WpfMath/Boxes/HorizontalBox.cs +++ b/src/WpfMath/Boxes/HorizontalBox.cs @@ -2,6 +2,8 @@ using System.Windows.Media; using WpfMath.Rendering; +#nullable disable + namespace WpfMath.Boxes { // Box containing horizontal stack of child boxes. diff --git a/src/WpfMath/Boxes/HorizontalRule.cs b/src/WpfMath/Boxes/HorizontalRule.cs index f1990e5e..6c062ecf 100644 --- a/src/WpfMath/Boxes/HorizontalRule.cs +++ b/src/WpfMath/Boxes/HorizontalRule.cs @@ -2,6 +2,8 @@ using System.Windows.Media; using WpfMath.Rendering; +#nullable disable + namespace WpfMath.Boxes { // Box representing horizontal line. diff --git a/src/WpfMath/Boxes/OverBar.cs b/src/WpfMath/Boxes/OverBar.cs index 6904b7bb..acf42d52 100644 --- a/src/WpfMath/Boxes/OverBar.cs +++ b/src/WpfMath/Boxes/OverBar.cs @@ -1,3 +1,5 @@ +#nullable disable + namespace WpfMath.Boxes { // Box representing other box with horizontal rule above it. diff --git a/src/WpfMath/Boxes/OverUnderBox.cs b/src/WpfMath/Boxes/OverUnderBox.cs index 492b6908..9479a84e 100644 --- a/src/WpfMath/Boxes/OverUnderBox.cs +++ b/src/WpfMath/Boxes/OverUnderBox.cs @@ -1,6 +1,8 @@ using WpfMath.Rendering; using WpfMath.Rendering.Transformations; +#nullable disable + namespace WpfMath.Boxes { // Box representing other box with delimiter and script box over or under it. diff --git a/src/WpfMath/Boxes/StrutBox.cs b/src/WpfMath/Boxes/StrutBox.cs index 059c380c..99ef2578 100644 --- a/src/WpfMath/Boxes/StrutBox.cs +++ b/src/WpfMath/Boxes/StrutBox.cs @@ -1,5 +1,7 @@ using WpfMath.Rendering; +#nullable disable + namespace WpfMath.Boxes { // Box representing whitespace. diff --git a/src/WpfMath/Boxes/VerticalBox.cs b/src/WpfMath/Boxes/VerticalBox.cs index e6a467a9..95584289 100644 --- a/src/WpfMath/Boxes/VerticalBox.cs +++ b/src/WpfMath/Boxes/VerticalBox.cs @@ -1,6 +1,8 @@ using System; using WpfMath.Rendering; +#nullable disable + namespace WpfMath.Boxes { // Box containing vertical stack of child boxes. diff --git a/src/WpfMath/CharFont.cs b/src/WpfMath/CharFont.cs index ab3eb033..ea27d135 100644 --- a/src/WpfMath/CharFont.cs +++ b/src/WpfMath/CharFont.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +#nullable disable + namespace WpfMath { // Single character together with specific font. diff --git a/src/WpfMath/CharInfo.cs b/src/WpfMath/CharInfo.cs index f333d178..af4b233a 100644 --- a/src/WpfMath/CharInfo.cs +++ b/src/WpfMath/CharInfo.cs @@ -1,5 +1,7 @@ using System.Windows.Media; +#nullable disable + namespace WpfMath { // Single character togeter with information about font and metrics. diff --git a/src/WpfMath/Colors/CmykColorParser.cs b/src/WpfMath/Colors/CmykColorParser.cs index 621157f7..4454960e 100644 --- a/src/WpfMath/Colors/CmykColorParser.cs +++ b/src/WpfMath/Colors/CmykColorParser.cs @@ -4,6 +4,8 @@ using System.Linq; using System.Windows.Media; +#nullable disable + namespace WpfMath.Colors { internal class CmykColorParser : IColorParser diff --git a/src/WpfMath/Colors/FixedComponentCountColorParser.cs b/src/WpfMath/Colors/FixedComponentCountColorParser.cs index b51822bd..e94b2f8b 100644 --- a/src/WpfMath/Colors/FixedComponentCountColorParser.cs +++ b/src/WpfMath/Colors/FixedComponentCountColorParser.cs @@ -2,6 +2,8 @@ using System.Linq; using System.Windows.Media; +#nullable disable + namespace WpfMath.Colors { /// A color parser that requires an exact number of components. diff --git a/src/WpfMath/Colors/FloatRgbColorParser.cs b/src/WpfMath/Colors/FloatRgbColorParser.cs index 2017295b..3663d363 100644 --- a/src/WpfMath/Colors/FloatRgbColorParser.cs +++ b/src/WpfMath/Colors/FloatRgbColorParser.cs @@ -1,6 +1,8 @@ using System; using System.Globalization; +#nullable disable + namespace WpfMath.Colors { internal class FloatRgbColorParser : RgbColorParserBase diff --git a/src/WpfMath/Colors/GrayscaleColorParser.cs b/src/WpfMath/Colors/GrayscaleColorParser.cs index b6a06254..74305ed2 100644 --- a/src/WpfMath/Colors/GrayscaleColorParser.cs +++ b/src/WpfMath/Colors/GrayscaleColorParser.cs @@ -4,6 +4,8 @@ using System.Linq; using System.Windows.Media; +#nullable disable + namespace WpfMath.Colors { internal class GrayscaleColorParser : IColorParser diff --git a/src/WpfMath/Colors/HtmlColorParser.cs b/src/WpfMath/Colors/HtmlColorParser.cs index e6138f6b..f39b97be 100644 --- a/src/WpfMath/Colors/HtmlColorParser.cs +++ b/src/WpfMath/Colors/HtmlColorParser.cs @@ -1,6 +1,8 @@ using System.Globalization; using System.Windows.Media; +#nullable disable + namespace WpfMath.Colors { internal class HtmlColorParser : SingleComponentColorParser diff --git a/src/WpfMath/Colors/IColorParser.cs b/src/WpfMath/Colors/IColorParser.cs index db1a9c22..0a9f5fa2 100644 --- a/src/WpfMath/Colors/IColorParser.cs +++ b/src/WpfMath/Colors/IColorParser.cs @@ -1,6 +1,8 @@ using System.Collections.Generic; using System.Windows.Media; +#nullable disable + namespace WpfMath.Colors { /// A parser for colors in commands like \color and \colorbox. diff --git a/src/WpfMath/Colors/IntegerRgbColorParser.cs b/src/WpfMath/Colors/IntegerRgbColorParser.cs index 9766da06..184ecbe3 100644 --- a/src/WpfMath/Colors/IntegerRgbColorParser.cs +++ b/src/WpfMath/Colors/IntegerRgbColorParser.cs @@ -1,6 +1,8 @@ using System; using System.Globalization; +#nullable disable + namespace WpfMath.Colors { internal class IntegerRgbColorParser : RgbColorParserBase diff --git a/src/WpfMath/Colors/PredefinedColorParser.cs b/src/WpfMath/Colors/PredefinedColorParser.cs index 5c34b9ff..3a977c5d 100644 --- a/src/WpfMath/Colors/PredefinedColorParser.cs +++ b/src/WpfMath/Colors/PredefinedColorParser.cs @@ -6,6 +6,8 @@ using System.Windows.Media; using System.Xml.Linq; +#nullable disable + namespace WpfMath.Colors { public class PredefinedColorParser : IColorParser diff --git a/src/WpfMath/Colors/RgbColorParserBase.cs b/src/WpfMath/Colors/RgbColorParserBase.cs index b7df2f5d..5ddcf0c8 100644 --- a/src/WpfMath/Colors/RgbColorParserBase.cs +++ b/src/WpfMath/Colors/RgbColorParserBase.cs @@ -4,6 +4,8 @@ using System.Windows.Media; using WpfMath.Utils; +#nullable disable + namespace WpfMath.Colors { /// Helps to differentiate RGBA and ARGB color models, if necessary. diff --git a/src/WpfMath/Colors/SingleComponentColorParser.cs b/src/WpfMath/Colors/SingleComponentColorParser.cs index f5575a76..e30f6758 100644 --- a/src/WpfMath/Colors/SingleComponentColorParser.cs +++ b/src/WpfMath/Colors/SingleComponentColorParser.cs @@ -2,6 +2,8 @@ using System.Linq; using System.Windows.Media; +#nullable disable + namespace WpfMath.Colors { /// A base class for color parsers that only require one component. diff --git a/src/WpfMath/Colors/StandardColorParsers.cs b/src/WpfMath/Colors/StandardColorParsers.cs index c42cc60d..9b806aa8 100644 --- a/src/WpfMath/Colors/StandardColorParsers.cs +++ b/src/WpfMath/Colors/StandardColorParsers.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; +#nullable disable + namespace WpfMath.Colors { public static class StandardColorParsers diff --git a/src/WpfMath/Controls/FormulaControl.xaml.cs b/src/WpfMath/Controls/FormulaControl.xaml.cs index fa4b7413..6c4a6a0d 100644 --- a/src/WpfMath/Controls/FormulaControl.xaml.cs +++ b/src/WpfMath/Controls/FormulaControl.xaml.cs @@ -7,6 +7,8 @@ using WpfMath.Boxes; using WpfMath.Exceptions; +#nullable disable + namespace WpfMath.Controls { /// diff --git a/src/WpfMath/Controls/VisualContainerElement.cs b/src/WpfMath/Controls/VisualContainerElement.cs index a7da708d..cd5bc689 100644 --- a/src/WpfMath/Controls/VisualContainerElement.cs +++ b/src/WpfMath/Controls/VisualContainerElement.cs @@ -5,6 +5,8 @@ using System.Windows; using System.Windows.Media; +#nullable disable + namespace WpfMath.Controls { public class VisualContainerElement : FrameworkElement diff --git a/src/WpfMath/Converters/SVGConverter.cs b/src/WpfMath/Converters/SVGConverter.cs index 67c9e713..8e9ee8ac 100644 --- a/src/WpfMath/Converters/SVGConverter.cs +++ b/src/WpfMath/Converters/SVGConverter.cs @@ -6,6 +6,8 @@ using System.Globalization; using System.Diagnostics; +#nullable disable + namespace WpfMath.Converters { public class SVGConverter diff --git a/src/WpfMath/DefaultTexFont.cs b/src/WpfMath/DefaultTexFont.cs index 6435d5ed..40234886 100644 --- a/src/WpfMath/DefaultTexFont.cs +++ b/src/WpfMath/DefaultTexFont.cs @@ -3,6 +3,8 @@ using WpfMath.Exceptions; using WpfMath.Utils; +#nullable disable + namespace WpfMath { // Default implementation of ITeXFont that reads all font information from XML file. diff --git a/src/WpfMath/DefaultTexFontParser.cs b/src/WpfMath/DefaultTexFontParser.cs index 5f3ac9ee..2d4e95ab 100644 --- a/src/WpfMath/DefaultTexFontParser.cs +++ b/src/WpfMath/DefaultTexFontParser.cs @@ -7,6 +7,8 @@ using System.Windows.Media; using System.Xml.Linq; +#nullable disable + namespace WpfMath { // Parses information for DefaultTeXFont settings from XML file. diff --git a/src/WpfMath/DelimiterFactory.cs b/src/WpfMath/DelimiterFactory.cs index 31ca0722..227f0311 100644 --- a/src/WpfMath/DelimiterFactory.cs +++ b/src/WpfMath/DelimiterFactory.cs @@ -4,6 +4,8 @@ using System.Text; using WpfMath.Boxes; +#nullable disable + namespace WpfMath { // Creates boxes containing delimeter symbol that exists in different sizes. diff --git a/src/WpfMath/DelimiterInfo.cs b/src/WpfMath/DelimiterInfo.cs index 835edef9..05e8f906 100644 --- a/src/WpfMath/DelimiterInfo.cs +++ b/src/WpfMath/DelimiterInfo.cs @@ -1,5 +1,7 @@ using WpfMath.Atoms; +#nullable disable + namespace WpfMath { /// diff --git a/src/WpfMath/DelimiterMappingNotFoundException.cs b/src/WpfMath/DelimiterMappingNotFoundException.cs index 87b3d735..0647f539 100644 --- a/src/WpfMath/DelimiterMappingNotFoundException.cs +++ b/src/WpfMath/DelimiterMappingNotFoundException.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +#nullable disable + namespace WpfMath { public class DelimiterMappingNotFoundException : Exception diff --git a/src/WpfMath/Exceptions/TexCharacterMappingNotFoundException.cs b/src/WpfMath/Exceptions/TexCharacterMappingNotFoundException.cs index ff7d69ca..6124dfc2 100644 --- a/src/WpfMath/Exceptions/TexCharacterMappingNotFoundException.cs +++ b/src/WpfMath/Exceptions/TexCharacterMappingNotFoundException.cs @@ -1,3 +1,5 @@ +#nullable disable + namespace WpfMath.Exceptions { public class TexCharacterMappingNotFoundException : TexException diff --git a/src/WpfMath/Exceptions/TexException.cs b/src/WpfMath/Exceptions/TexException.cs index eb13917e..03bbf9c1 100644 --- a/src/WpfMath/Exceptions/TexException.cs +++ b/src/WpfMath/Exceptions/TexException.cs @@ -1,5 +1,7 @@ using System; +#nullable disable + namespace WpfMath.Exceptions { public abstract class TexException : Exception diff --git a/src/WpfMath/Exceptions/TexNotSupportedException.cs b/src/WpfMath/Exceptions/TexNotSupportedException.cs index a81f94aa..2bcaccb9 100644 --- a/src/WpfMath/Exceptions/TexNotSupportedException.cs +++ b/src/WpfMath/Exceptions/TexNotSupportedException.cs @@ -1,3 +1,5 @@ +#nullable disable + namespace WpfMath.Exceptions { public class TexNotSupportedException : TexException diff --git a/src/WpfMath/Exceptions/TexParseException.cs b/src/WpfMath/Exceptions/TexParseException.cs index 090ef1da..df20396e 100644 --- a/src/WpfMath/Exceptions/TexParseException.cs +++ b/src/WpfMath/Exceptions/TexParseException.cs @@ -1,5 +1,7 @@ using System; +#nullable disable + namespace WpfMath.Exceptions { public class TexParseException : TexException diff --git a/src/WpfMath/Exceptions/TextStyleMappingNotFoundException.cs b/src/WpfMath/Exceptions/TextStyleMappingNotFoundException.cs index 0bd5c9bb..42afb67a 100644 --- a/src/WpfMath/Exceptions/TextStyleMappingNotFoundException.cs +++ b/src/WpfMath/Exceptions/TextStyleMappingNotFoundException.cs @@ -1,3 +1,5 @@ +#nullable disable + namespace WpfMath.Exceptions { public class TextStyleMappingNotFoundException : TexException diff --git a/src/WpfMath/Exceptions/TypeFaceNotFoundException.cs b/src/WpfMath/Exceptions/TypeFaceNotFoundException.cs index ec20cdc4..2d3d20a5 100644 --- a/src/WpfMath/Exceptions/TypeFaceNotFoundException.cs +++ b/src/WpfMath/Exceptions/TypeFaceNotFoundException.cs @@ -1,3 +1,5 @@ +#nullable disable + namespace WpfMath.Exceptions { public class TypeFaceNotFoundException : TexException diff --git a/src/WpfMath/ExtensionChar.cs b/src/WpfMath/ExtensionChar.cs index dce5fa8b..e8be8eeb 100644 --- a/src/WpfMath/ExtensionChar.cs +++ b/src/WpfMath/ExtensionChar.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +#nullable disable + namespace WpfMath { // Extension character that contains character information for each of its parts. diff --git a/src/WpfMath/Extensions.cs b/src/WpfMath/Extensions.cs index 118d8c6b..753158f0 100644 --- a/src/WpfMath/Extensions.cs +++ b/src/WpfMath/Extensions.cs @@ -1,6 +1,8 @@ using System.Windows.Media.Imaging; using System.IO; +#nullable disable + namespace WpfMath { public static class Extensions diff --git a/src/WpfMath/FormulaNotFoundException.cs b/src/WpfMath/FormulaNotFoundException.cs index ed6fb6cf..8977c496 100644 --- a/src/WpfMath/FormulaNotFoundException.cs +++ b/src/WpfMath/FormulaNotFoundException.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +#nullable disable + namespace WpfMath { public class FormulaNotFoundException : Exception diff --git a/src/WpfMath/Glue.cs b/src/WpfMath/Glue.cs index b8efcb82..0aba4ddf 100644 --- a/src/WpfMath/Glue.cs +++ b/src/WpfMath/Glue.cs @@ -4,6 +4,8 @@ using System.Text; using WpfMath.Boxes; +#nullable disable + namespace WpfMath { // Represents glueElement for holding together boxes. diff --git a/src/WpfMath/GlueSettingsParser.cs b/src/WpfMath/GlueSettingsParser.cs index 7a2f6c12..853dec95 100644 --- a/src/WpfMath/GlueSettingsParser.cs +++ b/src/WpfMath/GlueSettingsParser.cs @@ -6,6 +6,8 @@ using System.Text; using System.Xml.Linq; +#nullable disable + namespace WpfMath { // Parses information about glue settings from XML file. diff --git a/src/WpfMath/ITeXFont.cs b/src/WpfMath/ITeXFont.cs index 15dc40d5..9a60a0ce 100644 --- a/src/WpfMath/ITeXFont.cs +++ b/src/WpfMath/ITeXFont.cs @@ -1,5 +1,7 @@ using WpfMath.Utils; +#nullable disable + namespace WpfMath { // Font that specifies how TexFormula objects are rendered. diff --git a/src/WpfMath/Parsers/CommandParsers.cs b/src/WpfMath/Parsers/CommandParsers.cs index d0148852..9e8513d4 100644 --- a/src/WpfMath/Parsers/CommandParsers.cs +++ b/src/WpfMath/Parsers/CommandParsers.cs @@ -1,6 +1,8 @@ using WpfMath.Atoms; using WpfMath.Exceptions; +#nullable disable + namespace WpfMath.Parsers { /// A context that will be passed to the command parser. diff --git a/src/WpfMath/Parsers/DefaultCommandEnvironment.cs b/src/WpfMath/Parsers/DefaultCommandEnvironment.cs index 6c9b6e7b..82d3018d 100644 --- a/src/WpfMath/Parsers/DefaultCommandEnvironment.cs +++ b/src/WpfMath/Parsers/DefaultCommandEnvironment.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; +#nullable disable + namespace WpfMath.Parsers { internal class DefaultCommandEnvironment : ICommandEnvironment diff --git a/src/WpfMath/Parsers/ICommandEnvironment.cs b/src/WpfMath/Parsers/ICommandEnvironment.cs index c6cfedcc..b6aebc6a 100644 --- a/src/WpfMath/Parsers/ICommandEnvironment.cs +++ b/src/WpfMath/Parsers/ICommandEnvironment.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; +#nullable disable + namespace WpfMath.Parsers { /// diff --git a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs index 00ac207b..6d28fe2d 100644 --- a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs +++ b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs @@ -3,6 +3,8 @@ using WpfMath.Atoms; using WpfMath.Exceptions; +#nullable disable + namespace WpfMath.Parsers.Matrices { /// A parser for matrix-like constructs. diff --git a/src/WpfMath/Parsers/Matrices/MatrixInternalEnvironment.cs b/src/WpfMath/Parsers/Matrices/MatrixInternalEnvironment.cs index 10010854..87be774d 100644 --- a/src/WpfMath/Parsers/Matrices/MatrixInternalEnvironment.cs +++ b/src/WpfMath/Parsers/Matrices/MatrixInternalEnvironment.cs @@ -1,6 +1,8 @@ using System.Collections.Generic; using WpfMath.Atoms; +#nullable disable + namespace WpfMath.Parsers.Matrices { internal class MatrixInternalEnvironment : NonRecursiveEnvironment diff --git a/src/WpfMath/Parsers/Matrices/NextRowCommand.cs b/src/WpfMath/Parsers/Matrices/NextRowCommand.cs index 4edafa04..9a3b5080 100644 --- a/src/WpfMath/Parsers/Matrices/NextRowCommand.cs +++ b/src/WpfMath/Parsers/Matrices/NextRowCommand.cs @@ -2,6 +2,8 @@ using System.Linq; using WpfMath.Atoms; +#nullable disable + namespace WpfMath.Parsers.Matrices { internal class NextRowCommand : ICommandParser diff --git a/src/WpfMath/Parsers/NonRecursiveEnvironment.cs b/src/WpfMath/Parsers/NonRecursiveEnvironment.cs index 8e509095..654744f6 100644 --- a/src/WpfMath/Parsers/NonRecursiveEnvironment.cs +++ b/src/WpfMath/Parsers/NonRecursiveEnvironment.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; +#nullable disable + namespace WpfMath.Parsers { internal abstract class NonRecursiveEnvironment : ICommandEnvironment diff --git a/src/WpfMath/Parsers/StandardCommands.cs b/src/WpfMath/Parsers/StandardCommands.cs index df8784ed..c5a6e6bc 100644 --- a/src/WpfMath/Parsers/StandardCommands.cs +++ b/src/WpfMath/Parsers/StandardCommands.cs @@ -2,6 +2,8 @@ using WpfMath.Atoms; using WpfMath.Parsers.Matrices; +#nullable disable + namespace WpfMath.Parsers { internal static class StandardCommands diff --git a/src/WpfMath/PredefinedTexFormulaSettingsParser.cs b/src/WpfMath/PredefinedTexFormulaSettingsParser.cs index 09092584..9d6c0a24 100644 --- a/src/WpfMath/PredefinedTexFormulaSettingsParser.cs +++ b/src/WpfMath/PredefinedTexFormulaSettingsParser.cs @@ -6,6 +6,8 @@ using System.Text; using System.Xml.Linq; +#nullable disable + namespace WpfMath { // Parses settings for predefined formulas from XML file. diff --git a/src/WpfMath/Rendering/GeometryElementRenderer.cs b/src/WpfMath/Rendering/GeometryElementRenderer.cs index 1fe0f5b2..9cea154b 100644 --- a/src/WpfMath/Rendering/GeometryElementRenderer.cs +++ b/src/WpfMath/Rendering/GeometryElementRenderer.cs @@ -6,6 +6,8 @@ using WpfMath.Boxes; using WpfMath.Rendering.Transformations; +#nullable disable + namespace WpfMath.Rendering { /// A renderer that renders the elements to a provided instance. diff --git a/src/WpfMath/Rendering/GeometryHelper.cs b/src/WpfMath/Rendering/GeometryHelper.cs index 0f1fac3d..d7e83fa1 100644 --- a/src/WpfMath/Rendering/GeometryHelper.cs +++ b/src/WpfMath/Rendering/GeometryHelper.cs @@ -1,6 +1,8 @@ using System.Windows; using System.Windows.Media; +#nullable disable + namespace WpfMath.Rendering { internal static class GeometryHelper diff --git a/src/WpfMath/Rendering/IElementRenderer.cs b/src/WpfMath/Rendering/IElementRenderer.cs index f66b28c2..6eae577f 100644 --- a/src/WpfMath/Rendering/IElementRenderer.cs +++ b/src/WpfMath/Rendering/IElementRenderer.cs @@ -4,6 +4,8 @@ using WpfMath.Boxes; using WpfMath.Rendering.Transformations; +#nullable disable + namespace WpfMath.Rendering { /// Renderer interface for WPF-Math elements. diff --git a/src/WpfMath/Rendering/Transformations/Transformation.cs b/src/WpfMath/Rendering/Transformations/Transformation.cs index 3b60585f..165fd0a4 100644 --- a/src/WpfMath/Rendering/Transformations/Transformation.cs +++ b/src/WpfMath/Rendering/Transformations/Transformation.cs @@ -1,3 +1,5 @@ +#nullable disable + namespace WpfMath.Rendering.Transformations { /// Geometrical transformation. diff --git a/src/WpfMath/Rendering/WpfElementRenderer.cs b/src/WpfMath/Rendering/WpfElementRenderer.cs index d722c1cb..f0215046 100644 --- a/src/WpfMath/Rendering/WpfElementRenderer.cs +++ b/src/WpfMath/Rendering/WpfElementRenderer.cs @@ -5,6 +5,8 @@ using WpfMath.Boxes; using WpfMath.Rendering.Transformations; +#nullable disable + namespace WpfMath.Rendering { /// The renderer that uses WPF drawing context. diff --git a/src/WpfMath/SourceSpan.cs b/src/WpfMath/SourceSpan.cs index c94efb95..7daac5e7 100644 --- a/src/WpfMath/SourceSpan.cs +++ b/src/WpfMath/SourceSpan.cs @@ -1,5 +1,7 @@ using System; +#nullable disable + namespace WpfMath { public class SourceSpan : IEquatable diff --git a/src/WpfMath/SymbolMappingNotFoundException.cs b/src/WpfMath/SymbolMappingNotFoundException.cs index 02c3f515..39cdd016 100644 --- a/src/WpfMath/SymbolMappingNotFoundException.cs +++ b/src/WpfMath/SymbolMappingNotFoundException.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +#nullable disable + namespace WpfMath { public class SymbolMappingNotFoundException : Exception diff --git a/src/WpfMath/SymbolNotFoundException.cs b/src/WpfMath/SymbolNotFoundException.cs index b88ec40e..09aa9a94 100644 --- a/src/WpfMath/SymbolNotFoundException.cs +++ b/src/WpfMath/SymbolNotFoundException.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +#nullable disable + namespace WpfMath { public class SymbolNotFoundException : Exception diff --git a/src/WpfMath/SystemFont.cs b/src/WpfMath/SystemFont.cs index 609fba4b..142b2aec 100644 --- a/src/WpfMath/SystemFont.cs +++ b/src/WpfMath/SystemFont.cs @@ -4,6 +4,8 @@ using WpfMath.Exceptions; using WpfMath.Utils; +#nullable disable + namespace WpfMath { internal class SystemFont : ITeXFont diff --git a/src/WpfMath/TexEnvironment.cs b/src/WpfMath/TexEnvironment.cs index 249ebefb..2b12787a 100644 --- a/src/WpfMath/TexEnvironment.cs +++ b/src/WpfMath/TexEnvironment.cs @@ -1,5 +1,7 @@ using System.Windows.Media; +#nullable disable + namespace WpfMath { // Specifies current graphical parameters used to create boxes. diff --git a/src/WpfMath/TexFontInfo.cs b/src/WpfMath/TexFontInfo.cs index bf34733e..86103ae8 100644 --- a/src/WpfMath/TexFontInfo.cs +++ b/src/WpfMath/TexFontInfo.cs @@ -4,6 +4,8 @@ using WpfMath.Exceptions; using WpfMath.Utils; +#nullable disable + namespace WpfMath { // Specifies all information about single font. diff --git a/src/WpfMath/TexFontMetrics.cs b/src/WpfMath/TexFontMetrics.cs index d64c37ac..7163b864 100644 --- a/src/WpfMath/TexFontMetrics.cs +++ b/src/WpfMath/TexFontMetrics.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +#nullable disable + namespace WpfMath { // Specifies font metrics for single character. diff --git a/src/WpfMath/TexFontUtilities.cs b/src/WpfMath/TexFontUtilities.cs index 2d632f4b..eed3b73f 100644 --- a/src/WpfMath/TexFontUtilities.cs +++ b/src/WpfMath/TexFontUtilities.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +#nullable disable + namespace WpfMath { internal static class TexFontUtilities diff --git a/src/WpfMath/TexFormula.cs b/src/WpfMath/TexFormula.cs index af77bbc3..6583082b 100644 --- a/src/WpfMath/TexFormula.cs +++ b/src/WpfMath/TexFormula.cs @@ -5,6 +5,8 @@ using WpfMath.Atoms; using WpfMath.Boxes; +#nullable disable + namespace WpfMath { // Represents mathematical formula that can be rendered. diff --git a/src/WpfMath/TexFormulaHelper.cs b/src/WpfMath/TexFormulaHelper.cs index da181a1c..55164892 100644 --- a/src/WpfMath/TexFormulaHelper.cs +++ b/src/WpfMath/TexFormulaHelper.cs @@ -1,5 +1,7 @@ using WpfMath.Atoms; +#nullable disable + namespace WpfMath { internal class TexFormulaHelper diff --git a/src/WpfMath/TexFormulaParser.cs b/src/WpfMath/TexFormulaParser.cs index 9679a987..62b72e34 100644 --- a/src/WpfMath/TexFormulaParser.cs +++ b/src/WpfMath/TexFormulaParser.cs @@ -10,6 +10,8 @@ using WpfMath.Parsers; using WpfMath.Utils; +#nullable disable + namespace WpfMath { // TODO: Put all error strings into resources. diff --git a/src/WpfMath/TexPredefinedFormulaParser.cs b/src/WpfMath/TexPredefinedFormulaParser.cs index a65afde5..d4ecc882 100644 --- a/src/WpfMath/TexPredefinedFormulaParser.cs +++ b/src/WpfMath/TexPredefinedFormulaParser.cs @@ -7,6 +7,8 @@ using System.Windows.Media; using System.Xml.Linq; +#nullable disable + namespace WpfMath { // Parses definitions of predefined formulas from XML file. diff --git a/src/WpfMath/TexRenderer.cs b/src/WpfMath/TexRenderer.cs index dd6eba09..6ad963bd 100644 --- a/src/WpfMath/TexRenderer.cs +++ b/src/WpfMath/TexRenderer.cs @@ -5,6 +5,8 @@ using WpfMath.Boxes; using WpfMath.Rendering; +#nullable disable + namespace WpfMath { public class TexRenderer diff --git a/src/WpfMath/TexSymbolParser.cs b/src/WpfMath/TexSymbolParser.cs index 8e523924..12674c6c 100644 --- a/src/WpfMath/TexSymbolParser.cs +++ b/src/WpfMath/TexSymbolParser.cs @@ -5,6 +5,8 @@ using System.Xml.Linq; using WpfMath.Atoms; +#nullable disable + namespace WpfMath { // Parse definitions of symbols from XML files. diff --git a/src/WpfMath/TexUtilities.cs b/src/WpfMath/TexUtilities.cs index 9b531958..f3160585 100644 --- a/src/WpfMath/TexUtilities.cs +++ b/src/WpfMath/TexUtilities.cs @@ -1,3 +1,5 @@ +#nullable disable + namespace WpfMath { internal static class TexUtilities diff --git a/src/WpfMath/Utils/Result.cs b/src/WpfMath/Utils/Result.cs index 00f38974..430a843b 100644 --- a/src/WpfMath/Utils/Result.cs +++ b/src/WpfMath/Utils/Result.cs @@ -1,5 +1,7 @@ using System; +#nullable disable + namespace WpfMath.Utils { internal static class Result diff --git a/src/WpfMath/Utils/TupleExtensions.cs b/src/WpfMath/Utils/TupleExtensions.cs index c5e2ae1a..e0fd89ff 100644 --- a/src/WpfMath/Utils/TupleExtensions.cs +++ b/src/WpfMath/Utils/TupleExtensions.cs @@ -1,5 +1,7 @@ using System; +#nullable disable + namespace WpfMath.Utils { #if NET452 // not needed for .NET Core 3.0+ because there're System.TupleExtensions diff --git a/src/WpfMath/WpfMath.csproj b/src/WpfMath/WpfMath.csproj index 89d286d4..1e9658b5 100644 --- a/src/WpfMath/WpfMath.csproj +++ b/src/WpfMath/WpfMath.csproj @@ -21,9 +21,16 @@ Copyright © Alex Regueiro 2010; Copyright © WPF-Math Contributors 2020 true snupkg + nullable + enable + annotations + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/WpfMath/XmlUtilities.cs b/src/WpfMath/XmlUtilities.cs index 3436b2cc..79d1bac5 100644 --- a/src/WpfMath/XmlUtilities.cs +++ b/src/WpfMath/XmlUtilities.cs @@ -5,6 +5,8 @@ using System.Text; using System.Xml.Linq; +#nullable disable + namespace WpfMath { internal static class XmlUtilities From 921fe88f073c31541f61267a3089488212b896e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Thu, 13 Aug 2020 22:47:31 +0200 Subject: [PATCH 02/23] Drop nullable disable flags for WpfMath.Colors. --- src/WpfMath/Colors/CmykColorParser.cs | 2 -- src/WpfMath/Colors/FixedComponentCountColorParser.cs | 2 -- src/WpfMath/Colors/FloatRgbColorParser.cs | 2 -- src/WpfMath/Colors/GrayscaleColorParser.cs | 2 -- src/WpfMath/Colors/HtmlColorParser.cs | 2 -- src/WpfMath/Colors/IColorParser.cs | 2 -- src/WpfMath/Colors/IntegerRgbColorParser.cs | 2 -- src/WpfMath/Colors/PredefinedColorParser.cs | 2 -- src/WpfMath/Colors/RgbColorParserBase.cs | 2 -- src/WpfMath/Colors/SingleComponentColorParser.cs | 2 -- src/WpfMath/Colors/StandardColorParsers.cs | 2 -- 11 files changed, 22 deletions(-) diff --git a/src/WpfMath/Colors/CmykColorParser.cs b/src/WpfMath/Colors/CmykColorParser.cs index 4454960e..621157f7 100644 --- a/src/WpfMath/Colors/CmykColorParser.cs +++ b/src/WpfMath/Colors/CmykColorParser.cs @@ -4,8 +4,6 @@ using System.Linq; using System.Windows.Media; -#nullable disable - namespace WpfMath.Colors { internal class CmykColorParser : IColorParser diff --git a/src/WpfMath/Colors/FixedComponentCountColorParser.cs b/src/WpfMath/Colors/FixedComponentCountColorParser.cs index e94b2f8b..b51822bd 100644 --- a/src/WpfMath/Colors/FixedComponentCountColorParser.cs +++ b/src/WpfMath/Colors/FixedComponentCountColorParser.cs @@ -2,8 +2,6 @@ using System.Linq; using System.Windows.Media; -#nullable disable - namespace WpfMath.Colors { /// A color parser that requires an exact number of components. diff --git a/src/WpfMath/Colors/FloatRgbColorParser.cs b/src/WpfMath/Colors/FloatRgbColorParser.cs index 3663d363..2017295b 100644 --- a/src/WpfMath/Colors/FloatRgbColorParser.cs +++ b/src/WpfMath/Colors/FloatRgbColorParser.cs @@ -1,8 +1,6 @@ using System; using System.Globalization; -#nullable disable - namespace WpfMath.Colors { internal class FloatRgbColorParser : RgbColorParserBase diff --git a/src/WpfMath/Colors/GrayscaleColorParser.cs b/src/WpfMath/Colors/GrayscaleColorParser.cs index 74305ed2..b6a06254 100644 --- a/src/WpfMath/Colors/GrayscaleColorParser.cs +++ b/src/WpfMath/Colors/GrayscaleColorParser.cs @@ -4,8 +4,6 @@ using System.Linq; using System.Windows.Media; -#nullable disable - namespace WpfMath.Colors { internal class GrayscaleColorParser : IColorParser diff --git a/src/WpfMath/Colors/HtmlColorParser.cs b/src/WpfMath/Colors/HtmlColorParser.cs index f39b97be..e6138f6b 100644 --- a/src/WpfMath/Colors/HtmlColorParser.cs +++ b/src/WpfMath/Colors/HtmlColorParser.cs @@ -1,8 +1,6 @@ using System.Globalization; using System.Windows.Media; -#nullable disable - namespace WpfMath.Colors { internal class HtmlColorParser : SingleComponentColorParser diff --git a/src/WpfMath/Colors/IColorParser.cs b/src/WpfMath/Colors/IColorParser.cs index 0a9f5fa2..db1a9c22 100644 --- a/src/WpfMath/Colors/IColorParser.cs +++ b/src/WpfMath/Colors/IColorParser.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; using System.Windows.Media; -#nullable disable - namespace WpfMath.Colors { /// A parser for colors in commands like \color and \colorbox. diff --git a/src/WpfMath/Colors/IntegerRgbColorParser.cs b/src/WpfMath/Colors/IntegerRgbColorParser.cs index 184ecbe3..9766da06 100644 --- a/src/WpfMath/Colors/IntegerRgbColorParser.cs +++ b/src/WpfMath/Colors/IntegerRgbColorParser.cs @@ -1,8 +1,6 @@ using System; using System.Globalization; -#nullable disable - namespace WpfMath.Colors { internal class IntegerRgbColorParser : RgbColorParserBase diff --git a/src/WpfMath/Colors/PredefinedColorParser.cs b/src/WpfMath/Colors/PredefinedColorParser.cs index 3a977c5d..5c34b9ff 100644 --- a/src/WpfMath/Colors/PredefinedColorParser.cs +++ b/src/WpfMath/Colors/PredefinedColorParser.cs @@ -6,8 +6,6 @@ using System.Windows.Media; using System.Xml.Linq; -#nullable disable - namespace WpfMath.Colors { public class PredefinedColorParser : IColorParser diff --git a/src/WpfMath/Colors/RgbColorParserBase.cs b/src/WpfMath/Colors/RgbColorParserBase.cs index 5ddcf0c8..b7df2f5d 100644 --- a/src/WpfMath/Colors/RgbColorParserBase.cs +++ b/src/WpfMath/Colors/RgbColorParserBase.cs @@ -4,8 +4,6 @@ using System.Windows.Media; using WpfMath.Utils; -#nullable disable - namespace WpfMath.Colors { /// Helps to differentiate RGBA and ARGB color models, if necessary. diff --git a/src/WpfMath/Colors/SingleComponentColorParser.cs b/src/WpfMath/Colors/SingleComponentColorParser.cs index e30f6758..f5575a76 100644 --- a/src/WpfMath/Colors/SingleComponentColorParser.cs +++ b/src/WpfMath/Colors/SingleComponentColorParser.cs @@ -2,8 +2,6 @@ using System.Linq; using System.Windows.Media; -#nullable disable - namespace WpfMath.Colors { /// A base class for color parsers that only require one component. diff --git a/src/WpfMath/Colors/StandardColorParsers.cs b/src/WpfMath/Colors/StandardColorParsers.cs index 9b806aa8..c42cc60d 100644 --- a/src/WpfMath/Colors/StandardColorParsers.cs +++ b/src/WpfMath/Colors/StandardColorParsers.cs @@ -1,7 +1,5 @@ using System.Collections.Generic; -#nullable disable - namespace WpfMath.Colors { public static class StandardColorParsers From 6bdc3485f731567518bfc871df7f2847ff383a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Thu, 13 Aug 2020 22:54:15 +0200 Subject: [PATCH 03/23] Drop nullable diable for SvgConverter. The `as` operator has been changed to pattern matching to avoid null checks entirely. --- src/WpfMath/Converters/SVGConverter.cs | 77 ++++++++++++-------------- 1 file changed, 34 insertions(+), 43 deletions(-) diff --git a/src/WpfMath/Converters/SVGConverter.cs b/src/WpfMath/Converters/SVGConverter.cs index 8e9ee8ac..a550d853 100644 --- a/src/WpfMath/Converters/SVGConverter.cs +++ b/src/WpfMath/Converters/SVGConverter.cs @@ -6,8 +6,6 @@ using System.Globalization; using System.Diagnostics; -#nullable disable - namespace WpfMath.Converters { public class SVGConverter @@ -17,8 +15,7 @@ public class SVGConverter public string ConvertGeometry(Geometry geometry) { StringBuilder svgOutput = new StringBuilder(); - GeometryGroup group = geometry as GeometryGroup; - if (group != null) + if (geometry is GeometryGroup group) { AddGeometry(svgOutput, group); } @@ -78,75 +75,69 @@ private void AddGeometry(StringBuilder svgString, PathGeometry path) foreach (PathSegment ps in pf.Segments) { - if (ps is PolyLineSegment) + if (ps is PolyLineSegment plSeg) { - PolyLineSegment seg = ps as PolyLineSegment; - for (int i = 0; i < seg.Points.Count; ++i) + for (int i = 0; i < plSeg.Points.Count; ++i) { svgString.Append("L "); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", plSeg.Points[i].X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", plSeg.Points[i].Y); } } - else if (ps is PolyBezierSegment) + else if (ps is PolyBezierSegment pbSeg) { - PolyBezierSegment seg = ps as PolyBezierSegment; - for (int i = 0; i < seg.Points.Count; i += 3) + for (int i = 0; i < pbSeg.Points.Count; i += 3) { svgString.Append("C "); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i].X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i].Y); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 1].X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 1].Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i + 1].X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i + 1].Y); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 2].X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 2].Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i + 2].X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i + 2].Y); } } - else if (ps is LineSegment) + else if (ps is LineSegment lSeg) { - LineSegment seg = ps as LineSegment; svgString.Append("L "); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point.X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point.Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", lSeg.Point.X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", lSeg.Point.Y); } - else if (ps is BezierSegment) + else if (ps is BezierSegment bSeg) { - BezierSegment seg = ps as BezierSegment; svgString.Append("C "); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point1.X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point1.Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point1.X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point1.Y); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point2.X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point2.Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point2.X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point2.Y); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point3.X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point3.Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point3.X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point3.Y); } - else if (ps is QuadraticBezierSegment) + else if (ps is QuadraticBezierSegment qbSeg) { //Untested: BuildGeometry converts quadratic bezier to cubic - QuadraticBezierSegment seg = ps as QuadraticBezierSegment; svgString.Append("Q "); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point1.X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point1.Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", qbSeg.Point1.X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", qbSeg.Point1.Y); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point2.X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point2.Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", qbSeg.Point2.X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", qbSeg.Point2.Y); } - else if (ps is PolyQuadraticBezierSegment) + else if (ps is PolyQuadraticBezierSegment pqbSeg) { //Untested: BuildGeometry converts quadratic bezier to cubic - PolyQuadraticBezierSegment seg = ps as PolyQuadraticBezierSegment; - for (int i = 0; i < seg.Points.Count; i += 2) + for (int i = 0; i < pqbSeg.Points.Count; i += 2) { svgString.Append("Q "); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pqbSeg.Points[i].X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pqbSeg.Points[i].Y); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 1].X); - svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 1].Y); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pqbSeg.Points[i + 1].X); + svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pqbSeg.Points[i + 1].Y); } } else From ff0c861b5b6d49a470f5b9161fd98c3c9f7980df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Thu, 13 Aug 2020 23:07:57 +0200 Subject: [PATCH 04/23] Drop nullable disable for Utils. Unconstrained generics make a `!` necessary. --- src/WpfMath/Utils/Result.cs | 10 ++++------ src/WpfMath/Utils/TupleExtensions.cs | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/WpfMath/Utils/Result.cs b/src/WpfMath/Utils/Result.cs index 430a843b..4f8cf62a 100644 --- a/src/WpfMath/Utils/Result.cs +++ b/src/WpfMath/Utils/Result.cs @@ -1,13 +1,11 @@ using System; -#nullable disable - namespace WpfMath.Utils { internal static class Result { public static Result Ok(TValue value) => new Result(value, null); - public static Result Error(Exception error) => new Result(default, error); + public static Result Error(Exception error) => new Result(default!, error); // Nullable: CS8604; can't be avoided with generics without constraints } internal readonly struct Result @@ -15,11 +13,11 @@ internal readonly struct Result private readonly TValue value; public TValue Value => this.Error == null ? this.value : throw this.Error; - public Exception Error { get; } + public Exception? Error { get; } public bool IsSuccess => this.Error == null; - public Result(TValue value, Exception error) + public Result(TValue value, Exception? error) { if (!Equals(value, default) && error != null) { @@ -32,6 +30,6 @@ public Result(TValue value, Exception error) public Result Map(Func mapper) => this.IsSuccess ? Result.Ok(mapper(this.Value)) - : Result.Error(this.Error); + : Result.Error(this.Error!); // Nullable: CS8604, could be resolved by inlining IsSuccess } } diff --git a/src/WpfMath/Utils/TupleExtensions.cs b/src/WpfMath/Utils/TupleExtensions.cs index e0fd89ff..c5e2ae1a 100644 --- a/src/WpfMath/Utils/TupleExtensions.cs +++ b/src/WpfMath/Utils/TupleExtensions.cs @@ -1,7 +1,5 @@ using System; -#nullable disable - namespace WpfMath.Utils { #if NET452 // not needed for .NET Core 3.0+ because there're System.TupleExtensions From 06fe829a111e13916b1c6940faa149bdb7994222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 07:08:15 +0200 Subject: [PATCH 05/23] Fixed nullable reference types in sample app. --- src/WpfMath.Example/App.xaml.cs | 2 +- src/WpfMath.Example/MainWindow.xaml.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/WpfMath.Example/App.xaml.cs b/src/WpfMath.Example/App.xaml.cs index 1930751c..89e8e09e 100644 --- a/src/WpfMath.Example/App.xaml.cs +++ b/src/WpfMath.Example/App.xaml.cs @@ -12,7 +12,7 @@ public partial class App : Application { public static new App Current { - get { return Application.Current as App; } + get { return (App) Application.Current; } } private void Application_Startup(object sender, StartupEventArgs e) diff --git a/src/WpfMath.Example/MainWindow.xaml.cs b/src/WpfMath.Example/MainWindow.xaml.cs index 4ab02329..2fc40177 100644 --- a/src/WpfMath.Example/MainWindow.xaml.cs +++ b/src/WpfMath.Example/MainWindow.xaml.cs @@ -37,10 +37,10 @@ public MainWindow() FormulaSelector.SelectedIndex = 0; } - private TexFormula ParseFormula(string input) + private TexFormula? ParseFormula(string input) { // Create formula object from input text. - TexFormula formula = null; + TexFormula? formula = null; try { formula = this._formulaParser.Parse(input); From fe99f63c17a8bb44d3feb5b5cfbe5c8b0aff3a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 09:08:13 +0200 Subject: [PATCH 06/23] Drop nullable disable on a few Tex* classes. --- src/WpfMath/CharFont.cs | 2 -- src/WpfMath/CharInfo.cs | 2 -- src/WpfMath/DefaultTexFont.cs | 6 ++---- src/WpfMath/DefaultTexFontParser.cs | 9 ++++----- src/WpfMath/ITeXFont.cs | 4 +--- src/WpfMath/SystemFont.cs | 4 +--- src/WpfMath/TexEnvironment.cs | 8 +++----- src/WpfMath/TexFontInfo.cs | 7 ++----- src/WpfMath/TexFontMetrics.cs | 2 -- src/WpfMath/TexFontUtilities.cs | 2 -- src/WpfMath/TexFormulaHelper.cs | 26 ++++++++++++-------------- src/WpfMath/TexRenderer.cs | 2 -- src/WpfMath/TexSymbolParser.cs | 5 +---- 13 files changed, 26 insertions(+), 53 deletions(-) diff --git a/src/WpfMath/CharFont.cs b/src/WpfMath/CharFont.cs index ea27d135..ab3eb033 100644 --- a/src/WpfMath/CharFont.cs +++ b/src/WpfMath/CharFont.cs @@ -3,8 +3,6 @@ using System.Linq; using System.Text; -#nullable disable - namespace WpfMath { // Single character together with specific font. diff --git a/src/WpfMath/CharInfo.cs b/src/WpfMath/CharInfo.cs index af4b233a..f333d178 100644 --- a/src/WpfMath/CharInfo.cs +++ b/src/WpfMath/CharInfo.cs @@ -1,7 +1,5 @@ using System.Windows.Media; -#nullable disable - namespace WpfMath { // Single character togeter with information about font and metrics. diff --git a/src/WpfMath/DefaultTexFont.cs b/src/WpfMath/DefaultTexFont.cs index 40234886..5ac971f6 100644 --- a/src/WpfMath/DefaultTexFont.cs +++ b/src/WpfMath/DefaultTexFont.cs @@ -3,8 +3,6 @@ using WpfMath.Exceptions; using WpfMath.Utils; -#nullable disable - namespace WpfMath { // Default implementation of ITeXFont that reads all font information from XML file. @@ -73,7 +71,7 @@ public ExtensionChar GetExtension(CharInfo charInfo, TexStyle style) // Create character for each part of extension. var fontInfo = fontInfoList[charInfo.FontId]; var extension = fontInfo.GetExtension(charInfo.Character); - var parts = new CharInfo[extension.Length]; + var parts = new CharInfo?[extension.Length]; for (int i = 0; i < extension.Length; i++) { if (extension[i] == (int)TexCharKind.None) @@ -94,7 +92,7 @@ public ExtensionChar GetExtension(CharInfo charInfo, TexStyle style) parts[TexFontUtilities.ExtensionBottom], parts[TexFontUtilities.ExtensionRepeat]); } - public CharFont GetLigature(CharFont leftCharFont, CharFont rightCharFont) + public CharFont? GetLigature(CharFont leftCharFont, CharFont rightCharFont) { if (leftCharFont.FontId != rightCharFont.FontId) return null; diff --git a/src/WpfMath/DefaultTexFontParser.cs b/src/WpfMath/DefaultTexFontParser.cs index 2d4e95ab..7015a714 100644 --- a/src/WpfMath/DefaultTexFontParser.cs +++ b/src/WpfMath/DefaultTexFontParser.cs @@ -7,8 +7,6 @@ using System.Windows.Media; using System.Xml.Linq; -#nullable disable - namespace WpfMath { // Parses information for DefaultTeXFont settings from XML file. @@ -52,8 +50,11 @@ private static void SetCharChildParsers() public DefaultTexFontParser() { - var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))); + var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? this.rootElement = doc.Root; + + this.parsedTextStyles = new Dictionary(); + ParseTextStyleMappings(); } @@ -197,8 +198,6 @@ public IDictionary GetTextStyleMappings() private void ParseTextStyleMappings() { - this.parsedTextStyles = new Dictionary(); - var textStyleMappings = rootElement.Element("TextStyleMappings"); if (textStyleMappings == null) throw new InvalidOperationException("Cannot find TextStyleMappings element."); diff --git a/src/WpfMath/ITeXFont.cs b/src/WpfMath/ITeXFont.cs index 9a60a0ce..4b0406f4 100644 --- a/src/WpfMath/ITeXFont.cs +++ b/src/WpfMath/ITeXFont.cs @@ -1,7 +1,5 @@ using WpfMath.Utils; -#nullable disable - namespace WpfMath { // Font that specifies how TexFormula objects are rendered. @@ -16,7 +14,7 @@ internal interface ITeXFont ExtensionChar GetExtension(CharInfo charInfo, TexStyle style); - CharFont GetLigature(CharFont leftChar, CharFont rightChar); + CharFont? GetLigature(CharFont leftChar, CharFont rightChar); CharInfo GetNextLargerCharInfo(CharInfo charInfo, TexStyle style); diff --git a/src/WpfMath/SystemFont.cs b/src/WpfMath/SystemFont.cs index 142b2aec..1bfa26d7 100644 --- a/src/WpfMath/SystemFont.cs +++ b/src/WpfMath/SystemFont.cs @@ -4,8 +4,6 @@ using WpfMath.Exceptions; using WpfMath.Utils; -#nullable disable - namespace WpfMath { internal class SystemFont : ITeXFont @@ -26,7 +24,7 @@ public SystemFont(double size, FontFamily fontFamily) public ExtensionChar GetExtension(CharInfo charInfo, TexStyle style) => throw MethodNotSupported(nameof(GetExtension)); - public CharFont GetLigature(CharFont leftChar, CharFont rightChar) => null; + public CharFont? GetLigature(CharFont leftChar, CharFont rightChar) => null; public CharInfo GetNextLargerCharInfo(CharInfo charInfo, TexStyle style) => throw MethodNotSupported(nameof(GetNextLargerCharInfo)); diff --git a/src/WpfMath/TexEnvironment.cs b/src/WpfMath/TexEnvironment.cs index 2b12787a..b6465cf8 100644 --- a/src/WpfMath/TexEnvironment.cs +++ b/src/WpfMath/TexEnvironment.cs @@ -1,7 +1,5 @@ using System.Windows.Media; -#nullable disable - namespace WpfMath { // Specifies current graphical parameters used to create boxes. @@ -15,7 +13,7 @@ public TexEnvironment(TexStyle style, ITeXFont mathFont, ITeXFont textFont) { } - private TexEnvironment(TexStyle style, ITeXFont mathFont, ITeXFont textFont, Brush background, Brush foreground) + private TexEnvironment(TexStyle style, ITeXFont mathFont, ITeXFont textFont, Brush? background, Brush? foreground) { if (style == TexStyle.Display || style == TexStyle.Text || style == TexStyle.Script || style == TexStyle.ScriptScript) @@ -43,13 +41,13 @@ public ITeXFont MathFont public ITeXFont TextFont { get; } - public Brush Background + public Brush? Background { get; set; } - public Brush Foreground + public Brush? Foreground { get; set; diff --git a/src/WpfMath/TexFontInfo.cs b/src/WpfMath/TexFontInfo.cs index 86103ae8..58b6ad86 100644 --- a/src/WpfMath/TexFontInfo.cs +++ b/src/WpfMath/TexFontInfo.cs @@ -4,8 +4,6 @@ using WpfMath.Exceptions; using WpfMath.Utils; -#nullable disable - namespace WpfMath { // Specifies all information about single font. @@ -115,11 +113,10 @@ public double GetKern(char leftChar, char rightChar, double factor) return kern * factor; } - public CharFont GetLigature(char left, char right) + public CharFont? GetLigature(char left, char right) { Tuple tpl = Tuple.Create(left, right); - char ch; - return this.ligatures.TryGetValue(tpl, out ch) ? new CharFont(ch, this.FontId) : null; + return this.ligatures.TryGetValue(tpl, out char ch) ? new CharFont(ch, this.FontId) : null; } public CharFont GetNextLarger(char character) diff --git a/src/WpfMath/TexFontMetrics.cs b/src/WpfMath/TexFontMetrics.cs index 7163b864..d64c37ac 100644 --- a/src/WpfMath/TexFontMetrics.cs +++ b/src/WpfMath/TexFontMetrics.cs @@ -3,8 +3,6 @@ using System.Linq; using System.Text; -#nullable disable - namespace WpfMath { // Specifies font metrics for single character. diff --git a/src/WpfMath/TexFontUtilities.cs b/src/WpfMath/TexFontUtilities.cs index eed3b73f..2d632f4b 100644 --- a/src/WpfMath/TexFontUtilities.cs +++ b/src/WpfMath/TexFontUtilities.cs @@ -3,8 +3,6 @@ using System.Linq; using System.Text; -#nullable disable - namespace WpfMath { internal static class TexFontUtilities diff --git a/src/WpfMath/TexFormulaHelper.cs b/src/WpfMath/TexFormulaHelper.cs index 55164892..db4e1c90 100644 --- a/src/WpfMath/TexFormulaHelper.cs +++ b/src/WpfMath/TexFormulaHelper.cs @@ -1,7 +1,5 @@ using WpfMath.Atoms; -#nullable disable - namespace WpfMath { internal class TexFormulaHelper @@ -134,10 +132,10 @@ public void AddRadical(TexFormula baseFormula, string degreeFormula) public void AddRadical(TexFormula baseFormula) { - AddRadical(baseFormula, (TexFormula)null); + AddRadical(baseFormula, (TexFormula?)null); } - public void AddRadical(TexFormula baseFormula, TexFormula degreeFormula) + public void AddRadical(TexFormula baseFormula, TexFormula? degreeFormula) { this.Add(new Radical(null, baseFormula?.RootAtom, degreeFormula?.RootAtom)); } @@ -172,8 +170,8 @@ public void AddOperator(TexFormula operatorFormula, TexFormula lowerLimitFormula public void AddOperator( TexFormula operatorFormula, - TexFormula lowerLimitFormula, - TexFormula upperLimitFormula, + TexFormula? lowerLimitFormula, + TexFormula? upperLimitFormula, bool useVerticalLimits) { this.Add( @@ -317,7 +315,7 @@ public void PutDelimiterUnder(TexDelimiter delimiter, TexFormula subscriptName, false); } - public void PutOver(TexFormula overFormula, TexUnit overUnit, double overSpace, bool overScriptSize) + public void PutOver(TexFormula? overFormula, TexUnit overUnit, double overSpace, bool overScriptSize) { this.Formula.RootAtom = new UnderOverAtom( this._source, @@ -329,18 +327,18 @@ public void PutOver(TexFormula overFormula, TexUnit overUnit, double overSpace, true); } - public void PutOver(string overFormula, TexUnit overUnit, double overSpace, bool overScriptSize) + public void PutOver(string? overFormula, TexUnit overUnit, double overSpace, bool overScriptSize) { PutOver(overFormula == null ? null : ParseFormula(overFormula), overUnit, overSpace, overScriptSize); } - public void PutUnder(string underFormula, TexUnit underUnit, double underSpace, bool underScriptSize) + public void PutUnder(string? underFormula, TexUnit underUnit, double underSpace, bool underScriptSize) { PutUnder(underFormula == null ? null : ParseFormula(underFormula), underUnit, underSpace, underScriptSize); } - public void PutUnder(TexFormula underFormula, TexUnit underUnit, double underSpace, bool underScriptSize) + public void PutUnder(TexFormula? underFormula, TexUnit underUnit, double underSpace, bool underScriptSize) { this.Formula.RootAtom = new UnderOverAtom( this._source, @@ -352,15 +350,15 @@ public void PutUnder(TexFormula underFormula, TexUnit underUnit, double underSpa false); } - public void PutUnderAndOver(string underFormula, TexUnit underUnit, double underSpace, bool underScriptSize, - string over, TexUnit overUnit, double overSpace, bool overScriptSize) + public void PutUnderAndOver(string? underFormula, TexUnit underUnit, double underSpace, bool underScriptSize, + string? over, TexUnit overUnit, double overSpace, bool overScriptSize) { PutUnderAndOver(underFormula == null ? null : ParseFormula(underFormula), underUnit, underSpace, underScriptSize, over == null ? null : ParseFormula(over), overUnit, overSpace, overScriptSize); } - public void PutUnderAndOver(TexFormula underFormula, TexUnit underUnit, double underSpace, bool underScriptSize, - TexFormula over, TexUnit overUnit, double overSpace, bool overScriptSize) + public void PutUnderAndOver(TexFormula? underFormula, TexUnit underUnit, double underSpace, bool underScriptSize, + TexFormula? over, TexUnit overUnit, double overSpace, bool overScriptSize) { this.Formula.RootAtom = new UnderOverAtom( this._source, diff --git a/src/WpfMath/TexRenderer.cs b/src/WpfMath/TexRenderer.cs index 6ad963bd..dd6eba09 100644 --- a/src/WpfMath/TexRenderer.cs +++ b/src/WpfMath/TexRenderer.cs @@ -5,8 +5,6 @@ using WpfMath.Boxes; using WpfMath.Rendering; -#nullable disable - namespace WpfMath { public class TexRenderer diff --git a/src/WpfMath/TexSymbolParser.cs b/src/WpfMath/TexSymbolParser.cs index 12674c6c..32202244 100644 --- a/src/WpfMath/TexSymbolParser.cs +++ b/src/WpfMath/TexSymbolParser.cs @@ -5,8 +5,6 @@ using System.Xml.Linq; using WpfMath.Atoms; -#nullable disable - namespace WpfMath { // Parse definitions of symbols from XML files. @@ -40,9 +38,8 @@ private static void SetTypeMappings() public TexSymbolParser() { // for 3.5 - var doc = XDocument.Load(new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))); + var doc = XDocument.Load(new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? this.rootElement = doc.Root; - } public IDictionary> GetSymbols() From fc3a7c15ef05f0d73f16aefb9cb0c31100fc1987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 20:54:32 +0200 Subject: [PATCH 07/23] Drop nullable disable on a few more files. --- src/WpfMath/DelimiterFactory.cs | 4 +-- src/WpfMath/DelimiterInfo.cs | 2 -- .../DelimiterMappingNotFoundException.cs | 2 -- src/WpfMath/ExtensionChar.cs | 12 ++++---- src/WpfMath/Extensions.cs | 2 -- src/WpfMath/FormulaNotFoundException.cs | 2 -- .../PredefinedTexFormulaSettingsParser.cs | 4 +-- src/WpfMath/SourceSpan.cs | 6 ++-- src/WpfMath/SymbolMappingNotFoundException.cs | 2 -- src/WpfMath/SymbolNotFoundException.cs | 2 -- src/WpfMath/TexFormula.cs | 12 ++++---- src/WpfMath/TexPredefinedFormulaParser.cs | 28 +++++++++---------- src/WpfMath/TexUtilities.cs | 2 -- src/WpfMath/XmlUtilities.cs | 4 +-- 14 files changed, 28 insertions(+), 56 deletions(-) diff --git a/src/WpfMath/DelimiterFactory.cs b/src/WpfMath/DelimiterFactory.cs index 227f0311..0c609cee 100644 --- a/src/WpfMath/DelimiterFactory.cs +++ b/src/WpfMath/DelimiterFactory.cs @@ -4,14 +4,12 @@ using System.Text; using WpfMath.Boxes; -#nullable disable - namespace WpfMath { // Creates boxes containing delimeter symbol that exists in different sizes. internal static class DelimiterFactory { - public static Box CreateBox(string symbol, double minHeight, TexEnvironment environment, SourceSpan source = null) + public static Box CreateBox(string symbol, double minHeight, TexEnvironment environment, SourceSpan? source = null) { var texFont = environment.MathFont; var style = environment.Style; diff --git a/src/WpfMath/DelimiterInfo.cs b/src/WpfMath/DelimiterInfo.cs index 05e8f906..835edef9 100644 --- a/src/WpfMath/DelimiterInfo.cs +++ b/src/WpfMath/DelimiterInfo.cs @@ -1,7 +1,5 @@ using WpfMath.Atoms; -#nullable disable - namespace WpfMath { /// diff --git a/src/WpfMath/DelimiterMappingNotFoundException.cs b/src/WpfMath/DelimiterMappingNotFoundException.cs index 0647f539..87b3d735 100644 --- a/src/WpfMath/DelimiterMappingNotFoundException.cs +++ b/src/WpfMath/DelimiterMappingNotFoundException.cs @@ -3,8 +3,6 @@ using System.Linq; using System.Text; -#nullable disable - namespace WpfMath { public class DelimiterMappingNotFoundException : Exception diff --git a/src/WpfMath/ExtensionChar.cs b/src/WpfMath/ExtensionChar.cs index e8be8eeb..76f5a8d4 100644 --- a/src/WpfMath/ExtensionChar.cs +++ b/src/WpfMath/ExtensionChar.cs @@ -3,14 +3,12 @@ using System.Linq; using System.Text; -#nullable disable - namespace WpfMath { // Extension character that contains character information for each of its parts. internal class ExtensionChar { - public ExtensionChar(CharInfo top, CharInfo middle, CharInfo bottom, CharInfo repeat) + public ExtensionChar(CharInfo? top, CharInfo? middle, CharInfo? bottom, CharInfo? repeat) { this.Top = top; this.Middle = middle; @@ -18,25 +16,25 @@ public ExtensionChar(CharInfo top, CharInfo middle, CharInfo bottom, CharInfo re this.Bottom = bottom; } - public CharInfo Top + public CharInfo? Top { get; private set; } - public CharInfo Middle + public CharInfo? Middle { get; private set; } - public CharInfo Bottom + public CharInfo? Bottom { get; private set; } - public CharInfo Repeat + public CharInfo? Repeat { get; private set; diff --git a/src/WpfMath/Extensions.cs b/src/WpfMath/Extensions.cs index 753158f0..118d8c6b 100644 --- a/src/WpfMath/Extensions.cs +++ b/src/WpfMath/Extensions.cs @@ -1,8 +1,6 @@ using System.Windows.Media.Imaging; using System.IO; -#nullable disable - namespace WpfMath { public static class Extensions diff --git a/src/WpfMath/FormulaNotFoundException.cs b/src/WpfMath/FormulaNotFoundException.cs index 8977c496..ed6fb6cf 100644 --- a/src/WpfMath/FormulaNotFoundException.cs +++ b/src/WpfMath/FormulaNotFoundException.cs @@ -3,8 +3,6 @@ using System.Linq; using System.Text; -#nullable disable - namespace WpfMath { public class FormulaNotFoundException : Exception diff --git a/src/WpfMath/PredefinedTexFormulaSettingsParser.cs b/src/WpfMath/PredefinedTexFormulaSettingsParser.cs index 9d6c0a24..7c3e1336 100644 --- a/src/WpfMath/PredefinedTexFormulaSettingsParser.cs +++ b/src/WpfMath/PredefinedTexFormulaSettingsParser.cs @@ -6,8 +6,6 @@ using System.Text; using System.Xml.Linq; -#nullable disable - namespace WpfMath { // Parses settings for predefined formulas from XML file. @@ -36,7 +34,7 @@ private static void AddToMap(IEnumerable mapList, string[] table) public TexPredefinedFormulaSettingsParser() { - var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))); + var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? this.rootElement = doc.Root; } diff --git a/src/WpfMath/SourceSpan.cs b/src/WpfMath/SourceSpan.cs index 7daac5e7..2e4b0dd8 100644 --- a/src/WpfMath/SourceSpan.cs +++ b/src/WpfMath/SourceSpan.cs @@ -1,7 +1,5 @@ using System; -#nullable disable - namespace WpfMath { public class SourceSpan : IEquatable @@ -37,7 +35,7 @@ public SourceSpan(string sourceName, string source, int start, int length) public SourceSpan Segment(int start) => new SourceSpan(SourceName, this.Source, this.Start + start, this.Length - start); public SourceSpan Segment(int start, int length) => new SourceSpan(SourceName, this.Source, this.Start + start, length); - public bool Equals(SourceSpan other) + public bool Equals(SourceSpan? other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; @@ -47,7 +45,7 @@ public bool Equals(SourceSpan other) && string.Equals(SourceName, other.SourceName, StringComparison.Ordinal); } - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; diff --git a/src/WpfMath/SymbolMappingNotFoundException.cs b/src/WpfMath/SymbolMappingNotFoundException.cs index 39cdd016..02c3f515 100644 --- a/src/WpfMath/SymbolMappingNotFoundException.cs +++ b/src/WpfMath/SymbolMappingNotFoundException.cs @@ -3,8 +3,6 @@ using System.Linq; using System.Text; -#nullable disable - namespace WpfMath { public class SymbolMappingNotFoundException : Exception diff --git a/src/WpfMath/SymbolNotFoundException.cs b/src/WpfMath/SymbolNotFoundException.cs index 09aa9a94..b88ec40e 100644 --- a/src/WpfMath/SymbolNotFoundException.cs +++ b/src/WpfMath/SymbolNotFoundException.cs @@ -3,8 +3,6 @@ using System.Linq; using System.Text; -#nullable disable - namespace WpfMath { public class SymbolNotFoundException : Exception diff --git a/src/WpfMath/TexFormula.cs b/src/WpfMath/TexFormula.cs index 6583082b..00e09de2 100644 --- a/src/WpfMath/TexFormula.cs +++ b/src/WpfMath/TexFormula.cs @@ -5,26 +5,24 @@ using WpfMath.Atoms; using WpfMath.Boxes; -#nullable disable - namespace WpfMath { // Represents mathematical formula that can be rendered. public sealed class TexFormula { - public string TextStyle + public string? TextStyle { get; set; } - internal Atom RootAtom + internal Atom? RootAtom { get; set; } - public SourceSpan Source { get; set; } + public SourceSpan? Source { get; set; } public TexRenderer GetRenderer(TexStyle style, double scale, string systemTextFontName) { @@ -34,7 +32,7 @@ public TexRenderer GetRenderer(TexStyle style, double scale, string systemTextFo return new TexRenderer(CreateBox(environment), scale); } - public void Add(TexFormula formula, SourceSpan source = null) + public void Add(TexFormula formula, SourceSpan? source = null) { Debug.Assert(formula != null); Debug.Assert(formula.RootAtom != null); @@ -52,7 +50,7 @@ formula.RootAtom is RowAtom /// /// The atom to add. /// The source that will be set for the resulting row atom. - internal void Add(Atom atom, SourceSpan rowSource) + internal void Add(Atom atom, SourceSpan? rowSource) { if (this.RootAtom == null) { diff --git a/src/WpfMath/TexPredefinedFormulaParser.cs b/src/WpfMath/TexPredefinedFormulaParser.cs index d4ecc882..3699bc74 100644 --- a/src/WpfMath/TexPredefinedFormulaParser.cs +++ b/src/WpfMath/TexPredefinedFormulaParser.cs @@ -7,8 +7,6 @@ using System.Windows.Media; using System.Xml.Linq; -#nullable disable - namespace WpfMath { // Parses definitions of predefined formulas from XML file. @@ -68,9 +66,9 @@ private static Type[] GetArgumentTypes(IEnumerable args) return result.ToArray(); } - private static object[] GetArgumentValues(IEnumerable args) + private static object?[] GetArgumentValues(IEnumerable args) { - var result = new List(); + var result = new List(); foreach (var curArg in args) { var typeName = curArg.AttributeValue("type"); @@ -87,11 +85,11 @@ private static object[] GetArgumentValues(IEnumerable args) public TexPredefinedFormulaParser() { - var doc = XDocument.Load(new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))); + var doc = XDocument.Load(new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? this.rootElement = doc.Root; } - public void Parse(IDictionary> predefinedTeXFormulas) + public void Parse(IDictionary> predefinedTeXFormulas) { var rootEnabled = rootElement.AttributeBooleanValue("enabled", true); if (rootEnabled) @@ -108,7 +106,7 @@ public void Parse(IDictionary> predefinedTe } } - public TexFormula ParseFormula(SourceSpan source, XElement formulaElement) + public TexFormula? ParseFormula(SourceSpan source, XElement formulaElement) { foreach (var element in formulaElement.Elements()) { @@ -143,7 +141,7 @@ public override void Parse(SourceSpan source, XElement element) var argValues = GetArgumentValues(args); var helper = new TexFormulaHelper(formula, source); - typeof(TexFormulaHelper).GetMethod(methodName, argTypes).Invoke(helper, argValues); + typeof(TexFormulaHelper).GetMethod(methodName, argTypes)!.Invoke(helper, argValues); // Nullable: Hard to verify here, I guess } } @@ -163,11 +161,11 @@ public override void Parse(SourceSpan source, XElement element) var argValues = GetArgumentValues(args); Debug.Assert(argValues.Length == 1 || argValues.Length == 0); - TexFormula formula = null; + TexFormula formula; if (argValues.Length == 1) { var parser = new TexFormulaParser(); - formula = parser.Parse((string)argValues[0]); + formula = parser.Parse((string?)argValues[0]); } else { @@ -185,7 +183,7 @@ public ReturnParser(IDictionary sharedCacheFormulas) { } - public TexFormula Result + public TexFormula? Result { get; private set; @@ -274,7 +272,7 @@ public TeXFormulaValueParser(IDictionary sharedCacheFormulas { } - public override object Parse(string value, string type) + public override object? Parse(string value, string type) { if (value == null) return null; @@ -292,9 +290,9 @@ public ColorConstantValueParser(IDictionary sharedCacheFormu { } - public override object Parse(string value, string type) + public override object? Parse(string value, string type) { - return typeof(Color).GetField(value).GetValue(null); + return typeof(Color).GetField(value)!.GetValue(null); } } @@ -329,7 +327,7 @@ protected ArgumentValueParser(IDictionary sharedCacheFormula : base(sharedCacheFormulas) {} - public abstract object Parse(string value, string type); + public abstract object? Parse(string value, string type); } public abstract class ParserBase diff --git a/src/WpfMath/TexUtilities.cs b/src/WpfMath/TexUtilities.cs index f3160585..9b531958 100644 --- a/src/WpfMath/TexUtilities.cs +++ b/src/WpfMath/TexUtilities.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace WpfMath { internal static class TexUtilities diff --git a/src/WpfMath/XmlUtilities.cs b/src/WpfMath/XmlUtilities.cs index 79d1bac5..36420ddc 100644 --- a/src/WpfMath/XmlUtilities.cs +++ b/src/WpfMath/XmlUtilities.cs @@ -5,8 +5,6 @@ using System.Text; using System.Xml.Linq; -#nullable disable - namespace WpfMath { internal static class XmlUtilities @@ -47,7 +45,7 @@ public static double AttributeDoubleValue(this XElement element, string attribut return double.Parse(attribute.Value, CultureInfo.InvariantCulture); } - public static string AttributeValue(this XElement element, string attributeName, string defaultValue = null) + public static string AttributeValue(this XElement element, string attributeName, string? defaultValue = null) { var attribute = element.Attribute(attributeName); if (attribute == null) From 261695e59c05207c82a64d2c7013d712f23db610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 21:40:11 +0200 Subject: [PATCH 08/23] Drop nullable disable for Matrices folder. --- src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs | 4 +--- src/WpfMath/Parsers/Matrices/MatrixInternalEnvironment.cs | 2 -- src/WpfMath/Parsers/Matrices/NextRowCommand.cs | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs index 6d28fe2d..1d89c602 100644 --- a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs +++ b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs @@ -3,8 +3,6 @@ using WpfMath.Atoms; using WpfMath.Exceptions; -#nullable disable - namespace WpfMath.Parsers.Matrices { /// A parser for matrix-like constructs. @@ -40,7 +38,7 @@ public CommandProcessingResult ProcessCommand(CommandContext context) var cells = ReadMatrixCells(context.Parser, context.Formula, cellsSource, context.Environment); var matrix = new MatrixAtom(matrixSource, cells, _cellAlignment); - SymbolAtom GetDelimiter(string name) => + SymbolAtom? GetDelimiter(string? name) => name == null ? null : TexFormulaParser.GetDelimiterSymbol(name, null) ?? diff --git a/src/WpfMath/Parsers/Matrices/MatrixInternalEnvironment.cs b/src/WpfMath/Parsers/Matrices/MatrixInternalEnvironment.cs index 87be774d..10010854 100644 --- a/src/WpfMath/Parsers/Matrices/MatrixInternalEnvironment.cs +++ b/src/WpfMath/Parsers/Matrices/MatrixInternalEnvironment.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; using WpfMath.Atoms; -#nullable disable - namespace WpfMath.Parsers.Matrices { internal class MatrixInternalEnvironment : NonRecursiveEnvironment diff --git a/src/WpfMath/Parsers/Matrices/NextRowCommand.cs b/src/WpfMath/Parsers/Matrices/NextRowCommand.cs index 9a3b5080..4edafa04 100644 --- a/src/WpfMath/Parsers/Matrices/NextRowCommand.cs +++ b/src/WpfMath/Parsers/Matrices/NextRowCommand.cs @@ -2,8 +2,6 @@ using System.Linq; using WpfMath.Atoms; -#nullable disable - namespace WpfMath.Parsers.Matrices { internal class NextRowCommand : ICommandParser From f43f6c268337c6fda5bfcf615bf2fc9946ca57fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 21:42:22 +0200 Subject: [PATCH 09/23] Drop nullable disable for Rendering folder. --- src/WpfMath/Rendering/GeometryElementRenderer.cs | 2 -- src/WpfMath/Rendering/GeometryHelper.cs | 2 -- src/WpfMath/Rendering/IElementRenderer.cs | 2 -- src/WpfMath/Rendering/Transformations/Transformation.cs | 2 -- src/WpfMath/Rendering/WpfElementRenderer.cs | 2 -- 5 files changed, 10 deletions(-) diff --git a/src/WpfMath/Rendering/GeometryElementRenderer.cs b/src/WpfMath/Rendering/GeometryElementRenderer.cs index 9cea154b..1fe0f5b2 100644 --- a/src/WpfMath/Rendering/GeometryElementRenderer.cs +++ b/src/WpfMath/Rendering/GeometryElementRenderer.cs @@ -6,8 +6,6 @@ using WpfMath.Boxes; using WpfMath.Rendering.Transformations; -#nullable disable - namespace WpfMath.Rendering { /// A renderer that renders the elements to a provided instance. diff --git a/src/WpfMath/Rendering/GeometryHelper.cs b/src/WpfMath/Rendering/GeometryHelper.cs index d7e83fa1..0f1fac3d 100644 --- a/src/WpfMath/Rendering/GeometryHelper.cs +++ b/src/WpfMath/Rendering/GeometryHelper.cs @@ -1,8 +1,6 @@ using System.Windows; using System.Windows.Media; -#nullable disable - namespace WpfMath.Rendering { internal static class GeometryHelper diff --git a/src/WpfMath/Rendering/IElementRenderer.cs b/src/WpfMath/Rendering/IElementRenderer.cs index 6eae577f..f66b28c2 100644 --- a/src/WpfMath/Rendering/IElementRenderer.cs +++ b/src/WpfMath/Rendering/IElementRenderer.cs @@ -4,8 +4,6 @@ using WpfMath.Boxes; using WpfMath.Rendering.Transformations; -#nullable disable - namespace WpfMath.Rendering { /// Renderer interface for WPF-Math elements. diff --git a/src/WpfMath/Rendering/Transformations/Transformation.cs b/src/WpfMath/Rendering/Transformations/Transformation.cs index 165fd0a4..3b60585f 100644 --- a/src/WpfMath/Rendering/Transformations/Transformation.cs +++ b/src/WpfMath/Rendering/Transformations/Transformation.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace WpfMath.Rendering.Transformations { /// Geometrical transformation. diff --git a/src/WpfMath/Rendering/WpfElementRenderer.cs b/src/WpfMath/Rendering/WpfElementRenderer.cs index f0215046..d722c1cb 100644 --- a/src/WpfMath/Rendering/WpfElementRenderer.cs +++ b/src/WpfMath/Rendering/WpfElementRenderer.cs @@ -5,8 +5,6 @@ using WpfMath.Boxes; using WpfMath.Rendering.Transformations; -#nullable disable - namespace WpfMath.Rendering { /// The renderer that uses WPF drawing context. From b9ecf56ff3f7d3b63ea5d2c7462fa730dda74d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 21:45:09 +0200 Subject: [PATCH 10/23] Drop nullable disable for exceptions. --- src/WpfMath/Exceptions/TexCharacterMappingNotFoundException.cs | 2 -- src/WpfMath/Exceptions/TexException.cs | 2 -- src/WpfMath/Exceptions/TexNotSupportedException.cs | 2 -- src/WpfMath/Exceptions/TexParseException.cs | 2 -- src/WpfMath/Exceptions/TextStyleMappingNotFoundException.cs | 2 -- src/WpfMath/Exceptions/TypeFaceNotFoundException.cs | 2 -- 6 files changed, 12 deletions(-) diff --git a/src/WpfMath/Exceptions/TexCharacterMappingNotFoundException.cs b/src/WpfMath/Exceptions/TexCharacterMappingNotFoundException.cs index 6124dfc2..ff7d69ca 100644 --- a/src/WpfMath/Exceptions/TexCharacterMappingNotFoundException.cs +++ b/src/WpfMath/Exceptions/TexCharacterMappingNotFoundException.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace WpfMath.Exceptions { public class TexCharacterMappingNotFoundException : TexException diff --git a/src/WpfMath/Exceptions/TexException.cs b/src/WpfMath/Exceptions/TexException.cs index 03bbf9c1..eb13917e 100644 --- a/src/WpfMath/Exceptions/TexException.cs +++ b/src/WpfMath/Exceptions/TexException.cs @@ -1,7 +1,5 @@ using System; -#nullable disable - namespace WpfMath.Exceptions { public abstract class TexException : Exception diff --git a/src/WpfMath/Exceptions/TexNotSupportedException.cs b/src/WpfMath/Exceptions/TexNotSupportedException.cs index 2bcaccb9..a81f94aa 100644 --- a/src/WpfMath/Exceptions/TexNotSupportedException.cs +++ b/src/WpfMath/Exceptions/TexNotSupportedException.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace WpfMath.Exceptions { public class TexNotSupportedException : TexException diff --git a/src/WpfMath/Exceptions/TexParseException.cs b/src/WpfMath/Exceptions/TexParseException.cs index df20396e..090ef1da 100644 --- a/src/WpfMath/Exceptions/TexParseException.cs +++ b/src/WpfMath/Exceptions/TexParseException.cs @@ -1,7 +1,5 @@ using System; -#nullable disable - namespace WpfMath.Exceptions { public class TexParseException : TexException diff --git a/src/WpfMath/Exceptions/TextStyleMappingNotFoundException.cs b/src/WpfMath/Exceptions/TextStyleMappingNotFoundException.cs index 42afb67a..0bd5c9bb 100644 --- a/src/WpfMath/Exceptions/TextStyleMappingNotFoundException.cs +++ b/src/WpfMath/Exceptions/TextStyleMappingNotFoundException.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace WpfMath.Exceptions { public class TextStyleMappingNotFoundException : TexException diff --git a/src/WpfMath/Exceptions/TypeFaceNotFoundException.cs b/src/WpfMath/Exceptions/TypeFaceNotFoundException.cs index 2d3d20a5..ec20cdc4 100644 --- a/src/WpfMath/Exceptions/TypeFaceNotFoundException.cs +++ b/src/WpfMath/Exceptions/TypeFaceNotFoundException.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace WpfMath.Exceptions { public class TypeFaceNotFoundException : TexException From 290de97d21ae1d364a5665dcf3832902b6847216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 21:47:49 +0200 Subject: [PATCH 11/23] Drop nullable disable for controls. --- src/WpfMath/Controls/FormulaControl.xaml.cs | 4 +--- src/WpfMath/Controls/VisualContainerElement.cs | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/WpfMath/Controls/FormulaControl.xaml.cs b/src/WpfMath/Controls/FormulaControl.xaml.cs index 6c4a6a0d..2b16f185 100644 --- a/src/WpfMath/Controls/FormulaControl.xaml.cs +++ b/src/WpfMath/Controls/FormulaControl.xaml.cs @@ -7,8 +7,6 @@ using WpfMath.Boxes; using WpfMath.Exceptions; -#nullable disable - namespace WpfMath.Controls { /// @@ -17,7 +15,7 @@ namespace WpfMath.Controls public partial class FormulaControl : UserControl { private static TexFormulaParser formulaParser = new TexFormulaParser(); - private TexFormula texFormula; + private TexFormula? texFormula; public string Formula { diff --git a/src/WpfMath/Controls/VisualContainerElement.cs b/src/WpfMath/Controls/VisualContainerElement.cs index cd5bc689..39bf3236 100644 --- a/src/WpfMath/Controls/VisualContainerElement.cs +++ b/src/WpfMath/Controls/VisualContainerElement.cs @@ -5,13 +5,11 @@ using System.Windows; using System.Windows.Media; -#nullable disable - namespace WpfMath.Controls { public class VisualContainerElement : FrameworkElement { - private DrawingVisual visual; + private DrawingVisual? visual; public VisualContainerElement() : base() @@ -19,7 +17,7 @@ public VisualContainerElement() this.visual = null; } - public DrawingVisual Visual + public DrawingVisual? Visual { get { return this.visual; } set @@ -38,7 +36,7 @@ protected override int VisualChildrenCount get { return 1; } } - protected override Visual GetVisualChild(int index) + protected override Visual? GetVisualChild(int index) { return this.visual; } From 7f5509853268cf4bc42f1b24d4884c62dffa8506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 21:54:13 +0200 Subject: [PATCH 12/23] Drop nullable disable for Glue classes. --- src/WpfMath/Glue.cs | 2 -- src/WpfMath/GlueSettingsParser.cs | 11 +++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/WpfMath/Glue.cs b/src/WpfMath/Glue.cs index 0aba4ddf..b8efcb82 100644 --- a/src/WpfMath/Glue.cs +++ b/src/WpfMath/Glue.cs @@ -4,8 +4,6 @@ using System.Text; using WpfMath.Boxes; -#nullable disable - namespace WpfMath { // Represents glueElement for holding together boxes. diff --git a/src/WpfMath/GlueSettingsParser.cs b/src/WpfMath/GlueSettingsParser.cs index 853dec95..6a14b571 100644 --- a/src/WpfMath/GlueSettingsParser.cs +++ b/src/WpfMath/GlueSettingsParser.cs @@ -6,8 +6,6 @@ using System.Text; using System.Xml.Linq; -#nullable disable - namespace WpfMath { // Parses information about glue settings from XML file. @@ -63,8 +61,12 @@ private static void SetStyleMappings() public GlueSettingsParser() { - var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))); + var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? this.rootElement = doc.Root; + + this.glueTypes = new List(); + this.glueTypeMappings = new Dictionary(); + ParseGlueTypes(); } @@ -99,9 +101,6 @@ public IList GetGlueTypes() private void ParseGlueTypes() { - this.glueTypes = new List(); - this.glueTypeMappings = new Dictionary(); - int defaultIndex = -1; int index = 0; From 33384cd28dd934b604f85eb0dfc5445a7f7c41fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 22:05:13 +0200 Subject: [PATCH 13/23] Drop nullable disable in Parsers folder. --- src/WpfMath/Parsers/CommandParsers.cs | 6 ++---- src/WpfMath/Parsers/DefaultCommandEnvironment.cs | 2 -- src/WpfMath/Parsers/ICommandEnvironment.cs | 2 -- src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs | 8 ++++---- src/WpfMath/Parsers/NonRecursiveEnvironment.cs | 2 -- src/WpfMath/Parsers/StandardCommands.cs | 10 ++++------ 6 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/WpfMath/Parsers/CommandParsers.cs b/src/WpfMath/Parsers/CommandParsers.cs index 9e8513d4..970d56ae 100644 --- a/src/WpfMath/Parsers/CommandParsers.cs +++ b/src/WpfMath/Parsers/CommandParsers.cs @@ -1,8 +1,6 @@ using WpfMath.Atoms; using WpfMath.Exceptions; -#nullable disable - namespace WpfMath.Parsers { /// A context that will be passed to the command parser. @@ -51,7 +49,7 @@ public CommandContext( internal class CommandProcessingResult { /// A parsed atom. May be null. - public Atom Atom { get; } + public Atom? Atom { get; } /// /// A position pointing to the part of the where the parsing should @@ -65,7 +63,7 @@ internal class CommandProcessingResult /// public AtomAppendMode AppendMode { get; } - public CommandProcessingResult(Atom atom, int nextPosition, AtomAppendMode appendMode = AtomAppendMode.Add) + public CommandProcessingResult(Atom? atom, int nextPosition, AtomAppendMode appendMode = AtomAppendMode.Add) { Atom = atom; NextPosition = nextPosition; diff --git a/src/WpfMath/Parsers/DefaultCommandEnvironment.cs b/src/WpfMath/Parsers/DefaultCommandEnvironment.cs index 82d3018d..6c9b6e7b 100644 --- a/src/WpfMath/Parsers/DefaultCommandEnvironment.cs +++ b/src/WpfMath/Parsers/DefaultCommandEnvironment.cs @@ -1,7 +1,5 @@ using System.Collections.Generic; -#nullable disable - namespace WpfMath.Parsers { internal class DefaultCommandEnvironment : ICommandEnvironment diff --git a/src/WpfMath/Parsers/ICommandEnvironment.cs b/src/WpfMath/Parsers/ICommandEnvironment.cs index b6aebc6a..c6cfedcc 100644 --- a/src/WpfMath/Parsers/ICommandEnvironment.cs +++ b/src/WpfMath/Parsers/ICommandEnvironment.cs @@ -1,7 +1,5 @@ using System.Collections.Generic; -#nullable disable - namespace WpfMath.Parsers { /// diff --git a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs index 1d89c602..bf77ddab 100644 --- a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs +++ b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs @@ -8,13 +8,13 @@ namespace WpfMath.Parsers.Matrices /// A parser for matrix-like constructs. internal class MatrixCommandParser : ICommandParser { - private readonly string _leftDelimiterSymbolName; - private readonly string _rightDelimiterSymbolName; + private readonly string? _leftDelimiterSymbolName; + private readonly string? _rightDelimiterSymbolName; private readonly MatrixCellAlignment _cellAlignment; public MatrixCommandParser( - string leftDelimiterSymbolName, - string rightDelimiterSymbolName, + string? leftDelimiterSymbolName, + string? rightDelimiterSymbolName, MatrixCellAlignment cellAlignment) { _leftDelimiterSymbolName = leftDelimiterSymbolName; diff --git a/src/WpfMath/Parsers/NonRecursiveEnvironment.cs b/src/WpfMath/Parsers/NonRecursiveEnvironment.cs index 654744f6..8e509095 100644 --- a/src/WpfMath/Parsers/NonRecursiveEnvironment.cs +++ b/src/WpfMath/Parsers/NonRecursiveEnvironment.cs @@ -1,7 +1,5 @@ using System.Collections.Generic; -#nullable disable - namespace WpfMath.Parsers { internal abstract class NonRecursiveEnvironment : ICommandEnvironment diff --git a/src/WpfMath/Parsers/StandardCommands.cs b/src/WpfMath/Parsers/StandardCommands.cs index c5a6e6bc..34f3943f 100644 --- a/src/WpfMath/Parsers/StandardCommands.cs +++ b/src/WpfMath/Parsers/StandardCommands.cs @@ -2,8 +2,6 @@ using WpfMath.Atoms; using WpfMath.Parsers.Matrices; -#nullable disable - namespace WpfMath.Parsers { internal static class StandardCommands @@ -41,9 +39,9 @@ public CommandProcessingResult ProcessCommand(CommandContext context) context.Environment.CreateChildEnvironment()); var start = context.CommandNameStartPosition; var atomSource = source.Segment(start, position - start); - var topAtom = new List { topFormula.RootAtom }; - var bottomAtom = new List { bottomFormula.RootAtom }; - var atoms = new List> { topAtom, bottomAtom }; + var topAtom = new List { topFormula.RootAtom }; + var bottomAtom = new List { bottomFormula.RootAtom }; + var atoms = new List> { topAtom, bottomAtom }; var matrixAtom = new MatrixAtom(atomSource, atoms, MatrixCellAlignment.Center); var left = new SymbolAtom(atomSource, "(", TexAtomType.Opening, true); var right = new SymbolAtom(atomSource, ")", TexAtomType.Closing, true); @@ -78,7 +76,7 @@ public CommandProcessingResult ProcessCommand(CommandContext context) : null; var topRow = new[] {prevFormulaAtom}; - var rows = new List> {topRow}; + var rows = new List> {topRow}; if (newMatrix != null) { rows.AddRange(newMatrix.MatrixCells); From 5e34df8a9b62ea30cb7398139f91691d085812ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 22:15:49 +0200 Subject: [PATCH 14/23] Drop nullable disable on first half of Atoms. --- src/WpfMath/Atoms/AccentedAtom.cs | 10 ++++---- src/WpfMath/Atoms/Atom.cs | 6 ++--- src/WpfMath/Atoms/BigOperatorAtom.cs | 28 +++++++++++------------ src/WpfMath/Atoms/CharAtom.cs | 8 +++---- src/WpfMath/Atoms/CharSymbol.cs | 4 +--- src/WpfMath/Atoms/DummyAtom.cs | 2 -- src/WpfMath/Atoms/FencedAtom.cs | 8 +++---- src/WpfMath/Atoms/FixedCharAtom.cs | 4 +--- src/WpfMath/Atoms/FractionAtom.cs | 34 +++++++++++++--------------- 9 files changed, 43 insertions(+), 61 deletions(-) diff --git a/src/WpfMath/Atoms/AccentedAtom.cs b/src/WpfMath/Atoms/AccentedAtom.cs index 4558b64d..c42d106d 100644 --- a/src/WpfMath/Atoms/AccentedAtom.cs +++ b/src/WpfMath/Atoms/AccentedAtom.cs @@ -1,14 +1,12 @@ using System; using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing base atom with accent above it. internal class AccentedAtom : Atom { - public AccentedAtom(SourceSpan source, Atom baseAtom, string accentName) + public AccentedAtom(SourceSpan? source, Atom? baseAtom, string accentName) : base(source) { this.BaseAtom = baseAtom; @@ -18,7 +16,7 @@ public AccentedAtom(SourceSpan source, Atom baseAtom, string accentName) throw new ArgumentException("The specified symbol name is not an accent.", "accent"); } - public AccentedAtom(SourceSpan source, Atom baseAtom, TexFormula accent) + public AccentedAtom(SourceSpan? source, Atom? baseAtom, TexFormula accent) : base(source) { if (!(accent.RootAtom is SymbolAtom rootSymbol)) @@ -32,14 +30,14 @@ public AccentedAtom(SourceSpan source, Atom baseAtom, TexFormula accent) } // Atom over which accent symbol is placed. - public Atom BaseAtom { get; } + public Atom? BaseAtom { get; } // Atom representing accent symbol to place over base atom. public SymbolAtom AccentAtom { get; } protected override Box CreateBoxCore(TexEnvironment environment) { - CharSymbol GetBaseChar() + CharSymbol? GetBaseChar() { var baseAtom = this.BaseAtom; while (baseAtom is AccentedAtom a) diff --git a/src/WpfMath/Atoms/Atom.cs b/src/WpfMath/Atoms/Atom.cs index 399677fb..41f4d7a0 100644 --- a/src/WpfMath/Atoms/Atom.cs +++ b/src/WpfMath/Atoms/Atom.cs @@ -1,13 +1,11 @@ using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom (smallest unit) of TexFormula. internal abstract class Atom { - protected Atom(SourceSpan source, TexAtomType type = TexAtomType.Ordinary) + protected Atom(SourceSpan? source, TexAtomType type = TexAtomType.Ordinary) { this.Source = source; this.Type = type; @@ -15,7 +13,7 @@ protected Atom(SourceSpan source, TexAtomType type = TexAtomType.Ordinary) public TexAtomType Type { get; } - public SourceSpan Source { get; } + public SourceSpan? Source { get; } public Box CreateBox(TexEnvironment environment) { diff --git a/src/WpfMath/Atoms/BigOperatorAtom.cs b/src/WpfMath/Atoms/BigOperatorAtom.cs index e07b2fd3..e7688d07 100644 --- a/src/WpfMath/Atoms/BigOperatorAtom.cs +++ b/src/WpfMath/Atoms/BigOperatorAtom.cs @@ -1,8 +1,6 @@ using System; using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing big operator with optional limits. @@ -18,17 +16,17 @@ private static Box ChangeWidth(Box box, double maxWidth) } public BigOperatorAtom( - SourceSpan source, - Atom baseAtom, - Atom lowerLimitAtom, - Atom upperLimitAtom, + SourceSpan? source, + Atom? baseAtom, + Atom? lowerLimitAtom, + Atom? upperLimitAtom, bool? useVerticalLimits = null) : this(source, baseAtom, lowerLimitAtom, upperLimitAtom) { this.UseVerticalLimits = useVerticalLimits; } - public BigOperatorAtom(SourceSpan source, Atom baseAtom, Atom lowerLimitAtom, Atom upperLimitAtom) + public BigOperatorAtom(SourceSpan? source, Atom? baseAtom, Atom? lowerLimitAtom, Atom? upperLimitAtom) : base(source, TexAtomType.BigOperator) { this.BaseAtom = baseAtom; @@ -38,12 +36,12 @@ public BigOperatorAtom(SourceSpan source, Atom baseAtom, Atom lowerLimitAtom, At } // Atom representing big operator. - public Atom BaseAtom { get; } + public Atom? BaseAtom { get; } // Atoms representing lower and upper limits. - public Atom LowerLimitAtom { get; } + public Atom? LowerLimitAtom { get; } - public Atom UpperLimitAtom { get; } + public Atom? UpperLimitAtom { get; } // True if limits should be drawn over and under the base atom; false if they should be drawn as scripts. public bool? UseVerticalLimits { get; } @@ -85,9 +83,9 @@ protected override Box CreateBoxCore(TexEnvironment environment) } // Create boxes for upper and lower limits. - var upperLimitBox = this.UpperLimitAtom == null ? null : this.UpperLimitAtom.CreateBox( + Box? upperLimitBox = this.UpperLimitAtom == null ? null : this.UpperLimitAtom.CreateBox( environment.GetSuperscriptStyle()); - var lowerLimitBox = this.LowerLimitAtom == null ? null : this.LowerLimitAtom.CreateBox( + Box? lowerLimitBox = this.LowerLimitAtom == null ? null : this.LowerLimitAtom.CreateBox( environment.GetSubscriptStyle()); // Make all component boxes equally wide. @@ -108,7 +106,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) if (this.UpperLimitAtom != null) { resultBox.Add(new StrutBox(0, opSpacing5, 0, 0)); - upperLimitBox.Shift = delta / 2; + upperLimitBox!.Shift = delta / 2; resultBox.Add(upperLimitBox); kern = Math.Max(texFont.GetBigOpSpacing1(style), texFont.GetBigOpSpacing3(style) - upperLimitBox.Depth); @@ -122,14 +120,14 @@ protected override Box CreateBoxCore(TexEnvironment environment) if (this.LowerLimitAtom != null) { resultBox.Add(new StrutBox(0, Math.Max(texFont.GetBigOpSpacing2(style), texFont.GetBigOpSpacing4(style) - - lowerLimitBox.Height), 0, 0)); + lowerLimitBox!.Height), 0, 0)); lowerLimitBox.Shift = -delta / 2; resultBox.Add(lowerLimitBox); resultBox.Add(new StrutBox(0, opSpacing5, 0, 0)); } // Adjust height and depth of result box. - var baseBoxHeight = baseBox.Height; + var baseBoxHeight = baseBox!.Height; var totalHeight = resultBox.Height + resultBox.Depth; if (upperLimitBox != null) baseBoxHeight += opSpacing5 + kern + upperLimitBox.Height + upperLimitBox.Depth; diff --git a/src/WpfMath/Atoms/CharAtom.cs b/src/WpfMath/Atoms/CharAtom.cs index 35bd2b2e..fe4deaff 100644 --- a/src/WpfMath/Atoms/CharAtom.cs +++ b/src/WpfMath/Atoms/CharAtom.cs @@ -1,13 +1,11 @@ using WpfMath.Utils; -#nullable disable - namespace WpfMath.Atoms { // Atom representing single character in specific text style. internal class CharAtom : CharSymbol { - public CharAtom(SourceSpan source, char character, string textStyle = null) + public CharAtom(SourceSpan? source, char character, string? textStyle = null) : base(source) { this.TextStyle = textStyle; @@ -17,7 +15,7 @@ public CharAtom(SourceSpan source, char character, string textStyle = null) public char Character { get; } // Null means default text style. - public string TextStyle { get; } + public string? TextStyle { get; } private bool IsDefaultTextStyle => this.TextStyle == null; @@ -27,7 +25,7 @@ public override ITeXFont GetStyledFont(TexEnvironment environment) => protected override Result GetCharInfo(ITeXFont texFont, TexStyle style) => this.IsDefaultTextStyle ? texFont.GetDefaultCharInfo(this.Character, style) - : texFont.GetCharInfo(this.Character, this.TextStyle, style); + : texFont.GetCharInfo(this.Character, this.TextStyle!, style); // Nullable: CS8604, could be resolved by inlining IsDefaultTextStyle public override Result GetCharFont(ITeXFont texFont) => // Style is irrelevant here. diff --git a/src/WpfMath/Atoms/CharSymbol.cs b/src/WpfMath/Atoms/CharSymbol.cs index 664a2d46..daf1a6e2 100644 --- a/src/WpfMath/Atoms/CharSymbol.cs +++ b/src/WpfMath/Atoms/CharSymbol.cs @@ -1,14 +1,12 @@ using WpfMath.Boxes; using WpfMath.Utils; -#nullable disable - namespace WpfMath.Atoms { // Atom representing single character that can be marked as text symbol. internal abstract class CharSymbol : Atom { - protected CharSymbol(SourceSpan source, TexAtomType type = TexAtomType.Ordinary) + protected CharSymbol(SourceSpan? source, TexAtomType type = TexAtomType.Ordinary) : base(source, type) { this.IsTextSymbol = false; diff --git a/src/WpfMath/Atoms/DummyAtom.cs b/src/WpfMath/Atoms/DummyAtom.cs index 6a0ae075..1160d414 100644 --- a/src/WpfMath/Atoms/DummyAtom.cs +++ b/src/WpfMath/Atoms/DummyAtom.cs @@ -1,8 +1,6 @@ using WpfMath.Boxes; using WpfMath.Utils; -#nullable disable - namespace WpfMath.Atoms { // Dummy atom representing atom whose type can change or which can be replaced by a ligature. diff --git a/src/WpfMath/Atoms/FencedAtom.cs b/src/WpfMath/Atoms/FencedAtom.cs index f79c15a6..e5520385 100644 --- a/src/WpfMath/Atoms/FencedAtom.cs +++ b/src/WpfMath/Atoms/FencedAtom.cs @@ -1,8 +1,6 @@ using System; using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing base atom surrounded by delimeters. @@ -17,7 +15,7 @@ private static void CentreBox(Box box, double axis) box.Shift = -(totalHeight / 2 - box.Height) - axis; } - public FencedAtom(SourceSpan source, Atom baseAtom, SymbolAtom leftDelimeter, SymbolAtom rightDelimeter) + public FencedAtom(SourceSpan? source, Atom? baseAtom, SymbolAtom? leftDelimeter, SymbolAtom? rightDelimeter) : base(source) { this.BaseAtom = baseAtom ?? new RowAtom(null); @@ -27,9 +25,9 @@ public FencedAtom(SourceSpan source, Atom baseAtom, SymbolAtom leftDelimeter, Sy public Atom BaseAtom { get; } - private SymbolAtom LeftDelimeter { get; } + private SymbolAtom? LeftDelimeter { get; } - private SymbolAtom RightDelimeter { get; } + private SymbolAtom? RightDelimeter { get; } protected override Box CreateBoxCore(TexEnvironment environment) { diff --git a/src/WpfMath/Atoms/FixedCharAtom.cs b/src/WpfMath/Atoms/FixedCharAtom.cs index cf36a8c5..231133f0 100644 --- a/src/WpfMath/Atoms/FixedCharAtom.cs +++ b/src/WpfMath/Atoms/FixedCharAtom.cs @@ -1,13 +1,11 @@ using WpfMath.Utils; -#nullable disable - namespace WpfMath.Atoms { // Atom representing character that does not depend on text style. internal class FixedCharAtom : CharSymbol { - public FixedCharAtom(SourceSpan source, CharFont charFont) + public FixedCharAtom(SourceSpan? source, CharFont charFont) : base(source) { this.CharFont = charFont; diff --git a/src/WpfMath/Atoms/FractionAtom.cs b/src/WpfMath/Atoms/FractionAtom.cs index 1a1437c2..984f4d0d 100644 --- a/src/WpfMath/Atoms/FractionAtom.cs +++ b/src/WpfMath/Atoms/FractionAtom.cs @@ -1,7 +1,5 @@ using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing fraction, with or without separation line. @@ -25,9 +23,9 @@ private static TexAlignment CheckAlignment(TexAlignment alignment) private readonly double? lineRelativeThickness; public FractionAtom( - SourceSpan source, - Atom numerator, - Atom denominator, + SourceSpan? source, + Atom? numerator, + Atom? denominator, double relativeThickness, TexAlignment numeratorAlignment, TexAlignment denominatorAlignment) @@ -37,9 +35,9 @@ public FractionAtom( } public FractionAtom( - SourceSpan source, - Atom numerator, - Atom denominator, + SourceSpan? source, + Atom? numerator, + Atom? denominator, bool drawLine, TexAlignment numeratorAlignment, TexAlignment denominatorAlignment) @@ -49,15 +47,15 @@ public FractionAtom( this.denominatorAlignment = CheckAlignment(denominatorAlignment); } - public FractionAtom(SourceSpan source, Atom numerator, Atom denominator, bool drawLine) + public FractionAtom(SourceSpan? source, Atom? numerator, Atom? denominator, bool drawLine) : this(source, numerator, denominator, drawLine, TexUnit.Pixel, 0d) { } public FractionAtom( - SourceSpan source, - Atom numerator, - Atom denominator, + SourceSpan? source, + Atom? numerator, + Atom? denominator, TexUnit unit, double thickness, TexAlignment numeratorAlignment, @@ -68,15 +66,15 @@ public FractionAtom( this.denominatorAlignment = CheckAlignment(denominatorAlignment); } - public FractionAtom(SourceSpan source, Atom numerator, Atom denominator, TexUnit unit, double thickness) + public FractionAtom(SourceSpan? source, Atom? numerator, Atom? denominator, TexUnit unit, double thickness) : this(source, numerator, denominator, false, unit, thickness) { } protected FractionAtom( - SourceSpan source, - Atom numerator, - Atom denominator, + SourceSpan? source, + Atom? numerator, + Atom? denominator, bool useDefaultThickness, TexUnit unit, double thickness) @@ -93,9 +91,9 @@ protected FractionAtom( this.lineThickness = thickness; } - public Atom Numerator { get; } + public Atom? Numerator { get; } - public Atom Denominator { get; } + public Atom? Denominator { get; } protected override Box CreateBoxCore(TexEnvironment environment) { From b38d86e0c956270bfc4baaf31f8eabb9aeed7b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 22:44:05 +0200 Subject: [PATCH 15/23] Drop nullable disable on second half of Atoms. --- src/WpfMath/Atoms/IRow.cs | 2 -- src/WpfMath/Atoms/MatrixAtom.cs | 18 ++++++-------- src/WpfMath/Atoms/NullAtom.cs | 4 +-- src/WpfMath/Atoms/OverUnderDelimiter.cs | 16 ++++++------ src/WpfMath/Atoms/OverlinedAtom.cs | 4 +-- src/WpfMath/Atoms/PhantomAtom.cs | 6 ++--- src/WpfMath/Atoms/Radical.cs | 10 +++----- src/WpfMath/Atoms/ScriptsAtom.cs | 33 ++++++++++++------------- 8 files changed, 39 insertions(+), 54 deletions(-) diff --git a/src/WpfMath/Atoms/IRow.cs b/src/WpfMath/Atoms/IRow.cs index 16475dc0..02b66807 100644 --- a/src/WpfMath/Atoms/IRow.cs +++ b/src/WpfMath/Atoms/IRow.cs @@ -1,7 +1,5 @@ using WpfMath.Atoms; -#nullable disable - namespace WpfMath { // Atom consisting of child atoms displayed in horizontal row with glueElement between them. diff --git a/src/WpfMath/Atoms/MatrixAtom.cs b/src/WpfMath/Atoms/MatrixAtom.cs index c01cda0e..340ac430 100644 --- a/src/WpfMath/Atoms/MatrixAtom.cs +++ b/src/WpfMath/Atoms/MatrixAtom.cs @@ -5,8 +5,6 @@ using WpfMath.Boxes; using WpfMath.Utils; -#nullable disable - namespace WpfMath.Atoms { /// An atom representing a tabular arrangement of atoms. @@ -15,20 +13,20 @@ internal class MatrixAtom : Atom public const double DefaultPadding = 0.35; public MatrixAtom( - SourceSpan source, - IEnumerable> cells, + SourceSpan? source, + IEnumerable> cells, MatrixCellAlignment matrixCellAlignment, double verticalPadding = DefaultPadding, double horizontalPadding = DefaultPadding) : base(source) { - MatrixCells = new ReadOnlyCollection>( - cells.Select(row => new ReadOnlyCollection(row.ToList())).ToList()); + MatrixCells = new ReadOnlyCollection>( + cells.Select(row => new ReadOnlyCollection(row.ToList())).ToList()); MatrixCellAlignment = matrixCellAlignment; VerticalPadding = verticalPadding; HorizontalPadding = horizontalPadding; } - public ReadOnlyCollection> MatrixCells { get; } + public ReadOnlyCollection> MatrixCells { get; } public double VerticalPadding { get; } @@ -47,7 +45,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) return ApplyCellPaddings(environment, cells, columnCount, matrixCellGaps); } - private IEnumerable CreateRowCellBoxes(TexEnvironment environment, ReadOnlyCollection row) => + private IEnumerable CreateRowCellBoxes(TexEnvironment environment, ReadOnlyCollection row) => row.Select(atom => atom == null ? StrutBox.Empty : atom.CreateBox(environment)); /// @@ -144,7 +142,7 @@ Tuple GetTopBottomPadding(int i, int j) return new Tuple(topBox, bottomBox); } - Tuple GetLeftRightPadding(int i, int j) + Tuple GetLeftRightPadding(int i, int j) { var value = matrixCellGaps[i][j].Horizontal; var leftPadding = MatrixCellAlignment == MatrixCellAlignment.Left ? 0.0 : value; @@ -153,7 +151,7 @@ Tuple GetLeftRightPadding(int i, int j) ? null : new StrutBox(HorizontalPadding / 2 + leftPadding, 0.0, 0.0, 0.0); var rightBox = new StrutBox(HorizontalPadding / 2 + rightPadding, 0.0, 0.0, 0.0); - return new Tuple(leftBox, rightBox); + return new Tuple(leftBox, rightBox); } } diff --git a/src/WpfMath/Atoms/NullAtom.cs b/src/WpfMath/Atoms/NullAtom.cs index 676babcf..7c6160aa 100644 --- a/src/WpfMath/Atoms/NullAtom.cs +++ b/src/WpfMath/Atoms/NullAtom.cs @@ -1,12 +1,10 @@ using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { internal class NullAtom : Atom { - public NullAtom(SourceSpan source = null, TexAtomType type = TexAtomType.Ordinary) : base(source, type) + public NullAtom(SourceSpan? source = null, TexAtomType type = TexAtomType.Ordinary) : base(source, type) { } diff --git a/src/WpfMath/Atoms/OverUnderDelimiter.cs b/src/WpfMath/Atoms/OverUnderDelimiter.cs index 19b7db65..45ebacdc 100644 --- a/src/WpfMath/Atoms/OverUnderDelimiter.cs +++ b/src/WpfMath/Atoms/OverUnderDelimiter.cs @@ -2,14 +2,12 @@ using WpfMath.Atoms; using WpfMath.Boxes; -#nullable disable - namespace WpfMath { // Atom representing other atom with delimeter and script atoms over or under it. internal class OverUnderDelimiter : Atom { - private static double GetMaxWidth(Box baseBox, Box delimeterBox, Box scriptBox) + private static double GetMaxWidth(Box baseBox, Box delimeterBox, Box? scriptBox) { var maxWidth = Math.Max(baseBox.Width, delimeterBox.Height + delimeterBox.Depth); if (scriptBox != null) @@ -18,9 +16,9 @@ private static double GetMaxWidth(Box baseBox, Box delimeterBox, Box scriptBox) } public OverUnderDelimiter( - SourceSpan source, - Atom baseAtom, - Atom script, + SourceSpan? source, + Atom? baseAtom, + Atom? script, SymbolAtom symbol, TexUnit kernUnit, double kern, @@ -34,9 +32,9 @@ public OverUnderDelimiter( this.Over = over; } - public Atom BaseAtom { get; } + public Atom? BaseAtom { get; } - private Atom Script { get; } + private Atom? Script { get; } private SymbolAtom Symbol { get; } @@ -51,7 +49,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) // Create boxes for base, delimeter, and script atoms. var baseBox = this.BaseAtom == null ? StrutBox.Empty : this.BaseAtom.CreateBox(environment); var delimeterBox = DelimiterFactory.CreateBox(this.Symbol.Name, baseBox.Width, environment); - var scriptBox = this.Script == null ? null : this.Script.CreateBox(this.Over ? + Box? scriptBox = this.Script == null ? null : this.Script.CreateBox(this.Over ? environment.GetSuperscriptStyle() : environment.GetSubscriptStyle()); // Create centered horizontal box if any box is smaller than maximum width. diff --git a/src/WpfMath/Atoms/OverlinedAtom.cs b/src/WpfMath/Atoms/OverlinedAtom.cs index bfd9ee2d..47aba1b0 100644 --- a/src/WpfMath/Atoms/OverlinedAtom.cs +++ b/src/WpfMath/Atoms/OverlinedAtom.cs @@ -1,13 +1,11 @@ using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing other atom with horizontal rule above it. internal class OverlinedAtom : Atom { - public OverlinedAtom(SourceSpan source, Atom baseAtom) + public OverlinedAtom(SourceSpan? source, Atom baseAtom) : base(source) { this.BaseAtom = baseAtom; diff --git a/src/WpfMath/Atoms/PhantomAtom.cs b/src/WpfMath/Atoms/PhantomAtom.cs index 4bd2599c..9e4bcc44 100644 --- a/src/WpfMath/Atoms/PhantomAtom.cs +++ b/src/WpfMath/Atoms/PhantomAtom.cs @@ -1,7 +1,5 @@ using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing other atom that is not rendered. @@ -12,8 +10,8 @@ internal class PhantomAtom : Atom, IRow private readonly bool useDepth; public PhantomAtom( - SourceSpan source, - Atom baseAtom, + SourceSpan? source, + Atom? baseAtom, bool useWidth = true, bool useHeight = true, bool useDepth = true) diff --git a/src/WpfMath/Atoms/Radical.cs b/src/WpfMath/Atoms/Radical.cs index d2f05354..acf7ea36 100644 --- a/src/WpfMath/Atoms/Radical.cs +++ b/src/WpfMath/Atoms/Radical.cs @@ -2,8 +2,6 @@ using WpfMath.Atoms; using WpfMath.Boxes; -#nullable disable - namespace WpfMath { /// @@ -15,16 +13,16 @@ internal class Radical : Atom private const double scale = 0.55; - public Radical(SourceSpan source, Atom baseAtom, Atom degreeAtom = null) + public Radical(SourceSpan? source, Atom? baseAtom, Atom? degreeAtom = null) : base(source) { this.BaseAtom = baseAtom; this.DegreeAtom = degreeAtom; } - public Atom BaseAtom { get; } + public Atom? BaseAtom { get; } - public Atom DegreeAtom { get; } + public Atom? DegreeAtom { get; } protected override Box CreateBoxCore(TexEnvironment environment) { @@ -41,7 +39,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) clearance = defaultRuleThickness + Math.Abs(clearance) / 4; // Create box for base atom, in cramped style. - var baseBox = this.BaseAtom.CreateBox(environment.GetCrampedStyle()); + var baseBox = this.BaseAtom!.CreateBox(environment.GetCrampedStyle()); // Nullable TODO: See whether BaseAtom is really always non-null here // Create box for radical sign. var totalHeight = baseBox.Height + baseBox.Depth; diff --git a/src/WpfMath/Atoms/ScriptsAtom.cs b/src/WpfMath/Atoms/ScriptsAtom.cs index f949f24f..d8dbb716 100644 --- a/src/WpfMath/Atoms/ScriptsAtom.cs +++ b/src/WpfMath/Atoms/ScriptsAtom.cs @@ -1,8 +1,6 @@ using System; using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing scripts to attach to other atom. @@ -10,7 +8,7 @@ internal class ScriptsAtom : Atom { private static readonly SpaceAtom scriptSpaceAtom = new SpaceAtom(null, TexUnit.Point, 0.5, 0, 0); - public ScriptsAtom(SourceSpan source, Atom baseAtom, Atom subscriptAtom, Atom superscriptAtom) + public ScriptsAtom(SourceSpan? source, Atom? baseAtom, Atom? subscriptAtom, Atom? superscriptAtom) : base(source) { this.BaseAtom = baseAtom; @@ -18,11 +16,11 @@ public ScriptsAtom(SourceSpan source, Atom baseAtom, Atom subscriptAtom, Atom su this.SuperscriptAtom = superscriptAtom; } - public Atom BaseAtom { get; } + public Atom? BaseAtom { get; } - public Atom SubscriptAtom { get; } + public Atom? SubscriptAtom { get; } - public Atom SuperscriptAtom { get; } + public Atom? SuperscriptAtom { get; } protected override Box CreateBoxCore(TexEnvironment environment) { @@ -59,9 +57,9 @@ protected override Box CreateBoxCore(TexEnvironment environment) var delta = 0d; double shiftUp, shiftDown; - if (this.BaseAtom is AccentedAtom) + if (this.BaseAtom is AccentedAtom accentedAtom) { - var accentedBox = ((AccentedAtom)this.BaseAtom).BaseAtom.CreateBox(environment.GetCrampedStyle()); + var accentedBox = accentedAtom.BaseAtom!.CreateBox(environment.GetCrampedStyle()); // Nullable TODO: This probably needs null checking shiftUp = accentedBox.Height - texFont.GetSupDrop(superscriptStyle.Style); shiftDown = accentedBox.Depth + texFont.GetSubDrop(subscriptStyle.Style); } @@ -104,10 +102,10 @@ protected override Box CreateBoxCore(TexEnvironment environment) shiftDown = baseBox.Depth + texFont.GetSubDrop(subscriptStyle.Style); } - Box superscriptBox = null; - Box superscriptContainerBox = null; - Box subscriptBox = null; - Box subscriptContainerBox = null; + Box? superscriptBox = null; + Box? superscriptContainerBox = null; + Box? subscriptBox = null; + Box? subscriptContainerBox = null; if (this.SuperscriptAtom != null) { @@ -143,7 +141,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) // Check if only superscript is set. if (subscriptBox == null) { - superscriptContainerBox.Shift = -shiftUp; + superscriptContainerBox!.Shift = -shiftUp; // Nullable TODO: Check whether superscriptContainerBox is really always non-null here resultBox.Add(superscriptContainerBox); return resultBox; } @@ -151,7 +149,8 @@ protected override Box CreateBoxCore(TexEnvironment environment) // Check if only subscript is set. if (superscriptBox == null) { - subscriptContainerBox.Shift = Math.Max(Math.Max(shiftDown, texFont.GetSub1(style)), subscriptBox.Height - 4 * + // Nullable TODO: Check whether subscriptContainerBox is really always non-null here + subscriptContainerBox!.Shift = Math.Max(Math.Max(shiftDown, texFont.GetSub1(style)), subscriptBox.Height - 4 * Math.Abs(texFont.GetXHeight(style, lastFontId)) / 5); resultBox.Add(subscriptContainerBox); return resultBox; @@ -180,7 +179,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) // Create box containing both superscript and subscript. var scriptsBox = new VerticalBox(); - superscriptContainerBox.Shift = delta; + superscriptContainerBox!.Shift = delta; // Nullable TODO: Check whether superscriptContainerBox is really always non-null here scriptsBox.Add(superscriptContainerBox); scriptsBox.Add(new StrutBox(0, scriptsInterSpace, 0, 0)); scriptsBox.Add(subscriptContainerBox); @@ -193,12 +192,12 @@ protected override Box CreateBoxCore(TexEnvironment environment) public override TexAtomType GetLeftType() { - return this.BaseAtom.GetLeftType(); + return this.BaseAtom!.GetLeftType(); // Nullable TODO: This probably needs null checking } public override TexAtomType GetRightType() { - return this.BaseAtom.GetRightType(); + return this.BaseAtom!.GetRightType(); // Nullable TODO: This probably needs null checking } } } From 021704ecce3afeecd1e1e26b96a90c173b1276f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 23:08:12 +0200 Subject: [PATCH 16/23] Drop nullable disable on third half of Atoms. --- src/WpfMath/Atoms/SpaceAtom.cs | 8 +++---- src/WpfMath/Atoms/StyledAtom.cs | 14 ++++++------ src/WpfMath/Atoms/SymbolAtom.cs | 15 ++++++------- src/WpfMath/Atoms/TypedAtom.cs | 8 +++---- src/WpfMath/Atoms/UnderOverAtom.cs | 26 +++++++++++------------ src/WpfMath/Atoms/UnderlinedAtom.cs | 6 ++---- src/WpfMath/Atoms/VerticalCenteredAtom.cs | 8 +++---- src/WpfMath/TexSymbolParser.cs | 4 ++-- 8 files changed, 38 insertions(+), 51 deletions(-) diff --git a/src/WpfMath/Atoms/SpaceAtom.cs b/src/WpfMath/Atoms/SpaceAtom.cs index a5083bd3..30d0d3d8 100644 --- a/src/WpfMath/Atoms/SpaceAtom.cs +++ b/src/WpfMath/Atoms/SpaceAtom.cs @@ -1,8 +1,6 @@ using System; using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing whitespace. @@ -48,7 +46,7 @@ public static void CheckUnit(TexUnit unit) private readonly TexUnit depthUnit; public SpaceAtom( - SourceSpan source, + SourceSpan? source, TexUnit widthUnit, double width, TexUnit heightUnit, @@ -70,7 +68,7 @@ public SpaceAtom( this.depth = depth; } - public SpaceAtom(SourceSpan source, TexUnit unit, double width, double height, double depth) + public SpaceAtom(SourceSpan? source, TexUnit unit, double width, double height, double depth) : base(source) { CheckUnit(unit); @@ -84,7 +82,7 @@ public SpaceAtom(SourceSpan source, TexUnit unit, double width, double height, d this.depth = depth; } - public SpaceAtom(SourceSpan source) + public SpaceAtom(SourceSpan? source) : base(source) { this.isHardSpace = true; diff --git a/src/WpfMath/Atoms/StyledAtom.cs b/src/WpfMath/Atoms/StyledAtom.cs index 229288ad..ffdccd56 100644 --- a/src/WpfMath/Atoms/StyledAtom.cs +++ b/src/WpfMath/Atoms/StyledAtom.cs @@ -1,14 +1,12 @@ using System.Windows.Media; using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom specifying graphical style. internal class StyledAtom : Atom, IRow { - public StyledAtom(SourceSpan source, Atom atom, Brush backgroundColor, Brush foregroundColor) + public StyledAtom(SourceSpan? source, Atom? atom, Brush? backgroundColor, Brush? foregroundColor) : base(source) { this.RowAtom = new RowAtom(source, atom); @@ -19,9 +17,9 @@ public StyledAtom(SourceSpan source, Atom atom, Brush backgroundColor, Brush for // RowAtom to which colors are applied. public RowAtom RowAtom { get; } - public Brush Background { get; } + public Brush? Background { get; } - public Brush Foreground { get; } + public Brush? Foreground { get; } public Atom WithPreviousAtom(DummyAtom previousAtom) { @@ -51,9 +49,9 @@ public override TexAtomType GetRightType() } public StyledAtom Clone( - RowAtom rowAtom = null, - Brush background = null, - Brush foreground = null) + RowAtom? rowAtom = null, + Brush? background = null, + Brush? foreground = null) { return new StyledAtom( this.Source, diff --git a/src/WpfMath/Atoms/SymbolAtom.cs b/src/WpfMath/Atoms/SymbolAtom.cs index cf921b22..6585a5b7 100644 --- a/src/WpfMath/Atoms/SymbolAtom.cs +++ b/src/WpfMath/Atoms/SymbolAtom.cs @@ -1,10 +1,9 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using WpfMath.Utils; -#nullable disable - namespace WpfMath.Atoms { // Atom representing symbol (non-alphanumeric character). @@ -16,7 +15,7 @@ internal class SymbolAtom : CharSymbol internal const string EmptyDelimiterName = "_emptyDelimiter"; // Dictionary of definitions of all symbols, keyed by name. - private static readonly IDictionary> symbols; + private static readonly IDictionary> symbols; // Set of all valid symbol types. private static BitArray validSymbolTypes; @@ -37,7 +36,7 @@ static SymbolAtom() validSymbolTypes.Set((int)TexAtomType.Accent, true); } - public static bool TryGetAtom(string name, SourceSpan source, out SymbolAtom atom) + public static bool TryGetAtom(string name, SourceSpan? source, [NotNullWhen(true)] out SymbolAtom? atom) { if (!symbols.TryGetValue(name, out var factory)) { @@ -50,13 +49,13 @@ public static bool TryGetAtom(string name, SourceSpan source, out SymbolAtom ato return true; } - public static SymbolAtom GetAtom(string name, SourceSpan source) => + public static SymbolAtom GetAtom(string name, SourceSpan? source) => TryGetAtom(name, source, out var atom) ? atom : throw new SymbolNotFoundException(name); - public static bool TryGetAtom(SourceSpan name, out SymbolAtom atom) => + public static bool TryGetAtom(SourceSpan name, out SymbolAtom? atom) => TryGetAtom(name.ToString(), name, out atom); - public SymbolAtom(SourceSpan source, SymbolAtom symbolAtom, TexAtomType type) + public SymbolAtom(SourceSpan? source, SymbolAtom symbolAtom, TexAtomType type) : base(source, type) { if (!validSymbolTypes[(int)type]) @@ -65,7 +64,7 @@ public SymbolAtom(SourceSpan source, SymbolAtom symbolAtom, TexAtomType type) this.IsDelimeter = symbolAtom.IsDelimeter; } - public SymbolAtom(SourceSpan source, string name, TexAtomType type, bool isDelimeter) + public SymbolAtom(SourceSpan? source, string name, TexAtomType type, bool isDelimeter) : base(source, type) { this.Name = name; diff --git a/src/WpfMath/Atoms/TypedAtom.cs b/src/WpfMath/Atoms/TypedAtom.cs index 5f0585d5..49515a95 100644 --- a/src/WpfMath/Atoms/TypedAtom.cs +++ b/src/WpfMath/Atoms/TypedAtom.cs @@ -1,13 +1,11 @@ using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing other atom with custom left and right types. internal class TypedAtom : Atom { - public TypedAtom(SourceSpan source, Atom atom, TexAtomType leftType, TexAtomType rightType) + public TypedAtom(SourceSpan? source, Atom? atom, TexAtomType leftType, TexAtomType rightType) : base(source) { this.Atom = atom; @@ -15,14 +13,14 @@ public TypedAtom(SourceSpan source, Atom atom, TexAtomType leftType, TexAtomType this.RightType = rightType; } - public Atom Atom { get; } + public Atom? Atom { get; } public TexAtomType LeftType { get; } public TexAtomType RightType { get; } protected override Box CreateBoxCore(TexEnvironment environment) => - this.Atom.CreateBox(environment); + this.Atom!.CreateBox(environment); // Nullable TODO: This probably needs null checking public override TexAtomType GetLeftType() { diff --git a/src/WpfMath/Atoms/UnderOverAtom.cs b/src/WpfMath/Atoms/UnderOverAtom.cs index 630bdf07..fc9bf9db 100644 --- a/src/WpfMath/Atoms/UnderOverAtom.cs +++ b/src/WpfMath/Atoms/UnderOverAtom.cs @@ -1,14 +1,12 @@ using System; using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing other atom with atoms optionally over and under it. internal class UnderOverAtom : Atom { - private static Box ChangeWidth(Box box, double maxWidth) + private static Box? ChangeWidth(Box? box, double maxWidth) { if (box != null && Math.Abs(maxWidth - box.Width) > TexUtilities.FloatPrecision) return new HorizontalBox(box, maxWidth, TexAlignment.Center); @@ -17,9 +15,9 @@ private static Box ChangeWidth(Box box, double maxWidth) } public UnderOverAtom( - SourceSpan source, - Atom baseAtom, - Atom underOver, + SourceSpan? source, + Atom? baseAtom, + Atom? underOver, TexUnit underOverUnit, double underOverSpace, bool underOverScriptSize, @@ -55,13 +53,13 @@ public UnderOverAtom( } public UnderOverAtom( - SourceSpan source, - Atom baseAtom, - Atom under, + SourceSpan? source, + Atom? baseAtom, + Atom? under, TexUnit underUnit, double underSpace, bool underScriptSize, - Atom over, + Atom? over, TexUnit overUnit, double overSpace, bool overScriptSize) @@ -81,11 +79,11 @@ public UnderOverAtom( this.OverScriptSmaller = overScriptSize; } - public Atom BaseAtom { get; } + public Atom? BaseAtom { get; } - public Atom UnderAtom { get; } + public Atom? UnderAtom { get; } - public Atom OverAtom { get; } + public Atom? OverAtom { get; } // Kern between base and under atom. public double UnderSpace { get; } @@ -107,7 +105,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) var baseBox = this.BaseAtom == null ? StrutBox.Empty : this.BaseAtom.CreateBox(environment); // Create boxes for over and under atoms. - Box overBox = null, underBox = null; + Box? overBox = null, underBox = null; var maxWidth = baseBox.Width; if (this.OverAtom != null) diff --git a/src/WpfMath/Atoms/UnderlinedAtom.cs b/src/WpfMath/Atoms/UnderlinedAtom.cs index 21646697..88be9fbc 100644 --- a/src/WpfMath/Atoms/UnderlinedAtom.cs +++ b/src/WpfMath/Atoms/UnderlinedAtom.cs @@ -1,19 +1,17 @@ using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing other atom that is underlined. internal class UnderlinedAtom : Atom { - public UnderlinedAtom(SourceSpan source, Atom baseAtom) + public UnderlinedAtom(SourceSpan? source, Atom? baseAtom) : base(source) { this.BaseAtom = baseAtom; } - public Atom BaseAtom { get; } + public Atom? BaseAtom { get; } protected override Box CreateBoxCore(TexEnvironment environment) { diff --git a/src/WpfMath/Atoms/VerticalCenteredAtom.cs b/src/WpfMath/Atoms/VerticalCenteredAtom.cs index 6a87339a..bb2d7058 100644 --- a/src/WpfMath/Atoms/VerticalCenteredAtom.cs +++ b/src/WpfMath/Atoms/VerticalCenteredAtom.cs @@ -1,23 +1,21 @@ using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing other atom vertically centered with respect to axis. internal class VerticalCenteredAtom : Atom { - public VerticalCenteredAtom(SourceSpan source, Atom atom) + public VerticalCenteredAtom(SourceSpan? source, Atom? atom) : base(source) { this.Atom = atom; } - public Atom Atom { get; } + public Atom? Atom { get; } protected override Box CreateBoxCore(TexEnvironment environment) { - var box = this.Atom.CreateBox(environment); + var box = this.Atom!.CreateBox(environment); // Nullable TODO: This probably needs null checking // Centre box relative to horizontal axis. var totalHeight = box.Height + box.Depth; diff --git a/src/WpfMath/TexSymbolParser.cs b/src/WpfMath/TexSymbolParser.cs index 32202244..d6a0dc0e 100644 --- a/src/WpfMath/TexSymbolParser.cs +++ b/src/WpfMath/TexSymbolParser.cs @@ -42,9 +42,9 @@ public TexSymbolParser() this.rootElement = doc.Root; } - public IDictionary> GetSymbols() + public IDictionary> GetSymbols() { - var result = new Dictionary>(); + var result = new Dictionary>(); foreach (var symbolElement in rootElement.Elements("Symbol")) { From d477ccef259a0d562a9c7ebdc3a95353b145e228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 23:22:54 +0200 Subject: [PATCH 17/23] Drop nullable disable in RowAtom. This poses a bit of a problem in the StyledAtom ctor in that an Atom? is eventually passed to RowAtom(source, elements), where elements is supposed to not contain null values at all. --- src/WpfMath/Atoms/DummyAtom.cs | 2 +- src/WpfMath/Atoms/IRow.cs | 2 +- src/WpfMath/Atoms/PhantomAtom.cs | 2 +- src/WpfMath/Atoms/RowAtom.cs | 26 +++++++++----------------- src/WpfMath/Atoms/StyledAtom.cs | 4 ++-- 5 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/WpfMath/Atoms/DummyAtom.cs b/src/WpfMath/Atoms/DummyAtom.cs index 1160d414..5126547b 100644 --- a/src/WpfMath/Atoms/DummyAtom.cs +++ b/src/WpfMath/Atoms/DummyAtom.cs @@ -18,7 +18,7 @@ public DummyAtom(Atom atom) { } - public Atom WithPreviousAtom(DummyAtom previousAtom) + public Atom WithPreviousAtom(DummyAtom? previousAtom) { if (this.Atom is IRow row) { diff --git a/src/WpfMath/Atoms/IRow.cs b/src/WpfMath/Atoms/IRow.cs index 02b66807..727b06a7 100644 --- a/src/WpfMath/Atoms/IRow.cs +++ b/src/WpfMath/Atoms/IRow.cs @@ -6,6 +6,6 @@ namespace WpfMath internal interface IRow { // Dummy atom representing atom just before first child atom. - Atom WithPreviousAtom(DummyAtom previousAtom); + Atom WithPreviousAtom(DummyAtom? previousAtom); } } diff --git a/src/WpfMath/Atoms/PhantomAtom.cs b/src/WpfMath/Atoms/PhantomAtom.cs index 9e4bcc44..5149776d 100644 --- a/src/WpfMath/Atoms/PhantomAtom.cs +++ b/src/WpfMath/Atoms/PhantomAtom.cs @@ -23,7 +23,7 @@ public PhantomAtom( this.useDepth = useDepth; } - public Atom WithPreviousAtom(DummyAtom previousAtom) => + public Atom WithPreviousAtom(DummyAtom? previousAtom) => new PhantomAtom( this.Source, this.RowAtom.WithPreviousAtom(previousAtom), diff --git a/src/WpfMath/Atoms/RowAtom.cs b/src/WpfMath/Atoms/RowAtom.cs index 9b215d73..a4d8fb39 100644 --- a/src/WpfMath/Atoms/RowAtom.cs +++ b/src/WpfMath/Atoms/RowAtom.cs @@ -4,8 +4,6 @@ using System.Linq; using WpfMath.Boxes; -#nullable disable - namespace WpfMath.Atoms { // Atom representing horizontal row of other atoms, separated by glue. @@ -36,7 +34,7 @@ static RowAtom() ligatureKernChangeSet.Set((int)TexAtomType.Punctuation, true); } - public RowAtom(SourceSpan source, Atom baseAtom) + public RowAtom(SourceSpan? source, Atom baseAtom) : this( source, baseAtom is RowAtom @@ -45,47 +43,41 @@ baseAtom is RowAtom { } - public RowAtom(SourceSpan source) + public RowAtom(SourceSpan? source) : base(source) { this.Elements = new List().AsReadOnly(); } - private RowAtom(SourceSpan source, DummyAtom previousAtom, ReadOnlyCollection elements) + private RowAtom(SourceSpan? source, DummyAtom? previousAtom, ReadOnlyCollection elements) : base(source) { this.PreviousAtom = previousAtom; this.Elements = elements; } - internal RowAtom(SourceSpan source, IEnumerable elements) + internal RowAtom(SourceSpan? source, IEnumerable elements) : base(source) => - this.Elements = elements.Where(x => x != null).ToList().AsReadOnly(); - // TODO[F]: Fix this with C# 8 migration: there shouldn't be nullable atoms in this collection + this.Elements = elements.ToList().AsReadOnly(); - public DummyAtom PreviousAtom { get; } + public DummyAtom? PreviousAtom { get; } public ReadOnlyCollection Elements { get; } - public Atom WithPreviousAtom(DummyAtom previousAtom) => + public Atom WithPreviousAtom(DummyAtom? previousAtom) => new RowAtom(this.Source, previousAtom, this.Elements); - public RowAtom WithSource(SourceSpan source) => + public RowAtom WithSource(SourceSpan? source) => new RowAtom(source, this.PreviousAtom, this.Elements); public RowAtom Add(Atom atom) { - if (atom is null) // TODO[F]: Mark the parameter as non-nullable and drop this check whe porting to C# 8 - { - return new RowAtom(this.Source, this.PreviousAtom, this.Elements); - } - var newElements = this.Elements.ToList(); newElements.Add(atom); return new RowAtom(this.Source, this.PreviousAtom, newElements.AsReadOnly()); } - private static DummyAtom ChangeAtomToOrdinary(DummyAtom currentAtom, DummyAtom previousAtom, Atom nextAtom) + private static DummyAtom ChangeAtomToOrdinary(DummyAtom currentAtom, DummyAtom? previousAtom, Atom? nextAtom) { var type = currentAtom.GetLeftType(); if (type == TexAtomType.BinaryOperator && (previousAtom == null || diff --git a/src/WpfMath/Atoms/StyledAtom.cs b/src/WpfMath/Atoms/StyledAtom.cs index ffdccd56..1481c014 100644 --- a/src/WpfMath/Atoms/StyledAtom.cs +++ b/src/WpfMath/Atoms/StyledAtom.cs @@ -9,7 +9,7 @@ internal class StyledAtom : Atom, IRow public StyledAtom(SourceSpan? source, Atom? atom, Brush? backgroundColor, Brush? foregroundColor) : base(source) { - this.RowAtom = new RowAtom(source, atom); + this.RowAtom = new RowAtom(source, atom!); // Nullable TODO: This definitely needs null checking and is currently wrong this.Background = backgroundColor; this.Foreground = foregroundColor; } @@ -21,7 +21,7 @@ public StyledAtom(SourceSpan? source, Atom? atom, Brush? backgroundColor, Brush? public Brush? Foreground { get; } - public Atom WithPreviousAtom(DummyAtom previousAtom) + public Atom WithPreviousAtom(DummyAtom? previousAtom) { var rowAtom = this.RowAtom.WithPreviousAtom(previousAtom); return new StyledAtom(this.Source, rowAtom, this.Background, this.Foreground); From 2314ecc6026d134d65969a734bdce602cee9e6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 23:31:15 +0200 Subject: [PATCH 18/23] Drop nullable disable for Box classes. There's a few problems that stem from other parts of the code, e.g. ExtensionChar.Repeat being nullable, but used in CharBox, or OverUnderBox using a nullable ScriptBox as if it were not null. --- src/WpfMath/Atoms/BigOperatorAtom.cs | 2 +- src/WpfMath/Atoms/ScriptsAtom.cs | 2 +- src/WpfMath/Atoms/UnderOverAtom.cs | 6 ++++-- src/WpfMath/Boxes/Box.cs | 10 ++++------ src/WpfMath/Boxes/CharBox.cs | 2 -- src/WpfMath/Boxes/GlueBox.cs | 2 -- src/WpfMath/Boxes/HorizontalBox.cs | 4 +--- src/WpfMath/Boxes/HorizontalRule.cs | 2 -- src/WpfMath/Boxes/OverBar.cs | 2 -- src/WpfMath/Boxes/OverUnderBox.cs | 10 ++++------ src/WpfMath/Boxes/StrutBox.cs | 2 -- src/WpfMath/Boxes/VerticalBox.cs | 2 -- src/WpfMath/DelimiterFactory.cs | 2 +- 13 files changed, 16 insertions(+), 32 deletions(-) diff --git a/src/WpfMath/Atoms/BigOperatorAtom.cs b/src/WpfMath/Atoms/BigOperatorAtom.cs index e7688d07..3490ed24 100644 --- a/src/WpfMath/Atoms/BigOperatorAtom.cs +++ b/src/WpfMath/Atoms/BigOperatorAtom.cs @@ -114,7 +114,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) } // Add box for base atom. - resultBox.Add(baseBox); + resultBox.Add(baseBox!); // Create and add box for lower limit. if (this.LowerLimitAtom != null) diff --git a/src/WpfMath/Atoms/ScriptsAtom.cs b/src/WpfMath/Atoms/ScriptsAtom.cs index d8dbb716..5a5f9d86 100644 --- a/src/WpfMath/Atoms/ScriptsAtom.cs +++ b/src/WpfMath/Atoms/ScriptsAtom.cs @@ -182,7 +182,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) superscriptContainerBox!.Shift = delta; // Nullable TODO: Check whether superscriptContainerBox is really always non-null here scriptsBox.Add(superscriptContainerBox); scriptsBox.Add(new StrutBox(0, scriptsInterSpace, 0, 0)); - scriptsBox.Add(subscriptContainerBox); + scriptsBox.Add(subscriptContainerBox!); scriptsBox.Height = shiftUp + superscriptBox.Height; scriptsBox.Depth = shiftDown + subscriptBox.Depth; resultBox.Add(scriptsBox); diff --git a/src/WpfMath/Atoms/UnderOverAtom.cs b/src/WpfMath/Atoms/UnderOverAtom.cs index fc9bf9db..64d62de6 100644 --- a/src/WpfMath/Atoms/UnderOverAtom.cs +++ b/src/WpfMath/Atoms/UnderOverAtom.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using WpfMath.Boxes; namespace WpfMath.Atoms @@ -6,6 +7,7 @@ namespace WpfMath.Atoms // Atom representing other atom with atoms optionally over and under it. internal class UnderOverAtom : Atom { + [return: NotNullIfNotNull("box")] private static Box? ChangeWidth(Box? box, double maxWidth) { if (box != null && Math.Abs(maxWidth - box.Width) > TexUtilities.FloatPrecision) @@ -128,7 +130,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) // Create and add box for over atom. if (this.OverAtom != null) { - resultBox.Add(ChangeWidth(overBox, maxWidth)); + resultBox.Add(ChangeWidth(overBox!, maxWidth)); resultBox.Add(new SpaceAtom(null, this.OverSpaceUnit, 0, this.OverSpace, 0).CreateBox(environment)); } @@ -141,7 +143,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) if (this.UnderAtom != null) { resultBox.Add(new SpaceAtom(null, this.OverSpaceUnit, 0, this.UnderSpace, 0).CreateBox(environment)); - resultBox.Add(ChangeWidth(underBox, maxWidth)); + resultBox.Add(ChangeWidth(underBox!, maxWidth)); } resultBox.Depth = resultBox.Height + resultBox.Depth - totalHeight; diff --git a/src/WpfMath/Boxes/Box.cs b/src/WpfMath/Boxes/Box.cs index 82b1919e..3cdf8479 100644 --- a/src/WpfMath/Boxes/Box.cs +++ b/src/WpfMath/Boxes/Box.cs @@ -3,8 +3,6 @@ using System.Windows.Media; using WpfMath.Rendering; -#nullable disable - namespace WpfMath.Boxes { // Represents graphical box that is part of math expression, and can itself contain child boxes. @@ -23,7 +21,7 @@ protected Box() { } - protected Box(Brush foreground, Brush background) + protected Box(Brush? foreground, Brush? background) { this.children = new List(); this.childrenReadOnly = new ReadOnlyCollection(this.children); @@ -36,19 +34,19 @@ public ReadOnlyCollection Children get { return this.childrenReadOnly; } } - public SourceSpan Source + public SourceSpan? Source { get; set; } - public Brush Foreground + public Brush? Foreground { get; set; } - public Brush Background + public Brush? Background { get; set; diff --git a/src/WpfMath/Boxes/CharBox.cs b/src/WpfMath/Boxes/CharBox.cs index e4a60378..a864f150 100644 --- a/src/WpfMath/Boxes/CharBox.cs +++ b/src/WpfMath/Boxes/CharBox.cs @@ -4,8 +4,6 @@ using WpfMath.Exceptions; using WpfMath.Rendering; -#nullable disable - namespace WpfMath.Boxes { // Box representing single character. diff --git a/src/WpfMath/Boxes/GlueBox.cs b/src/WpfMath/Boxes/GlueBox.cs index 608387df..bad54081 100644 --- a/src/WpfMath/Boxes/GlueBox.cs +++ b/src/WpfMath/Boxes/GlueBox.cs @@ -1,7 +1,5 @@ using WpfMath.Rendering; -#nullable disable - namespace WpfMath.Boxes { // Box representing glue. diff --git a/src/WpfMath/Boxes/HorizontalBox.cs b/src/WpfMath/Boxes/HorizontalBox.cs index e770caef..7b1e8537 100644 --- a/src/WpfMath/Boxes/HorizontalBox.cs +++ b/src/WpfMath/Boxes/HorizontalBox.cs @@ -2,8 +2,6 @@ using System.Windows.Media; using WpfMath.Rendering; -#nullable disable - namespace WpfMath.Boxes { // Box containing horizontal stack of child boxes. @@ -40,7 +38,7 @@ public HorizontalBox(Box box) this.Add(box); } - public HorizontalBox(Brush foreground, Brush background) + public HorizontalBox(Brush? foreground, Brush? background) : base(foreground, background) { } diff --git a/src/WpfMath/Boxes/HorizontalRule.cs b/src/WpfMath/Boxes/HorizontalRule.cs index 6c062ecf..f1990e5e 100644 --- a/src/WpfMath/Boxes/HorizontalRule.cs +++ b/src/WpfMath/Boxes/HorizontalRule.cs @@ -2,8 +2,6 @@ using System.Windows.Media; using WpfMath.Rendering; -#nullable disable - namespace WpfMath.Boxes { // Box representing horizontal line. diff --git a/src/WpfMath/Boxes/OverBar.cs b/src/WpfMath/Boxes/OverBar.cs index acf42d52..6904b7bb 100644 --- a/src/WpfMath/Boxes/OverBar.cs +++ b/src/WpfMath/Boxes/OverBar.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace WpfMath.Boxes { // Box representing other box with horizontal rule above it. diff --git a/src/WpfMath/Boxes/OverUnderBox.cs b/src/WpfMath/Boxes/OverUnderBox.cs index 9479a84e..fe9da4c6 100644 --- a/src/WpfMath/Boxes/OverUnderBox.cs +++ b/src/WpfMath/Boxes/OverUnderBox.cs @@ -1,14 +1,12 @@ using WpfMath.Rendering; using WpfMath.Rendering.Transformations; -#nullable disable - namespace WpfMath.Boxes { // Box representing other box with delimiter and script box over or under it. internal class OverUnderBox : Box { - public OverUnderBox(Box baseBox, Box delimiterBox, Box scriptBox, double kern, bool over) + public OverUnderBox(Box baseBox, Box delimiterBox, Box? scriptBox, double kern, bool over) : base() { this.BaseBox = baseBox; @@ -37,7 +35,7 @@ public Box DelimiterBox private set; } - public Box ScriptBox + public Box? ScriptBox { get; private set; @@ -71,7 +69,7 @@ public override void RenderTo(IElementRenderer renderer, double x, double y) RenderDelimiter(translationX, translationY); // Draw script box as superscript. - RenderScriptBox(centerY - this.Kern - this.ScriptBox.Depth); + RenderScriptBox(centerY - this.Kern - this.ScriptBox!.Depth); // Nullable TODO: This probably needs null checking } else { @@ -83,7 +81,7 @@ public override void RenderTo(IElementRenderer renderer, double x, double y) RenderDelimiter(translationX, translationY); // Draw script box as subscript. - RenderScriptBox(centerY + this.Kern + this.ScriptBox.Height); + RenderScriptBox(centerY + this.Kern + this.ScriptBox!.Height); // Nullable TODO: This probably needs null checking } void RenderDelimiter(double translationX, double translationY) diff --git a/src/WpfMath/Boxes/StrutBox.cs b/src/WpfMath/Boxes/StrutBox.cs index 99ef2578..059c380c 100644 --- a/src/WpfMath/Boxes/StrutBox.cs +++ b/src/WpfMath/Boxes/StrutBox.cs @@ -1,7 +1,5 @@ using WpfMath.Rendering; -#nullable disable - namespace WpfMath.Boxes { // Box representing whitespace. diff --git a/src/WpfMath/Boxes/VerticalBox.cs b/src/WpfMath/Boxes/VerticalBox.cs index 95584289..e6a467a9 100644 --- a/src/WpfMath/Boxes/VerticalBox.cs +++ b/src/WpfMath/Boxes/VerticalBox.cs @@ -1,8 +1,6 @@ using System; using WpfMath.Rendering; -#nullable disable - namespace WpfMath.Boxes { // Box containing vertical stack of child boxes. diff --git a/src/WpfMath/DelimiterFactory.cs b/src/WpfMath/DelimiterFactory.cs index 0c609cee..05257dea 100644 --- a/src/WpfMath/DelimiterFactory.cs +++ b/src/WpfMath/DelimiterFactory.cs @@ -44,7 +44,7 @@ public static Box CreateBox(string symbol, double minHeight, TexEnvironment envi resultBox.Add(new CharBox(environment, extension.Bottom) { Source = source }); // Insert repeatable part multiple times until box is high enough. - var repeatBox = new CharBox(environment, extension.Repeat) { Source = source }; + var repeatBox = new CharBox(environment, extension.Repeat!) { Source = source }; // Nullable TODO: This probably needs null checking do { if (extension.Top != null && extension.Bottom != null) From 6586f268aebce2e9dd5e881a91961ba91ee7ac70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Fri, 14 Aug 2020 23:57:10 +0200 Subject: [PATCH 19/23] Drop nullable disable on TexFormulaParser. --- src/WpfMath/Atoms/OverlinedAtom.cs | 4 +- src/WpfMath/Atoms/SymbolAtom.cs | 2 +- .../Parsers/Matrices/MatrixCommandParser.cs | 4 +- src/WpfMath/TexFormulaParser.cs | 61 +++++++++---------- src/WpfMath/TexPredefinedFormulaParser.cs | 2 +- 5 files changed, 35 insertions(+), 38 deletions(-) diff --git a/src/WpfMath/Atoms/OverlinedAtom.cs b/src/WpfMath/Atoms/OverlinedAtom.cs index 47aba1b0..8b9f98f0 100644 --- a/src/WpfMath/Atoms/OverlinedAtom.cs +++ b/src/WpfMath/Atoms/OverlinedAtom.cs @@ -5,13 +5,13 @@ namespace WpfMath.Atoms // Atom representing other atom with horizontal rule above it. internal class OverlinedAtom : Atom { - public OverlinedAtom(SourceSpan? source, Atom baseAtom) + public OverlinedAtom(SourceSpan? source, Atom? baseAtom) : base(source) { this.BaseAtom = baseAtom; } - public Atom BaseAtom { get; } + public Atom? BaseAtom { get; } protected override Box CreateBoxCore(TexEnvironment environment) { diff --git a/src/WpfMath/Atoms/SymbolAtom.cs b/src/WpfMath/Atoms/SymbolAtom.cs index 6585a5b7..7fbbbe30 100644 --- a/src/WpfMath/Atoms/SymbolAtom.cs +++ b/src/WpfMath/Atoms/SymbolAtom.cs @@ -52,7 +52,7 @@ public static bool TryGetAtom(string name, SourceSpan? source, [NotNullWhen(true public static SymbolAtom GetAtom(string name, SourceSpan? source) => TryGetAtom(name, source, out var atom) ? atom : throw new SymbolNotFoundException(name); - public static bool TryGetAtom(SourceSpan name, out SymbolAtom? atom) => + public static bool TryGetAtom(SourceSpan name, [NotNullWhen(true)] out SymbolAtom? atom) => TryGetAtom(name.ToString(), name, out atom); public SymbolAtom(SourceSpan? source, SymbolAtom symbolAtom, TexAtomType type) diff --git a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs index bf77ddab..bcbb5dfe 100644 --- a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs +++ b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs @@ -44,8 +44,8 @@ public CommandProcessingResult ProcessCommand(CommandContext context) : TexFormulaParser.GetDelimiterSymbol(name, null) ?? throw new TexParseException($"The delimiter {name} could not be found"); - var leftDelimiter = GetDelimiter(_leftDelimiterSymbolName); - var rightDelimiter = GetDelimiter(_rightDelimiterSymbolName); + SymbolAtom? leftDelimiter = GetDelimiter(_leftDelimiterSymbolName); + SymbolAtom? rightDelimiter = GetDelimiter(_rightDelimiterSymbolName); var atom = leftDelimiter == null && rightDelimiter == null ? (Atom) matrix diff --git a/src/WpfMath/TexFormulaParser.cs b/src/WpfMath/TexFormulaParser.cs index 62b72e34..08c5c7ce 100644 --- a/src/WpfMath/TexFormulaParser.cs +++ b/src/WpfMath/TexFormulaParser.cs @@ -10,8 +10,6 @@ using WpfMath.Parsers; using WpfMath.Utils; -#nullable disable - namespace WpfMath { // TODO: Put all error strings into resources. @@ -45,11 +43,11 @@ public class TexFormulaParser "sqrt" }; - private static IList symbols; - private static IList delimeters; - private static HashSet textStyles; - private static readonly IDictionary> predefinedFormulas = - new Dictionary>(); + private static IList symbols = new List(); // Nullable: CS8618 + private static IList delimeters = new List(); + private static HashSet textStyles = new HashSet(); + private static readonly IDictionary> predefinedFormulas = + new Dictionary>(); private static readonly string[][] delimiterNames = { @@ -109,7 +107,7 @@ internal static string GetDelimeterMapping(char character) } } - internal static SymbolAtom GetDelimiterSymbol(string name, SourceSpan source) + internal static SymbolAtom? GetDelimiterSymbol(string? name, SourceSpan? source) { if (name == null) return null; @@ -130,7 +128,7 @@ private static bool IsWhiteSpace(char ch) return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'; } - private static bool ShouldSkipWhiteSpace(string style) => style != TexUtilities.TextStyleName; + private static bool ShouldSkipWhiteSpace(string? style) => style != TexUtilities.TextStyleName; /// A registry for additional commands. private readonly IReadOnlyDictionary _commandRegistry; @@ -160,16 +158,16 @@ public TexFormulaParser() : this( PredefinedColorParser.Instance) {} - public TexFormula Parse(string value, string textStyle = null) => + public TexFormula Parse(string value, string? textStyle = null) => Parse(new SourceSpan("User input", value, 0, value.Length), textStyle); - public TexFormula Parse(SourceSpan value, string textStyle = null) + public TexFormula Parse(SourceSpan value, string? textStyle = null) { var position = 0; return Parse(value, ref position, false, textStyle, DefaultCommandEnvironment.Instance); } - internal TexFormula Parse(SourceSpan value, string textStyle, ICommandEnvironment environment) + internal TexFormula Parse(SourceSpan value, string? textStyle, ICommandEnvironment environment) { int localPostion = 0; return Parse(value, ref localPostion, false, textStyle, environment); @@ -178,7 +176,7 @@ internal TexFormula Parse(SourceSpan value, string textStyle, ICommandEnvironmen private DelimiterInfo ParseUntilDelimiter( SourceSpan value, ref int position, - string textStyle, + string? textStyle, ICommandEnvironment environment) { var embeddedFormula = Parse(value, ref position, true, textStyle, environment); @@ -219,7 +217,7 @@ private TexFormula Parse( SourceSpan value, ref int position, bool allowClosingDelimiter, - string textStyle, + string? textStyle, ICommandEnvironment environment) { var formula = new TexFormula { Source = value, TextStyle = textStyle }; @@ -344,7 +342,7 @@ internal static SourceSpan ReadElementGroup(SourceSpan value, ref int position, } /// Reads a char-delimited element group if it exists; returns null if it isn't. - private static SourceSpan ReadElementGroupOptional( + private static SourceSpan? ReadElementGroupOptional( SourceSpan value, ref int position, char openChar, @@ -444,7 +442,7 @@ private TexFormula ReadScript( Parse(ReadElement(value, ref position), formula.TextStyle, environment.CreateChildEnvironment()); /// May return null for commands that produce no atoms. - private Tuple ProcessCommand( + private Tuple ProcessCommand( TexFormula formula, SourceSpan value, ref int position, @@ -469,7 +467,7 @@ private Tuple ProcessCommand( formula.TextStyle, environment.CreateChildEnvironment()); source = value.Segment(start, position - start); - return new Tuple( + return new Tuple( AtomAppendMode.Add, new FractionAtom( source, @@ -487,7 +485,7 @@ private Tuple ProcessCommand( var internals = ParseUntilDelimiter(value, ref position, formula.TextStyle, environment); var closing = internals.ClosingDelimiter; source = value.Segment(start, position - start); - return new Tuple( + return new Tuple( AtomAppendMode.Add, new FencedAtom(source, internals.Body, opening, closing)); } @@ -498,7 +496,7 @@ private Tuple ProcessCommand( formula.TextStyle, environment.CreateChildEnvironment()); source = value.Segment(start, position - start); - return new Tuple( + return new Tuple( AtomAppendMode.Add, new OverlinedAtom(source, overlineFormula.RootAtom)); } @@ -514,14 +512,14 @@ private Tuple ProcessCommand( var closing = ParseDelimiter(value, start, ref position); closedDelimiter = true; - return new Tuple(AtomAppendMode.Add, closing); + return new Tuple(AtomAppendMode.Add, closing); } case "sqrt": { // Command is radical. SkipWhiteSpace(value, ref position); - TexFormula degreeFormula = null; + TexFormula? degreeFormula = null; if (value.Length > position && value[position] == leftBracketChar) { // Degree of radical is specified. @@ -537,7 +535,7 @@ private Tuple ProcessCommand( environment.CreateChildEnvironment()); source = value.Segment(start, position - start); - return new Tuple( + return new Tuple( AtomAppendMode.Add, new Radical(source, sqrtFormula.RootAtom, degreeFormula?.RootAtom)); } @@ -549,7 +547,7 @@ private Tuple ProcessCommand( var bodyFormula = Parse(bodyValue, formula.TextStyle, environment.CreateChildEnvironment()); source = value.Segment(start, position - start); - return new Tuple( + return new Tuple( AtomAppendMode.Add, new StyledAtom(source, bodyFormula.RootAtom, null, new SolidColorBrush(color))); } @@ -561,7 +559,7 @@ private Tuple ProcessCommand( var bodyFormula = Parse(bodyValue, formula.TextStyle, environment.CreateChildEnvironment()); source = value.Segment(start, position - start); - return new Tuple( + return new Tuple( AtomAppendMode.Add, new StyledAtom(source, bodyFormula.RootAtom, new SolidColorBrush(color), null)); } @@ -622,8 +620,7 @@ private void ProcessEscapeSequence(TexFormula formula, var command = commandSpan.ToString(); var formulaSource = new SourceSpan(value.SourceName, value.Source, initialSrcPosition, commandSpan.End); - SymbolAtom symbolAtom = null; - if (SymbolAtom.TryGetAtom(commandSpan, out symbolAtom)) + if (SymbolAtom.TryGetAtom(commandSpan, out SymbolAtom? symbolAtom)) { // Symbol was found. @@ -648,7 +645,7 @@ private void ProcessEscapeSequence(TexFormula formula, { // Predefined formula was found. var predefinedFormula = factory(formulaSource); - var atom = AttachScripts(formula, value, ref position, predefinedFormula.RootAtom, true, environment); + var atom = AttachScripts(formula, value, ref position, predefinedFormula!.RootAtom!, true, environment); // Nullable TODO: This might need null checking formula.Add(atom, formulaSource); } else if (command.Equals("nbsp")) @@ -755,7 +752,7 @@ private Atom AttachScripts( var primesRowSource = new SourceSpan( value.SourceName, value.Source, - primesRowAtom.Source.Start, + primesRowAtom.Source!.Start, // Nullable TODO: This might need null checking position - primesRowAtom.Source.Start); primesRowAtom = primesRowAtom.WithSource(primesRowSource); @@ -765,8 +762,8 @@ private Atom AttachScripts( if (position == value.Length) return atom; - TexFormula superscriptFormula = null; - TexFormula subscriptFormula = null; + TexFormula? superscriptFormula = null; + TexFormula? subscriptFormula = null; var ch = value[position]; if (ch == superScriptChar) @@ -806,7 +803,7 @@ private Atom AttachScripts( var superscriptAtom = superscriptFormula?.RootAtom; if (atom.GetRightType() == TexAtomType.BigOperator) { - var source = value.Segment(atom.Source.Start, position - atom.Source.Start); + var source = value.Segment(atom.Source!.Start, position - atom.Source.Start); // Nullable TODO: This might need null checking if (atom is BigOperatorAtom typedAtom) { return new BigOperatorAtom( @@ -831,7 +828,7 @@ private Atom AttachScripts( } /// May return null. - private Atom ConvertCharacter( + private Atom? ConvertCharacter( TexFormula formula, ref int position, SourceSpan source, diff --git a/src/WpfMath/TexPredefinedFormulaParser.cs b/src/WpfMath/TexPredefinedFormulaParser.cs index 3699bc74..de304916 100644 --- a/src/WpfMath/TexPredefinedFormulaParser.cs +++ b/src/WpfMath/TexPredefinedFormulaParser.cs @@ -165,7 +165,7 @@ public override void Parse(SourceSpan source, XElement element) if (argValues.Length == 1) { var parser = new TexFormulaParser(); - formula = parser.Parse((string?)argValues[0]); + formula = parser.Parse((string)argValues[0]!); // Nullable TODO: This might need null checking } else { From 4717e5843444b984b05825a1f594333b67b7d1f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Sat, 15 Aug 2020 09:55:13 +0200 Subject: [PATCH 20/23] Made nullability attributes conditional. --- src/WpfMath/Atoms/SymbolAtom.cs | 11 +++++++++-- src/WpfMath/Atoms/UnderOverAtom.cs | 2 ++ src/WpfMath/WpfMath.csproj | 4 ---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/WpfMath/Atoms/SymbolAtom.cs b/src/WpfMath/Atoms/SymbolAtom.cs index 7fbbbe30..c7735133 100644 --- a/src/WpfMath/Atoms/SymbolAtom.cs +++ b/src/WpfMath/Atoms/SymbolAtom.cs @@ -36,7 +36,11 @@ static SymbolAtom() validSymbolTypes.Set((int)TexAtomType.Accent, true); } +#if !NET452 public static bool TryGetAtom(string name, SourceSpan? source, [NotNullWhen(true)] out SymbolAtom? atom) +#else + public static bool TryGetAtom(string name, SourceSpan? source, out SymbolAtom? atom) +#endif { if (!symbols.TryGetValue(name, out var factory)) { @@ -52,8 +56,11 @@ public static bool TryGetAtom(string name, SourceSpan? source, [NotNullWhen(true public static SymbolAtom GetAtom(string name, SourceSpan? source) => TryGetAtom(name, source, out var atom) ? atom : throw new SymbolNotFoundException(name); - public static bool TryGetAtom(SourceSpan name, [NotNullWhen(true)] out SymbolAtom? atom) => - TryGetAtom(name.ToString(), name, out atom); +#if !NET452 + public static bool TryGetAtom(SourceSpan name, [NotNullWhen(true)] out SymbolAtom? atom) => TryGetAtom(name.ToString(), name, out atom); +#else + public static bool TryGetAtom(SourceSpan name, out SymbolAtom? atom) => TryGetAtom(name.ToString(), name, out atom); +#endif public SymbolAtom(SourceSpan? source, SymbolAtom symbolAtom, TexAtomType type) : base(source, type) diff --git a/src/WpfMath/Atoms/UnderOverAtom.cs b/src/WpfMath/Atoms/UnderOverAtom.cs index 64d62de6..27be3548 100644 --- a/src/WpfMath/Atoms/UnderOverAtom.cs +++ b/src/WpfMath/Atoms/UnderOverAtom.cs @@ -7,7 +7,9 @@ namespace WpfMath.Atoms // Atom representing other atom with atoms optionally over and under it. internal class UnderOverAtom : Atom { +#if !NET452 [return: NotNullIfNotNull("box")] +#endif private static Box? ChangeWidth(Box? box, double maxWidth) { if (box != null && Math.Abs(maxWidth - box.Width) > TexUtilities.FloatPrecision) diff --git a/src/WpfMath/WpfMath.csproj b/src/WpfMath/WpfMath.csproj index 1e9658b5..3ec03ac8 100644 --- a/src/WpfMath/WpfMath.csproj +++ b/src/WpfMath/WpfMath.csproj @@ -27,10 +27,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - From b6582a338d088721f15b354ecf893f981e636ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Sat, 15 Aug 2020 13:45:20 +0200 Subject: [PATCH 21/23] Review fixes. --- src/WpfMath/Atoms/BigOperatorAtom.cs | 7 ++-- src/WpfMath/Atoms/CharAtom.cs | 6 +-- src/WpfMath/Atoms/Radical.cs | 6 +-- src/WpfMath/Atoms/ScriptsAtom.cs | 22 +++++++---- src/WpfMath/Atoms/SymbolAtom.cs | 7 +++- src/WpfMath/DefaultTexFontParser.cs | 2 +- src/WpfMath/DelimiterFactory.cs | 37 ++++++++++--------- src/WpfMath/GlueSettingsParser.cs | 2 +- src/WpfMath/Parsers/CommandParsers.cs | 2 +- .../PredefinedTexFormulaSettingsParser.cs | 2 +- src/WpfMath/TexFormulaHelper.cs | 4 +- src/WpfMath/TexFormulaParser.cs | 27 ++++++-------- src/WpfMath/TexPredefinedFormulaParser.cs | 4 +- src/WpfMath/TexSymbolParser.cs | 2 +- src/WpfMath/Utils/Result.cs | 2 +- 15 files changed, 71 insertions(+), 61 deletions(-) diff --git a/src/WpfMath/Atoms/BigOperatorAtom.cs b/src/WpfMath/Atoms/BigOperatorAtom.cs index 3490ed24..8064592c 100644 --- a/src/WpfMath/Atoms/BigOperatorAtom.cs +++ b/src/WpfMath/Atoms/BigOperatorAtom.cs @@ -91,8 +91,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) // Make all component boxes equally wide. var maxWidth = Math.Max(Math.Max(baseBox.Width, upperLimitBox == null ? 0 : upperLimitBox.Width), lowerLimitBox == null ? 0 : lowerLimitBox.Width); - if (baseBox != null) - baseBox = ChangeWidth(baseBox, maxWidth); + baseBox = ChangeWidth(baseBox, maxWidth); if (upperLimitBox != null) upperLimitBox = ChangeWidth(upperLimitBox, maxWidth); if (lowerLimitBox != null) @@ -114,7 +113,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) } // Add box for base atom. - resultBox.Add(baseBox!); + resultBox.Add(baseBox); // Create and add box for lower limit. if (this.LowerLimitAtom != null) @@ -127,7 +126,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) } // Adjust height and depth of result box. - var baseBoxHeight = baseBox!.Height; + var baseBoxHeight = baseBox.Height; var totalHeight = resultBox.Height + resultBox.Depth; if (upperLimitBox != null) baseBoxHeight += opSpacing5 + kern + upperLimitBox.Height + upperLimitBox.Depth; diff --git a/src/WpfMath/Atoms/CharAtom.cs b/src/WpfMath/Atoms/CharAtom.cs index fe4deaff..86373b75 100644 --- a/src/WpfMath/Atoms/CharAtom.cs +++ b/src/WpfMath/Atoms/CharAtom.cs @@ -17,15 +17,13 @@ public CharAtom(SourceSpan? source, char character, string? textStyle = null) // Null means default text style. public string? TextStyle { get; } - private bool IsDefaultTextStyle => this.TextStyle == null; - public override ITeXFont GetStyledFont(TexEnvironment environment) => this.TextStyle == TexUtilities.TextStyleName ? environment.TextFont : base.GetStyledFont(environment); protected override Result GetCharInfo(ITeXFont texFont, TexStyle style) => - this.IsDefaultTextStyle + this.TextStyle == null ? texFont.GetDefaultCharInfo(this.Character, style) - : texFont.GetCharInfo(this.Character, this.TextStyle!, style); // Nullable: CS8604, could be resolved by inlining IsDefaultTextStyle + : texFont.GetCharInfo(this.Character, this.TextStyle, style); public override Result GetCharFont(ITeXFont texFont) => // Style is irrelevant here. diff --git a/src/WpfMath/Atoms/Radical.cs b/src/WpfMath/Atoms/Radical.cs index acf7ea36..a640cc42 100644 --- a/src/WpfMath/Atoms/Radical.cs +++ b/src/WpfMath/Atoms/Radical.cs @@ -13,14 +13,14 @@ internal class Radical : Atom private const double scale = 0.55; - public Radical(SourceSpan? source, Atom? baseAtom, Atom? degreeAtom = null) + public Radical(SourceSpan? source, Atom baseAtom, Atom? degreeAtom = null) : base(source) { this.BaseAtom = baseAtom; this.DegreeAtom = degreeAtom; } - public Atom? BaseAtom { get; } + public Atom BaseAtom { get; } public Atom? DegreeAtom { get; } @@ -39,7 +39,7 @@ protected override Box CreateBoxCore(TexEnvironment environment) clearance = defaultRuleThickness + Math.Abs(clearance) / 4; // Create box for base atom, in cramped style. - var baseBox = this.BaseAtom!.CreateBox(environment.GetCrampedStyle()); // Nullable TODO: See whether BaseAtom is really always non-null here + var baseBox = this.BaseAtom.CreateBox(environment.GetCrampedStyle()); // Create box for radical sign. var totalHeight = baseBox.Height + baseBox.Depth; diff --git a/src/WpfMath/Atoms/ScriptsAtom.cs b/src/WpfMath/Atoms/ScriptsAtom.cs index 5a5f9d86..179c68a0 100644 --- a/src/WpfMath/Atoms/ScriptsAtom.cs +++ b/src/WpfMath/Atoms/ScriptsAtom.cs @@ -57,9 +57,9 @@ protected override Box CreateBoxCore(TexEnvironment environment) var delta = 0d; double shiftUp, shiftDown; - if (this.BaseAtom is AccentedAtom accentedAtom) + if (this.BaseAtom is AccentedAtom accentedAtom && accentedAtom.BaseAtom != null) { - var accentedBox = accentedAtom.BaseAtom!.CreateBox(environment.GetCrampedStyle()); // Nullable TODO: This probably needs null checking + var accentedBox = accentedAtom.BaseAtom.CreateBox(environment.GetCrampedStyle()); shiftUp = accentedBox.Height - texFont.GetSupDrop(superscriptStyle.Style); shiftDown = accentedBox.Depth + texFont.GetSubDrop(subscriptStyle.Style); } @@ -141,7 +141,10 @@ protected override Box CreateBoxCore(TexEnvironment environment) // Check if only superscript is set. if (subscriptBox == null) { - superscriptContainerBox!.Shift = -shiftUp; // Nullable TODO: Check whether superscriptContainerBox is really always non-null here + if (superscriptContainerBox == null) + throw new Exception("ScriptsAtom with neither subscript nor superscript defined"); + + superscriptContainerBox.Shift = -shiftUp; resultBox.Add(superscriptContainerBox); return resultBox; } @@ -149,8 +152,10 @@ protected override Box CreateBoxCore(TexEnvironment environment) // Check if only subscript is set. if (superscriptBox == null) { - // Nullable TODO: Check whether subscriptContainerBox is really always non-null here - subscriptContainerBox!.Shift = Math.Max(Math.Max(shiftDown, texFont.GetSub1(style)), subscriptBox.Height - 4 * + if (subscriptContainerBox == null) + throw new Exception("ScriptsAtom with neither subscript nor superscript defined"); + + subscriptContainerBox.Shift = Math.Max(Math.Max(shiftDown, texFont.GetSub1(style)), subscriptBox.Height - 4 * Math.Abs(texFont.GetXHeight(style, lastFontId)) / 5); resultBox.Add(subscriptContainerBox); return resultBox; @@ -178,11 +183,14 @@ protected override Box CreateBoxCore(TexEnvironment environment) scriptsInterSpace = shiftUp - superscriptBox.Depth + shiftDown - subscriptBox.Height; // Create box containing both superscript and subscript. + if (superscriptContainerBox == null || subscriptContainerBox == null) + throw new Exception($"ScriptsAtom with superscriptContainerBox = {superscriptContainerBox} and subscriptContainerBox = {subscriptContainerBox} is not supposed to be here"); + var scriptsBox = new VerticalBox(); - superscriptContainerBox!.Shift = delta; // Nullable TODO: Check whether superscriptContainerBox is really always non-null here + superscriptContainerBox.Shift = delta; scriptsBox.Add(superscriptContainerBox); scriptsBox.Add(new StrutBox(0, scriptsInterSpace, 0, 0)); - scriptsBox.Add(subscriptContainerBox!); + scriptsBox.Add(subscriptContainerBox); scriptsBox.Height = shiftUp + superscriptBox.Height; scriptsBox.Depth = shiftDown + subscriptBox.Depth; resultBox.Add(scriptsBox); diff --git a/src/WpfMath/Atoms/SymbolAtom.cs b/src/WpfMath/Atoms/SymbolAtom.cs index c7735133..d85c3320 100644 --- a/src/WpfMath/Atoms/SymbolAtom.cs +++ b/src/WpfMath/Atoms/SymbolAtom.cs @@ -57,10 +57,13 @@ public static SymbolAtom GetAtom(string name, SourceSpan? source) => TryGetAtom(name, source, out var atom) ? atom : throw new SymbolNotFoundException(name); #if !NET452 - public static bool TryGetAtom(SourceSpan name, [NotNullWhen(true)] out SymbolAtom? atom) => TryGetAtom(name.ToString(), name, out atom); + public static bool TryGetAtom(SourceSpan name, [NotNullWhen(true)] out SymbolAtom? atom) #else - public static bool TryGetAtom(SourceSpan name, out SymbolAtom? atom) => TryGetAtom(name.ToString(), name, out atom); + public static bool TryGetAtom(SourceSpan name, out SymbolAtom? atom) #endif + { + return TryGetAtom(name.ToString(), name, out atom); + } public SymbolAtom(SourceSpan? source, SymbolAtom symbolAtom, TexAtomType type) : base(source, type) diff --git a/src/WpfMath/DefaultTexFontParser.cs b/src/WpfMath/DefaultTexFontParser.cs index 7015a714..dd65905b 100644 --- a/src/WpfMath/DefaultTexFontParser.cs +++ b/src/WpfMath/DefaultTexFontParser.cs @@ -50,7 +50,7 @@ private static void SetCharChildParsers() public DefaultTexFontParser() { - var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? + var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); this.rootElement = doc.Root; this.parsedTextStyles = new Dictionary(); diff --git a/src/WpfMath/DelimiterFactory.cs b/src/WpfMath/DelimiterFactory.cs index 05257dea..7a93d165 100644 --- a/src/WpfMath/DelimiterFactory.cs +++ b/src/WpfMath/DelimiterFactory.cs @@ -43,25 +43,28 @@ public static Box CreateBox(string symbol, double minHeight, TexEnvironment envi if (extension.Bottom != null) resultBox.Add(new CharBox(environment, extension.Bottom) { Source = source }); - // Insert repeatable part multiple times until box is high enough. - var repeatBox = new CharBox(environment, extension.Repeat!) { Source = source }; // Nullable TODO: This probably needs null checking - do + if (extension.Repeat != null) { - if (extension.Top != null && extension.Bottom != null) + // Insert repeatable part multiple times until box is high enough. + var repeatBox = new CharBox(environment, extension.Repeat) { Source = source }; + do { - resultBox.Add(1, repeatBox); - if (extension.Middle != null) - resultBox.Add(resultBox.Children.Count - 1, repeatBox); - } - else if (extension.Bottom != null) - { - resultBox.Add(0, repeatBox); - } - else - { - resultBox.Add(repeatBox); - } - } while (resultBox.Height + resultBox.Depth < minHeight); + if (extension.Top != null && extension.Bottom != null) + { + resultBox.Add(1, repeatBox); + if (extension.Middle != null) + resultBox.Add(resultBox.Children.Count - 1, repeatBox); + } + else if (extension.Bottom != null) + { + resultBox.Add(0, repeatBox); + } + else + { + resultBox.Add(repeatBox); + } + } while (resultBox.Height + resultBox.Depth < minHeight); + } return resultBox; } diff --git a/src/WpfMath/GlueSettingsParser.cs b/src/WpfMath/GlueSettingsParser.cs index 6a14b571..26117e2e 100644 --- a/src/WpfMath/GlueSettingsParser.cs +++ b/src/WpfMath/GlueSettingsParser.cs @@ -61,7 +61,7 @@ private static void SetStyleMappings() public GlueSettingsParser() { - var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? + var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); this.rootElement = doc.Root; this.glueTypes = new List(); diff --git a/src/WpfMath/Parsers/CommandParsers.cs b/src/WpfMath/Parsers/CommandParsers.cs index 970d56ae..bdc337af 100644 --- a/src/WpfMath/Parsers/CommandParsers.cs +++ b/src/WpfMath/Parsers/CommandParsers.cs @@ -48,7 +48,7 @@ public CommandContext( internal class CommandProcessingResult { - /// A parsed atom. May be null. + /// A parsed atom.. public Atom? Atom { get; } /// diff --git a/src/WpfMath/PredefinedTexFormulaSettingsParser.cs b/src/WpfMath/PredefinedTexFormulaSettingsParser.cs index 7c3e1336..5964123e 100644 --- a/src/WpfMath/PredefinedTexFormulaSettingsParser.cs +++ b/src/WpfMath/PredefinedTexFormulaSettingsParser.cs @@ -34,7 +34,7 @@ private static void AddToMap(IEnumerable mapList, string[] table) public TexPredefinedFormulaSettingsParser() { - var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? + var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); this.rootElement = doc.Root; } diff --git a/src/WpfMath/TexFormulaHelper.cs b/src/WpfMath/TexFormulaHelper.cs index db4e1c90..afb7764e 100644 --- a/src/WpfMath/TexFormulaHelper.cs +++ b/src/WpfMath/TexFormulaHelper.cs @@ -1,3 +1,4 @@ +using System.Diagnostics; using WpfMath.Atoms; namespace WpfMath @@ -137,7 +138,8 @@ public void AddRadical(TexFormula baseFormula) public void AddRadical(TexFormula baseFormula, TexFormula? degreeFormula) { - this.Add(new Radical(null, baseFormula?.RootAtom, degreeFormula?.RootAtom)); + Debug.Assert(baseFormula.RootAtom != null); + this.Add(new Radical(null, baseFormula.RootAtom, degreeFormula?.RootAtom)); } public void AddOperator(string operatorFormula, string lowerLimitFormula, string upperLimitFormula) diff --git a/src/WpfMath/TexFormulaParser.cs b/src/WpfMath/TexFormulaParser.cs index 08c5c7ce..0b8808d5 100644 --- a/src/WpfMath/TexFormulaParser.cs +++ b/src/WpfMath/TexFormulaParser.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Reflection; using System.Windows; @@ -43,9 +44,9 @@ public class TexFormulaParser "sqrt" }; - private static IList symbols = new List(); // Nullable: CS8618 - private static IList delimeters = new List(); - private static HashSet textStyles = new HashSet(); + private static readonly IList symbols; + private static readonly IList delimeters; + private static readonly HashSet textStyles; private static readonly IDictionary> predefinedFormulas = new Dictionary>(); @@ -65,16 +66,6 @@ public class TexFormulaParser }; static TexFormulaParser() - { - Initialize(); - } - - internal static string[][] DelimiterNames - { - get { return delimiterNames; } - } - - private static void Initialize() { // // If start application isn't WPF, pack isn't registered by defaultTexFontParser @@ -95,6 +86,11 @@ private static void Initialize() predefinedFormulasParser.Parse(predefinedFormulas); } + internal static string[][] DelimiterNames + { + get { return delimiterNames; } + } + internal static string GetDelimeterMapping(char character) { try @@ -535,6 +531,7 @@ private TexFormula ReadScript( environment.CreateChildEnvironment()); source = value.Segment(start, position - start); + Debug.Assert(sqrtFormula.RootAtom != null); return new Tuple( AtomAppendMode.Add, new Radical(source, sqrtFormula.RootAtom, degreeFormula?.RootAtom)); @@ -752,7 +749,7 @@ private Atom AttachScripts( var primesRowSource = new SourceSpan( value.SourceName, value.Source, - primesRowAtom.Source!.Start, // Nullable TODO: This might need null checking + primesRowAtom.Source!.Start, position - primesRowAtom.Source.Start); primesRowAtom = primesRowAtom.WithSource(primesRowSource); @@ -803,7 +800,7 @@ private Atom AttachScripts( var superscriptAtom = superscriptFormula?.RootAtom; if (atom.GetRightType() == TexAtomType.BigOperator) { - var source = value.Segment(atom.Source!.Start, position - atom.Source.Start); // Nullable TODO: This might need null checking + var source = value.Segment(atom.Source!.Start, position - atom.Source.Start); if (atom is BigOperatorAtom typedAtom) { return new BigOperatorAtom( diff --git a/src/WpfMath/TexPredefinedFormulaParser.cs b/src/WpfMath/TexPredefinedFormulaParser.cs index de304916..fad99df4 100644 --- a/src/WpfMath/TexPredefinedFormulaParser.cs +++ b/src/WpfMath/TexPredefinedFormulaParser.cs @@ -85,7 +85,7 @@ private static Type[] GetArgumentTypes(IEnumerable args) public TexPredefinedFormulaParser() { - var doc = XDocument.Load(new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? + var doc = XDocument.Load(new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); this.rootElement = doc.Root; } @@ -141,7 +141,7 @@ public override void Parse(SourceSpan source, XElement element) var argValues = GetArgumentValues(args); var helper = new TexFormulaHelper(formula, source); - typeof(TexFormulaHelper).GetMethod(methodName, argTypes)!.Invoke(helper, argValues); // Nullable: Hard to verify here, I guess + typeof(TexFormulaHelper).GetMethod(methodName, argTypes)!.Invoke(helper, argValues); } } diff --git a/src/WpfMath/TexSymbolParser.cs b/src/WpfMath/TexSymbolParser.cs index d6a0dc0e..f7edb0a6 100644 --- a/src/WpfMath/TexSymbolParser.cs +++ b/src/WpfMath/TexSymbolParser.cs @@ -38,7 +38,7 @@ private static void SetTypeMappings() public TexSymbolParser() { // for 3.5 - var doc = XDocument.Load(new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); // Nullable: CS8604: Possibly just throw if the resource is missing? + var doc = XDocument.Load(new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!)); this.rootElement = doc.Root; } diff --git a/src/WpfMath/Utils/Result.cs b/src/WpfMath/Utils/Result.cs index 4f8cf62a..2be3fa1b 100644 --- a/src/WpfMath/Utils/Result.cs +++ b/src/WpfMath/Utils/Result.cs @@ -30,6 +30,6 @@ public Result(TValue value, Exception? error) public Result Map(Func mapper) => this.IsSuccess ? Result.Ok(mapper(this.Value)) - : Result.Error(this.Error!); // Nullable: CS8604, could be resolved by inlining IsSuccess + : Result.Error(this.Error!); } } From ff1bbfad5fb4bc74df965eee935b49862d959e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Sat, 15 Aug 2020 21:52:56 +0200 Subject: [PATCH 22/23] Rollback of null handling in RowAtom. --- src/WpfMath/Atoms/RowAtom.cs | 9 +++++---- src/WpfMath/Atoms/StyledAtom.cs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/WpfMath/Atoms/RowAtom.cs b/src/WpfMath/Atoms/RowAtom.cs index a4d8fb39..b7383415 100644 --- a/src/WpfMath/Atoms/RowAtom.cs +++ b/src/WpfMath/Atoms/RowAtom.cs @@ -34,12 +34,12 @@ static RowAtom() ligatureKernChangeSet.Set((int)TexAtomType.Punctuation, true); } - public RowAtom(SourceSpan? source, Atom baseAtom) + public RowAtom(SourceSpan? source, Atom? baseAtom) : this( source, baseAtom is RowAtom ? (IEnumerable) ((RowAtom) baseAtom).Elements - : new[] { baseAtom }) + : new[] { baseAtom! }) // Nullable: Seems to require some sort of non-null assertion to make the analyzer happy { } @@ -56,9 +56,10 @@ private RowAtom(SourceSpan? source, DummyAtom? previousAtom, ReadOnlyCollection< this.Elements = elements; } - internal RowAtom(SourceSpan? source, IEnumerable elements) + internal RowAtom(SourceSpan? source, IEnumerable elements) : base(source) => - this.Elements = elements.ToList().AsReadOnly(); + this.Elements = elements.Where(x => x != null).ToList().AsReadOnly()!; + // TODO[F]: Fix this with C# 8 migration: there shouldn't be nullable atoms in this collection public DummyAtom? PreviousAtom { get; } diff --git a/src/WpfMath/Atoms/StyledAtom.cs b/src/WpfMath/Atoms/StyledAtom.cs index 1481c014..878c42e1 100644 --- a/src/WpfMath/Atoms/StyledAtom.cs +++ b/src/WpfMath/Atoms/StyledAtom.cs @@ -9,7 +9,7 @@ internal class StyledAtom : Atom, IRow public StyledAtom(SourceSpan? source, Atom? atom, Brush? backgroundColor, Brush? foregroundColor) : base(source) { - this.RowAtom = new RowAtom(source, atom!); // Nullable TODO: This definitely needs null checking and is currently wrong + this.RowAtom = new RowAtom(source, atom); this.Background = backgroundColor; this.Foreground = foregroundColor; } From 5b4fd214748175c8050f122b69addd898f136dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B6ssel?= Date: Sat, 15 Aug 2020 21:53:29 +0200 Subject: [PATCH 23/23] Fixed tests after removal of IsDefaultStyle. --- .../TestResults/ParserTests.2+2.approved.txt | 2 - ...rserTests.bigMatrixExpression.approved.txt | 46 ------------------- .../ParserTests.binom.( 2 x123).approved.txt | 5 -- .../ParserTests.binom.( 2(x)123).approved.txt | 5 -- ...ParserTests.binom.((2)(x)123).approved.txt | 5 -- .../ParserTests.binom.((2)x123).approved.txt | 5 -- .../ParserTests.binom.(2 (x)123).approved.txt | 5 -- .../ParserTests.binom.(2(x)123).approved.txt | 5 -- .../ParserTests.binom.(2x123).approved.txt | 5 -- ...serTests.color.((red) (1)123).approved.txt | 4 -- ...arserTests.color.((red) 1123).approved.txt | 4 -- ...rserTests.color.((red)(1)123).approved.txt | 4 -- ...ParserTests.color.((red)1123).approved.txt | 4 -- ...s.colorModels.(color (red) x).approved.txt | 1 - ...els.(color [HTML] (abcdef) x).approved.txt | 1 - ...olor [RGB] (128, 128, 128) x).approved.txt | 1 - ...olorModels.(color [] (red) x).approved.txt | 1 - ...cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt | 1 - ...Models.(color [gray] (0.5) x).approved.txt | 1 - ...olor [rgb] (0.5, 0.5, 0.5) x).approved.txt | 1 - ...olorModels.(colorbox (red) x).approved.txt | 1 - ....(colorbox [HTML] (abcdef) x).approved.txt | 1 - ...rbox [RGB] (128, 128, 128) x).approved.txt | 1 - ...rModels.(colorbox [] (red) x).approved.txt | 1 - ...cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt | 1 - ...els.(colorbox [gray] (0.5) x).approved.txt | 1 - ...rbox [rgb] (0.5, 0.5, 0.5) x).approved.txt | 1 - ...hOpacity.(color (red, 0.1) x).approved.txt | 1 - ...[ARGB] (25, 128, 128, 128) x).approved.txt | 1 - ...y.(color [HTML] (abcdef19) x).approved.txt | 1 - ...[RGBA] (128, 128, 128, 25) x).approved.txt | 1 - ...acity.(color [] (red, 0.1) x).approved.txt | 1 - ...argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt | 1 - ... (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt | 1 - ...y.(color [gray] (0.5, 0.1) x).approved.txt | 1 - ...rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt | 1 - ...acity.(colorbox (red, 0.1) x).approved.txt | 1 - ...[ARGB] (25, 128, 128, 128) x).approved.txt | 1 - ...colorbox [HTML] (abcdef19) x).approved.txt | 1 - ...[RGBA] (128, 128, 128, 25) x).approved.txt | 1 - ...ty.(colorbox [] (red, 0.1) x).approved.txt | 1 - ...argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt | 1 - ... (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt | 1 - ...colorbox [gray] (0.5, 0.1) x).approved.txt | 1 - ...rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt | 1 - ...Tests.colorbox.((red) (1)123).approved.txt | 4 -- ...erTests.colorbox.((red) 1123).approved.txt | 4 -- ...rTests.colorbox.((red)(1)123).approved.txt | 4 -- ...serTests.colorbox.((red)1123).approved.txt | 4 -- .../ParserTests.commandsInText.approved.txt | 26 ----------- .../ParserTests.complexMathrm.approved.txt | 3 -- .../ParserTests.cyrillicText.approved.txt | 3 -- ...serTests.delimiterWithScripts.approved.txt | 4 -- .../ParserTests.delimiters.((,)).approved.txt | 1 - ...imiters.(backslash,backslash).approved.txt | 1 - ...ts.delimiters.(langle,rangle).approved.txt | 1 - ...ts.delimiters.(lbrace,rbrace).approved.txt | 1 - ...ts.delimiters.(lbrack,rbrack).approved.txt | 1 - ...rTests.delimiters.(vert,vert).approved.txt | 1 - ...Delimiters.(((,.,false,true)).approved.txt | 1 - ...Delimiters.((.,),true,false)).approved.txt | 1 - ...erTests.expressionAfterBraces.approved.txt | 3 -- ...arserTests.expressionInBraces.approved.txt | 2 - .../ParserTests.frac.( 2 x123).approved.txt | 5 -- .../ParserTests.frac.( 2(x)123).approved.txt | 5 -- .../ParserTests.frac.((2)(x)123).approved.txt | 5 -- .../ParserTests.frac.((2)x123).approved.txt | 5 -- .../ParserTests.frac.(2 (x)123).approved.txt | 5 -- .../ParserTests.frac.(2(x)123).approved.txt | 5 -- .../ParserTests.frac.(2x123).approved.txt | 5 -- .../TestResults/ParserTests.hat.approved.txt | 1 - .../TestResults/ParserTests.intF.approved.txt | 1 - .../ParserTests.integral.approved.txt | 2 - .../TestResults/ParserTests.lim.approved.txt | 5 -- .../ParserTests.limInCurlyBraces.approved.txt | 4 -- .../ParserTests.mathcal.approved.txt | 3 -- .../ParserTests.mathit.approved.txt | 3 -- .../ParserTests.mathrm.approved.txt | 3 -- .../ParserTests.matrixExpression.approved.txt | 45 ------------------ .../ParserTests.multilineFormula.approved.txt | 15 ------ .../ParserTests.nestedMatrix.approved.txt | 15 ------ ...Matrix.(matrix(line 1)line 2).approved.txt | 10 ---- ...atrix.(pmatrix(line 1)line 2).approved.txt | 10 ---- ...erTests.oneNonAsciiSymbolText.approved.txt | 2 - ...arserTests.overline.( (1)123).approved.txt | 4 -- .../ParserTests.overline.( 1123).approved.txt | 4 -- ...ParserTests.overline.((1)123).approved.txt | 4 -- .../ParserTests.overline.(1123).approved.txt | 4 -- ...ests.piecewiseDefinedFunction.approved.txt | 26 ----------- ...s.(x \342\206\221 (y) _ (z)).approved.txt" | 3 -- ...ripts.(x\342\206\221(y)_(z)).approved.txt" | 3 -- ...scripts.(x\342\206\221(y)_z).approved.txt" | 3 -- ....scripts.(x\342\206\221y_ z).approved.txt" | 3 -- ...scripts.(x\342\206\221y_(z)).approved.txt" | 3 -- ...s.scripts.(x\342\206\221y_z).approved.txt" | 3 -- .../ParserTests.simpleCases.approved.txt | 15 ------ .../ParserTests.simpleMatrix.approved.txt | 8 ---- .../TestResults/ParserTests.sin.approved.txt | 5 -- .../ParserTests.spacesInText.approved.txt | 3 -- .../ParserTests.sqrt.( (1)123).approved.txt | 4 -- .../ParserTests.sqrt.( 1123).approved.txt | 4 -- .../ParserTests.sqrt.((1)123).approved.txt | 4 -- .../ParserTests.sqrt.(1123).approved.txt | 4 -- ...WithOptArgument.( [ 2](1)123).approved.txt | 5 -- ...qrtWithOptArgument.( [2]1123).approved.txt | 5 -- ...ithOptArgument.([ 2 ] (1)123).approved.txt | 5 -- ...rtWithOptArgument.([2 ] 1123).approved.txt | 5 -- ...textArgumentParsing.( (1)123).approved.txt | 4 -- ...s.textArgumentParsing.( 1123).approved.txt | 4 -- .../ParserTests.textCommand.approved.txt | 4 -- ...arserTests.textWithExpression.approved.txt | 3 -- ...rserTests.underline.( (1)123).approved.txt | 4 -- ...ParserTests.underline.( 1123).approved.txt | 4 -- ...arserTests.underline.((1)123).approved.txt | 4 -- .../ParserTests.underline.(1123).approved.txt | 4 -- .../ParserTests.underscoreText.approved.txt | 1 - ...rserTests.unmatchedDelimiters.approved.txt | 1 - 117 files changed, 510 deletions(-) diff --git a/src/WpfMath.Tests/TestResults/ParserTests.2+2.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.2+2.approved.txt index 4c05af11..3a75b4db 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.2+2.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.2+2.approved.txt @@ -6,7 +6,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -33,7 +32,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.bigMatrixExpression.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.bigMatrixExpression.approved.txt index 0ba5034b..9fdf5869 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.bigMatrixExpression.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.bigMatrixExpression.approved.txt @@ -102,7 +102,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -116,7 +115,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -130,7 +128,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -146,7 +143,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -176,7 +172,6 @@ { "Character": "r", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -200,7 +195,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -216,7 +210,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -230,7 +223,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -260,7 +252,6 @@ { "Character": "r", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -274,7 +265,6 @@ { "Character": "s", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -288,7 +278,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -303,7 +292,6 @@ "BaseAtom": { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -318,7 +306,6 @@ "SuperscriptAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -433,7 +420,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -448,7 +434,6 @@ "Numerator": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -462,7 +447,6 @@ "Denominator": { "Character": "r", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -485,7 +469,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -502,7 +485,6 @@ "Numerator": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -516,7 +498,6 @@ "Denominator": { "Character": "r", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -539,7 +520,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -553,7 +533,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -569,7 +548,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -583,7 +561,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -617,7 +594,6 @@ { "Character": "s", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -631,7 +607,6 @@ { "Character": "i", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -645,7 +620,6 @@ { "Character": "n", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -724,7 +698,6 @@ { "Character": "c", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -738,7 +711,6 @@ { "Character": "o", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -752,7 +724,6 @@ { "Character": "s", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -880,7 +851,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -894,7 +864,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -909,7 +878,6 @@ "Numerator": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -923,7 +891,6 @@ "Denominator": { "Character": "r", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -948,7 +915,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -962,7 +928,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -977,7 +942,6 @@ "Numerator": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -998,7 +962,6 @@ { "Character": "t", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1012,7 +975,6 @@ { "Character": "a", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1026,7 +988,6 @@ { "Character": "n", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1123,7 +1084,6 @@ "Numerator": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1137,7 +1097,6 @@ "Denominator": { "Character": "r", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1161,7 +1120,6 @@ "Numerator": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1182,7 +1140,6 @@ { "Character": "t", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1196,7 +1153,6 @@ { "Character": "a", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1210,7 +1166,6 @@ { "Character": "n", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1304,7 +1259,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2 x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2 x123).approved.txt index ba23cd46..0d49e304 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2 x123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2 x123).approved.txt @@ -10,7 +10,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -26,7 +25,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -89,7 +87,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -103,7 +100,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -117,7 +113,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2(x)123).approved.txt index 5f05543d..ba3bba10 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2(x)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2(x)123).approved.txt @@ -10,7 +10,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -26,7 +25,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -89,7 +87,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -103,7 +100,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -117,7 +113,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)(x)123).approved.txt index e771125e..7cd28e82 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)(x)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)(x)123).approved.txt @@ -10,7 +10,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -26,7 +25,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -89,7 +87,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -103,7 +100,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -117,7 +113,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)x123).approved.txt index ff79d932..9b4305f6 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)x123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)x123).approved.txt @@ -10,7 +10,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -26,7 +25,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -89,7 +87,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -103,7 +100,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -117,7 +113,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2 (x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2 (x)123).approved.txt index 8fcd6dea..29fd9497 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2 (x)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2 (x)123).approved.txt @@ -10,7 +10,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -26,7 +25,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -89,7 +87,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -103,7 +100,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -117,7 +113,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2(x)123).approved.txt index 55d7f499..4489bce4 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2(x)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2(x)123).approved.txt @@ -10,7 +10,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -26,7 +25,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -89,7 +87,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -103,7 +100,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -117,7 +113,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2x123).approved.txt index 15d5afc5..35d00713 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2x123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2x123).approved.txt @@ -10,7 +10,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -26,7 +25,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -89,7 +87,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -103,7 +100,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -117,7 +113,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.color.((red) (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.color.((red) (1)123).approved.txt index fc9603f7..4c0eafea 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.color.((red) (1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.color.((red) (1)123).approved.txt @@ -10,7 +10,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +44,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +57,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -73,7 +70,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.color.((red) 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.color.((red) 1123).approved.txt index 5f8d6213..0815f85c 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.color.((red) 1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.color.((red) 1123).approved.txt @@ -10,7 +10,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +44,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +57,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -73,7 +70,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.color.((red)(1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.color.((red)(1)123).approved.txt index b8aada76..d6591577 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.color.((red)(1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.color.((red)(1)123).approved.txt @@ -10,7 +10,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +44,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +57,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -73,7 +70,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.color.((red)1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.color.((red)1123).approved.txt index 1ee1dd52..6fd4bcc5 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.color.((red)1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.color.((red)1123).approved.txt @@ -10,7 +10,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +44,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +57,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -73,7 +70,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color (red) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color (red) x).approved.txt index 87af1443..c36f967c 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color (red) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color (red) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [HTML] (abcdef) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [HTML] (abcdef) x).approved.txt index c1a40e98..2f8337be 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [HTML] (abcdef) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [HTML] (abcdef) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [RGB] (128, 128, 128) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [RGB] (128, 128, 128) x).approved.txt index 53929b28..a2311aa1 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [RGB] (128, 128, 128) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [RGB] (128, 128, 128) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [] (red) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [] (red) x).approved.txt index d1d919fa..53d42a11 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [] (red) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [] (red) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt index 9b3fa746..7756b2fa 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [gray] (0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [gray] (0.5) x).approved.txt index 6a593637..a0b98c4e 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [gray] (0.5) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [gray] (0.5) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [rgb] (0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [rgb] (0.5, 0.5, 0.5) x).approved.txt index b0861402..70174329 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [rgb] (0.5, 0.5, 0.5) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [rgb] (0.5, 0.5, 0.5) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox (red) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox (red) x).approved.txt index 942fa4bf..4345bba5 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox (red) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox (red) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [HTML] (abcdef) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [HTML] (abcdef) x).approved.txt index 0be1c00f..6fad9c4b 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [HTML] (abcdef) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [HTML] (abcdef) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [RGB] (128, 128, 128) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [RGB] (128, 128, 128) x).approved.txt index bf8207a0..8d10000c 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [RGB] (128, 128, 128) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [RGB] (128, 128, 128) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [] (red) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [] (red) x).approved.txt index 71e09b26..b7199266 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [] (red) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [] (red) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt index bcdc30ff..3e617d1b 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [gray] (0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [gray] (0.5) x).approved.txt index 63b1cd52..30c3fd2f 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [gray] (0.5) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [gray] (0.5) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [rgb] (0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [rgb] (0.5, 0.5, 0.5) x).approved.txt index 0a1beec6..9f9b0ce4 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [rgb] (0.5, 0.5, 0.5) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [rgb] (0.5, 0.5, 0.5) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color (red, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color (red, 0.1) x).approved.txt index 27eebde2..d7f21615 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color (red, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color (red, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [ARGB] (25, 128, 128, 128) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [ARGB] (25, 128, 128, 128) x).approved.txt index dd23a49f..86bdd4cd 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [ARGB] (25, 128, 128, 128) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [ARGB] (25, 128, 128, 128) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [HTML] (abcdef19) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [HTML] (abcdef19) x).approved.txt index bd2ae2a6..1c9cf128 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [HTML] (abcdef19) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [HTML] (abcdef19) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [RGBA] (128, 128, 128, 25) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [RGBA] (128, 128, 128, 25) x).approved.txt index 24f9fa87..5eee3503 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [RGBA] (128, 128, 128, 25) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [RGBA] (128, 128, 128, 25) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [] (red, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [] (red, 0.1) x).approved.txt index e8d4cd55..5f3bdec8 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [] (red, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [] (red, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt index 6485a1e6..8a0bd7f6 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt index 8294ff04..c264aafa 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [gray] (0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [gray] (0.5, 0.1) x).approved.txt index 8c3b6b07..a6246ede 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [gray] (0.5, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [gray] (0.5, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt index 62777199..cbec5ebb 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox (red, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox (red, 0.1) x).approved.txt index 7feecf40..d9ecf27b 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox (red, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox (red, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [ARGB] (25, 128, 128, 128) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [ARGB] (25, 128, 128, 128) x).approved.txt index bcb2f44a..6584c641 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [ARGB] (25, 128, 128, 128) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [ARGB] (25, 128, 128, 128) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [HTML] (abcdef19) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [HTML] (abcdef19) x).approved.txt index 1c00ff2e..4ddab5be 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [HTML] (abcdef19) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [HTML] (abcdef19) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [RGBA] (128, 128, 128, 25) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [RGBA] (128, 128, 128, 25) x).approved.txt index 3cb03309..1176f702 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [RGBA] (128, 128, 128, 25) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [RGBA] (128, 128, 128, 25) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [] (red, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [] (red, 0.1) x).approved.txt index fb5122da..f61450b7 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [] (red, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [] (red, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt index 388b3981..1679a8e8 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt index 97c6c585..9c378a1e 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [gray] (0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [gray] (0.5, 0.1) x).approved.txt index 2b25005b..83035e09 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [gray] (0.5, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [gray] (0.5, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt index 931054d4..27559622 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt @@ -7,7 +7,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) (1)123).approved.txt index b857d7c0..829c4b85 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) (1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) (1)123).approved.txt @@ -10,7 +10,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +44,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +57,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -73,7 +70,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) 1123).approved.txt index f517cadf..8d1a3860 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) 1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) 1123).approved.txt @@ -10,7 +10,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +44,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +57,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -73,7 +70,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)(1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)(1)123).approved.txt index ea3a8daf..e7492002 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)(1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)(1)123).approved.txt @@ -10,7 +10,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +44,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +57,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -73,7 +70,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)1123).approved.txt index 9ba31cbc..810fc9d6 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)1123).approved.txt @@ -10,7 +10,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +44,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +57,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -73,7 +70,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.commandsInText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.commandsInText.approved.txt index 2d3cf5fc..e121effa 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.commandsInText.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.commandsInText.approved.txt @@ -6,7 +6,6 @@ { "Character": "\\", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -20,7 +19,6 @@ { "Character": "a", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +32,6 @@ { "Character": "l", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -48,7 +45,6 @@ { "Character": "p", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -62,7 +58,6 @@ { "Character": "h", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -76,7 +71,6 @@ { "Character": "a", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -100,7 +94,6 @@ { "Character": "\\", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -114,7 +107,6 @@ { "Character": "b", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -128,7 +120,6 @@ { "Character": "e", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -142,7 +133,6 @@ { "Character": "t", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -156,7 +146,6 @@ { "Character": "a", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -180,7 +169,6 @@ { "Character": "\\", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -194,7 +182,6 @@ { "Character": "u", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -208,7 +195,6 @@ { "Character": "n", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -222,7 +208,6 @@ { "Character": "k", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -236,7 +221,6 @@ { "Character": "n", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -250,7 +234,6 @@ { "Character": "o", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -264,7 +247,6 @@ { "Character": "w", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -278,7 +260,6 @@ { "Character": "n", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -292,7 +273,6 @@ { "Character": "c", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -306,7 +286,6 @@ { "Character": "o", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -320,7 +299,6 @@ { "Character": "m", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -334,7 +312,6 @@ { "Character": "m", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -348,7 +325,6 @@ { "Character": "a", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -362,7 +338,6 @@ { "Character": "n", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -376,7 +351,6 @@ { "Character": "d", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.complexMathrm.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.complexMathrm.approved.txt index cce0f5fe..288be3ce 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.complexMathrm.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.complexMathrm.approved.txt @@ -10,7 +10,6 @@ { "Character": "2", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -37,7 +36,6 @@ { "Character": "2", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -109,7 +107,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.cyrillicText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.cyrillicText.approved.txt index 4b9ef5dc..df238321 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.cyrillicText.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.cyrillicText.approved.txt @@ -6,7 +6,6 @@ { "Character": "а", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -20,7 +19,6 @@ { "Character": "б", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +32,6 @@ { "Character": "в", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiterWithScripts.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiterWithScripts.approved.txt index 685c3298..2d7257b0 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.delimiterWithScripts.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiterWithScripts.approved.txt @@ -8,7 +8,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -35,7 +34,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -94,7 +92,6 @@ "SubscriptAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -108,7 +105,6 @@ "SuperscriptAtom": { "Character": "b", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.((,)).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.((,)).approved.txt index cc26b878..2e83e0a6 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.((,)).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.((,)).approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(backslash,backslash).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(backslash,backslash).approved.txt index 36b8d68d..6f1a3395 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(backslash,backslash).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(backslash,backslash).approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(langle,rangle).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(langle,rangle).approved.txt index c29564fe..2291c8ca 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(langle,rangle).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(langle,rangle).approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrace,rbrace).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrace,rbrace).approved.txt index 312dbffa..c83bf2b1 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrace,rbrace).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrace,rbrace).approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrack,rbrack).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrack,rbrack).approved.txt index f4f0f611..7cd34ac4 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrack,rbrack).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrack,rbrack).approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(vert,vert).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(vert,vert).approved.txt index a3804a64..54a074c5 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(vert,vert).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(vert,vert).approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.(((,.,false,true)).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.(((,.,false,true)).approved.txt index a51f476e..1eef2a4a 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.(((,.,false,true)).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.(((,.,false,true)).approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.((.,),true,false)).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.((.,),true,false)).approved.txt index 4b6387e3..7dd21434 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.((.,),true,false)).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.((.,),true,false)).approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.expressionAfterBraces.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.expressionAfterBraces.approved.txt index bc280047..1345680f 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.expressionAfterBraces.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.expressionAfterBraces.approved.txt @@ -10,7 +10,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -37,7 +36,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -109,7 +107,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.expressionInBraces.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.expressionInBraces.approved.txt index 057ea7fa..89a7fb69 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.expressionInBraces.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.expressionInBraces.approved.txt @@ -7,7 +7,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +33,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2 x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2 x123).approved.txt index f81280c0..95620905 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2 x123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2 x123).approved.txt @@ -7,7 +7,6 @@ "Numerator": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "Denominator": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2(x)123).approved.txt index 30ac430d..1329428a 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2(x)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2(x)123).approved.txt @@ -7,7 +7,6 @@ "Numerator": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "Denominator": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)(x)123).approved.txt index 95c5ece2..7ea6d7f6 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)(x)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)(x)123).approved.txt @@ -7,7 +7,6 @@ "Numerator": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "Denominator": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)x123).approved.txt index 115162b1..055c210b 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)x123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)x123).approved.txt @@ -7,7 +7,6 @@ "Numerator": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "Denominator": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2 (x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2 (x)123).approved.txt index bf568eae..c1d88992 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2 (x)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2 (x)123).approved.txt @@ -7,7 +7,6 @@ "Numerator": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "Denominator": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2(x)123).approved.txt index cd0124e7..81e7e083 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2(x)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2(x)123).approved.txt @@ -7,7 +7,6 @@ "Numerator": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "Denominator": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2x123).approved.txt index cb8b0aca..6123b231 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2x123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2x123).approved.txt @@ -7,7 +7,6 @@ "Numerator": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "Denominator": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.hat.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.hat.approved.txt index 7f96e87c..da461d59 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.hat.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.hat.approved.txt @@ -5,7 +5,6 @@ "BaseAtom": { "Character": "T", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.intF.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.intF.approved.txt index 903bf23d..bb64430f 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.intF.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.intF.approved.txt @@ -32,7 +32,6 @@ { "Character": "f", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.integral.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.integral.approved.txt index 9e7b9efc..26cc4e37 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.integral.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.integral.approved.txt @@ -17,7 +17,6 @@ "LowerLimitAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -31,7 +30,6 @@ "UpperLimitAtom": { "Character": "b", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.lim.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.lim.approved.txt index 61e05e81..26678c41 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.lim.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.lim.approved.txt @@ -10,7 +10,6 @@ { "Character": "l", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -24,7 +23,6 @@ { "Character": "i", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -38,7 +36,6 @@ { "Character": "m", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -62,7 +59,6 @@ "LowerLimitAtom": { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -87,7 +83,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.limInCurlyBraces.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.limInCurlyBraces.approved.txt index 475c71ff..9d23af73 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.limInCurlyBraces.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.limInCurlyBraces.approved.txt @@ -11,7 +11,6 @@ { "Character": "l", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -25,7 +24,6 @@ { "Character": "i", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -39,7 +37,6 @@ { "Character": "m", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -86,7 +83,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.mathcal.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.mathcal.approved.txt index 9cbdad1d..9608845f 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.mathcal.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.mathcal.approved.txt @@ -6,7 +6,6 @@ { "Character": "s", "TextStyle": "mathcal", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -20,7 +19,6 @@ { "Character": "i", "TextStyle": "mathcal", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +32,6 @@ { "Character": "n", "TextStyle": "mathcal", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.mathit.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.mathit.approved.txt index 70a0410f..55d59cfb 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.mathit.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.mathit.approved.txt @@ -6,7 +6,6 @@ { "Character": "s", "TextStyle": "mathit", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -20,7 +19,6 @@ { "Character": "i", "TextStyle": "mathit", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +32,6 @@ { "Character": "n", "TextStyle": "mathit", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.mathrm.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.mathrm.approved.txt index 8a3ae046..200371ed 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.mathrm.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.mathrm.approved.txt @@ -6,7 +6,6 @@ { "Character": "s", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -20,7 +19,6 @@ { "Character": "i", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +32,6 @@ { "Character": "n", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.matrixExpression.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.matrixExpression.approved.txt index 2be90394..0905c978 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.matrixExpression.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.matrixExpression.approved.txt @@ -6,7 +6,6 @@ { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -33,7 +32,6 @@ { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -68,7 +66,6 @@ "BaseAtom": { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -82,7 +79,6 @@ "SubscriptAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -107,7 +103,6 @@ "BaseAtom": { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -121,7 +116,6 @@ "SubscriptAtom": { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -159,7 +153,6 @@ "BaseAtom": { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -173,7 +166,6 @@ "SubscriptAtom": { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -198,7 +190,6 @@ "BaseAtom": { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -212,7 +203,6 @@ "SubscriptAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -252,7 +242,6 @@ "BaseAtom": { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -266,7 +255,6 @@ "SubscriptAtom": { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -291,7 +279,6 @@ "BaseAtom": { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -305,7 +292,6 @@ "SubscriptAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -343,7 +329,6 @@ "BaseAtom": { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -357,7 +342,6 @@ "SubscriptAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -382,7 +366,6 @@ "BaseAtom": { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -396,7 +379,6 @@ "SubscriptAtom": { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -436,7 +418,6 @@ "BaseAtom": { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -450,7 +431,6 @@ "SubscriptAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -475,7 +455,6 @@ "BaseAtom": { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -489,7 +468,6 @@ "SubscriptAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -527,7 +505,6 @@ "BaseAtom": { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -541,7 +518,6 @@ "SubscriptAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -566,7 +542,6 @@ "BaseAtom": { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -580,7 +555,6 @@ "SubscriptAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -663,7 +637,6 @@ { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -677,7 +650,6 @@ { "Character": "h", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -691,7 +663,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -705,7 +676,6 @@ { "Character": "r", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -719,7 +689,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -733,7 +702,6 @@ { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -765,7 +733,6 @@ "BaseAtom": { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -779,7 +746,6 @@ "SubscriptAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -806,7 +772,6 @@ "BaseAtom": { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -820,7 +785,6 @@ "SubscriptAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -847,7 +811,6 @@ "BaseAtom": { "Character": "v", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -861,7 +824,6 @@ "SubscriptAtom": { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -947,7 +909,6 @@ { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -979,7 +940,6 @@ "BaseAtom": { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -993,7 +953,6 @@ "SubscriptAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1020,7 +979,6 @@ "BaseAtom": { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1034,7 +992,6 @@ "SubscriptAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1061,7 +1018,6 @@ "BaseAtom": { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -1075,7 +1031,6 @@ "SubscriptAtom": { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.multilineFormula.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.multilineFormula.approved.txt index 00f9481d..a9187803 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.multilineFormula.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.multilineFormula.approved.txt @@ -9,7 +9,6 @@ { "Character": "l", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -23,7 +22,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -37,7 +35,6 @@ { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -51,7 +48,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -65,7 +61,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -94,7 +89,6 @@ { "Character": "l", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -108,7 +102,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -122,7 +115,6 @@ { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -136,7 +128,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -150,7 +141,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -179,7 +169,6 @@ { "Character": "l", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -193,7 +182,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -207,7 +195,6 @@ { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -221,7 +208,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -235,7 +221,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.nestedMatrix.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.nestedMatrix.approved.txt index dd7f7dc5..bab0196a 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.nestedMatrix.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.nestedMatrix.approved.txt @@ -6,7 +6,6 @@ { "Character": "4", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -23,7 +22,6 @@ { "Character": "7", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -37,7 +35,6 @@ { "Character": "8", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -61,7 +58,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -80,7 +76,6 @@ { "Character": "5", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -94,7 +89,6 @@ { "Character": "7", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -125,7 +119,6 @@ { "Character": "7", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -139,7 +132,6 @@ { "Character": "8", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -168,7 +160,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -182,7 +173,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -234,7 +224,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -248,7 +237,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -262,7 +250,6 @@ { "Character": "7", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -276,7 +263,6 @@ { "Character": "8", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -290,7 +276,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(matrix(line 1)line 2).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(matrix(line 1)line 2).approved.txt index 340dd0ae..8bb33dee 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(matrix(line 1)line 2).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(matrix(line 1)line 2).approved.txt @@ -12,7 +12,6 @@ { "Character": "l", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -26,7 +25,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -40,7 +38,6 @@ { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -54,7 +51,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -68,7 +64,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -111,7 +106,6 @@ { "Character": "l", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -125,7 +119,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -139,7 +132,6 @@ { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -153,7 +145,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -167,7 +158,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(pmatrix(line 1)line 2).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(pmatrix(line 1)line 2).approved.txt index 2ecfb27f..6ee0a73d 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(pmatrix(line 1)line 2).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(pmatrix(line 1)line 2).approved.txt @@ -13,7 +13,6 @@ { "Character": "l", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -27,7 +26,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -41,7 +39,6 @@ { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -55,7 +52,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -69,7 +65,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -135,7 +130,6 @@ { "Character": "l", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -149,7 +143,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -163,7 +156,6 @@ { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -177,7 +169,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -191,7 +182,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.oneNonAsciiSymbolText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.oneNonAsciiSymbolText.approved.txt index 31dd0fa5..27f78b57 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.oneNonAsciiSymbolText.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.oneNonAsciiSymbolText.approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "А", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -18,7 +17,6 @@ "SubscriptAtom": { "Character": "И", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.overline.( (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.overline.( (1)123).approved.txt index 76533358..401567c1 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.overline.( (1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.overline.( (1)123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -30,7 +29,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.overline.( 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.overline.( 1123).approved.txt index 9124e9a5..fbb306f1 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.overline.( 1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.overline.( 1123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -30,7 +29,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.overline.((1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.overline.((1)123).approved.txt index 7e8a5fb4..878d3398 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.overline.((1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.overline.((1)123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -30,7 +29,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.overline.(1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.overline.(1123).approved.txt index 41c60113..ec93242e 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.overline.(1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.overline.(1123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -30,7 +29,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.piecewiseDefinedFunction.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.piecewiseDefinedFunction.approved.txt index 8ff133d8..6110eb84 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.piecewiseDefinedFunction.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.piecewiseDefinedFunction.approved.txt @@ -6,7 +6,6 @@ { "Character": "f", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -33,7 +32,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -80,7 +78,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -107,7 +104,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -134,7 +130,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -148,7 +143,6 @@ { "Character": "f", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -166,7 +160,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -193,7 +186,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -220,7 +212,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -262,7 +253,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -289,7 +279,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -316,7 +305,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -330,7 +318,6 @@ { "Character": "f", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -348,7 +335,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -375,7 +361,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -402,7 +387,6 @@ { "Character": "4", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -441,7 +425,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -458,7 +441,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -472,7 +454,6 @@ { "Character": "l", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -486,7 +467,6 @@ { "Character": "s", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -500,7 +480,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -514,7 +493,6 @@ { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -528,7 +506,6 @@ { "Character": "h", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -542,7 +519,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -556,7 +532,6 @@ { "Character": "r", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -570,7 +545,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x \342\206\221 (y) _ (z)).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x \342\206\221 (y) _ (z)).approved.txt" index e0727a4f..3ba7e8d4 100644 --- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x \342\206\221 (y) _ (z)).approved.txt" +++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x \342\206\221 (y) _ (z)).approved.txt" @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -18,7 +17,6 @@ "SubscriptAtom": { "Character": "z", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -32,7 +30,6 @@ "SuperscriptAtom": { "Character": "y", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_(z)).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_(z)).approved.txt" index 33dd3c6a..4a2a26b7 100644 --- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_(z)).approved.txt" +++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_(z)).approved.txt" @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -18,7 +17,6 @@ "SubscriptAtom": { "Character": "z", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -32,7 +30,6 @@ "SuperscriptAtom": { "Character": "y", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_z).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_z).approved.txt" index 4deb665f..d04243e3 100644 --- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_z).approved.txt" +++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_z).approved.txt" @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -18,7 +17,6 @@ "SubscriptAtom": { "Character": "z", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -32,7 +30,6 @@ "SuperscriptAtom": { "Character": "y", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_ z).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_ z).approved.txt" index b5ebbb44..f8988543 100644 --- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_ z).approved.txt" +++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_ z).approved.txt" @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -18,7 +17,6 @@ "SubscriptAtom": { "Character": "z", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -32,7 +30,6 @@ "SuperscriptAtom": { "Character": "y", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_(z)).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_(z)).approved.txt" index 16b3200e..770efd36 100644 --- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_(z)).approved.txt" +++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_(z)).approved.txt" @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -18,7 +17,6 @@ "SubscriptAtom": { "Character": "z", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -32,7 +30,6 @@ "SuperscriptAtom": { "Character": "y", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_z).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_z).approved.txt" index e502c72f..d45e2aea 100644 --- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_z).approved.txt" +++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_z).approved.txt" @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -18,7 +17,6 @@ "SubscriptAtom": { "Character": "z", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -32,7 +30,6 @@ "SuperscriptAtom": { "Character": "y", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.simpleCases.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.simpleCases.approved.txt index cec01150..4390b3b9 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.simpleCases.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.simpleCases.approved.txt @@ -10,7 +10,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -50,7 +49,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -64,7 +62,6 @@ { "Character": "f", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -78,7 +75,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -105,7 +101,6 @@ { "Character": "0", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -160,7 +155,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -200,7 +194,6 @@ { "Character": "o", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -214,7 +207,6 @@ { "Character": "t", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -228,7 +220,6 @@ { "Character": "h", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -242,7 +233,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -256,7 +246,6 @@ { "Character": "r", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -270,7 +259,6 @@ { "Character": "w", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -284,7 +272,6 @@ { "Character": "i", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -298,7 +285,6 @@ { "Character": "s", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -312,7 +298,6 @@ { "Character": "e", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.simpleMatrix.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.simpleMatrix.approved.txt index 06af3536..a985d543 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.simpleMatrix.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.simpleMatrix.approved.txt @@ -6,7 +6,6 @@ { "Character": "4", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -23,7 +22,6 @@ { "Character": "7", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -37,7 +35,6 @@ { "Character": "8", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -61,7 +58,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -77,7 +73,6 @@ { "Character": "5", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -91,7 +86,6 @@ { "Character": "9", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -108,7 +102,6 @@ { "Character": "8", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -122,7 +115,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sin.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sin.approved.txt index e41a5394..1180b99e 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.sin.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.sin.approved.txt @@ -10,7 +10,6 @@ { "Character": "s", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -24,7 +23,6 @@ { "Character": "i", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -38,7 +36,6 @@ { "Character": "n", "TextStyle": "mathrm", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -63,7 +60,6 @@ "UpperLimitAtom": { "Character": "n", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -87,7 +83,6 @@ { "Character": "x", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.spacesInText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.spacesInText.approved.txt index 47ada8c8..33e160e0 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.spacesInText.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.spacesInText.approved.txt @@ -6,7 +6,6 @@ { "Character": "a", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -30,7 +29,6 @@ { "Character": "b", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -54,7 +52,6 @@ { "Character": "c", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( (1)123).approved.txt index 18766172..809ec910 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( (1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( (1)123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -31,7 +30,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +43,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +56,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( 1123).approved.txt index 6ba57a54..0254a803 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( 1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( 1123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -31,7 +30,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +43,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +56,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.((1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.((1)123).approved.txt index d08b1300..2b01b86b 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.((1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.((1)123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -31,7 +30,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +43,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +56,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.(1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.(1123).approved.txt index 9e38faf5..96ac6123 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.(1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.(1123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -31,7 +30,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -45,7 +43,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -59,7 +56,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [ 2](1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [ 2](1)123).approved.txt index d1eb1cfa..59cfce83 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [ 2](1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [ 2](1)123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "DegreeAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [2]1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [2]1123).approved.txt index febae95c..d1bb043d 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [2]1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [2]1123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "DegreeAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([ 2 ] (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([ 2 ] (1)123).approved.txt index 500ab7a3..5e176664 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([ 2 ] (1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([ 2 ] (1)123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "DegreeAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([2 ] 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([2 ] 1123).approved.txt index 5d0edebe..0041f9bd 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([2 ] 1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([2 ] 1123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -21,7 +20,6 @@ "DegreeAtom": { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -72,7 +68,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( (1)123).approved.txt index 0051fefc..4bbec92d 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( (1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( (1)123).approved.txt @@ -6,7 +6,6 @@ { "Character": "1", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -20,7 +19,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +32,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -48,7 +45,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( 1123).approved.txt index fc69eea7..93b64d3b 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( 1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( 1123).approved.txt @@ -6,7 +6,6 @@ { "Character": "1", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -20,7 +19,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +32,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -48,7 +45,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.textCommand.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.textCommand.approved.txt index d98afadc..f4a43449 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.textCommand.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.textCommand.approved.txt @@ -6,7 +6,6 @@ { "Character": "t", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -20,7 +19,6 @@ { "Character": "e", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +32,6 @@ { "Character": "s", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -48,7 +45,6 @@ { "Character": "t", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.textWithExpression.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.textWithExpression.approved.txt index 80116885..c64a29ce 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.textWithExpression.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.textWithExpression.approved.txt @@ -6,7 +6,6 @@ { "Character": "2", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -20,7 +19,6 @@ { "Character": "+", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -34,7 +32,6 @@ { "Character": "2", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underline.( (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underline.( (1)123).approved.txt index 2040ae9a..ee4d83c8 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.underline.( (1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.underline.( (1)123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -30,7 +29,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underline.( 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underline.( 1123).approved.txt index 17230394..7f292843 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.underline.( 1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.underline.( 1123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -30,7 +29,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underline.((1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underline.((1)123).approved.txt index 5fa85cb4..5e788fdf 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.underline.((1)123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.underline.((1)123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -30,7 +29,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underline.(1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underline.(1123).approved.txt index 4645b060..49218214 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.underline.(1123).approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.underline.(1123).approved.txt @@ -7,7 +7,6 @@ "BaseAtom": { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -30,7 +29,6 @@ { "Character": "1", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -44,7 +42,6 @@ { "Character": "2", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { @@ -58,7 +55,6 @@ { "Character": "3", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underscoreText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underscoreText.approved.txt index e35ac202..31695813 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.underscoreText.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.underscoreText.approved.txt @@ -3,7 +3,6 @@ "RootAtom": { "Character": "_", "TextStyle": "text", - "IsDefaultTextStyle": false, "IsTextSymbol": false, "Type": "Ordinary", "Source": { diff --git a/src/WpfMath.Tests/TestResults/ParserTests.unmatchedDelimiters.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.unmatchedDelimiters.approved.txt index 157293e5..6c2d70a5 100644 --- a/src/WpfMath.Tests/TestResults/ParserTests.unmatchedDelimiters.approved.txt +++ b/src/WpfMath.Tests/TestResults/ParserTests.unmatchedDelimiters.approved.txt @@ -4,7 +4,6 @@ "BaseAtom": { "Character": "a", "TextStyle": null, - "IsDefaultTextStyle": true, "IsTextSymbol": false, "Type": "Ordinary", "Source": {