Skip to content

Commit a2f5879

Browse files
authored
Word Export Cleanup (#403)
Removed some CloneNode() calls that are not needed.
1 parent 5e17da7 commit a2f5879

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Src/xWorks/LcmWordGenerator.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,15 @@ public static void SavePublishedDocx(int[] entryHvos, DictionaryPublicationDecor
265265

266266
GenerateBulletAndNumberingData(element, numberingPart);
267267
}
268-
styleSheet.AppendChild(element.Style.CloneNode(true));
268+
styleSheet.AppendChild(element.Style);
269269
}
270270
var characterElements = s_styleCollection.GetUsedCharacterElements();
271-
characterElements.ForEach(element => styleSheet.AppendChild(element.Style.CloneNode(true)));
271+
characterElements.ForEach(element => styleSheet.AppendChild(element.Style));
272272

273273
// Clear the collection.
274274
s_styleCollection.Clear();
275275

276-
// Clone styles from the stylesheet into the word doc's styles xml
277-
stylePart.Styles = ((Styles)styleSheet.CloneNode(true));
276+
stylePart.Styles = styleSheet;
278277
}
279278

280279
// Add the page headers.

0 commit comments

Comments
 (0)