Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.
C# audio-converteravaloniabatch-conversionconvertercsharpdocument-converterdocx-to-pdfdotnetdrag-and-dropfile-conversionfile-converterheic-converterhwphwpximage-converterlinuxmacospdf-convertervideo-converterwindows
LibreOffice for presentations → PDF, and optionally for HWP → PDF
KnifeLemon5c54281e24ab
diff --git a/src/Filee.App/App.axaml.cs b/src/Filee.App/App.axaml.csindex afa0d355..09f84d03 100644--- a/src/Filee.App/App.axaml.cs+++ b/src/Filee.App/App.axaml.cs@@ -146,6 +146,10 @@ public partial class App : Applicationvar ownCopiesChanged = !EngineEnvironment.OwnCopies.OrderBy(p => p.Key).SequenceEqual(settings.EngineOwnCopies.OrderBy(p => p.Key));if (ownCopiesChanged)EngineEnvironment.OwnCopies = new Dictionary<string, string>(settings.EngineOwnCopies);+ var routesChanged = EngineEnvironment.LibreOfficeForSlides != settings.LibreOfficeForSlides+ || EngineEnvironment.LibreOfficeForHwp != settings.LibreOfficeForHwp;+ EngineEnvironment.LibreOfficeForSlides = settings.LibreOfficeForSlides;+ EngineEnvironment.LibreOfficeForHwp = settings.LibreOfficeForHwp;var loc = AppHost.Get<LocalizationService>();if (loc.NeedsUpdate(settings.Language))@@ -154,7 +158,7 @@ public partial class App : ApplicationAppHost.Get<ThemeService>().Apply(settings.Theme, loc.Language);AppHost.Get<TriggerService>().Apply(settings);AppHost.Get<ConverterCatalog>().Priority = settings.EnginePriority;- if (ownCopiesChanged)+ if (ownCopiesChanged || routesChanged){AppHost.Get<ConverterCatalog>().Refresh();AppHost.Get<EngineDownloadService>().RefreshStatus();diff --git a/src/Filee.App/Assets/i18n/en.json b/src/Filee.App/Assets/i18n/en.jsonindex e5e83094..e0ae3a40 100644--- a/src/Filee.App/Assets/i18n/en.json+++ b/src/Filee.App/Assets/i18n/en.json@@ -382,8 +382,14 @@"engines.optional_title": "Optional engines","engines.optional_description": "Large engines are only downloaded when you want them. They are kept when Filee updates and removed when you uninstall it.","engines.all_title": "All engines",+ "engines.lo_title": "When LibreOffice is installed",+ "engines.lo_description": "Besides the formats only it reads, LibreOffice can take over conversions it does more faithfully. Without LibreOffice these switches change nothing.",+ "engines.lo_slides": "Use LibreOffice for presentations → PDF",+ "engines.lo_slides_hint": "PPTX, PPT and ODP keep their slide backgrounds and shape positions as in PowerPoint. Off: the built-in route, which needs no LibreOffice but can lose backgrounds and move shapes.",+ "engines.lo_hwp": "Use LibreOffice for HWP·HWPX → PDF",+ "engines.lo_hwp_hint": "Off by default: rhwp usually lays out HWP more like 한글. Turn it on when a document comes out wrong with rhwp (overlapping text, misplaced tables), then compare.","engines.package.libreoffice.name": "LibreOffice (older and rare formats)",- "engines.package.libreoffice.description": "Only needed for older and less common formats: DOC and PPT, OpenDocument slides, WordPerfect, Works, Apple Pages, Numbers and Keynote, Publisher, CorelDRAW and Visio, and saving as DOC, XLS, PPT, ODT or ODP (includes the H2Orestart filter and Java). Word, Excel, PowerPoint, PDF, HWP and e-books convert without it.",+ "engines.package.libreoffice.description": "Needed for old or uncommon formats: DOC·PPT, OpenDocument presentations, WordPerfect·Works, Apple Pages·Numbers·Keynote, Publisher·CorelDRAW·Visio, and saving as DOC·XLS·PPT·ODT·ODP (includes the H2Orestart filter and Java). It also makes presentations → PDF more faithful. Word·Excel·PowerPoint·PDF·HWP·e-books convert without it.","engines.package.pandoc.name": "Pandoc (Markdown, LaTeX, ODT)","engines.package.pandoc.description": "Markdown and HTML ↔ ODT and RTF, DOCX → Markdown, and reStructuredText and LaTeX ↔ Markdown, HTML, DOCX and ODT. Markdown, HTML and text → PDF, DOCX and HWPX work without it.","engines.package.ghostscript.name": "Ghostscript (EPS and PostScript)",diff --git a/src/Filee.App/Assets/i18n/ko.json b/src/Filee.App/Assets/i18n/ko.jsonindex bc2b25e9..364f8a79 100644--- a/src/Filee.App/Assets/i18n/ko.json+++ b/src/Filee.App/Assets/i18n/ko.json@@ -382,8 +382,14 @@"engines.optional_title": "선택 설치 엔진","engines.optional_description": "용량이 큰 엔진은 원할 때만 내려받아요. Filee를 업데이트해도 남아 있고, Filee를 제거하면 함께 지워져요.","engines.all_title": "전체 엔진",+ "engines.lo_title": "LibreOffice가 설치돼 있을 때",+ "engines.lo_description": "LibreOffice만 읽을 수 있는 형식 외에도, 더 정확하게 변환하는 작업을 맡길 수 있어요. LibreOffice가 없으면 아래 설정은 아무 영향이 없어요.",+ "engines.lo_slides": "발표 자료 → PDF는 LibreOffice로 변환",+ "engines.lo_slides_hint": "PPTX·PPT·ODP의 슬라이드 배경과 도형 위치가 파워포인트와 같게 나와요. 끄면 LibreOffice 없이 되는 내장 방식으로 변환하는데, 배경이 빠지거나 도형 위치가 달라질 수 있어요.",+ "engines.lo_hwp": "한글(HWP·HWPX) → PDF는 LibreOffice로 변환",+ "engines.lo_hwp_hint": "기본은 꺼져 있어요. 보통은 rhwp가 한글과 더 비슷하게 그려요. rhwp로 변환한 문서가 깨질 때(글자 겹침, 표 위치 어긋남) 켜서 비교해 보세요.","engines.package.libreoffice.name": "LibreOffice (오래되었거나 드문 형식)",- "engines.package.libreoffice.description": "오래되었거나 흔하지 않은 형식에만 필요해요: DOC·PPT, 오픈도큐먼트 프레젠테이션, 워드퍼펙트·Works, Apple Pages·Numbers·Keynote, Publisher·CorelDRAW·Visio, 그리고 DOC·XLS·PPT·ODT·ODP로 저장하기(H2Orestart 필터와 Java 포함). 워드·엑셀·파워포인트·PDF·HWP·전자책은 없어도 변환돼요.",+ "engines.package.libreoffice.description": "오래되었거나 흔하지 않은 형식에 필요해요: DOC·PPT, 오픈도큐먼트 프레젠테이션, 워드퍼펙트·Works, Apple Pages·Numbers·Keynote, Publisher·CorelDRAW·Visio, 그리고 DOC·XLS·PPT·ODT·ODP로 저장하기(H2Orestart 필터와 Java 포함). 발표 자료 → PDF도 더 정확해져요. 워드·엑셀·파워포인트·PDF·HWP·전자책은 없어도 변환돼요.","engines.package.pandoc.name": "Pandoc (마크다운·LaTeX·ODT)","engines.package.pandoc.description": "마크다운·HTML ↔ ODT·RTF, DOCX → 마크다운, reStructuredText·LaTeX ↔ 마크다운·HTML·DOCX·ODT 변환을 추가해요. 마크다운·HTML·텍스트 → PDF·DOCX·HWPX는 없어도 돼요.","engines.package.ghostscript.name": "Ghostscript (EPS·PostScript)",diff --git a/src/Filee.App/Assets/i18n/zh-CN.json b/src/Filee.App/Assets/i18n/zh-CN.jsonindex b1b95f41..abc1ada6 100644--- a/src/Filee.App/Assets/i18n/zh-CN.json+++ b/src/Filee.App/Assets/i18n/zh-CN.json@@ -382,8 +382,14 @@"engines.optional_title": "可选引擎","engines.optional_description": "体积较大的引擎仅在需要时下载。更新 Filee 时会保留,卸载时一并删除。","engines.all_title": "全部引擎",+ "engines.lo_title": "安装了 LibreOffice 时",+ "engines.lo_description": "除了只有它能读取的格式,还可以把它转换得更准确的工作交给 LibreOffice。没有安装 LibreOffice 时,下面的设置没有作用。",+ "engines.lo_slides": "演示文稿 → PDF 使用 LibreOffice",+ "engines.lo_slides_hint": "PPTX、PPT、ODP 的幻灯片背景和形状位置与 PowerPoint 一致。关闭后使用内置方式(不需要 LibreOffice),但背景可能丢失、形状位置可能改变。",+ "engines.lo_hwp": "HWP·HWPX → PDF 使用 LibreOffice",+ "engines.lo_hwp_hint": "默认关闭:rhwp 的排版通常更接近韩文 Hangul。某个文档用 rhwp 转换出错(文字重叠、表格错位)时再打开对比。","engines.package.libreoffice.name": "LibreOffice(旧版和少见格式)",- "engines.package.libreoffice.description": "仅用于较旧或不常见的格式:DOC 和 PPT、OpenDocument 演示文稿、WordPerfect、Works、Apple Pages、Numbers 和 Keynote、Publisher、CorelDRAW 和 Visio,以及保存为 DOC、XLS、PPT、ODT 或 ODP(含 H2Orestart 过滤器和 Java)。Word、Excel、PowerPoint、PDF、HWP 和电子书无需它即可转换。",+ "engines.package.libreoffice.description": "旧的或少见的格式需要它:DOC·PPT、OpenDocument 演示文稿、WordPerfect·Works、Apple Pages·Numbers·Keynote、Publisher·CorelDRAW·Visio,以及保存为 DOC·XLS·PPT·ODT·ODP(含 H2Orestart 过滤器和 Java)。也能让演示文稿 → PDF 更准确。Word·Excel·PowerPoint·PDF·HWP·电子书不需要它也能转换。","engines.package.pandoc.name": "Pandoc(Markdown、LaTeX、ODT)","engines.package.pandoc.description": "Markdown 和 HTML ↔ ODT、RTF,DOCX → Markdown,以及 reStructuredText、LaTeX ↔ Markdown、HTML、DOCX、ODT。Markdown、HTML 和文本 → PDF、DOCX、HWPX 无需它。","engines.package.ghostscript.name": "Ghostscript(EPS 与 PostScript)",diff --git a/src/Filee.App/ViewModels/Pages/EnginesPageViewModel.cs b/src/Filee.App/ViewModels/Pages/EnginesPageViewModel.csindex eae6fbda..125d820c 100644--- a/src/Filee.App/ViewModels/Pages/EnginesPageViewModel.cs+++ b/src/Filee.App/ViewModels/Pages/EnginesPageViewModel.cs@@ -52,10 +52,30 @@ public sealed partial class EnginesPageViewModel : ObservableObject, IDisposable_catalog = catalog;_loc = loc;_downloads = downloads;+ _libreOfficeForSlides = store.Settings.LibreOfficeForSlides;+ _libreOfficeForHwp = store.Settings.LibreOfficeForHwp;_catalog.Changed += OnCatalogChanged;Reload();}+ /// <summary>Presentations → PDF through LibreOffice when it is installed (App.ApplySettings re-checks the engines).</summary>+ [ObservableProperty] private bool _libreOfficeForSlides;++ /// <summary>HWP / HWPX → PDF through LibreOffice and H2Orestart instead of rhwp.</summary>+ [ObservableProperty] private bool _libreOfficeForHwp;++ partial void OnLibreOfficeForSlidesChanged(bool value)+ {+ _store.Settings.LibreOfficeForSlides = value;+ _store.SaveSettings();+ }++ partial void OnLibreOfficeForHwpChanged(bool value)+ {+ _store.Settings.LibreOfficeForHwp = value;+ _store.SaveSettings();+ }+/// <summary>Optional engines that are downloaded on demand.</summary>public IReadOnlyList<EnginePackageState> Packages => _downloads.Packages;diff --git a/src/Filee.App/Views/Pages/EnginesPage.axaml b/src/Filee.App/Views/Pages/EnginesPage.axamlindex d17e9d73..703d4481 100644--- a/src/Filee.App/Views/Pages/EnginesPage.axaml+++ b/src/Filee.App/Views/Pages/EnginesPage.axaml@@ -66,6 +66,21 @@</DataTemplate></ItemsControl.ItemTemplate></ItemsControl>+ <!-- What LibreOffice converts when it is installed, besides the formats only it reads -->+ <Border Classes="card">+ <StackPanel Spacing="10">+ <TextBlock Classes="h2" Text="{DynamicResource engines.lo_title}" />+ <TextBlock Classes="caption" TextWrapping="Wrap" Text="{DynamicResource engines.lo_description}" />+ <StackPanel Spacing="2">+ <ToggleSwitch IsChecked="{Binding LibreOfficeForSlides}" OnContent="{DynamicResource engines.lo_slides}" OffContent="{DynamicResource engines.lo_slides}" />+ <TextBlock Classes="caption" TextWrapping="Wrap" Margin="0,0,0,4" Text="{DynamicResource engines.lo_slides_hint}" />+ </StackPanel>+ <StackPanel Spacing="2">+ <ToggleSwitch IsChecked="{Binding LibreOfficeForHwp}" OnContent="{DynamicResource engines.lo_hwp}" OffContent="{DynamicResource engines.lo_hwp}" />+ <TextBlock Classes="caption" TextWrapping="Wrap" Text="{DynamicResource engines.lo_hwp_hint}" />+ </StackPanel>+ </StackPanel>+ </Border><TextBlock Classes="h2" Margin="0,8,0,0" Text="{DynamicResource engines.all_title}" /></StackPanel>diff --git a/src/Filee.Cli/CliHost.cs b/src/Filee.Cli/CliHost.csindex 1d48338e..98406d78 100644--- a/src/Filee.Cli/CliHost.cs+++ b/src/Filee.Cli/CliHost.cs@@ -29,6 +29,8 @@ internal sealed class CliHost : IAsyncDisposablevar store = new UserDataStore(dataDirectory ?? UserDataStore.DefaultDirectory);store.Load();EngineEnvironment.OwnCopies = new Dictionary<string, string>(store.Settings.EngineOwnCopies);+ EngineEnvironment.LibreOfficeForSlides = store.Settings.LibreOfficeForSlides;+ EngineEnvironment.LibreOfficeForHwp = store.Settings.LibreOfficeForHwp;var converters = EngineRegistry.CreateAll(new EngineEnvironment(store.Directory));var catalog = new ConverterCatalog(converters) { Priority = store.Settings.EnginePriority };var queue = new JobQueue(catalog, EngineRegistry.FindPdfMerger(converters), combiner: EngineRegistry.FindFileCombiner(converters),diff --git a/src/Filee.Core/Settings/AppSettings.cs b/src/Filee.Core/Settings/AppSettings.csindex 2ba66371..2b3e699d 100644--- a/src/Filee.Core/Settings/AppSettings.cs+++ b/src/Filee.Core/Settings/AppSettings.cs@@ -111,6 +111,18 @@ public sealed class AppSettings/// </summary>public Dictionary<string, string> EngineOwnCopies { get; set; } = [];+ /// <summary>+ /// With LibreOffice installed, presentations (PPTX, PPT, ODP) → PDF go through it instead of the built-in route+ /// (HWPX writer and rhwp): slide backgrounds and shape positions come out as in PowerPoint.+ /// </summary>+ public bool LibreOfficeForSlides { get; set; } = true;++ /// <summary>+ /// With LibreOffice and H2Orestart installed, HWP / HWPX → PDF go through it instead of rhwp: a way around a+ /// document rhwp lays out wrong (each engine gets different documents right).+ /// </summary>+ public bool LibreOfficeForHwp { get; set; }+/// <summary>Every conversion keeps the created and modified dates of the original, whatever the preset says.</summary>public bool KeepFileDates { get; set; }diff --git a/src/Filee.Engines/Infrastructure/EngineEnvironment.cs b/src/Filee.Engines/Infrastructure/EngineEnvironment.csindex 4a33e4fb..20282298 100644--- a/src/Filee.Engines/Infrastructure/EngineEnvironment.cs+++ b/src/Filee.Engines/Infrastructure/EngineEnvironment.cs@@ -54,6 +54,12 @@ public sealed class EngineEnvironment(string dataDirectory)/// </summary>public static IReadOnlyDictionary<string, string> OwnCopies { get; set; } = new Dictionary<string, string>();+ /// <summary>LibreOffice converts presentations to PDF (Settings → Engines). Re-check the engines after a change.</summary>+ public static bool LibreOfficeForSlides { get; set; } = true;++ /// <summary>LibreOffice converts HWP / HWPX to PDF instead of rhwp (Settings → Engines). Re-check after a change.</summary>+ public static bool LibreOfficeForHwp { get; set; }+/// <summary>Programs required by each engine package on the current operating system.</summary>public static IReadOnlyDictionary<string, string[]> OwnCopyPrograms { get; } = Programs(OperatingSystem.IsWindows());diff --git a/src/Filee.Engines/Office/LibreOfficeConverter.cs b/src/Filee.Engines/Office/LibreOfficeConverter.csindex fc65860c..a1c1d83f 100644--- a/src/Filee.Engines/Office/LibreOfficeConverter.cs+++ b/src/Filee.Engines/Office/LibreOfficeConverter.cs@@ -57,7 +57,7 @@ public sealed class LibreOfficeConverter : IConverter{_env = env;Locate();- Edges = BuildEdges(_hasHwpFilter);+ Edges = BuildEdges(_hasHwpFilter, EngineEnvironment.LibreOfficeForSlides, EngineEnvironment.LibreOfficeForHwp);}public string Id => "libreoffice";@@ -68,7 +68,7 @@ public sealed class LibreOfficeConverter : IConverterpublic EngineStatus GetStatus(){Locate();- Edges = BuildEdges(_hasHwpFilter);+ Edges = BuildEdges(_hasHwpFilter, EngineEnvironment.LibreOfficeForSlides, EngineEnvironment.LibreOfficeForHwp);return _soffice is null? EngineStatus.Unavailable("engine.reason.not_installed"): !EngineEnvironment.UsesFileesCopy("libreoffice")@@ -240,7 +240,10 @@ public sealed class LibreOfficeConverter : IConverterreturn Draw.Contains(from) ? "draw" : "writer";}- private static List<ConversionEdge> BuildEdges(bool hwp)+ /// <param name="hwp">H2Orestart is installed (HWP / HWPX import).</param>+ /// <param name="slides">Presentations → PDF should go through LibreOffice (<see cref="EngineEnvironment.LibreOfficeForSlides"/>).</param>+ /// <param name="hwpToPdf">HWP / HWPX → PDF should go through LibreOffice (<see cref="EngineEnvironment.LibreOfficeForHwp"/>).</param>+ internal static List<ConversionEdge> BuildEdges(bool hwp, bool slides, bool hwpToPdf){var edges = new List<ConversionEdge>();void Add(IEnumerable<string> sources, IEnumerable<string> targets, int cost)@@ -255,9 +258,13 @@ public sealed class LibreOfficeConverter : IConverter// (DOCX / XLSX / PPTX / TXT → PDF through the HWPX writer and rhwp, XLSX ↔ CSV, ...), so it is only used for// what nothing else reads or writes (DOC, XLS, PPT, OpenDocument, DOCX output, ...).const int Fallback = 25;+ // Chosen in Settings → Engines: cheap enough to beat the built-in route even at the bottom of the engine list+ // (its priority adds at most 9; PPTX → HWPX → PDF costs about 32, rhwp's HWP → PDF about 13).+ const int Preferred = 0;Add(Writer, [.. Writer, "pdf", "txt", "html"], Fallback);Add(Calc, [.. Calc, "pdf", "html"], Fallback);- Add(Impress, [.. Impress, "pdf"], Fallback);+ Add(Impress, Impress, Fallback);+ Add(Impress, ["pdf"], slides ? Preferred : Fallback);Add(["txt", "html"], ["docx", "odt", "pdf"], Fallback + 3);// Formats only LibreOffice reads, to PDF and the editable formats of their kind.Add(WriterImport, [.. Writer, "pdf", "txt", "html"], Fallback);@@ -265,7 +272,10 @@ public sealed class LibreOfficeConverter : IConverterAdd(ImpressImport, [.. Impress, "pdf"], Fallback);Add([.. ImpressGraphics, .. Draw], ["pdf", "odg", "svg", "png"], Fallback);if (hwp)- Add(["hwp", "hwpx"], ["pdf", "docx", "odt", "rtf"], Fallback + 6);+ {+ Add(["hwp", "hwpx"], ["docx", "odt", "rtf"], Fallback + 6);+ Add(["hwp", "hwpx"], ["pdf"], hwpToPdf ? Preferred : Fallback + 6);+ }return edges;}diff --git a/tests/Filee.Engines.Tests/LibreOfficeFormatTests.cs b/tests/Filee.Engines.Tests/LibreOfficeFormatTests.csindex fec1e6d2..43ec1c31 100644--- a/tests/Filee.Engines.Tests/LibreOfficeFormatTests.cs+++ b/tests/Filee.Engines.Tests/LibreOfficeFormatTests.cs@@ -57,8 +57,9 @@ public class LibreOfficeFormatTests(EngineFixture fx) : IClassFixture<EngineFixtelse if (edge.To is not ("odt" or "ods" or "odp"))Assert.Contains(':', filter);}- // Built-in engines stay first: LibreOffice's edges cost more than a normal direct conversion.- Assert.All(LibreOffice.Edges, e => Assert.True(e.Cost >= 25));+ // Built-in engines stay first: LibreOffice's edges cost more than a normal direct conversion, except+ // presentations → PDF, which it lays out like PowerPoint (Settings → Engines, on by default).+ Assert.All(LibreOffice.Edges.Where(e => !(impress.Contains(e.From) && e.To == "pdf")), e => Assert.True(e.Cost >= 25));foreach (var from in new[] { "dot", "wps", "wpd", "lwp", "abw", "pages", "sdw", "et", "numbers", "sdc", "key", "dps", "sda", "pub", "cdr", "cgm", "vsd", "odg" })Assert.Contains(LibreOffice.Edges, e => e.From == from && e.To == "pdf");}diff --git a/tests/Filee.Engines.Tests/LibreOfficeRouteTests.cs b/tests/Filee.Engines.Tests/LibreOfficeRouteTests.csnew file mode 100644index 00000000..f41be7c9--- /dev/null+++ b/tests/Filee.Engines.Tests/LibreOfficeRouteTests.cs@@ -0,0 +1,60 @@+// Settings → Engines → "When LibreOffice is installed": presentations → PDF go through LibreOffice by default (slide+// backgrounds and shapes as in PowerPoint), HWP → PDF only when chosen (rhwp usually lays HWP out more like 한글).++using Filee.Core.Conversion;+using Filee.Core.Settings;+using Filee.Engines.Office;++namespace Filee.Engines.Tests;++public class LibreOfficeRouteTests(EngineFixture fx) : IClassFixture<EngineFixture>+{+ /// <summary>The built-in engines with a LibreOffice that is installed (with H2Orestart), whatever this PC has.</summary>+ private RoutePlanner Planner(bool slides, bool hwpToPdf)+ {+ var libreOffice = new InstalledLibreOffice(LibreOfficeConverter.BuildEdges(hwp: true, slides, hwpToPdf));+ var converters = fx.Converters.Where(c => c.Id != "libreoffice").Append(libreOffice).ToList();+ var priority = new AppSettings().EnginePriority;+ return new RoutePlanner(converters, c => Math.Min(priority.IndexOf(c.Id) is >= 0 and var i ? i : priority.Count, 9));+ }++ [Theory]+ [InlineData("pptx")]+ [InlineData("ppt")]+ [InlineData("odp")]+ public void Presentations_go_to_pdf_through_libreoffice_when_it_is_chosen(string from)+ {+ var route = Planner(slides: true, hwpToPdf: false).Plan(from, "pdf");++ Assert.Equal("libreoffice", Assert.Single(route!.Steps).Converter.Id);+ }++ [Fact]+ public void Without_the_choice_pptx_goes_the_built_in_way()+ {+ var route = Planner(slides: false, hwpToPdf: false).Plan("pptx", "pdf");++ Assert.Equal(["hwpx-writer", "rhwp"], route!.Steps.Select(s => s.Converter.Id));+ }++ [Theory]+ [InlineData("hwp")]+ [InlineData("hwpx")]+ public void Hwp_goes_to_pdf_through_rhwp_unless_libreoffice_is_chosen(string from)+ {+ Assert.Equal("rhwp", Assert.Single(Planner(slides: true, hwpToPdf: false).Plan(from, "pdf")!.Steps).Converter.Id);+ Assert.Equal("libreoffice", Assert.Single(Planner(slides: true, hwpToPdf: true).Plan(from, "pdf")!.Steps).Converter.Id);+ }++ private sealed class InstalledLibreOffice(IReadOnlyList<ConversionEdge> edges) : IConverter+ {+ public string Id => "libreoffice";+ public string DisplayName => "LibreOffice";+ public IReadOnlyList<ConversionEdge> Edges => edges;+ public int MaxParallelism => 1;+ public EngineStatus GetStatus() => EngineStatus.Available("test");++ public Task<IReadOnlyList<string>> ConvertAsync(ConversionStep step, IProgress<double>? progress, CancellationToken cancellationToken) =>+ throw new NotSupportedException();+ }+}diff --git a/tests/Filee.Engines.Tests/OfficeTests.cs b/tests/Filee.Engines.Tests/OfficeTests.csindex 5c094457..28b7981b 100644--- a/tests/Filee.Engines.Tests/OfficeTests.cs+++ b/tests/Filee.Engines.Tests/OfficeTests.cs@@ -273,8 +273,13 @@ public class OfficeTests(EngineFixture fx) : IClassFixture<EngineFixture>public void Office_files_convert_without_optional_engines(string from, string to, string engines){Assert.Equal(engines.Split(','), BuiltInPlanner("rhwp").Plan(from, to)!.Steps.Select(s => s.Converter.Id));- // Built-in conversions win even when LibreOffice is installed.- Assert.DoesNotContain(fx.Catalog.CreatePlanner(["libreoffice", "rhwp"]).Plan(from, to)!.Steps, s => s.Converter.Id == "libreoffice");+ // Built-in conversions win even when LibreOffice is installed, except presentations → PDF, which LibreOffice+ // lays out like PowerPoint (Settings → Engines, on by default; see LibreOfficeRouteTests).+ var withLibreOffice = fx.Catalog.CreatePlanner(["libreoffice", "rhwp"]).Plan(from, to)!.Steps;+ if (from == "pptx" && to == "pdf")+ Assert.Equal("libreoffice", Assert.Single(withLibreOffice).Converter.Id);+ else+ Assert.DoesNotContain(withLibreOffice, s => s.Converter.Id == "libreoffice");}[Theory]