From 8bdbe184471a19245fed8af128cc7db55b7a8674 Mon Sep 17 00:00:00 2001 From: Richard Webb Date: Sun, 8 Dec 2024 10:56:03 +0000 Subject: [PATCH] When constructing an OlePropertiesContainer, use the PropertyContext from the PropertySetStream directly instead of cloning it. --- OpenMcdf.Ole/OlePropertiesContainer.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/OpenMcdf.Ole/OlePropertiesContainer.cs b/OpenMcdf.Ole/OlePropertiesContainer.cs index ee1ccb1..c411297 100644 --- a/OpenMcdf.Ole/OlePropertiesContainer.cs +++ b/OpenMcdf.Ole/OlePropertiesContainer.cs @@ -63,11 +63,7 @@ public OlePropertiesContainer(CfbStream cfStream) PropertyNames = (Dictionary?)pStream.PropertySet0!.Properties .FirstOrDefault(p => p.PropertyType == PropertyType.DictionaryProperty)?.Value; - Context = new PropertyContext() - { - CodePage = pStream.PropertySet0.PropertyContext.CodePage, - Locale = pStream.PropertySet0.PropertyContext.Locale - }; + Context = pStream.PropertySet0.PropertyContext; for (int i = 0; i < pStream.PropertySet0.Properties.Count; i++) {