diff --git a/ClosedXML/ClosedXML/ClosedXML/Properties/AssemblyInfo.cs b/ClosedXML/ClosedXML/ClosedXML/Properties/AssemblyInfo.cs index 4c8eb42..99f56c4 100644 --- a/ClosedXML/ClosedXML/ClosedXML/Properties/AssemblyInfo.cs +++ b/ClosedXML/ClosedXML/ClosedXML/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.67.1.0")] -[assembly: AssemblyFileVersion("0.67.1.0")] +[assembly: AssemblyVersion("0.67.2.0")] +[assembly: AssemblyFileVersion("0.67.2.0")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ClosedXML_Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a1fb8ba59167fe734d64128ca73d32c45cb8a117246d09c95c8769db88fe332b0a3396bedd0ea48ee42b0e5796fec0798ca5cb628a9a6de80d35d6c67b936ca1670347b3d4f2b769c8ce2ddcf959dbac6bcd88e6c08751ea1fffa0522de3507193e7035305a8aa008d6c88cca1341b3120fa9c347ab3f97e2d772e2709277da5")] \ No newline at end of file diff --git a/ClosedXML/ClosedXML/ClosedXML_Net3.5/Properties/AssemblyInfo.cs b/ClosedXML/ClosedXML/ClosedXML_Net3.5/Properties/AssemblyInfo.cs index 310e5a2..cc20c83 100644 --- a/ClosedXML/ClosedXML/ClosedXML_Net3.5/Properties/AssemblyInfo.cs +++ b/ClosedXML/ClosedXML/ClosedXML_Net3.5/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.67.1.0")] -[assembly: AssemblyFileVersion("0.67.1.0")] +[assembly: AssemblyVersion("0.67.2.0")] +[assembly: AssemblyFileVersion("0.67.2.0")] diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Misc/CopyContentsTest.cs b/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Misc/CopyContentsTest.cs index 91de6ee..407ffb6 100644 --- a/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Misc/CopyContentsTest.cs +++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Misc/CopyContentsTest.cs @@ -76,8 +76,47 @@ ws.Cell("B1").Value = "1"; ws.Cell("A1").AddConditionalFormat().WhenEquals("=B1").Fill.SetBackgroundColor(XLColor.Blue); ws.Cell("A2").Value = ws.Cell("A1"); - Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "B1"))); - Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "B2"))); + Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "B1" && v.Value.IsFormula))); + Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "B2" && v.Value.IsFormula))); + } + + [TestMethod] + public void CopyConditionalFormatsFixedStringNum() + { + var wb = new XLWorkbook(); + var ws = wb.AddWorksheet("Sheet1"); + ws.Cell("A1").Value = "1"; + ws.Cell("B1").Value = "1"; + ws.Cell("A1").AddConditionalFormat().WhenEquals("1").Fill.SetBackgroundColor(XLColor.Blue); + ws.Cell("A2").Value = ws.Cell("A1"); + Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "1" && !v.Value.IsFormula))); + Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "1" && !v.Value.IsFormula))); + } + + [TestMethod] + public void CopyConditionalFormatsFixedString() + { + var wb = new XLWorkbook(); + var ws = wb.AddWorksheet("Sheet1"); + ws.Cell("A1").Value = "A"; + ws.Cell("B1").Value = "B"; + ws.Cell("A1").AddConditionalFormat().WhenEquals("A").Fill.SetBackgroundColor(XLColor.Blue); + ws.Cell("A2").Value = ws.Cell("A1"); + Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "A" && !v.Value.IsFormula))); + Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "A" && !v.Value.IsFormula))); + } + + [TestMethod] + public void CopyConditionalFormatsFixedNum() + { + var wb = new XLWorkbook(); + var ws = wb.AddWorksheet("Sheet1"); + ws.Cell("A1").Value = "1"; + ws.Cell("B1").Value = "1"; + ws.Cell("A1").AddConditionalFormat().WhenEquals(1).Fill.SetBackgroundColor(XLColor.Blue); + ws.Cell("A2").Value = ws.Cell("A1"); + Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "1" && !v.Value.IsFormula))); + Assert.IsTrue(ws.ConditionalFormats.Any(cf => cf.Values.Any(v => v.Value.Value == "1" && !v.Value.IsFormula))); } } }