Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions Src/xWorks/DictionaryExportService.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Copyright (c) 2016 SIL International
// Copyright (c) 2016-2026 SIL International
// This software is licensed under the LGPL, version 2.1 or later
// (http://www.gnu.org/licenses/lgpl-2.1.html)

using Newtonsoft.Json.Linq;
using SIL.Code;
using SIL.LCModel;
using SIL.LCModel.Utils;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml;
using Newtonsoft.Json.Linq;
using SIL.Code;
using SIL.LCModel;
using SIL.LCModel.Utils;
using XCore;

namespace SIL.FieldWorks.XWorks
Expand Down Expand Up @@ -133,14 +133,10 @@ public void ExportWordReversal(string filePath, string reversalWs, int[] entries
if (progress != null)
progress.Maximum = entriesToSave.Length;

// ReSharper disable once ObjectCreationAsStatement
// (Re)loading the reversal configuration ensures its homograph settings are in the
// cache's HomographConfiguration singleton during export.
// https://github.com/sillsdev/FieldWorks/pull/939
// REVIEW (Hasso) 2026.08: would revConfig.Load(m_cache); suffice?
new DictionaryConfigurationModel(
DictionaryConfigurationListener.GetCurrentConfiguration(m_propertyTable,
"ReversalIndex"), m_cache);
revConfig.Load(m_cache);

string reversalFilePath = filePath.Split(new string[] { ".docx"}, StringSplitOptions.None)[0] + "-reversal-" + reversalWs + ".docx";
LcmWordGenerator.SavePublishedDocx(entriesToSave, revClerk, pubDecorator, int.MaxValue, revConfig, m_propertyTable,
Expand Down
Loading