mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
.NET 8 Upgrade Silenced Errors Fix (#30469)
* [Dev][Build] .NET 8 Upgrade Silenced errors first fix. * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1859 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1854. * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1860 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1861 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1862 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1863 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1864 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1865 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA2208 * [Dev][Build] .NET 8 Upgrade Silenced errors. CS9191 * [Dev][Build] .NET 8 Upgrade Silenced errors. Spell check * [Dev][Build] .NET 8 Upgrade Silenced errors. Spell check * [Dev][Build] .NET 8 Upgrade Silenced errors. - CompositeFormat variables used more than once in the same file were assigned to a single variable. - GetProcessesByName logic fix. - String comparion fix. - ArgumentOutOfRangeException message change. * [Dev][Build] .NET 8 Upgrade Silenced errors. - Null check added. - static readonly CompositeFormat added for all fields.
This commit is contained in:
@@ -148,6 +148,8 @@ internal sealed class ImageMethods
|
||||
return resultText.Trim();
|
||||
}
|
||||
|
||||
internal static readonly char[] Separator = new char[] { '\n', '\r' };
|
||||
|
||||
public static async Task<string> ExtractText(Bitmap bmp, Language? preferredLanguage, System.Windows.Point? singlePoint = null)
|
||||
{
|
||||
Language? selectedLanguage = preferredLanguage ?? GetOCRLanguage();
|
||||
@@ -211,7 +213,7 @@ internal sealed class ImageMethods
|
||||
|
||||
if (culture.TextInfo.IsRightToLeft)
|
||||
{
|
||||
string[] textListLines = text.ToString().Split(new char[] { '\n', '\r' });
|
||||
string[] textListLines = text.ToString().Split(Separator);
|
||||
|
||||
_ = text.Clear();
|
||||
foreach (string textLine in textListLines)
|
||||
|
||||
@@ -239,7 +239,7 @@ public class ResultTable
|
||||
return rowAreas;
|
||||
}
|
||||
|
||||
private static void CheckIntersectionsWithWordBorders(int hitGridSpacing, ICollection<WordBorder> wordBorders, ICollection<int> rowAreas, int i, Rect horizontalLineRect)
|
||||
private static void CheckIntersectionsWithWordBorders(int hitGridSpacing, ICollection<WordBorder> wordBorders, List<int> rowAreas, int i, Rect horizontalLineRect)
|
||||
{
|
||||
foreach (WordBorder wb in wordBorders)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PowerOCR.Settings
|
||||
[Export(typeof(IUserSettings))]
|
||||
public class UserSettings : IUserSettings
|
||||
{
|
||||
private readonly ISettingsUtils _settingsUtils;
|
||||
private readonly SettingsUtils _settingsUtils;
|
||||
private const string PowerOcrModuleName = "TextExtractor";
|
||||
private const string DefaultActivationShortcut = "Win + Shift + O";
|
||||
private const int MaxNumberOfRetry = 5;
|
||||
|
||||
Reference in New Issue
Block a user