mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-23 02:52:10 +01:00
Chore: update dependencies
This commit is contained in:
1 parent
6de1af539f
commit
c067590126
6 files changed
+26
-28
No files matched your search
@@ -8,7 +8,7 @@ namespace FileConverter.ConversionJobs
|
||||
|
||||
using FileConverter.Diagnostics;
|
||||
|
||||
using Excel = Microsoft.Office.Interop.Excel;
|
||||
using Excel = NetOffice.ExcelApi;
|
||||
|
||||
public class ConversionJob_Excel : ConversionJob_Office
|
||||
{
|
||||
@@ -108,7 +108,7 @@ namespace FileConverter.ConversionJobs
|
||||
this.UserState = Properties.Resources.ConversionStateConversion;
|
||||
|
||||
Debug.Log("Convert excel document to pdf.");
|
||||
this.document.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF, this.intermediateFilePath);
|
||||
this.document.ExportAsFixedFormat(Excel.Enums.XlFixedFormatType.xlTypePDF, this.intermediateFilePath);
|
||||
|
||||
Debug.Log($"Close excel document '{this.InputFilePath}'.");
|
||||
this.document.Close(false);
|
||||
|
||||
@@ -7,9 +7,8 @@ namespace FileConverter.ConversionJobs
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using FileConverter.Diagnostics;
|
||||
using Microsoft.Office.Core;
|
||||
|
||||
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
|
||||
using PowerPoint = NetOffice.PowerPointApi;
|
||||
|
||||
public class ConversionJob_PowerPoint : ConversionJob_Office
|
||||
{
|
||||
@@ -97,7 +96,7 @@ namespace FileConverter.ConversionJobs
|
||||
this.UserState = Properties.Resources.ConversionStateConversion;
|
||||
|
||||
Debug.Log("Convert PowerPoint document to pdf.");
|
||||
this.document.ExportAsFixedFormat(this.intermediateFilePath, PowerPoint.PpFixedFormatType.ppFixedFormatTypePDF);
|
||||
this.document.ExportAsFixedFormat(this.intermediateFilePath, PowerPoint.Enums.PpFixedFormatType.ppFixedFormatTypePDF);
|
||||
|
||||
Debug.Log($"Close PowerPoint document '{this.InputFilePath}'.");
|
||||
this.document.Close();
|
||||
@@ -201,7 +200,7 @@ namespace FileConverter.ConversionJobs
|
||||
{
|
||||
Debug.Log($"Load PowerPoint document '{this.InputFilePath}'.");
|
||||
|
||||
this.document = this.application.Presentations.Open(this.InputFilePath, ReadOnly: MsoTriState.msoTrue, WithWindow: MsoTriState.msoFalse);
|
||||
this.document = this.application.Presentations.Open(this.InputFilePath, readOnly: NetOffice.OfficeApi.Enums.MsoTriState.msoTrue, untitled: NetOffice.OfficeApi.Enums.MsoTriState.msoFalse, withWindow: NetOffice.OfficeApi.Enums.MsoTriState.msoFalse);
|
||||
}
|
||||
|
||||
return this.document != null;
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace FileConverter.ConversionJobs
|
||||
|
||||
using FileConverter.Diagnostics;
|
||||
|
||||
using Word = Microsoft.Office.Interop.Word;
|
||||
using Word = NetOffice.WordApi;
|
||||
|
||||
public class ConversionJob_Word : ConversionJob_Office
|
||||
{
|
||||
@@ -42,7 +42,7 @@ namespace FileConverter.ConversionJobs
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pagesCount = this.document.ComputeStatistics(Word.WdStatistic.wdStatisticPages);
|
||||
int pagesCount = this.document.ComputeStatistics(Word.Enums.WdStatistic.wdStatisticPages);
|
||||
|
||||
return pagesCount;
|
||||
}
|
||||
@@ -102,19 +102,19 @@ namespace FileConverter.ConversionJobs
|
||||
Debug.Log("Convert word document to pdf.");
|
||||
// this.document.ExportAsFixedFormat(this.intermediateFilePath, Word.WdExportFormat.wdExportFormatPDF);
|
||||
this.document.ExportAsFixedFormat(this.intermediateFilePath,
|
||||
Word.WdExportFormat.wdExportFormatPDF,
|
||||
Word.Enums.WdExportFormat.wdExportFormatPDF,
|
||||
false,
|
||||
Word.WdExportOptimizeFor.wdExportOptimizeForPrint,
|
||||
Word.WdExportRange.wdExportAllDocument,
|
||||
Word.Enums.WdExportOptimizeFor.wdExportOptimizeForPrint,
|
||||
Word.Enums.WdExportRange.wdExportAllDocument,
|
||||
1, 1,
|
||||
Word.WdExportItem.wdExportDocumentContent,
|
||||
Word.Enums.WdExportItem.wdExportDocumentContent,
|
||||
true,
|
||||
true,
|
||||
Word.WdExportCreateBookmarks.wdExportCreateHeadingBookmarks,
|
||||
Word.Enums.WdExportCreateBookmarks.wdExportCreateHeadingBookmarks,
|
||||
true);
|
||||
|
||||
Debug.Log($"Close word document '{this.InputFilePath}'.");
|
||||
this.document.Close(Word.WdSaveOptions.wdDoNotSaveChanges);
|
||||
this.document.Close(Word.Enums.WdSaveOptions.wdDoNotSaveChanges);
|
||||
this.document = null;
|
||||
|
||||
this.ReleaseOfficeApplicationInstanceIfNeeded();
|
||||
@@ -159,7 +159,7 @@ namespace FileConverter.ConversionJobs
|
||||
|
||||
// Initialize word application.
|
||||
Debug.Log("Instantiate word application via interop.");
|
||||
this.application = new Microsoft.Office.Interop.Word.Application
|
||||
this.application = new Word.Application
|
||||
{
|
||||
Visible = false
|
||||
};
|
||||
|
||||
@@ -393,25 +393,22 @@
|
||||
<Version>8.4.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Magick.NET-Q16-AnyCPU">
|
||||
<Version>14.4.0</Version>
|
||||
<Version>14.10.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection">
|
||||
<Version>9.0.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Office.Interop.Excel">
|
||||
<Version>15.0.4795.1000</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Office.Interop.PowerPoint">
|
||||
<Version>12.0.4518.1014</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Office.Interop.Word">
|
||||
<Version>15.0.4797.1003</Version>
|
||||
<Version>10.0.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf">
|
||||
<Version>1.1.135</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Office">
|
||||
<Version>12.0.0</Version>
|
||||
<PackageReference Include="NetOffice.Excel">
|
||||
<Version>1.7.4.11</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NetOffice.PowerPoint">
|
||||
<Version>1.7.4.11</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NetOffice.Word">
|
||||
<Version>1.7.4.11</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SharpShell">
|
||||
<Version>2.7.2</Version>
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
- Fixes: Various English grammar corrections and improvements (thanks to One-Hoopy-Frood).
|
||||
- Fixes: Traditional Chinese translation issues (thanks to NeKoOuO).
|
||||
- Fixes: Vietnamese translation issues (thanks to thaovd).
|
||||
- Tech: Update ffmpeg to v8.0.1 and ImageMagick to v14.10.
|
||||
- Tech: Remove deprecated dependency (Office). Replace it with NetOffice.
|
||||
|
||||
## Version 2.1
|
||||
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user