mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-30 10:17:34 +01:00
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
// <copyright file="ConversionJob_Office.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
|
|
|
|
namespace FileConverter.ConversionJobs
|
|
{
|
|
public abstract class ConversionJob_Office : ConversionJob
|
|
{
|
|
protected ConversionJob_Office() : base()
|
|
{
|
|
}
|
|
|
|
protected ConversionJob_Office(ConversionPreset conversionPreset, string inputFilePath) : base(conversionPreset, inputFilePath)
|
|
{
|
|
}
|
|
|
|
protected override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
if (!Helpers.IsMicrosoftOfficeAvailable())
|
|
{
|
|
this.ConversionFailed(Properties.Resources.ErrorMicrosoftOfficeIsNotAvailable);
|
|
return;
|
|
}
|
|
}
|
|
|
|
protected override void OnConversionFailed()
|
|
{
|
|
base.OnConversionFailed();
|
|
|
|
this.ReleaseOfficeApplicationInstanceIfNeeded();
|
|
}
|
|
|
|
protected abstract void InitializeOfficeApplicationInstanceIfNecessary();
|
|
|
|
protected abstract void ReleaseOfficeApplicationInstanceIfNeeded();
|
|
}
|
|
} |