mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Merge pull request #8518 from ivandrofly/fix-common
Remove spell check functionality from FixCommonErrors
This commit is contained in:
commit
ceac0eee80
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace Nikse.SubtitleEdit.Core.Interfaces
|
namespace Nikse.SubtitleEdit.Core.Interfaces
|
||||||
{
|
{
|
||||||
public interface IFixCallbacks : IDoSpell
|
public interface IFixCallbacks
|
||||||
{
|
{
|
||||||
bool AllowFix(Paragraph p, string action);
|
bool AllowFix(Paragraph p, string action);
|
||||||
void AddFixToListView(Paragraph p, string action, string before, string after);
|
void AddFixToListView(Paragraph p, string action, string before, string after);
|
||||||
|
@ -1899,35 +1899,6 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Hunspell _hunspell;
|
|
||||||
|
|
||||||
public bool DoSpell(string word)
|
|
||||||
{
|
|
||||||
if (_hunspell == null && Language != null)
|
|
||||||
{
|
|
||||||
var fileMatches = Directory.GetFiles(Utilities.DictionaryFolder, Language + "*.dic");
|
|
||||||
if (fileMatches.Length > 0)
|
|
||||||
{
|
|
||||||
var dictionary = fileMatches[0].Substring(0, fileMatches[0].Length - 4);
|
|
||||||
try
|
|
||||||
{
|
|
||||||
_hunspell = Hunspell.GetHunspell(dictionary);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
_hunspell = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_hunspell == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _hunspell.Spell(word);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void toolStripMenuItemSelectAll_Click(object sender, EventArgs e)
|
private void toolStripMenuItemSelectAll_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
listViewFixes.CheckAll();
|
listViewFixes.CheckAll();
|
||||||
|
Loading…
Reference in New Issue
Block a user