Skip to content

Commit

Permalink
1551 cleanup (stevencohn#1580)
Browse files Browse the repository at this point in the history
* cleanup

* resx
  • Loading branch information
stevencohn authored and weissm committed Sep 23, 2024
1 parent 1e96af1 commit e9bd626
Show file tree
Hide file tree
Showing 24 changed files with 103 additions and 118 deletions.
2 changes: 1 addition & 1 deletion OneMore/Commands/Tables/AddFormulaCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private static void StoreFormula(
return;
}

var regex = new Regex(Processor.AddressPattern);
var regex = new Regex(@"\b(?<c>[a-zA-Z]{1,3})(?<r>\d{1,3})\b");

int offset = 0;
foreach (var cell in cells)
Expand Down
5 changes: 4 additions & 1 deletion OneMore/Commands/Tables/Formulas/FunctionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace River.OneMoreAddIn.Commands.Tables.Formulas
using System.Linq;
using Resx = Properties.Resources;


internal class FunctionFactory
{
private const int CountIfNe = 3;
Expand Down Expand Up @@ -51,13 +52,15 @@ public Func<VariantList, double> Find(string name)
"countif" => inputs => CountIf(inputs),
"exp" => inputs => Math.Exp(inputs.Assert(D)[0]),
"floor" => inputs => Math.Floor(inputs.Assert(D)[0]),
"log" => inputs => Math.Log(inputs.Assert(D)[0]),
"log10" => inputs => Math.Log10(inputs.Assert(D)[0]),
"max" => inputs => Max(inputs.Assert(D).ToDoubleArray()),
"median" => inputs => Median(inputs.Assert(D).ToDoubleArray()),
"min" => inputs => Min(inputs.Assert(D).ToDoubleArray()),
"mode" => inputs => Mode(inputs.Assert(D).ToDoubleArray()),
"pow" => inputs => Math.Pow(inputs.Assert(D)[0], inputs[1]),
"rem" => inputs => Math.IEEERemainder(inputs.Assert(D)[0], inputs[1]),
"range" => inputs => Range(inputs.Assert(D).ToDoubleArray()),
"rem" => inputs => Math.IEEERemainder(inputs.Assert(D)[0], inputs[1]),
"root" => inputs => Math.Pow(inputs.Assert(D, D)[0], 1 / inputs[1]),
"round" => inputs => Math.Round(inputs.Assert(D)[0], MidpointRounding.AwayFromZero),
"sign" => inputs => Math.Sign(inputs.Assert(D)[0]),
Expand Down
2 changes: 1 addition & 1 deletion OneMore/Commands/Tables/Formulas/GetCellValueHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//************************************************************************************************
// Copyright © 2022 Steven M Cohn. All rights reserved.
// Copyright © 2022 Steven M Cohn. All rights reserved.
//************************************************************************************************

namespace River.OneMoreAddIn.Commands.Tables.Formulas
Expand Down
6 changes: 0 additions & 6 deletions OneMore/Commands/Tables/Formulas/Processor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ namespace River.OneMoreAddIn.Commands.Tables.Formulas

internal class Processor : Loggable
{
/// <summary>
/// Regex pattern for matching cell addresses of the form [col-letters][row-number] where
/// row-number is a positive, non-zero integer. Capture groups are named c)ell and r)row.
/// </summary>
public const string AddressPattern = @"^(?<c>[a-zA-Z]{1,3})(?<r>\d{1,3})$";

private readonly Table table;
private int maxdec;
private List<TagDef> tags;
Expand Down
2 changes: 1 addition & 1 deletion OneMore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal static class AssemblyInfo
* NOTE - also update the version in the Setup project
* by clicking on the Setup project node in VS and update its properties
*/
public const string Version = "6.5.1";
public const string Version = "6.5.2";

public const string Product = "OneMore";

Expand Down
10 changes: 5 additions & 5 deletions OneMore/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions OneMore/Properties/Resources.ar-SA.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1210,16 +1210,16 @@
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>يجب أن تنطبق الصيغة المدخلة على الخلية المحددة الأولى. سيتم زيادة هذه الصيغة تلقائيًا للخلايا المحددة الإضافية.
<value>تنطبق الصيغة على الخلية المحددة الأولى ويتم زيادة تلقائيًا للخلايا المحددة الإضافية.

الوظائف: abs، acos، asin، atan، atan2، متوسط، سقف، cos، cosh، countif، exp، Floor، log، log10، max، median، min، mode، pow، range، round،sign، sin، sinh، sqrt، stdev، مجموع، تان، تانه، الجذع، التباين
الوظائف: ABS ، ACOS ، ARCCOS ، Arcsin ، Arctan ، Asin ، Atan ، Atan2 ، MEBERT ، CEIL ، COSH ، COSH ، EXP ، LOGH ، LOG ، MAX ، MIN الجذر ، الجولة ، علامة ، الخطيئة ، sinh ، sqrt ، stdev ، sum ، tan ، tanh ، trunc ، truncate ، والتباين.

المشغلين: + - / * ^
الرموز: PI، E
مرجع الخلية: A1، A2، ... ZZZ999
نطاق الخلايا: A1:A22
النطاق النسبي في عمود: A1:A-1</value>
<comment></comment></data>
المشغلين: + - / * ^ ٪
المتغيرات: E ، PHI ، PI ، TAO ، TableCols ، TableRows
مرجع الخلية: A1 ، A2 ، ... zzz999
نطاق الخلية: A1: A22
النطاقات النسبية: A1: Cell (0 ، -1)</value>
<comment>!EDIT</comment></data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>الخلايا المحددة:</value>
<comment>label</comment>
Expand Down
16 changes: 8 additions & 8 deletions OneMore/Properties/Resources.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1180,16 +1180,16 @@ OneNote-Datei (*.one)</value>
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>Die eingegebene Formel sollte für die erste ausgewählte Zelle gelten. Diese Formel wird für weitere ausgewählte Zellen automatisch erhöht.
<value>Die Formel gelten für die erste ausgewählte Zelle und wird für zusätzliche ausgewählte Zellen automatisch erhöht.

Funktionen: abs, acos, asin, atan, atan2, Durchschnitt, Decke, cos, cosh, countif, exp, floor, log, log10, max, median, min, mode, pow, range, rund, sign, sin, sinh, sqrt, stdev, sum, tan, tanh, trunc, Varianz
Funktionen: ABS, ACOS, ARCCOS, Arcsin, Arctan, Asin, Atan, ATAN2, Durchschnitt, CEIL, Decke, COSH, COSH, EXP, FODEN, LOG, LOG10, MAX, MEDIAN, MIN, MODE, POW, REM, REM, REM, REM, REM, REM, Wurzel, Runde, Zeichen, Sünde, Sinh, Sqrt, Stdev, Sum, Tan, Tanh, Trunc, Truncate und Varianz.

Operatoren: + - / * ^
Symbole: PI, E
Zellreferenz: A1, A2, ... ZZZ999
Zellbereich: A1:A22
Relativer Bereich in einer Spalte: A1:A-1</value>
<comment></comment></data>
Operatoren: + - / * ^ %
Variablen: E, PHI, PI, Tao, Tabellen, Tabllerows
Zellreferenz: A1, A2, ... Zzz999
Zellbereich: A1: A22
Verwandte Bereiche: A1: Zelle (0, -1)</value>
<comment>!EDIT</comment></data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>Ausgewählte Zellen:</value>
<comment>label</comment>
Expand Down
16 changes: 8 additions & 8 deletions OneMore/Properties/Resources.es-ES.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1210,16 +1210,16 @@ Porcentaje</value>
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>La fórmula ingresada debe aplicarse a la primera celda seleccionada. Esta fórmula se incrementará automáticamente para las celdas seleccionadas adicionales.
<value>La fórmula se aplica a la primera celda seleccionada y se incrementa automáticamente para celdas seleccionadas adicionales.

Funciones: abs, acos, asin, atan, atan2, promedio, techo, cos, cosh, countif, exp, piso, log, log10, max, mediana, min, modo, pow, rango, redondo, signo, sin, sinh, sqrt, stdev, suma, bronceado, tanh, trunc, variación
Funciones: ABS, ACOS, Arccos, Arcsin, Arctan, Asin, Atan, Atan2, promedio, techo, techo, cos, cosh, exp, piso, log, log10, max, mediano, mín, modo, rango, REM, REM, raíz, redonda, signo, pecado, sinh, sqrt, stdev, suma, bronceado, tanh, trunc, truncado y varianza.

Operadores: + - / * ^
Símbolos: PI, E
Referencia de celda: A1, A2, ... ZZZ999
Rango de celdas: A1:A22
Rango relativo en una columna: A1:A-1</value>
<comment></comment></data>
Operadores: + - / * ^ %
Variables: E, Phi, PI, Tao, TableCols, Tablerows
Referencia celular: A1, A2, ... ZZZ999
Rango de células: A1: A22
Rangos relativos: A1: Cell (0, -1)</value>
<comment>!EDIT</comment></data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>Celdas seleccionadas:</value>
<comment>label</comment>
Expand Down
16 changes: 8 additions & 8 deletions OneMore/Properties/Resources.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1210,16 +1210,16 @@ Pourcentage</value>
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>La formule saisie doit s'appliquer à la première cellule sélectionnée. Cette formule sera incrémentée automatiquement pour les cellules supplémentaires sélectionnées.
<value>La formule s'applique à la première cellule sélectionnée et est incrémentée automatiquement pour des cellules sélectionnées supplémentaires.

Fonctions : abs, acos, asin, atan, atan2, moyenne, plafond, cos, cosh, countif, exp, floor, log, log10, max, median, min, mode, pow, range, round, sign, sin, sinh, sqrt, stdev, somme, tan, tanh, trunc, variance
Fonctions: ABS, ACOS, ARCCOS, ARCSIN, ARCTAN, ASIN, ATAN, ATAN2, Moyenne, CEIL, Plafond, Cos, Cosh, Exp, Floor, Log, Log10, Max, Median, Min, Mode, Pow, Remar, REM, racine, ronde, signe, péché, sinh, sqrt, stdev, sum, tan, tanh, trunc, truncate et variance.

Opérateurs : + - / * ^
Symboles : PI, E
Référence cellule : A1, A2, ... ZZZ999
Plage de cellules : A1 : A22
Plage relative dans une colonne : A1:A-1</value>
<comment></comment></data>
Opérateurs: + - / * ^%
Variables: E, Phi, Pi, Tao, Tablecols, Tablerows
Référence cellulaire: A1, A2, ... ZZZ999
Plage cellulaire: A1: A22
Plages relatives: a1: cellule (0, -1)</value>
<comment>!EDIT</comment></data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>Cellules sélectionnées:</value>
<comment>label</comment>
Expand Down
16 changes: 8 additions & 8 deletions OneMore/Properties/Resources.he-IL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1211,16 +1211,16 @@ Total Row Font
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>הנוסחה שהוזנה צריכה לחול על התא שנבחר הראשון. נוסחה זו תוגדל אוטומטית עבור תאים נוספים שנבחרו.
<value>הנוסחה חלה על התא שנבחר הראשון ומוגדלים באופן אוטומטי עבור תאים שנבחרו נוספים.

פונקציות: abs, acos, asin, atan, atan2, ממוצע, תקרה, cos, cosh, countif, exp, floor, log, log10, max, mediaan, min, mode, pow, range, round, round, sign, sin, sinh, sqrt, stdev, sum, tan, tanh, trunc, variance
פונקציות: ABS, ACOs, Arccos, Arcsin, Arctan, Asin, Atan, Atan2, הממוצע, התקרה, התקרה, COS, Cosh, Exp, Floor, Log, Log10, Max, Median, Min, Mode, Pow, REM, REM, שורש, עגול, סימן, חטא, sinh, sqrt, stdev, sum, tan, tanh, trunc, truncate ושונות.

אופרטורים: + - / * ^
סמלים: PI, E
הפניה לתא: A1, A2, ... ZZZ999
טווח תאים: A1:A22
טווח יחסי בעמודה: A1:A-1</value>
<comment></comment></data>
מפעילים: + - / * ^ %
משתנים: E, Phi, Pi, Tao, Tablecols, טבלאות
הפניה לתאים: A1, A2, ... ZZZ999
טווח תאים: A1: A22
טווחים יחסית: A1: תא (0, -1)</value>
<comment>!EDIT</comment></data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>תאים שנבחרו:</value>
<comment>label</comment>
Expand Down
16 changes: 8 additions & 8 deletions OneMore/Properties/Resources.ja-JP.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1213,16 +1213,16 @@ OneNoteファイル (*.one)</value>
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>入力された数式は最初に選択されたセルに適用されます。この数式は追加の選択されたセルに対して自動的に増分されます
<value>フォーミュラは、最初に選択されたセルに適用され、追加の選択されたセルのために自動的に増加します

関数: abs, acos, asin, atan, atan2, average, ceiling, cos, cosh, countif, exp, floor, log, log10, max, median, min, mode, pow, range, round, sign, sin, sinh, sqrt, stdev, sum, tan, tanh, trunc, variance
関数:ABS、ACOS、ARCCOS、ARCSIN、ARCTAN、ASIN、ATAN、ATAN2、平均、天井、COS、COSH、EXP、床、ログ、ログ、最大、中央値、MIN、モード、POW、範囲、REM、 ルート、ラウンド、サイン、罪、sinhsqrtstdevsumtantanhtrunc、truncate、and分散。

演算子: + - / * ^
記号: PI, E
セル参照: A1, A2, ... ZZZ999
セル範囲: A1:A22
列内の相対範囲: A1:A-1</value>
</data>
オペレーター: + - / * ^
変数:E、PHI、PI、TAO、テーブルコール、テーブル
セル参照:A1、A2、... ZZZ999
セル範囲:A1:A22
相対範囲:A1:セル(0、-1)</value>
<comment>!EDIT</comment></data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>選択されたセル:</value>
<comment>label</comment>
Expand Down
14 changes: 7 additions & 7 deletions OneMore/Properties/Resources.nl-NL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1211,16 +1211,16 @@ Percentage</value>
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>De ingevoerde formule moet van toepassing zijn op de eerste geselecteerde cel. Deze formule wordt automatisch verhoogd voor extra geselecteerde cellen.
<value>Formule is van toepassing op de eerste geselecteerde cel en worden automatisch verhoogd voor extra geselecteerde cellen.

Functies: abs, acos, asin, atan, atan2, gemiddeld, plafond, cos, cosh, countif, exp, floor, log, log10, max, mediaan, min, mode, pow, bereik, rond, teken, sin, sinh, sqrt, stdev, som, tan, tanh, trunc, variantie
Functies: ABS, ACOS, Arccos, Arcsin, Arctan, Asin, Atan, Atan2, gemiddeld, plafond, plafond, cos, cosh, exp, vloer, log, log10, max, mediaan, min, mode, pow, bereik, rem, Wortel, rond, teken, zonde, sinh, sqrt, stdev, som, tan, tanh, trunc, afknekking en variantie.

Operatoren: + - / * ^
Symbolen: PI, E
Operators: + - / * ^ %
Variabelen: E, PHI, PI, Tao, Tablecols, Tablerows
Celreferentie: A1, A2, ... ZZZ999
Celbereik: A1:A22
Relatief bereik in een kolom: A1:A-1</value>
<comment></comment></data>
Celbereik: A1: A22
Relatieve bereiken: A1: Cell (0, -1)</value>
<comment>!EDIT</comment></data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>Geselecteerde cellen:</value>
<comment>label</comment>
Expand Down
14 changes: 7 additions & 7 deletions OneMore/Properties/Resources.pl-PL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1211,16 +1211,16 @@ Odsetek</value>
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>Wprowadzona formuła powinna dotyczyć pierwszej zaznaczonej komórki. Ta formuła będzie zwiększana automatycznie dla dodatkowych wybranych komórek.
<value>Wzór dotyczy pierwszej wybranej komórki i są automatycznie zwiększane dla dodatkowych wybranych komórek.

Funkcje: abs, acos, asin, atan, atan2, średnia, sufit, cos, cosh, countif, exp, podłoga, log, log10, max, mediana, min, tryb, pow, zakres, okrągły, znak, grzech, sinh, sqrt, stdev, suma, tan, tanh, trunc, wariancja
Funkcje: ABS, ACOS, ARCCOS, Arcsin, Arctan, Asin, Atan, Atan2, średnia, suil, sufit, cos, cosh, exp, floor, log10, max, mediana, min, tryb, pow, rem, rem, root, okrągły, znak, sin, sinh, sqrt, stdev, sum, tan, tanh, trunc, obcięcie i wariancja.

Operatory: + - / * ^
Symbole: PI, E
Operatorzy: + - / * ^ %
Zmienne: E, Phi, PI, Tao, TableCole, tablerowe
Odniesienie do komórki: A1, A2, ... ZZZ999
Zakres komórek: A1:A22
Względny zakres w kolumnie: A1:A-1</value>
<comment></comment></data>
Zakres komórek: A1: A22
Zakresy względne: A1: komórka (0, -1)</value>
<comment>!EDIT</comment></data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>Wybrane komórki:</value>
<comment>label</comment>
Expand Down
16 changes: 8 additions & 8 deletions OneMore/Properties/Resources.pt-BR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1211,16 +1211,16 @@ Percentagem</value>
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>A fórmula inserida deve ser aplicada à primeira célula selecionada. Esta fórmula será incrementada automaticamente para células adicionais selecionadas.
<value>A fórmula se aplica à primeira célula selecionada e é incrementada automaticamente para células selecionadas adicionais.

Funções: abs, acos, asin, atan, atan2, média, teto, cos, cosh, countif, exp, floor, log, log10, max, mediana, min, mode, pow, range, round, sign, sin, sinh, sqrt, stdev, soma, tan, tanh, trunc, variância
Funções: ABS, ACOS, ArcCos, Arcsin, Arctan, Asin, Atan, Atan2, Média, teto, teto, cosh, exp, piso, log10, max, mediana, min, modo, pow, alcance, rem, Raiz, redonda, sinal, pecado, sinh, sqrt, stdev, soma, tan, Tanh, trunc, truncado e variação.

Operadores: + - / * ^
Símbolos: PI, E
Referência de célula: A1, A2, ... ZZZ999
Intervalo de células: A1:A22
Intervalo relativo em uma coluna: A1:A-1</value>
<comment></comment></data>
Operadores: + - / * ^ %
Variáveis: E, Phi, Pi, Tao, Tabels, Tablerows
Referência de células: A1, A2, ... ZZZ999
Faixa de células: A1: A22
Intervalos relativos: a1: célula (0, -1)</value>
<comment>!EDIT</comment></data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>Células selecionadas:</value>
<comment>label</comment>
Expand Down
12 changes: 6 additions & 6 deletions OneMore/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="AboutDialog.Text" xml:space="preserve">
<value>OneMore Add-in smoker</value>
<comment>dialog title bar</comment>
Expand Down Expand Up @@ -1211,15 +1210,15 @@ Percentage</value>
<comment>label</comment>
</data>
<data name="FormulaDialog_helpBox.Text" xml:space="preserve">
<value>Entered formula should apply to the first selected cell. This formula will be incremented automatically for additional selected cells.
<value>Formula apply to the first selected cell and are incremented automatically for additional selected cells.

Functions: abs, acos, asin, atan, atan2, average, ceiling, cos, cosh, countif, exp, floor, log, log10, max, median, min, mode, pow, range, round, sign, sin, sinh, sqrt, stdev, sum, tan, tanh, trunc, variance
Functions: abs, acos, arccos, arcsin, arctan, asin, atan, atan2, average, ceil, ceiling, cos, cosh, exp, floor, log, log10, max, median, min, mode, pow, range, rem, root, round, sign, sin, sinh, sqrt, stdev, sum, tan, tanh, trunc, truncate, and variance.

Operators: + - / * ^
Symbols: PI, E
Operators: + - / * ^ %
Variables: e, phi, pi, tao, tablecols, tablerows
Cell reference: A1, A2, ... ZZZ999
Cell range: A1:A22
Relative range in a column: A1:A-1</value>
Relative ranges: A1:cell(0,-1)</value>
</data>
<data name="FormulaDialog_selectedLabel.Text" xml:space="preserve">
<value>Selected cells:</value>
Expand Down Expand Up @@ -5335,6 +5334,7 @@ The Find Hashtags dialog will now open.</value>
<value>Word Counts</value>
<comment>page title</comment>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="sponsor_dark" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Commands\Tools\sponsor-dark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand Down
Loading

0 comments on commit e9bd626

Please sign in to comment.