From 25b803ed3a856f6dcb13f982db1169a383fe4e9e Mon Sep 17 00:00:00 2001 From: mark-sil Date: Thu, 17 Jul 2025 13:29:16 -0400 Subject: [PATCH] Word Export Cleanup Removed some CloneNode() calls that are not needed. Change-Id: I14d06af6ce491f04b71ff43976c909d1fde73af0 --- Src/xWorks/LcmWordGenerator.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Src/xWorks/LcmWordGenerator.cs b/Src/xWorks/LcmWordGenerator.cs index 117e67fe98..8559aa7402 100644 --- a/Src/xWorks/LcmWordGenerator.cs +++ b/Src/xWorks/LcmWordGenerator.cs @@ -265,16 +265,15 @@ public static void SavePublishedDocx(int[] entryHvos, DictionaryPublicationDecor GenerateBulletAndNumberingData(element, numberingPart); } - styleSheet.AppendChild(element.Style.CloneNode(true)); + styleSheet.AppendChild(element.Style); } var characterElements = s_styleCollection.GetUsedCharacterElements(); - characterElements.ForEach(element => styleSheet.AppendChild(element.Style.CloneNode(true))); + characterElements.ForEach(element => styleSheet.AppendChild(element.Style)); // Clear the collection. s_styleCollection.Clear(); - // Clone styles from the stylesheet into the word doc's styles xml - stylePart.Styles = ((Styles)styleSheet.CloneNode(true)); + stylePart.Styles = styleSheet; } // Add the page headers.